From a57531b866da7d1be996c46019b17b4ef617f9d9 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Thu, 7 May 2020 17:09:55 -0700 Subject: [PATCH 001/154] chore: add initial files for launch --- .../google-cloud-osconfig/CODE_OF_CONDUCT.md | 43 ++++ .../google-cloud-osconfig/CONTRIBUTING.md | 65 ++++++ packages/google-cloud-osconfig/LICENSE | 202 ++++++++++++++++++ packages/google-cloud-osconfig/README.md | 121 +++++++++++ packages/google-cloud-osconfig/synth.py | 50 +++++ 5 files changed, 481 insertions(+) create mode 100644 packages/google-cloud-osconfig/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-osconfig/CONTRIBUTING.md create mode 100644 packages/google-cloud-osconfig/LICENSE create mode 100644 packages/google-cloud-osconfig/README.md create mode 100644 packages/google-cloud-osconfig/synth.py diff --git a/packages/google-cloud-osconfig/CODE_OF_CONDUCT.md b/packages/google-cloud-osconfig/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..46b2a08ea6d --- /dev/null +++ b/packages/google-cloud-osconfig/CODE_OF_CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/packages/google-cloud-osconfig/CONTRIBUTING.md b/packages/google-cloud-osconfig/CONTRIBUTING.md new file mode 100644 index 00000000000..f6c4cf010e3 --- /dev/null +++ b/packages/google-cloud-osconfig/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + gcloud auth application-default login + npm run samples-test + + # Run all system tests. + gcloud auth application-default login + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup diff --git a/packages/google-cloud-osconfig/LICENSE b/packages/google-cloud-osconfig/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-osconfig/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md new file mode 100644 index 00000000000..3e6b003b87d --- /dev/null +++ b/packages/google-cloud-osconfig/README.md @@ -0,0 +1,121 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [OS Config API: Node.js Client](https://github.com/googleapis/nodejs-os-config) + +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/os-config.svg)](https://www.npmjs.org/package/@google-cloud/os-config) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-os-config/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-os-config) + + + + +Osconfig client for Node.js + + +* [OS Config API Node.js Client API Reference][client-docs] +* [OS Config API Documentation][product-docs] +* [github.com/googleapis/nodejs-os-config](https://github.com/googleapis/nodejs-os-config) + +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 the OS Config API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/os-config +``` + + + + + +The [OS Config API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targetting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-os-config/blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-os-config/blob/master/LICENSE) + +[client-docs]: https://googleapis.dev/nodejs/osconfig/latest/index.html +[product-docs]: https://cloud.google.com/compute/docs/os-patch-management +[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=osconfig.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-osconfig/synth.py b/packages/google-cloud-osconfig/synth.py new file mode 100644 index 00000000000..8d5c97efcbc --- /dev/null +++ b/packages/google-cloud-osconfig/synth.py @@ -0,0 +1,50 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import subprocess +import logging + +logging.basicConfig(level=logging.DEBUG) + +# run the gapic generator +gapic = gcp.GAPICMicrogenerator() +versions = ['v1'] +name = 'osconfig' +for version in versions: + library = gapic.typescript_library( + name, + generator_args={ + "grpc-service-config": f"google/cloud/{name}/{version}/{name}_grpc_service_config.json", + "package-name": "@google-cloud/os-config", + "main-service": "OsConOsConOsConOsConOsConOsConOsConOsConOsConfigServiceClient" + }, + extra_proto_files=['google/cloud/common_resources.proto'], + proto_path=f'/google/cloud/{name}/{version}', + version=version) +s.copy(library, excludes=['README.md']) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library( + source_location='build/src', versions=['v1'], default_version='v1') +s.copy(templates, excludes=[]) + +# Node.js specific cleanup +subprocess.run(['npm', 'install']) +subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npx', 'compileProtos', 'src']) + From abb3cbfcb5f80d328a92693f9f9a852fa5106252 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 11 May 2020 17:50:39 -0700 Subject: [PATCH 002/154] feat!: initial generation of library (#1) --- packages/google-cloud-osconfig/.eslintignore | 6 + packages/google-cloud-osconfig/.eslintrc.json | 3 + packages/google-cloud-osconfig/.gitignore | 14 + packages/google-cloud-osconfig/.jsdoc.js | 55 + packages/google-cloud-osconfig/.mocharc.js | 28 + packages/google-cloud-osconfig/.nycrc | 24 + .../google-cloud-osconfig/.prettierignore | 6 + packages/google-cloud-osconfig/.prettierrc.js | 17 + .../google-cloud-osconfig/.repo-metadata.json | 13 + packages/google-cloud-osconfig/README.md | 36 +- .../linkinator.config.json | 12 + packages/google-cloud-osconfig/package.json | 53 + .../google/cloud/common_resources.proto | 52 + .../cloud/osconfig/v1/osconfig_service.proto | 119 + .../cloud/osconfig/v1/patch_deployments.proto | 251 + .../google/cloud/osconfig/v1/patch_jobs.proto | 685 + .../google-cloud-osconfig/protos/protos.d.ts | 8241 ++++++ .../google-cloud-osconfig/protos/protos.js | 21791 ++++++++++++++++ .../google-cloud-osconfig/protos/protos.json | 2268 ++ .../google-cloud-osconfig/samples/README.md | 50 + .../samples/package.json | 23 + .../samples/quickstart.js | 46 + packages/google-cloud-osconfig/src/index.ts | 26 + .../google-cloud-osconfig/src/v1/index.ts | 19 + .../src/v1/os_config_service_client.ts | 1581 ++ .../v1/os_config_service_client_config.json | 83 + .../src/v1/os_config_service_proto_list.json | 5 + packages/google-cloud-osconfig/synth.metadata | 30 + packages/google-cloud-osconfig/synth.py | 9 +- .../system-test/fixtures/sample/src/index.js | 26 + .../system-test/fixtures/sample/src/index.ts | 25 + .../system-test/install.ts | 51 + .../test/gapic_os_config_service_v1.ts | 1920 ++ packages/google-cloud-osconfig/tsconfig.json | 19 + .../google-cloud-osconfig/webpack.config.js | 65 + 35 files changed, 37644 insertions(+), 8 deletions(-) create mode 100644 packages/google-cloud-osconfig/.eslintignore create mode 100644 packages/google-cloud-osconfig/.eslintrc.json create mode 100644 packages/google-cloud-osconfig/.gitignore create mode 100644 packages/google-cloud-osconfig/.jsdoc.js create mode 100644 packages/google-cloud-osconfig/.mocharc.js create mode 100644 packages/google-cloud-osconfig/.nycrc create mode 100644 packages/google-cloud-osconfig/.prettierignore create mode 100644 packages/google-cloud-osconfig/.prettierrc.js create mode 100644 packages/google-cloud-osconfig/.repo-metadata.json create mode 100644 packages/google-cloud-osconfig/linkinator.config.json create mode 100644 packages/google-cloud-osconfig/package.json create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/common_resources.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto create mode 100644 packages/google-cloud-osconfig/protos/protos.d.ts create mode 100644 packages/google-cloud-osconfig/protos/protos.js create mode 100644 packages/google-cloud-osconfig/protos/protos.json create mode 100644 packages/google-cloud-osconfig/samples/README.md create mode 100644 packages/google-cloud-osconfig/samples/package.json create mode 100644 packages/google-cloud-osconfig/samples/quickstart.js create mode 100644 packages/google-cloud-osconfig/src/index.ts create mode 100644 packages/google-cloud-osconfig/src/v1/index.ts create mode 100644 packages/google-cloud-osconfig/src/v1/os_config_service_client.ts create mode 100644 packages/google-cloud-osconfig/src/v1/os_config_service_client_config.json create mode 100644 packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json create mode 100644 packages/google-cloud-osconfig/synth.metadata create mode 100644 packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-osconfig/system-test/install.ts create mode 100644 packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts create mode 100644 packages/google-cloud-osconfig/tsconfig.json create mode 100644 packages/google-cloud-osconfig/webpack.config.js diff --git a/packages/google-cloud-osconfig/.eslintignore b/packages/google-cloud-osconfig/.eslintignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-osconfig/.eslintignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-osconfig/.eslintrc.json b/packages/google-cloud-osconfig/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-osconfig/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-osconfig/.gitignore b/packages/google-cloud-osconfig/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-osconfig/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +.coverage +coverage +.nyc_output +docs/ +out/ +build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-osconfig/.jsdoc.js b/packages/google-cloud-osconfig/.jsdoc.js new file mode 100644 index 00000000000..2bef80dff21 --- /dev/null +++ b/packages/google-cloud-osconfig/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2020 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/os-config', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-osconfig/.mocharc.js b/packages/google-cloud-osconfig/.mocharc.js new file mode 100644 index 00000000000..ff7b34fa5d1 --- /dev/null +++ b/packages/google-cloud-osconfig/.mocharc.js @@ -0,0 +1,28 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-osconfig/.nycrc b/packages/google-cloud-osconfig/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-osconfig/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-osconfig/.prettierignore b/packages/google-cloud-osconfig/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-osconfig/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-osconfig/.prettierrc.js b/packages/google-cloud-osconfig/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-osconfig/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-osconfig/.repo-metadata.json b/packages/google-cloud-osconfig/.repo-metadata.json new file mode 100644 index 00000000000..7d706deebc7 --- /dev/null +++ b/packages/google-cloud-osconfig/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "name": "osconfig", + "name_pretty": "OS Config API", + "product_documentation": "https://cloud.google.com/compute/docs/os-patch-management", + "api_description": "provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", + "client_documentation": "https://googleapis.dev/nodejs/osconfig/latest/index.html", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-os-config", + "repo_short": "nodejs-os-config", + "distribution_name": "@google-cloud/os-config", + "api_id": "osconfig.googleapis.com" +} diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index 3e6b003b87d..f2566d49503 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -29,8 +29,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - - + * [Using the client library](#using-the-client-library) +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -51,6 +51,38 @@ npm install @google-cloud/os-config ``` +### Using the client library + +```javascript +// Imports the Google Cloud client library +const {OsConfigServiceClient} = require('@google-cloud/os-config'); + +// Creates a client +const client = new OsConfigServiceClient(); + +// project = 'my-project' // Project to list deployments for. + +async function listPatchDeployments() { + const [deployments] = await client.listPatchDeployments({ + parent: `projects/${project}`, + }); + console.info(`found ${deployments.length} deployments:`); + console.info(deployments); +} +const listPatchDeploymentsResponse = listPatchDeployments(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-os-config/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-os-config/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-os-config&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-osconfig/linkinator.config.json b/packages/google-cloud-osconfig/linkinator.config.json new file mode 100644 index 00000000000..de4c600f026 --- /dev/null +++ b/packages/google-cloud-osconfig/linkinator.config.json @@ -0,0 +1,12 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "github.com/googleapis/nodejs-os-config.*", + "googleapis.dev/nodejs/osconfig/latest/index.html" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json new file mode 100644 index 00000000000..e2219a28d2d --- /dev/null +++ b/packages/google-cloud-osconfig/package.json @@ -0,0 +1,53 @@ +{ + "name": "@google-cloud/os-config", + "version": "0.1.0", + "description": "Osconfig client for Node.js", + "repository": "googleapis/nodejs-os-config", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prelint": "cd samples; npm link ../; npm install", + "prepare": "npm run compile-protos && npm run compile", + "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^2.3.1" + }, + "devDependencies": { + "@types/mocha": "^5.2.7", + "@types/node": "^12.12.37", + "@types/sinon": "^9.0.0", + "c8": "^7.1.2", + "gts": "^2.0.0", + "jsdoc": "^3.6.4", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.4", + "linkinator": "^2.1.0", + "mocha": "^7.1.2", + "null-loader": "^4.0.0", + "pack-n-play": "^1.0.0-2", + "sinon": "^9.0.2", + "ts-loader": "^7.0.2", + "typescript": "~3.8.3", + "webpack": "^4.43.0", + "webpack-cli": "^3.3.11" + }, + "engines": { + "node": ">=10.0.0" + } +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/common_resources.proto b/packages/google-cloud-osconfig/protos/google/cloud/common_resources.proto new file mode 100644 index 00000000000..56c9f800d5e --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/common_resources.proto @@ -0,0 +1,52 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file contains stub messages for common resources in GCP. +// It is not intended to be directly generated, and is instead used by +// other tooling to be able to match common resource patterns. +syntax = "proto3"; + +package google.cloud; + +import "google/api/resource.proto"; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Project" + pattern: "projects/{project}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Organization" + pattern: "organizations/{organization}" +}; + + +option (google.api.resource_definition) = { + type: "cloudresourcemanager.googleapis.com/Folder" + pattern: "folders/{folder}" +}; + + +option (google.api.resource_definition) = { + type: "cloudbilling.googleapis.com/BillingAccount" + pattern: "billingAccounts/{billing_account}" +}; + +option (google.api.resource_definition) = { + type: "locations.googleapis.com/Location" + pattern: "projects/{project}/locations/{location}" +}; + diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto new file mode 100644 index 00000000000..2a654eaa2a4 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto @@ -0,0 +1,119 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1/patch_deployments.proto"; +import "google/cloud/osconfig/v1/patch_jobs.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "OsConfigProto"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Instance" + pattern: "projects/{project}/zones/{zone}/instances/{instance}" +}; + +// OS Config API +// +// The OS Config service is a server-side component that you can use to +// manage package installations and patch jobs for virtual machine instances. +service OsConfigService { + option (google.api.default_host) = "osconfig.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Patch VM instances by creating and running a patch job. + rpc ExecutePatchJob(ExecutePatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/patchJobs:execute" + body: "*" + }; + } + + // Get the patch job. This can be used to track the progress of an + // ongoing patch job or review the details of completed jobs. + rpc GetPatchJob(GetPatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/patchJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Cancel a patch job. The patch job must be active. Canceled patch jobs + // cannot be restarted. + rpc CancelPatchJob(CancelPatchJobRequest) returns (PatchJob) { + option (google.api.http) = { + post: "/v1/{name=projects/*/patchJobs/*}:cancel" + body: "*" + }; + } + + // Get a list of patch jobs. + rpc ListPatchJobs(ListPatchJobsRequest) returns (ListPatchJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/patchJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a list of instance details for a given patch job. + rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) returns (ListPatchJobInstanceDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/patchJobs/*}/instanceDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Create an OS Config patch deployment. + rpc CreatePatchDeployment(CreatePatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/patchDeployments" + body: "patch_deployment" + }; + option (google.api.method_signature) = "parent,patch_deployment,patch_deployment_id"; + } + + // Get an OS Config patch deployment. + rpc GetPatchDeployment(GetPatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/patchDeployments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get a page of OS Config patch deployments. + rpc ListPatchDeployments(ListPatchDeploymentsRequest) returns (ListPatchDeploymentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/patchDeployments" + }; + option (google.api.method_signature) = "parent"; + } + + // Delete an OS Config patch deployment. + rpc DeletePatchDeployment(DeletePatchDeploymentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/patchDeployments/*}" + }; + option (google.api.method_signature) = "name"; + } +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto new file mode 100644 index 00000000000..7d699222209 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto @@ -0,0 +1,251 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1/patch_jobs.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/datetime.proto"; +import "google/type/dayofweek.proto"; +import "google/type/timeofday.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "PatchDeployments"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// Patch deployments are configurations that individual patch jobs use to +// complete a patch. These configurations include instance filter, package +// repository settings, and a schedule. For more information about creating and +// managing patch deployments, see [Scheduling patch +// jobs](https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs). +message PatchDeployment { + option (google.api.resource) = { + type: "osconfig.googleapis.com/PatchDeployment" + pattern: "projects/{project}/patchDeployments/{patch_deployment}" + }; + + // Unique name for the patch deployment resource in a project. The patch + // deployment name is in the form: + // `projects/{project_id}/patchDeployments/{patch_deployment_id}`. + // This field is ignored when you create a new patch deployment. + string name = 1; + + // Optional. Description of the patch deployment. Length of the description is limited + // to 1024 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. VM instances to patch. + PatchInstanceFilter instance_filter = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Patch configuration that is applied. + PatchConfig patch_config = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Duration of the patch. After the duration ends, the patch times out. + google.protobuf.Duration duration = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Schedule for the patch. + oneof schedule { + // Required. Schedule a one-time execution. + OneTimeSchedule one_time_schedule = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Schedule recurring executions. + RecurringSchedule recurring_schedule = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. Time the patch deployment was created. Timestamp is in + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the patch deployment was last updated. Timestamp is in + // [RFC3339]("https://www.ietf.org/rfc/rfc3339.txt) text format. + google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last time a patch job was started by this deployment. + // Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text + // format. + google.protobuf.Timestamp last_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Sets the time for a one time patch deployment. Timestamp is in +// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. +message OneTimeSchedule { + // Required. The desired patch job execution time. + google.protobuf.Timestamp execute_time = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Sets the time for recurring patch deployments. +message RecurringSchedule { + // Specifies the frequency of the recurring patch deployments. + enum Frequency { + // Invalid. A frequency must be specified. + FREQUENCY_UNSPECIFIED = 0; + + // Indicates that the frequency should be expressed in terms of + // weeks. + WEEKLY = 1; + + // Indicates that the frequency should be expressed in terms of + // months. + MONTHLY = 2; + } + + // Required. Defines the time zone that `time_of_day` is relative to. + // The rules for daylight saving time are determined by the chosen time zone. + google.type.TimeZone time_zone = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The time that the recurring schedule becomes effective. + // Defaults to `create_time` of the patch deployment. + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The end time at which a recurring patch deployment schedule is no longer + // active. + google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Time of the day to run a recurring deployment. + google.type.TimeOfDay time_of_day = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The frequency unit of this recurring schedule. + Frequency frequency = 5 [(google.api.field_behavior) = REQUIRED]; + + // Configurations for this recurring schedule. + // Configurations must match frequency. + oneof schedule_config { + // Required. Schedule with weekly executions. + WeeklySchedule weekly = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Schedule with monthly executions. + MonthlySchedule monthly = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. The time the last patch job ran successfully. + google.protobuf.Timestamp last_execute_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the next patch job is scheduled to run. + google.protobuf.Timestamp next_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a weekly schedule. +message WeeklySchedule { + // Required. Day of the week. + google.type.DayOfWeek day_of_week = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents a monthly schedule. An example of a valid monthly schedule is +// "on the third Tuesday of the month" or "on the 15th of the month". +message MonthlySchedule { + // One day in a month. + oneof day_of_month { + // Required. Week day in a month. + WeekDayOfMonth week_day_of_month = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1 + // indicates the last day of the month. + // Months without the target day will be skipped. For example, a schedule to + // run "every month on the 31st" will not run in February, April, June, etc. + int32 month_day = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + +// Represents one week day in a month. An example is "the 4th Sunday". +message WeekDayOfMonth { + // Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1 + // indicates the last week of the month. + int32 week_ordinal = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A day of the week. + google.type.DayOfWeek day_of_week = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for creating a patch deployment. +message CreatePatchDeploymentRequest { + // Required. The project to apply this patch deployment to in the form `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. A name for the patch deployment in the project. When creating a name + // the following rules apply: + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the project. + string patch_deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The patch deployment to create. + PatchDeployment patch_deployment = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for retrieving a patch deployment. +message GetPatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} + +// A request message for listing patch deployments. +message ListPatchDeploymentsRequest { + // Required. The resource name of the parent in the form `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. The maximum number of patch deployments to return. Default is 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to ListPatchDeployments + // that indicates where this listing should continue from. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response message for listing patch deployments. +message ListPatchDeploymentsResponse { + // The list of patch deployments. + repeated PatchDeployment patch_deployments = 1; + + // A pagination token that can be used to get the next page of patch + // deployments. + string next_page_token = 2; +} + +// A request message for deleting a patch deployment. +message DeletePatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto new file mode 100644 index 00000000000..cd274d646f9 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto @@ -0,0 +1,685 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "PatchJobs"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// A request message to initiate patching across Compute Engine +// instances. +message ExecutePatchJobRequest { + // Required. The project in which to run this patch in the form `projects/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Description of the patch job. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Required. Instances to patch, either explicitly or filtered by some criteria such + // as zone or labels. + PatchInstanceFilter instance_filter = 7 [(google.api.field_behavior) = REQUIRED]; + + // Patch configuration being applied. If omitted, instances are + // patched using the default configurations. + PatchConfig patch_config = 4; + + // Duration of the patch job. After the duration ends, the patch job + // times out. + google.protobuf.Duration duration = 5; + + // If this patch is a dry-run only, instances are contacted but + // will do nothing. + bool dry_run = 6; + + // Display name for this patch job. This does not have to be unique. + string display_name = 8; +} + +// Request to get an active or completed patch job. +message GetPatchJobRequest { + // Required. Name of the patch in the form `projects/*/patchJobs/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchJob" + } + ]; +} + +// Request to list details for all instances that are part of a patch job. +message ListPatchJobInstanceDetailsRequest { + // Required. The parent for the instances are in the form of `projects/*/patchJobs/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchJob" + } + ]; + + // The maximum number of instance details records to return. Default is 100. + int32 page_size = 2; + + // A pagination token returned from a previous call + // that indicates where this listing should continue from. + string page_token = 3; + + // A filter expression that filters results listed in the response. This + // field supports filtering results by instance zone, name, state, or + // `failure_reason`. + string filter = 4; +} + +// A response message for listing the instances details for a patch job. +message ListPatchJobInstanceDetailsResponse { + // A list of instance status. + repeated PatchJobInstanceDetails patch_job_instance_details = 1; + + // A pagination token that can be used to get the next page of results. + string next_page_token = 2; +} + +// Patch details for a VM instance. For more information about reviewing VM +// instance details, see +// [Listing all VM instance details for a specific patch +// job](https://cloud.google.com/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). +message PatchJobInstanceDetails { + // The instance name in the form `projects/*/zones/*/instances/*` + string name = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + }]; + + // The unique identifier for the instance. This identifier is + // defined by the server. + string instance_system_id = 2; + + // Current state of instance patch. + Instance.PatchState state = 3; + + // If the patch fails, this field provides the reason. + string failure_reason = 4; + + // The number of times the agent that the agent attempts to apply the patch. + int64 attempt_count = 5; +} + +// A request message for listing patch jobs. +message ListPatchJobsRequest { + // Required. In the form of `projects/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // The maximum number of instance status to return. + int32 page_size = 2; + + // A pagination token returned from a previous call + // that indicates where this listing should continue from. + string page_token = 3; + + // If provided, this field specifies the criteria that must be met by patch + // jobs to be included in the response. + // Currently, filtering is only available on the patch_deployment field. + string filter = 4; +} + +// A response message for listing patch jobs. +message ListPatchJobsResponse { + // The list of patch jobs. + repeated PatchJob patch_jobs = 1; + + // A pagination token that can be used to get the next page of results. + string next_page_token = 2; +} + +// A high level representation of a patch job that is either in progress +// or has completed. +// +// Instances details are not included in the job. To paginate through instance +// details, use ListPatchJobInstanceDetails. +// +// For more information about patch jobs, see +// [Creating patch +// jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). +message PatchJob { + option (google.api.resource) = { + type: "osconfig.googleapis.com/PatchJob" + pattern: "projects/{project}/patchJobs/{patch_job}" + }; + + // A summary of the current patch state across all instances that this patch + // job affects. Contains counts of instances in different states. These states + // map to `InstancePatchState`. List patch job instance details to see the + // specific states of each instance. + message InstanceDetailsSummary { + // Number of instances pending patch job. + int64 pending_instance_count = 1; + + // Number of instances that are inactive. + int64 inactive_instance_count = 2; + + // Number of instances notified about patch job. + int64 notified_instance_count = 3; + + // Number of instances that have started. + int64 started_instance_count = 4; + + // Number of instances that are downloading patches. + int64 downloading_patches_instance_count = 5; + + // Number of instances that are applying patches. + int64 applying_patches_instance_count = 6; + + // Number of instances rebooting. + int64 rebooting_instance_count = 7; + + // Number of instances that have completed successfully. + int64 succeeded_instance_count = 8; + + // Number of instances that require reboot. + int64 succeeded_reboot_required_instance_count = 9; + + // Number of instances that failed. + int64 failed_instance_count = 10; + + // Number of instances that have acked and will start shortly. + int64 acked_instance_count = 11; + + // Number of instances that exceeded the time out while applying the patch. + int64 timed_out_instance_count = 12; + + // Number of instances that are running the pre-patch step. + int64 pre_patch_step_instance_count = 13; + + // Number of instances that are running the post-patch step. + int64 post_patch_step_instance_count = 14; + + // Number of instances that do not appear to be running the agent. Check to + // ensure that the agent is installed, running, and able to communicate with + // the service. + int64 no_agent_detected_instance_count = 15; + } + + // Enumeration of the various states a patch job passes through as it + // executes. + enum State { + // State must be specified. + STATE_UNSPECIFIED = 0; + + // The patch job was successfully initiated. + STARTED = 1; + + // The patch job is looking up instances to run the patch on. + INSTANCE_LOOKUP = 2; + + // Instances are being patched. + PATCHING = 3; + + // Patch job completed successfully. + SUCCEEDED = 4; + + // Patch job completed but there were errors. + COMPLETED_WITH_ERRORS = 5; + + // The patch job was canceled. + CANCELED = 6; + + // The patch job timed out. + TIMED_OUT = 7; + } + + // Unique identifier for this patch job in the form + // `projects/*/patchJobs/*` + string name = 1; + + // Display name for this patch job. This is not a unique identifier. + string display_name = 14; + + // Description of the patch job. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Time this patch job was created. + google.protobuf.Timestamp create_time = 3; + + // Last time this patch job was updated. + google.protobuf.Timestamp update_time = 4; + + // The current state of the PatchJob . + State state = 5; + + // Instances to patch. + PatchInstanceFilter instance_filter = 13; + + // Patch configuration being applied. + PatchConfig patch_config = 7; + + // Duration of the patch job. After the duration ends, the + // patch job times out. + google.protobuf.Duration duration = 8; + + // Summary of instance details. + InstanceDetailsSummary instance_details_summary = 9; + + // If this patch job is a dry run, the agent reports that it has + // finished without running any updates on the VM instance. + bool dry_run = 10; + + // If this patch job failed, this message provides information about the + // failure. + string error_message = 11; + + // Reflects the overall progress of the patch job in the range of + // 0.0 being no progress to 100.0 being complete. + double percent_complete = 12; + + // Output only. Name of the patch deployment that created this patch job. + string patch_deployment = 15 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} + +// Patch configuration specifications. Contains details on how to apply the +// patch(es) to a VM instance. +message PatchConfig { + // Post-patch reboot settings. + enum RebootConfig { + // The default behavior is DEFAULT. + REBOOT_CONFIG_UNSPECIFIED = 0; + + // The agent decides if a reboot is necessary by checking signals such as + // registry keys on Windows or `/var/run/reboot-required` on APT based + // systems. On RPM based systems, a set of core system package install times + // are compared with system boot time. + DEFAULT = 1; + + // Always reboot the machine after the update completes. + ALWAYS = 2; + + // Never reboot the machine after the update completes. + NEVER = 3; + } + + // Post-patch reboot settings. + RebootConfig reboot_config = 1; + + // Apt update settings. Use this setting to override the default `apt` patch + // rules. + AptSettings apt = 3; + + // Yum update settings. Use this setting to override the default `yum` patch + // rules. + YumSettings yum = 4; + + // Goo update settings. Use this setting to override the default `goo` patch + // rules. + GooSettings goo = 5; + + // Zypper update settings. Use this setting to override the default `zypper` + // patch rules. + ZypperSettings zypper = 6; + + // Windows update settings. Use this override the default windows patch rules. + WindowsUpdateSettings windows_update = 7; + + // The `ExecStep` to run before the patch update. + ExecStep pre_step = 8; + + // The `ExecStep` to run after the patch update. + ExecStep post_step = 9; +} + +// Namespace for instance state enums. +message Instance { + // Patch state of an instance. + enum PatchState { + // Unspecified. + PATCH_STATE_UNSPECIFIED = 0; + + // The instance is not yet notified. + PENDING = 1; + + // Instance is inactive and cannot be patched. + INACTIVE = 2; + + // The instance is notified that it should be patched. + NOTIFIED = 3; + + // The instance has started the patching process. + STARTED = 4; + + // The instance is downloading patches. + DOWNLOADING_PATCHES = 5; + + // The instance is applying patches. + APPLYING_PATCHES = 6; + + // The instance is rebooting. + REBOOTING = 7; + + // The instance has completed applying patches. + SUCCEEDED = 8; + + // The instance has completed applying patches but a reboot is required. + SUCCEEDED_REBOOT_REQUIRED = 9; + + // The instance has failed to apply the patch. + FAILED = 10; + + // The instance acked the notification and will start shortly. + ACKED = 11; + + // The instance exceeded the time out while applying the patch. + TIMED_OUT = 12; + + // The instance is running the pre-patch step. + RUNNING_PRE_PATCH_STEP = 13; + + // The instance is running the post-patch step. + RUNNING_POST_PATCH_STEP = 14; + + // The service could not detect the presence of the agent. Check to ensure + // that the agent is installed, running, and able to communicate with the + // service. + NO_AGENT_DETECTED = 15; + } + + +} + +// Message for canceling a patch job. +message CancelPatchJobRequest { + // Required. Name of the patch in the form `projects/*/patchJobs/*` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchJob" + } + ]; +} + +// Apt patching is completed by executing `apt-get update && apt-get +// upgrade`. Additional options can be set to control how this is executed. +message AptSettings { + // Apt patch type. + enum Type { + // By default, upgrade will be performed. + TYPE_UNSPECIFIED = 0; + + // Runs `apt-get dist-upgrade`. + DIST = 1; + + // Runs `apt-get upgrade`. + UPGRADE = 2; + } + + // By changing the type to DIST, the patching is performed + // using `apt-get dist-upgrade` instead. + Type type = 1; + + // List of packages to exclude from update. These packages will be excluded + repeated string excludes = 2; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field cannot be specified with any other patch configuration + // fields. + repeated string exclusive_packages = 3; +} + +// Yum patching is performed by executing `yum update`. Additional options +// can be set to control how this is executed. +// +// Note that not all settings are supported on all platforms. +message YumSettings { + // Adds the `--security` flag to `yum update`. Not supported on + // all platforms. + bool security = 1; + + // Will cause patch to run `yum update-minimal` instead. + bool minimal = 2; + + // List of packages to exclude from update. These packages are excluded by + // using the yum `--exclude` flag. + repeated string excludes = 3; + + // An exclusive list of packages to be updated. These are the only packages + // that will be updated. If these packages are not installed, they will be + // ignored. This field must not be specified with any other patch + // configuration fields. + repeated string exclusive_packages = 4; +} + +// Googet patching is performed by running `googet update`. +message GooSettings { + +} + +// Zypper patching is performed by running `zypper patch`. +// See also https://en.opensuse.org/SDB:Zypper_manual. +message ZypperSettings { + // Adds the `--with-optional` flag to `zypper patch`. + bool with_optional = 1; + + // Adds the `--with-update` flag, to `zypper patch`. + bool with_update = 2; + + // Install only patches with these categories. + // Common categories include security, recommended, and feature. + repeated string categories = 3; + + // Install only patches with these severities. + // Common severities include critical, important, moderate, and low. + repeated string severities = 4; + + // List of patches to exclude from update. + repeated string excludes = 5; + + // An exclusive list of patches to be updated. These are the only patches + // that will be installed using 'zypper patch patch:' command. + // This field must not be used with any other patch configuration fields. + repeated string exclusive_patches = 6; +} + +// Windows patching is performed using the Windows Update Agent. +message WindowsUpdateSettings { + // Microsoft Windows update classifications as defined in + // [1] + // https://support.microsoft.com/en-us/help/824684/description-of-the-standard-terminology-that-is-used-to-describe-micro + enum Classification { + // Invalid. If classifications are included, they must be specified. + CLASSIFICATION_UNSPECIFIED = 0; + + // "A widely released fix for a specific problem that addresses a critical, + // non-security-related bug." [1] + CRITICAL = 1; + + // "A widely released fix for a product-specific, security-related + // vulnerability. Security vulnerabilities are rated by their severity. The + // severity rating is indicated in the Microsoft security bulletin as + // critical, important, moderate, or low." [1] + SECURITY = 2; + + // "A widely released and frequent software update that contains additions + // to a product's definition database. Definition databases are often used + // to detect objects that have specific attributes, such as malicious code, + // phishing websites, or junk mail." [1] + DEFINITION = 3; + + // "Software that controls the input and output of a device." [1] + DRIVER = 4; + + // "New product functionality that is first distributed outside the context + // of a product release and that is typically included in the next full + // product release." [1] + FEATURE_PACK = 5; + + // "A tested, cumulative set of all hotfixes, security updates, critical + // updates, and updates. Additionally, service packs may contain additional + // fixes for problems that are found internally since the release of the + // product. Service packs my also contain a limited number of + // customer-requested design changes or features." [1] + SERVICE_PACK = 6; + + // "A utility or feature that helps complete a task or set of tasks." [1] + TOOL = 7; + + // "A tested, cumulative set of hotfixes, security updates, critical + // updates, and updates that are packaged together for easy deployment. A + // rollup generally targets a specific area, such as security, or a + // component of a product, such as Internet Information Services (IIS)." [1] + UPDATE_ROLLUP = 8; + + // "A widely released fix for a specific problem. An update addresses a + // noncritical, non-security-related bug." [1] + UPDATE = 9; + } + + // Only apply updates of these windows update classifications. If empty, all + // updates are applied. + repeated Classification classifications = 1; + + // List of KBs to exclude from update. + repeated string excludes = 2; + + // An exclusive list of kbs to be updated. These are the only patches + // that will be updated. This field must not be used with other + // patch configurations. + repeated string exclusive_patches = 3; +} + +// A step that runs an executable for a PatchJob. +message ExecStep { + // The ExecStepConfig for all Linux VMs targeted by the PatchJob. + ExecStepConfig linux_exec_step_config = 1; + + // The ExecStepConfig for all Windows VMs targeted by the PatchJob. + ExecStepConfig windows_exec_step_config = 2; +} + +// Common configurations for an ExecStep. +message ExecStepConfig { + // The interpreter used to execute the a file. + enum Interpreter { + // Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the + // interpreter will be parsed from the shebang line of the script if + // unspecified. + INTERPRETER_UNSPECIFIED = 0; + + // Indicates that the script is run with `/bin/sh` on Linux and `cmd` + // on Windows. + SHELL = 1; + + // Indicates that the file is run with PowerShell flags + // `-NonInteractive`, `-NoProfile`, and `-ExecutionPolicy Bypass`. + POWERSHELL = 2; + } + + // Location of the executable. + oneof executable { + // An absolute path to the executable on the VM. + string local_path = 1; + + // A Cloud Storage object containing the executable. + GcsObject gcs_object = 2; + } + + // Defaults to [0]. A list of possible return values that the + // execution can return to indicate a success. + repeated int32 allowed_success_codes = 3; + + // The script interpreter to use to run the script. If no interpreter is + // specified the script will be executed directly, which will likely + // only succeed for scripts with [shebang lines] + // (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + Interpreter interpreter = 4; +} + +// Cloud Storage object representation. +message GcsObject { + // Required. Bucket of the Cloud Storage object. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Cloud Storage object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Generation number of the Cloud Storage object. This is used to + // ensure that the ExecStep specified by this PatchJob does not change. + int64 generation_number = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A filter to target VM instances for patching. The targeted +// VMs must meet all criteria specified. So if both labels and zones are +// specified, the patch job targets only VMs with those labels and in those +// zones. +message PatchInstanceFilter { + // Targets a group of VM instances by using their [assigned + // labels](https://cloud.google.com/compute/docs/labeling-resources). Labels + // are key-value pairs. A `GroupLabel` is a combination of labels + // that is used to target VMs for a patch job. + // + // For example, a patch job can target VMs that have the following + // `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job + // is applied to VMs that have both the labels `env=test` and `app=web`. + message GroupLabel { + // Compute Engine instance labels that must be present for a VM + // instance to be targeted by this filter. + map labels = 1; + } + + // Target all VM instances in the project. If true, no other criteria is + // permitted. + bool all = 1; + + // Targets VM instances matching ANY of these GroupLabels. This allows + // targeting of disparate groups of VM instances. + repeated GroupLabel group_labels = 2; + + // Targets VM instances in ANY of these zones. Leave empty to target VM + // instances in any zone. + repeated string zones = 3; + + // Targets any of the VM instances specified. Instances are specified by their + // URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME], + // `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or + // `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` + repeated string instances = 4; + + // Targets VMs whose name starts with one of these prefixes. Similar to + // labels, this is another way to group VMs when targeting configs, for + // example prefix="prod-". + repeated string instance_name_prefixes = 5; +} diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts new file mode 100644 index 00000000000..a8b9fcb42d0 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -0,0 +1,8241 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as Long from "long"; +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace osconfig. */ + namespace osconfig { + + /** Namespace v1. */ + namespace v1 { + + /** Represents an OsConfigService */ + class OsConfigService extends $protobuf.rpc.Service { + + /** + * Constructs a new OsConfigService 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 OsConfigService 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): OsConfigService; + + /** + * Calls ExecutePatchJob. + * @param request ExecutePatchJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchJob + */ + public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback): void; + + /** + * Calls ExecutePatchJob. + * @param request ExecutePatchJobRequest message or plain object + * @returns Promise + */ + public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest): Promise; + + /** + * Calls GetPatchJob. + * @param request GetPatchJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchJob + */ + public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback): void; + + /** + * Calls GetPatchJob. + * @param request GetPatchJobRequest message or plain object + * @returns Promise + */ + public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest): Promise; + + /** + * Calls CancelPatchJob. + * @param request CancelPatchJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchJob + */ + public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback): void; + + /** + * Calls CancelPatchJob. + * @param request CancelPatchJobRequest message or plain object + * @returns Promise + */ + public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest): Promise; + + /** + * Calls ListPatchJobs. + * @param request ListPatchJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPatchJobsResponse + */ + public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback): void; + + /** + * Calls ListPatchJobs. + * @param request ListPatchJobsRequest message or plain object + * @returns Promise + */ + public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest): Promise; + + /** + * Calls ListPatchJobInstanceDetails. + * @param request ListPatchJobInstanceDetailsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse + */ + public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback): void; + + /** + * Calls ListPatchJobInstanceDetails. + * @param request ListPatchJobInstanceDetailsRequest message or plain object + * @returns Promise + */ + public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): Promise; + + /** + * Calls CreatePatchDeployment. + * @param request CreatePatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchDeployment + */ + public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback): void; + + /** + * Calls CreatePatchDeployment. + * @param request CreatePatchDeploymentRequest message or plain object + * @returns Promise + */ + public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): Promise; + + /** + * Calls GetPatchDeployment. + * @param request GetPatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchDeployment + */ + public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback): void; + + /** + * Calls GetPatchDeployment. + * @param request GetPatchDeploymentRequest message or plain object + * @returns Promise + */ + public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): Promise; + + /** + * Calls ListPatchDeployments. + * @param request ListPatchDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse + */ + public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback): void; + + /** + * Calls ListPatchDeployments. + * @param request ListPatchDeploymentsRequest message or plain object + * @returns Promise + */ + public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): Promise; + + /** + * Calls DeletePatchDeployment. + * @param request DeletePatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback): void; + + /** + * Calls DeletePatchDeployment. + * @param request DeletePatchDeploymentRequest message or plain object + * @returns Promise + */ + public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): Promise; + } + + namespace OsConfigService { + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. + * @param error Error, if any + * @param [response] PatchJob + */ + type ExecutePatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. + * @param error Error, if any + * @param [response] PatchJob + */ + type GetPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. + * @param error Error, if any + * @param [response] PatchJob + */ + type CancelPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. + * @param error Error, if any + * @param [response] ListPatchJobsResponse + */ + type ListPatchJobsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. + * @param error Error, if any + * @param [response] ListPatchJobInstanceDetailsResponse + */ + type ListPatchJobInstanceDetailsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. + * @param error Error, if any + * @param [response] PatchDeployment + */ + type CreatePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. + * @param error Error, if any + * @param [response] PatchDeployment + */ + type GetPatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. + * @param error Error, if any + * @param [response] ListPatchDeploymentsResponse + */ + type ListPatchDeploymentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchDeploymentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePatchDeploymentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a PatchDeployment. */ + interface IPatchDeployment { + + /** PatchDeployment name */ + name?: (string|null); + + /** PatchDeployment description */ + description?: (string|null); + + /** PatchDeployment instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + + /** PatchDeployment patchConfig */ + patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + + /** PatchDeployment duration */ + duration?: (google.protobuf.IDuration|null); + + /** PatchDeployment oneTimeSchedule */ + oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); + + /** PatchDeployment recurringSchedule */ + recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); + + /** PatchDeployment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** PatchDeployment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** PatchDeployment lastExecuteTime */ + lastExecuteTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a PatchDeployment. */ + class PatchDeployment implements IPatchDeployment { + + /** + * Constructs a new PatchDeployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchDeployment); + + /** PatchDeployment name. */ + public name: string; + + /** PatchDeployment description. */ + public description: string; + + /** PatchDeployment instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + + /** PatchDeployment patchConfig. */ + public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + + /** PatchDeployment duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** PatchDeployment oneTimeSchedule. */ + public oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); + + /** PatchDeployment recurringSchedule. */ + public recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); + + /** PatchDeployment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PatchDeployment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** PatchDeployment lastExecuteTime. */ + public lastExecuteTime?: (google.protobuf.ITimestamp|null); + + /** PatchDeployment schedule. */ + public schedule?: ("oneTimeSchedule"|"recurringSchedule"); + + /** + * Creates a new PatchDeployment instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchDeployment instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchDeployment): google.cloud.osconfig.v1.PatchDeployment; + + /** + * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @param message PatchDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @param message PatchDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PatchDeployment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchDeployment; + + /** + * Decodes a PatchDeployment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchDeployment; + + /** + * Verifies a PatchDeployment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchDeployment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchDeployment; + + /** + * Creates a plain object from a PatchDeployment message. Also converts values to other types if specified. + * @param message PatchDeployment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PatchDeployment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OneTimeSchedule. */ + interface IOneTimeSchedule { + + /** OneTimeSchedule executeTime */ + executeTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an OneTimeSchedule. */ + class OneTimeSchedule implements IOneTimeSchedule { + + /** + * Constructs a new OneTimeSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IOneTimeSchedule); + + /** OneTimeSchedule executeTime. */ + public executeTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OneTimeSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns OneTimeSchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IOneTimeSchedule): google.cloud.osconfig.v1.OneTimeSchedule; + + /** + * Encodes the specified OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @param message OneTimeSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IOneTimeSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @param message OneTimeSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IOneTimeSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OneTimeSchedule; + + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OneTimeSchedule; + + /** + * Verifies an OneTimeSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneTimeSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OneTimeSchedule; + + /** + * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. + * @param message OneTimeSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OneTimeSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneTimeSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecurringSchedule. */ + interface IRecurringSchedule { + + /** RecurringSchedule timeZone */ + timeZone?: (google.type.ITimeZone|null); + + /** RecurringSchedule startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** RecurringSchedule endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** RecurringSchedule timeOfDay */ + timeOfDay?: (google.type.ITimeOfDay|null); + + /** RecurringSchedule frequency */ + frequency?: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency|null); + + /** RecurringSchedule weekly */ + weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); + + /** RecurringSchedule monthly */ + monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); + + /** RecurringSchedule lastExecuteTime */ + lastExecuteTime?: (google.protobuf.ITimestamp|null); + + /** RecurringSchedule nextExecuteTime */ + nextExecuteTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RecurringSchedule. */ + class RecurringSchedule implements IRecurringSchedule { + + /** + * Constructs a new RecurringSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IRecurringSchedule); + + /** RecurringSchedule timeZone. */ + public timeZone?: (google.type.ITimeZone|null); + + /** RecurringSchedule startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** RecurringSchedule endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** RecurringSchedule timeOfDay. */ + public timeOfDay?: (google.type.ITimeOfDay|null); + + /** RecurringSchedule frequency. */ + public frequency: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency); + + /** RecurringSchedule weekly. */ + public weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); + + /** RecurringSchedule monthly. */ + public monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); + + /** RecurringSchedule lastExecuteTime. */ + public lastExecuteTime?: (google.protobuf.ITimestamp|null); + + /** RecurringSchedule nextExecuteTime. */ + public nextExecuteTime?: (google.protobuf.ITimestamp|null); + + /** RecurringSchedule scheduleConfig. */ + public scheduleConfig?: ("weekly"|"monthly"); + + /** + * Creates a new RecurringSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns RecurringSchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IRecurringSchedule): google.cloud.osconfig.v1.RecurringSchedule; + + /** + * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @param message RecurringSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @param message RecurringSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecurringSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.RecurringSchedule; + + /** + * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.RecurringSchedule; + + /** + * Verifies a RecurringSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecurringSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.RecurringSchedule; + + /** + * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. + * @param message RecurringSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.RecurringSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecurringSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RecurringSchedule { + + /** Frequency enum. */ + enum Frequency { + FREQUENCY_UNSPECIFIED = 0, + WEEKLY = 1, + MONTHLY = 2 + } + } + + /** Properties of a WeeklySchedule. */ + interface IWeeklySchedule { + + /** WeeklySchedule dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a WeeklySchedule. */ + class WeeklySchedule implements IWeeklySchedule { + + /** + * Constructs a new WeeklySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IWeeklySchedule); + + /** WeeklySchedule dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns WeeklySchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IWeeklySchedule): google.cloud.osconfig.v1.WeeklySchedule; + + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeeklySchedule; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeeklySchedule; + + /** + * Verifies a WeeklySchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeeklySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeeklySchedule; + + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @param message WeeklySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeeklySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonthlySchedule. */ + interface IMonthlySchedule { + + /** MonthlySchedule weekDayOfMonth */ + weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); + + /** MonthlySchedule monthDay */ + monthDay?: (number|null); + } + + /** Represents a MonthlySchedule. */ + class MonthlySchedule implements IMonthlySchedule { + + /** + * Constructs a new MonthlySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IMonthlySchedule); + + /** MonthlySchedule weekDayOfMonth. */ + public weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); + + /** MonthlySchedule monthDay. */ + public monthDay: number; + + /** MonthlySchedule dayOfMonth. */ + public dayOfMonth?: ("weekDayOfMonth"|"monthDay"); + + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns MonthlySchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IMonthlySchedule): google.cloud.osconfig.v1.MonthlySchedule; + + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.MonthlySchedule; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.MonthlySchedule; + + /** + * Verifies a MonthlySchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonthlySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.MonthlySchedule; + + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @param message MonthlySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonthlySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WeekDayOfMonth. */ + interface IWeekDayOfMonth { + + /** WeekDayOfMonth weekOrdinal */ + weekOrdinal?: (number|null); + + /** WeekDayOfMonth dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a WeekDayOfMonth. */ + class WeekDayOfMonth implements IWeekDayOfMonth { + + /** + * Constructs a new WeekDayOfMonth. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth); + + /** WeekDayOfMonth weekOrdinal. */ + public weekOrdinal: number; + + /** WeekDayOfMonth dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @param [properties] Properties to set + * @returns WeekDayOfMonth instance + */ + public static create(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth): google.cloud.osconfig.v1.WeekDayOfMonth; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeekDayOfMonth; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeekDayOfMonth; + + /** + * Verifies a WeekDayOfMonth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeekDayOfMonth + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeekDayOfMonth; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @param message WeekDayOfMonth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreatePatchDeploymentRequest. */ + interface ICreatePatchDeploymentRequest { + + /** CreatePatchDeploymentRequest parent */ + parent?: (string|null); + + /** CreatePatchDeploymentRequest patchDeploymentId */ + patchDeploymentId?: (string|null); + + /** CreatePatchDeploymentRequest patchDeployment */ + patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + } + + /** Represents a CreatePatchDeploymentRequest. */ + class CreatePatchDeploymentRequest implements ICreatePatchDeploymentRequest { + + /** + * Constructs a new CreatePatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest); + + /** CreatePatchDeploymentRequest parent. */ + public parent: string; + + /** CreatePatchDeploymentRequest patchDeploymentId. */ + public patchDeploymentId: string; + + /** CreatePatchDeploymentRequest patchDeployment. */ + public patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + + /** + * Creates a new CreatePatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + + /** + * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @param message CreatePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @param message CreatePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + + /** + * Verifies a CreatePatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + + /** + * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. + * @param message CreatePatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.CreatePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPatchDeploymentRequest. */ + interface IGetPatchDeploymentRequest { + + /** GetPatchDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a GetPatchDeploymentRequest. */ + class GetPatchDeploymentRequest implements IGetPatchDeploymentRequest { + + /** + * Constructs a new GetPatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest); + + /** GetPatchDeploymentRequest name. */ + public name: string; + + /** + * Creates a new GetPatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + + /** + * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @param message GetPatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @param message GetPatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + + /** + * Verifies a GetPatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + + /** + * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. + * @param message GetPatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GetPatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPatchDeploymentsRequest. */ + interface IListPatchDeploymentsRequest { + + /** ListPatchDeploymentsRequest parent */ + parent?: (string|null); + + /** ListPatchDeploymentsRequest pageSize */ + pageSize?: (number|null); + + /** ListPatchDeploymentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPatchDeploymentsRequest. */ + class ListPatchDeploymentsRequest implements IListPatchDeploymentsRequest { + + /** + * Constructs a new ListPatchDeploymentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest); + + /** ListPatchDeploymentsRequest parent. */ + public parent: string; + + /** ListPatchDeploymentsRequest pageSize. */ + public pageSize: number; + + /** ListPatchDeploymentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPatchDeploymentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchDeploymentsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + + /** + * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @param message ListPatchDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @param message ListPatchDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + + /** + * Verifies a ListPatchDeploymentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchDeploymentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + + /** + * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListPatchDeploymentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPatchDeploymentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPatchDeploymentsResponse. */ + interface IListPatchDeploymentsResponse { + + /** ListPatchDeploymentsResponse patchDeployments */ + patchDeployments?: (google.cloud.osconfig.v1.IPatchDeployment[]|null); + + /** ListPatchDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPatchDeploymentsResponse. */ + class ListPatchDeploymentsResponse implements IListPatchDeploymentsResponse { + + /** + * Constructs a new ListPatchDeploymentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse); + + /** ListPatchDeploymentsResponse patchDeployments. */ + public patchDeployments: google.cloud.osconfig.v1.IPatchDeployment[]; + + /** ListPatchDeploymentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPatchDeploymentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchDeploymentsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + + /** + * Encodes the specified ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @param message ListPatchDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @param message ListPatchDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + + /** + * Verifies a ListPatchDeploymentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchDeploymentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + + /** + * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListPatchDeploymentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPatchDeploymentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeletePatchDeploymentRequest. */ + interface IDeletePatchDeploymentRequest { + + /** DeletePatchDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a DeletePatchDeploymentRequest. */ + class DeletePatchDeploymentRequest implements IDeletePatchDeploymentRequest { + + /** + * Constructs a new DeletePatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest); + + /** DeletePatchDeploymentRequest name. */ + public name: string; + + /** + * Creates a new DeletePatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + + /** + * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @param message DeletePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @param message DeletePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + + /** + * Verifies a DeletePatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + + /** + * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. + * @param message DeletePatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.DeletePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExecutePatchJobRequest. */ + interface IExecutePatchJobRequest { + + /** ExecutePatchJobRequest parent */ + parent?: (string|null); + + /** ExecutePatchJobRequest description */ + description?: (string|null); + + /** ExecutePatchJobRequest instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + + /** ExecutePatchJobRequest patchConfig */ + patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + + /** ExecutePatchJobRequest duration */ + duration?: (google.protobuf.IDuration|null); + + /** ExecutePatchJobRequest dryRun */ + dryRun?: (boolean|null); + + /** ExecutePatchJobRequest displayName */ + displayName?: (string|null); + } + + /** Represents an ExecutePatchJobRequest. */ + class ExecutePatchJobRequest implements IExecutePatchJobRequest { + + /** + * Constructs a new ExecutePatchJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest); + + /** ExecutePatchJobRequest parent. */ + public parent: string; + + /** ExecutePatchJobRequest description. */ + public description: string; + + /** ExecutePatchJobRequest instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + + /** ExecutePatchJobRequest patchConfig. */ + public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + + /** ExecutePatchJobRequest duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** ExecutePatchJobRequest dryRun. */ + public dryRun: boolean; + + /** ExecutePatchJobRequest displayName. */ + public displayName: string; + + /** + * Creates a new ExecutePatchJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutePatchJobRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest): google.cloud.osconfig.v1.ExecutePatchJobRequest; + + /** + * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @param message ExecutePatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @param message ExecutePatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecutePatchJobRequest; + + /** + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecutePatchJobRequest; + + /** + * Verifies an ExecutePatchJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutePatchJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecutePatchJobRequest; + + /** + * Creates a plain object from an ExecutePatchJobRequest message. Also converts values to other types if specified. + * @param message ExecutePatchJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ExecutePatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutePatchJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPatchJobRequest. */ + interface IGetPatchJobRequest { + + /** GetPatchJobRequest name */ + name?: (string|null); + } + + /** Represents a GetPatchJobRequest. */ + class GetPatchJobRequest implements IGetPatchJobRequest { + + /** + * Constructs a new GetPatchJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest); + + /** GetPatchJobRequest name. */ + public name: string; + + /** + * Creates a new GetPatchJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPatchJobRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest): google.cloud.osconfig.v1.GetPatchJobRequest; + + /** + * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @param message GetPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGetPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @param message GetPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchJobRequest; + + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchJobRequest; + + /** + * Verifies a GetPatchJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPatchJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchJobRequest; + + /** + * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. + * @param message GetPatchJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GetPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPatchJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPatchJobInstanceDetailsRequest. */ + interface IListPatchJobInstanceDetailsRequest { + + /** ListPatchJobInstanceDetailsRequest parent */ + parent?: (string|null); + + /** ListPatchJobInstanceDetailsRequest pageSize */ + pageSize?: (number|null); + + /** ListPatchJobInstanceDetailsRequest pageToken */ + pageToken?: (string|null); + + /** ListPatchJobInstanceDetailsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListPatchJobInstanceDetailsRequest. */ + class ListPatchJobInstanceDetailsRequest implements IListPatchJobInstanceDetailsRequest { + + /** + * Constructs a new ListPatchJobInstanceDetailsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest); + + /** ListPatchJobInstanceDetailsRequest parent. */ + public parent: string; + + /** ListPatchJobInstanceDetailsRequest pageSize. */ + public pageSize: number; + + /** ListPatchJobInstanceDetailsRequest pageToken. */ + public pageToken: string; + + /** ListPatchJobInstanceDetailsRequest filter. */ + public filter: string; + + /** + * Creates a new ListPatchJobInstanceDetailsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobInstanceDetailsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + + /** + * Verifies a ListPatchJobInstanceDetailsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobInstanceDetailsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + + /** + * Creates a plain object from a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. + * @param message ListPatchJobInstanceDetailsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPatchJobInstanceDetailsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPatchJobInstanceDetailsResponse. */ + interface IListPatchJobInstanceDetailsResponse { + + /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails */ + patchJobInstanceDetails?: (google.cloud.osconfig.v1.IPatchJobInstanceDetails[]|null); + + /** ListPatchJobInstanceDetailsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPatchJobInstanceDetailsResponse. */ + class ListPatchJobInstanceDetailsResponse implements IListPatchJobInstanceDetailsResponse { + + /** + * Constructs a new ListPatchJobInstanceDetailsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse); + + /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. */ + public patchJobInstanceDetails: google.cloud.osconfig.v1.IPatchJobInstanceDetails[]; + + /** ListPatchJobInstanceDetailsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobInstanceDetailsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + + /** + * Encodes the specified ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + + /** + * Verifies a ListPatchJobInstanceDetailsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobInstanceDetailsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + + /** + * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. + * @param message ListPatchJobInstanceDetailsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPatchJobInstanceDetailsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PatchJobInstanceDetails. */ + interface IPatchJobInstanceDetails { + + /** PatchJobInstanceDetails name */ + name?: (string|null); + + /** PatchJobInstanceDetails instanceSystemId */ + instanceSystemId?: (string|null); + + /** PatchJobInstanceDetails state */ + state?: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState|null); + + /** PatchJobInstanceDetails failureReason */ + failureReason?: (string|null); + + /** PatchJobInstanceDetails attemptCount */ + attemptCount?: (number|Long|string|null); + } + + /** Represents a PatchJobInstanceDetails. */ + class PatchJobInstanceDetails implements IPatchJobInstanceDetails { + + /** + * Constructs a new PatchJobInstanceDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails); + + /** PatchJobInstanceDetails name. */ + public name: string; + + /** PatchJobInstanceDetails instanceSystemId. */ + public instanceSystemId: string; + + /** PatchJobInstanceDetails state. */ + public state: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState); + + /** PatchJobInstanceDetails failureReason. */ + public failureReason: string; + + /** PatchJobInstanceDetails attemptCount. */ + public attemptCount: (number|Long|string); + + /** + * Creates a new PatchJobInstanceDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchJobInstanceDetails instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails): google.cloud.osconfig.v1.PatchJobInstanceDetails; + + /** + * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @param message PatchJobInstanceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @param message PatchJobInstanceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJobInstanceDetails; + + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJobInstanceDetails; + + /** + * Verifies a PatchJobInstanceDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchJobInstanceDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJobInstanceDetails; + + /** + * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. + * @param message PatchJobInstanceDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchJobInstanceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PatchJobInstanceDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPatchJobsRequest. */ + interface IListPatchJobsRequest { + + /** ListPatchJobsRequest parent */ + parent?: (string|null); + + /** ListPatchJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListPatchJobsRequest pageToken */ + pageToken?: (string|null); + + /** ListPatchJobsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListPatchJobsRequest. */ + class ListPatchJobsRequest implements IListPatchJobsRequest { + + /** + * Constructs a new ListPatchJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest); + + /** ListPatchJobsRequest parent. */ + public parent: string; + + /** ListPatchJobsRequest pageSize. */ + public pageSize: number; + + /** ListPatchJobsRequest pageToken. */ + public pageToken: string; + + /** ListPatchJobsRequest filter. */ + public filter: string; + + /** + * Creates a new ListPatchJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest): google.cloud.osconfig.v1.ListPatchJobsRequest; + + /** + * Encodes the specified ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @param message ListPatchJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @param message ListPatchJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsRequest; + + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsRequest; + + /** + * Verifies a ListPatchJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsRequest; + + /** + * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. + * @param message ListPatchJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPatchJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPatchJobsResponse. */ + interface IListPatchJobsResponse { + + /** ListPatchJobsResponse patchJobs */ + patchJobs?: (google.cloud.osconfig.v1.IPatchJob[]|null); + + /** ListPatchJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPatchJobsResponse. */ + class ListPatchJobsResponse implements IListPatchJobsResponse { + + /** + * Constructs a new ListPatchJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse); + + /** ListPatchJobsResponse patchJobs. */ + public patchJobs: google.cloud.osconfig.v1.IPatchJob[]; + + /** ListPatchJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPatchJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse): google.cloud.osconfig.v1.ListPatchJobsResponse; + + /** + * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @param message ListPatchJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @param message ListPatchJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsResponse; + + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsResponse; + + /** + * Verifies a ListPatchJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsResponse; + + /** + * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. + * @param message ListPatchJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPatchJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PatchJob. */ + interface IPatchJob { + + /** PatchJob name */ + name?: (string|null); + + /** PatchJob displayName */ + displayName?: (string|null); + + /** PatchJob description */ + description?: (string|null); + + /** PatchJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** PatchJob updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** PatchJob state */ + state?: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State|null); + + /** PatchJob instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + + /** PatchJob patchConfig */ + patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + + /** PatchJob duration */ + duration?: (google.protobuf.IDuration|null); + + /** PatchJob instanceDetailsSummary */ + instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); + + /** PatchJob dryRun */ + dryRun?: (boolean|null); + + /** PatchJob errorMessage */ + errorMessage?: (string|null); + + /** PatchJob percentComplete */ + percentComplete?: (number|null); + + /** PatchJob patchDeployment */ + patchDeployment?: (string|null); + } + + /** Represents a PatchJob. */ + class PatchJob implements IPatchJob { + + /** + * Constructs a new PatchJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchJob); + + /** PatchJob name. */ + public name: string; + + /** PatchJob displayName. */ + public displayName: string; + + /** PatchJob description. */ + public description: string; + + /** PatchJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PatchJob updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** PatchJob state. */ + public state: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State); + + /** PatchJob instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + + /** PatchJob patchConfig. */ + public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + + /** PatchJob duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** PatchJob instanceDetailsSummary. */ + public instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); + + /** PatchJob dryRun. */ + public dryRun: boolean; + + /** PatchJob errorMessage. */ + public errorMessage: string; + + /** PatchJob percentComplete. */ + public percentComplete: number; + + /** PatchJob patchDeployment. */ + public patchDeployment: string; + + /** + * Creates a new PatchJob instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchJob instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchJob): google.cloud.osconfig.v1.PatchJob; + + /** + * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @param message PatchJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @param message PatchJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PatchJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob; + + /** + * Decodes a PatchJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob; + + /** + * Verifies a PatchJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob; + + /** + * Creates a plain object from a PatchJob message. Also converts values to other types if specified. + * @param message PatchJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PatchJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PatchJob { + + /** Properties of an InstanceDetailsSummary. */ + interface IInstanceDetailsSummary { + + /** InstanceDetailsSummary pendingInstanceCount */ + pendingInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary inactiveInstanceCount */ + inactiveInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary notifiedInstanceCount */ + notifiedInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary startedInstanceCount */ + startedInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary downloadingPatchesInstanceCount */ + downloadingPatchesInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary applyingPatchesInstanceCount */ + applyingPatchesInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary rebootingInstanceCount */ + rebootingInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary succeededInstanceCount */ + succeededInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary succeededRebootRequiredInstanceCount */ + succeededRebootRequiredInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary failedInstanceCount */ + failedInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary ackedInstanceCount */ + ackedInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary timedOutInstanceCount */ + timedOutInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary prePatchStepInstanceCount */ + prePatchStepInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary postPatchStepInstanceCount */ + postPatchStepInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary noAgentDetectedInstanceCount */ + noAgentDetectedInstanceCount?: (number|Long|string|null); + } + + /** Represents an InstanceDetailsSummary. */ + class InstanceDetailsSummary implements IInstanceDetailsSummary { + + /** + * Constructs a new InstanceDetailsSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary); + + /** InstanceDetailsSummary pendingInstanceCount. */ + public pendingInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary inactiveInstanceCount. */ + public inactiveInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary notifiedInstanceCount. */ + public notifiedInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary startedInstanceCount. */ + public startedInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary downloadingPatchesInstanceCount. */ + public downloadingPatchesInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary applyingPatchesInstanceCount. */ + public applyingPatchesInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary rebootingInstanceCount. */ + public rebootingInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary succeededInstanceCount. */ + public succeededInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary succeededRebootRequiredInstanceCount. */ + public succeededRebootRequiredInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary failedInstanceCount. */ + public failedInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary ackedInstanceCount. */ + public ackedInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary timedOutInstanceCount. */ + public timedOutInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary prePatchStepInstanceCount. */ + public prePatchStepInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary postPatchStepInstanceCount. */ + public postPatchStepInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary noAgentDetectedInstanceCount. */ + public noAgentDetectedInstanceCount: (number|Long|string); + + /** + * Creates a new InstanceDetailsSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceDetailsSummary instance + */ + public static create(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + + /** + * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @param message InstanceDetailsSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @param message InstanceDetailsSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceDetailsSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceDetailsSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + + /** + * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceDetailsSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + + /** + * Verifies an InstanceDetailsSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceDetailsSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + + /** + * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. + * @param message InstanceDetailsSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceDetailsSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTED = 1, + INSTANCE_LOOKUP = 2, + PATCHING = 3, + SUCCEEDED = 4, + COMPLETED_WITH_ERRORS = 5, + CANCELED = 6, + TIMED_OUT = 7 + } + } + + /** Properties of a PatchConfig. */ + interface IPatchConfig { + + /** PatchConfig rebootConfig */ + rebootConfig?: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig|null); + + /** PatchConfig apt */ + apt?: (google.cloud.osconfig.v1.IAptSettings|null); + + /** PatchConfig yum */ + yum?: (google.cloud.osconfig.v1.IYumSettings|null); + + /** PatchConfig goo */ + goo?: (google.cloud.osconfig.v1.IGooSettings|null); + + /** PatchConfig zypper */ + zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); + + /** PatchConfig windowsUpdate */ + windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); + + /** PatchConfig preStep */ + preStep?: (google.cloud.osconfig.v1.IExecStep|null); + + /** PatchConfig postStep */ + postStep?: (google.cloud.osconfig.v1.IExecStep|null); + } + + /** Represents a PatchConfig. */ + class PatchConfig implements IPatchConfig { + + /** + * Constructs a new PatchConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchConfig); + + /** PatchConfig rebootConfig. */ + public rebootConfig: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig); + + /** PatchConfig apt. */ + public apt?: (google.cloud.osconfig.v1.IAptSettings|null); + + /** PatchConfig yum. */ + public yum?: (google.cloud.osconfig.v1.IYumSettings|null); + + /** PatchConfig goo. */ + public goo?: (google.cloud.osconfig.v1.IGooSettings|null); + + /** PatchConfig zypper. */ + public zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); + + /** PatchConfig windowsUpdate. */ + public windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); + + /** PatchConfig preStep. */ + public preStep?: (google.cloud.osconfig.v1.IExecStep|null); + + /** PatchConfig postStep. */ + public postStep?: (google.cloud.osconfig.v1.IExecStep|null); + + /** + * Creates a new PatchConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchConfig instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchConfig): google.cloud.osconfig.v1.PatchConfig; + + /** + * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @param message PatchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @param message PatchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PatchConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchConfig; + + /** + * Decodes a PatchConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchConfig; + + /** + * Verifies a PatchConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchConfig; + + /** + * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. + * @param message PatchConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PatchConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PatchConfig { + + /** RebootConfig enum. */ + enum RebootConfig { + REBOOT_CONFIG_UNSPECIFIED = 0, + DEFAULT = 1, + ALWAYS = 2, + NEVER = 3 + } + } + + /** Properties of an Instance. */ + interface IInstance { + } + + /** Represents an Instance. */ + class Instance implements IInstance { + + /** + * Constructs a new Instance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IInstance); + + /** + * Creates a new Instance instance using the specified properties. + * @param [properties] Properties to set + * @returns Instance instance + */ + public static create(properties?: google.cloud.osconfig.v1.IInstance): google.cloud.osconfig.v1.Instance; + + /** + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Instance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Instance; + + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Instance; + + /** + * Verifies an Instance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Instance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Instance; + + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @param message Instance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Instance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Instance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Instance { + + /** PatchState enum. */ + enum PatchState { + PATCH_STATE_UNSPECIFIED = 0, + PENDING = 1, + INACTIVE = 2, + NOTIFIED = 3, + STARTED = 4, + DOWNLOADING_PATCHES = 5, + APPLYING_PATCHES = 6, + REBOOTING = 7, + SUCCEEDED = 8, + SUCCEEDED_REBOOT_REQUIRED = 9, + FAILED = 10, + ACKED = 11, + TIMED_OUT = 12, + RUNNING_PRE_PATCH_STEP = 13, + RUNNING_POST_PATCH_STEP = 14, + NO_AGENT_DETECTED = 15 + } + } + + /** Properties of a CancelPatchJobRequest. */ + interface ICancelPatchJobRequest { + + /** CancelPatchJobRequest name */ + name?: (string|null); + } + + /** Represents a CancelPatchJobRequest. */ + class CancelPatchJobRequest implements ICancelPatchJobRequest { + + /** + * Constructs a new CancelPatchJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest); + + /** CancelPatchJobRequest name. */ + public name: string; + + /** + * Creates a new CancelPatchJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelPatchJobRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest): google.cloud.osconfig.v1.CancelPatchJobRequest; + + /** + * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @param message CancelPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @param message CancelPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CancelPatchJobRequest; + + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CancelPatchJobRequest; + + /** + * Verifies a CancelPatchJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelPatchJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CancelPatchJobRequest; + + /** + * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. + * @param message CancelPatchJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.CancelPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelPatchJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AptSettings. */ + interface IAptSettings { + + /** AptSettings type */ + type?: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type|null); + + /** AptSettings excludes */ + excludes?: (string[]|null); + + /** AptSettings exclusivePackages */ + exclusivePackages?: (string[]|null); + } + + /** Represents an AptSettings. */ + class AptSettings implements IAptSettings { + + /** + * Constructs a new AptSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IAptSettings); + + /** AptSettings type. */ + public type: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type); + + /** AptSettings excludes. */ + public excludes: string[]; + + /** AptSettings exclusivePackages. */ + public exclusivePackages: string[]; + + /** + * Creates a new AptSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AptSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IAptSettings): google.cloud.osconfig.v1.AptSettings; + + /** + * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @param message AptSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @param message AptSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AptSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.AptSettings; + + /** + * Decodes an AptSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.AptSettings; + + /** + * Verifies an AptSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AptSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.AptSettings; + + /** + * Creates a plain object from an AptSettings message. Also converts values to other types if specified. + * @param message AptSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.AptSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AptSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AptSettings { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + DIST = 1, + UPGRADE = 2 + } + } + + /** Properties of a YumSettings. */ + interface IYumSettings { + + /** YumSettings security */ + security?: (boolean|null); + + /** YumSettings minimal */ + minimal?: (boolean|null); + + /** YumSettings excludes */ + excludes?: (string[]|null); + + /** YumSettings exclusivePackages */ + exclusivePackages?: (string[]|null); + } + + /** Represents a YumSettings. */ + class YumSettings implements IYumSettings { + + /** + * Constructs a new YumSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IYumSettings); + + /** YumSettings security. */ + public security: boolean; + + /** YumSettings minimal. */ + public minimal: boolean; + + /** YumSettings excludes. */ + public excludes: string[]; + + /** YumSettings exclusivePackages. */ + public exclusivePackages: string[]; + + /** + * Creates a new YumSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns YumSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IYumSettings): google.cloud.osconfig.v1.YumSettings; + + /** + * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @param message YumSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @param message YumSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YumSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.YumSettings; + + /** + * Decodes a YumSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.YumSettings; + + /** + * Verifies a YumSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.YumSettings; + + /** + * Creates a plain object from a YumSettings message. Also converts values to other types if specified. + * @param message YumSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.YumSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YumSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GooSettings. */ + interface IGooSettings { + } + + /** Represents a GooSettings. */ + class GooSettings implements IGooSettings { + + /** + * Constructs a new GooSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGooSettings); + + /** + * Creates a new GooSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GooSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGooSettings): google.cloud.osconfig.v1.GooSettings; + + /** + * Encodes the specified GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @param message GooSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGooSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @param message GooSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGooSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GooSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GooSettings; + + /** + * Decodes a GooSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GooSettings; + + /** + * Verifies a GooSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GooSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GooSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GooSettings; + + /** + * Creates a plain object from a GooSettings message. Also converts values to other types if specified. + * @param message GooSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GooSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GooSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ZypperSettings. */ + interface IZypperSettings { + + /** ZypperSettings withOptional */ + withOptional?: (boolean|null); + + /** ZypperSettings withUpdate */ + withUpdate?: (boolean|null); + + /** ZypperSettings categories */ + categories?: (string[]|null); + + /** ZypperSettings severities */ + severities?: (string[]|null); + + /** ZypperSettings excludes */ + excludes?: (string[]|null); + + /** ZypperSettings exclusivePatches */ + exclusivePatches?: (string[]|null); + } + + /** Represents a ZypperSettings. */ + class ZypperSettings implements IZypperSettings { + + /** + * Constructs a new ZypperSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IZypperSettings); + + /** ZypperSettings withOptional. */ + public withOptional: boolean; + + /** ZypperSettings withUpdate. */ + public withUpdate: boolean; + + /** ZypperSettings categories. */ + public categories: string[]; + + /** ZypperSettings severities. */ + public severities: string[]; + + /** ZypperSettings excludes. */ + public excludes: string[]; + + /** ZypperSettings exclusivePatches. */ + public exclusivePatches: string[]; + + /** + * Creates a new ZypperSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IZypperSettings): google.cloud.osconfig.v1.ZypperSettings; + + /** + * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @param message ZypperSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @param message ZypperSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ZypperSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ZypperSettings; + + /** + * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ZypperSettings; + + /** + * Verifies a ZypperSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ZypperSettings; + + /** + * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. + * @param message ZypperSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ZypperSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ZypperSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WindowsUpdateSettings. */ + interface IWindowsUpdateSettings { + + /** WindowsUpdateSettings classifications */ + classifications?: (google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]|null); + + /** WindowsUpdateSettings excludes */ + excludes?: (string[]|null); + + /** WindowsUpdateSettings exclusivePatches */ + exclusivePatches?: (string[]|null); + } + + /** Represents a WindowsUpdateSettings. */ + class WindowsUpdateSettings implements IWindowsUpdateSettings { + + /** + * Constructs a new WindowsUpdateSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings); + + /** WindowsUpdateSettings classifications. */ + public classifications: google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]; + + /** WindowsUpdateSettings excludes. */ + public excludes: string[]; + + /** WindowsUpdateSettings exclusivePatches. */ + public exclusivePatches: string[]; + + /** + * Creates a new WindowsUpdateSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdateSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings): google.cloud.osconfig.v1.WindowsUpdateSettings; + + /** + * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @param message WindowsUpdateSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @param message WindowsUpdateSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsUpdateSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WindowsUpdateSettings; + + /** + * Decodes a WindowsUpdateSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WindowsUpdateSettings; + + /** + * Verifies a WindowsUpdateSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdateSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WindowsUpdateSettings; + + /** + * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. + * @param message WindowsUpdateSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.WindowsUpdateSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsUpdateSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WindowsUpdateSettings { + + /** Classification enum. */ + enum Classification { + CLASSIFICATION_UNSPECIFIED = 0, + CRITICAL = 1, + SECURITY = 2, + DEFINITION = 3, + DRIVER = 4, + FEATURE_PACK = 5, + SERVICE_PACK = 6, + TOOL = 7, + UPDATE_ROLLUP = 8, + UPDATE = 9 + } + } + + /** Properties of an ExecStep. */ + interface IExecStep { + + /** ExecStep linuxExecStepConfig */ + linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + + /** ExecStep windowsExecStepConfig */ + windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + } + + /** Represents an ExecStep. */ + class ExecStep implements IExecStep { + + /** + * Constructs a new ExecStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IExecStep); + + /** ExecStep linuxExecStepConfig. */ + public linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + + /** ExecStep windowsExecStepConfig. */ + public windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + + /** + * Creates a new ExecStep instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecStep instance + */ + public static create(properties?: google.cloud.osconfig.v1.IExecStep): google.cloud.osconfig.v1.ExecStep; + + /** + * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @param message ExecStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @param message ExecStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStep; + + /** + * Decodes an ExecStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStep; + + /** + * Verifies an ExecStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecStep + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStep; + + /** + * Creates a plain object from an ExecStep message. Also converts values to other types if specified. + * @param message ExecStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ExecStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExecStepConfig. */ + interface IExecStepConfig { + + /** ExecStepConfig localPath */ + localPath?: (string|null); + + /** ExecStepConfig gcsObject */ + gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); + + /** ExecStepConfig allowedSuccessCodes */ + allowedSuccessCodes?: (number[]|null); + + /** ExecStepConfig interpreter */ + interpreter?: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null); + } + + /** Represents an ExecStepConfig. */ + class ExecStepConfig implements IExecStepConfig { + + /** + * Constructs a new ExecStepConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IExecStepConfig); + + /** ExecStepConfig localPath. */ + public localPath: string; + + /** ExecStepConfig gcsObject. */ + public gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); + + /** ExecStepConfig allowedSuccessCodes. */ + public allowedSuccessCodes: number[]; + + /** ExecStepConfig interpreter. */ + public interpreter: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter); + + /** ExecStepConfig executable. */ + public executable?: ("localPath"|"gcsObject"); + + /** + * Creates a new ExecStepConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecStepConfig instance + */ + public static create(properties?: google.cloud.osconfig.v1.IExecStepConfig): google.cloud.osconfig.v1.ExecStepConfig; + + /** + * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @param message ExecStepConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @param message ExecStepConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecStepConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStepConfig; + + /** + * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStepConfig; + + /** + * Verifies an ExecStepConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecStepConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStepConfig; + + /** + * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. + * @param message ExecStepConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ExecStepConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecStepConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ExecStepConfig { + + /** Interpreter enum. */ + enum Interpreter { + INTERPRETER_UNSPECIFIED = 0, + SHELL = 1, + POWERSHELL = 2 + } + } + + /** Properties of a GcsObject. */ + interface IGcsObject { + + /** GcsObject bucket */ + bucket?: (string|null); + + /** GcsObject object */ + object?: (string|null); + + /** GcsObject generationNumber */ + generationNumber?: (number|Long|string|null); + } + + /** Represents a GcsObject. */ + class GcsObject implements IGcsObject { + + /** + * Constructs a new GcsObject. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGcsObject); + + /** GcsObject bucket. */ + public bucket: string; + + /** GcsObject object. */ + public object: string; + + /** GcsObject generationNumber. */ + public generationNumber: (number|Long|string); + + /** + * Creates a new GcsObject instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsObject instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGcsObject): google.cloud.osconfig.v1.GcsObject; + + /** + * Encodes the specified GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @param message GcsObject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGcsObject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @param message GcsObject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGcsObject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsObject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GcsObject; + + /** + * Decodes a GcsObject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GcsObject; + + /** + * Verifies a GcsObject message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsObject + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GcsObject; + + /** + * Creates a plain object from a GcsObject message. Also converts values to other types if specified. + * @param message GcsObject + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GcsObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsObject to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PatchInstanceFilter. */ + interface IPatchInstanceFilter { + + /** PatchInstanceFilter all */ + all?: (boolean|null); + + /** PatchInstanceFilter groupLabels */ + groupLabels?: (google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]|null); + + /** PatchInstanceFilter zones */ + zones?: (string[]|null); + + /** PatchInstanceFilter instances */ + instances?: (string[]|null); + + /** PatchInstanceFilter instanceNamePrefixes */ + instanceNamePrefixes?: (string[]|null); + } + + /** Represents a PatchInstanceFilter. */ + class PatchInstanceFilter implements IPatchInstanceFilter { + + /** + * Constructs a new PatchInstanceFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter); + + /** PatchInstanceFilter all. */ + public all: boolean; + + /** PatchInstanceFilter groupLabels. */ + public groupLabels: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]; + + /** PatchInstanceFilter zones. */ + public zones: string[]; + + /** PatchInstanceFilter instances. */ + public instances: string[]; + + /** PatchInstanceFilter instanceNamePrefixes. */ + public instanceNamePrefixes: string[]; + + /** + * Creates a new PatchInstanceFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchInstanceFilter instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter): google.cloud.osconfig.v1.PatchInstanceFilter; + + /** + * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @param message PatchInstanceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @param message PatchInstanceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PatchInstanceFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchInstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchInstanceFilter; + + /** + * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchInstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchInstanceFilter; + + /** + * Verifies a PatchInstanceFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchInstanceFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter; + + /** + * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. + * @param message PatchInstanceFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchInstanceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PatchInstanceFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PatchInstanceFilter { + + /** Properties of a GroupLabel. */ + interface IGroupLabel { + + /** GroupLabel labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a GroupLabel. */ + class GroupLabel implements IGroupLabel { + + /** + * Constructs a new GroupLabel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel); + + /** GroupLabel labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new GroupLabel instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupLabel instance + */ + public static create(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + + /** + * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @param message GroupLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @param message GroupLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GroupLabel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + + /** + * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + + /** + * Verifies a GroupLabel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GroupLabel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupLabel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + + /** + * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. + * @param message GroupLabel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GroupLabel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + } + + /** 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); + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a DateTime. */ + interface IDateTime { + + /** DateTime year */ + year?: (number|null); + + /** DateTime month */ + month?: (number|null); + + /** DateTime day */ + day?: (number|null); + + /** DateTime hours */ + hours?: (number|null); + + /** DateTime minutes */ + minutes?: (number|null); + + /** DateTime seconds */ + seconds?: (number|null); + + /** DateTime nanos */ + nanos?: (number|null); + + /** DateTime utcOffset */ + utcOffset?: (google.protobuf.IDuration|null); + + /** DateTime timeZone */ + timeZone?: (google.type.ITimeZone|null); + } + + /** Represents a DateTime. */ + class DateTime implements IDateTime { + + /** + * Constructs a new DateTime. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDateTime); + + /** DateTime year. */ + public year: number; + + /** DateTime month. */ + public month: number; + + /** DateTime day. */ + public day: number; + + /** DateTime hours. */ + public hours: number; + + /** DateTime minutes. */ + public minutes: number; + + /** DateTime seconds. */ + public seconds: number; + + /** DateTime nanos. */ + public nanos: number; + + /** DateTime utcOffset. */ + public utcOffset?: (google.protobuf.IDuration|null); + + /** DateTime timeZone. */ + public timeZone?: (google.type.ITimeZone|null); + + /** DateTime timeOffset. */ + public timeOffset?: ("utcOffset"|"timeZone"); + + /** + * Creates a new DateTime instance using the specified properties. + * @param [properties] Properties to set + * @returns DateTime instance + */ + public static create(properties?: google.type.IDateTime): google.type.DateTime; + + /** + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateTime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.DateTime; + + /** + * Decodes a DateTime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.DateTime; + + /** + * Verifies a DateTime message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateTime + */ + public static fromObject(object: { [k: string]: any }): google.type.DateTime; + + /** + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @param message DateTime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateTime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TimeZone. */ + interface ITimeZone { + + /** TimeZone id */ + id?: (string|null); + + /** TimeZone version */ + version?: (string|null); + } + + /** Represents a TimeZone. */ + class TimeZone implements ITimeZone { + + /** + * Constructs a new TimeZone. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ITimeZone); + + /** TimeZone id. */ + public id: string; + + /** TimeZone version. */ + public version: string; + + /** + * Creates a new TimeZone instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeZone instance + */ + public static create(properties?: google.type.ITimeZone): google.type.TimeZone; + + /** + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeZone message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeZone; + + /** + * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeZone; + + /** + * Verifies a TimeZone message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeZone + */ + public static fromObject(object: { [k: string]: any }): google.type.TimeZone; + + /** + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @param message TimeZone + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeZone to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } + + /** Properties of a TimeOfDay. */ + interface ITimeOfDay { + + /** TimeOfDay hours */ + hours?: (number|null); + + /** TimeOfDay minutes */ + minutes?: (number|null); + + /** TimeOfDay seconds */ + seconds?: (number|null); + + /** TimeOfDay nanos */ + nanos?: (number|null); + } + + /** Represents a TimeOfDay. */ + class TimeOfDay implements ITimeOfDay { + + /** + * Constructs a new TimeOfDay. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ITimeOfDay); + + /** TimeOfDay hours. */ + public hours: number; + + /** TimeOfDay minutes. */ + public minutes: number; + + /** TimeOfDay seconds. */ + public seconds: number; + + /** TimeOfDay nanos. */ + public nanos: number; + + /** + * Creates a new TimeOfDay instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeOfDay instance + */ + public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; + + /** + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeOfDay; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeOfDay; + + /** + * Verifies a TimeOfDay message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeOfDay + */ + public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; + + /** + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. + * @param message TimeOfDay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeOfDay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js new file mode 100644 index 00000000000..3acd393aa36 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -0,0 +1,21791 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("protobufjs/minimal")); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_os_config_0_1_0_protos || ($protobuf.roots._google_cloud_os_config_0_1_0_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.osconfig = (function() { + + /** + * Namespace osconfig. + * @memberof google.cloud + * @namespace + */ + var osconfig = {}; + + osconfig.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.osconfig + * @namespace + */ + var v1 = {}; + + v1.OsConfigService = (function() { + + /** + * Constructs a new OsConfigService service. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an OsConfigService + * @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 OsConfigService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (OsConfigService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsConfigService; + + /** + * Creates new OsConfigService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.osconfig.v1.OsConfigService + * @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 {OsConfigService} RPC service. Useful where requests and/or responses are streamed. + */ + OsConfigService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ExecutePatchJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + */ + + /** + * Calls ExecutePatchJob. + * @function executePatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.executePatchJob = function executePatchJob(request, callback) { + return this.rpcCall(executePatchJob, $root.google.cloud.osconfig.v1.ExecutePatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); + }, "name", { value: "ExecutePatchJob" }); + + /** + * Calls ExecutePatchJob. + * @function executePatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef GetPatchJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + */ + + /** + * Calls GetPatchJob. + * @function getPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.getPatchJob = function getPatchJob(request, callback) { + return this.rpcCall(getPatchJob, $root.google.cloud.osconfig.v1.GetPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); + }, "name", { value: "GetPatchJob" }); + + /** + * Calls GetPatchJob. + * @function getPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef CancelPatchJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + */ + + /** + * Calls CancelPatchJob. + * @function cancelPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.cancelPatchJob = function cancelPatchJob(request, callback) { + return this.rpcCall(cancelPatchJob, $root.google.cloud.osconfig.v1.CancelPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); + }, "name", { value: "CancelPatchJob" }); + + /** + * Calls CancelPatchJob. + * @function cancelPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ListPatchJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} [response] ListPatchJobsResponse + */ + + /** + * Calls ListPatchJobs. + * @function listPatchJobs + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback} callback Node-style callback called with the error, if any, and ListPatchJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.listPatchJobs = function listPatchJobs(request, callback) { + return this.rpcCall(listPatchJobs, $root.google.cloud.osconfig.v1.ListPatchJobsRequest, $root.google.cloud.osconfig.v1.ListPatchJobsResponse, request, callback); + }, "name", { value: "ListPatchJobs" }); + + /** + * Calls ListPatchJobs. + * @function listPatchJobs + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ListPatchJobInstanceDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} [response] ListPatchJobInstanceDetailsResponse + */ + + /** + * Calls ListPatchJobInstanceDetails. + * @function listPatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback} callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.listPatchJobInstanceDetails = function listPatchJobInstanceDetails(request, callback) { + return this.rpcCall(listPatchJobInstanceDetails, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, request, callback); + }, "name", { value: "ListPatchJobInstanceDetails" }); + + /** + * Calls ListPatchJobInstanceDetails. + * @function listPatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef CreatePatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + */ + + /** + * Calls CreatePatchDeployment. + * @function createPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.createPatchDeployment = function createPatchDeployment(request, callback) { + return this.rpcCall(createPatchDeployment, $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); + }, "name", { value: "CreatePatchDeployment" }); + + /** + * Calls CreatePatchDeployment. + * @function createPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef GetPatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + */ + + /** + * Calls GetPatchDeployment. + * @function getPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.getPatchDeployment = function getPatchDeployment(request, callback) { + return this.rpcCall(getPatchDeployment, $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); + }, "name", { value: "GetPatchDeployment" }); + + /** + * Calls GetPatchDeployment. + * @function getPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ListPatchDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} [response] ListPatchDeploymentsResponse + */ + + /** + * Calls ListPatchDeployments. + * @function listPatchDeployments + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback} callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.listPatchDeployments = function listPatchDeployments(request, callback) { + return this.rpcCall(listPatchDeployments, $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest, $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse, request, callback); + }, "name", { value: "ListPatchDeployments" }); + + /** + * Calls ListPatchDeployments. + * @function listPatchDeployments + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef DeletePatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeletePatchDeployment. + * @function deletePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.deletePatchDeployment = function deletePatchDeployment(request, callback) { + return this.rpcCall(deletePatchDeployment, $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePatchDeployment" }); + + /** + * Calls DeletePatchDeployment. + * @function deletePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return OsConfigService; + })(); + + v1.PatchDeployment = (function() { + + /** + * Properties of a PatchDeployment. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchDeployment + * @property {string|null} [name] PatchDeployment name + * @property {string|null} [description] PatchDeployment description + * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchDeployment instanceFilter + * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchDeployment patchConfig + * @property {google.protobuf.IDuration|null} [duration] PatchDeployment duration + * @property {google.cloud.osconfig.v1.IOneTimeSchedule|null} [oneTimeSchedule] PatchDeployment oneTimeSchedule + * @property {google.cloud.osconfig.v1.IRecurringSchedule|null} [recurringSchedule] PatchDeployment recurringSchedule + * @property {google.protobuf.ITimestamp|null} [createTime] PatchDeployment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PatchDeployment updateTime + * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] PatchDeployment lastExecuteTime + */ + + /** + * Constructs a new PatchDeployment. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchDeployment. + * @implements IPatchDeployment + * @constructor + * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set + */ + function PatchDeployment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PatchDeployment name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.name = ""; + + /** + * PatchDeployment description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.description = ""; + + /** + * PatchDeployment instanceFilter. + * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.instanceFilter = null; + + /** + * PatchDeployment patchConfig. + * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.patchConfig = null; + + /** + * PatchDeployment duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.duration = null; + + /** + * PatchDeployment oneTimeSchedule. + * @member {google.cloud.osconfig.v1.IOneTimeSchedule|null|undefined} oneTimeSchedule + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.oneTimeSchedule = null; + + /** + * PatchDeployment recurringSchedule. + * @member {google.cloud.osconfig.v1.IRecurringSchedule|null|undefined} recurringSchedule + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.recurringSchedule = null; + + /** + * PatchDeployment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.createTime = null; + + /** + * PatchDeployment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.updateTime = null; + + /** + * PatchDeployment lastExecuteTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.lastExecuteTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PatchDeployment schedule. + * @member {"oneTimeSchedule"|"recurringSchedule"|undefined} schedule + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + Object.defineProperty(PatchDeployment.prototype, "schedule", { + get: $util.oneOfGetter($oneOfFields = ["oneTimeSchedule", "recurringSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PatchDeployment instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment instance + */ + PatchDeployment.create = function create(properties) { + return new PatchDeployment(properties); + }; + + /** + * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchDeployment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) + $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.oneTimeSchedule != null && Object.hasOwnProperty.call(message, "oneTimeSchedule")) + $root.google.cloud.osconfig.v1.OneTimeSchedule.encode(message.oneTimeSchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.recurringSchedule != null && Object.hasOwnProperty.call(message, "recurringSchedule")) + $root.google.cloud.osconfig.v1.RecurringSchedule.encode(message.recurringSchedule, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) + $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchDeployment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PatchDeployment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchDeployment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchDeployment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + case 4: + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + case 5: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.decode(reader, reader.uint32()); + break; + case 7: + message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.decode(reader, reader.uint32()); + break; + case 8: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PatchDeployment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchDeployment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PatchDeployment message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchDeployment.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { + var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); + if (error) + return "patchConfig." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { + properties.schedule = 1; + { + var error = $root.google.cloud.osconfig.v1.OneTimeSchedule.verify(message.oneTimeSchedule); + if (error) + return "oneTimeSchedule." + error; + } + } + if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { + if (properties.schedule === 1) + return "schedule: multiple values"; + properties.schedule = 1; + { + var error = $root.google.cloud.osconfig.v1.RecurringSchedule.verify(message.recurringSchedule); + if (error) + return "recurringSchedule." + error; + } + } + 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.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); + if (error) + return "lastExecuteTime." + error; + } + return null; + }; + + /** + * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + */ + PatchDeployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchDeployment) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchDeployment(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); + } + if (object.patchConfig != null) { + if (typeof object.patchConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.patchConfig: object expected"); + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.oneTimeSchedule != null) { + if (typeof object.oneTimeSchedule !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.oneTimeSchedule: object expected"); + message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.fromObject(object.oneTimeSchedule); + } + if (object.recurringSchedule != null) { + if (typeof object.recurringSchedule !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.recurringSchedule: object expected"); + message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.fromObject(object.recurringSchedule); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.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.osconfig.v1.PatchDeployment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastExecuteTime != null) { + if (typeof object.lastExecuteTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.lastExecuteTime: object expected"); + message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); + } + return message; + }; + + /** + * Creates a plain object from a PatchDeployment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.PatchDeployment} message PatchDeployment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchDeployment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.instanceFilter = null; + object.patchConfig = null; + object.duration = null; + object.createTime = null; + object.updateTime = null; + object.lastExecuteTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) + object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { + object.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.toObject(message.oneTimeSchedule, options); + if (options.oneofs) + object.schedule = "oneTimeSchedule"; + } + if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { + object.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.toObject(message.recurringSchedule, options); + if (options.oneofs) + object.schedule = "recurringSchedule"; + } + 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.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) + object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); + return object; + }; + + /** + * Converts this PatchDeployment to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + * @returns {Object.} JSON object + */ + PatchDeployment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PatchDeployment; + })(); + + v1.OneTimeSchedule = (function() { + + /** + * Properties of an OneTimeSchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IOneTimeSchedule + * @property {google.protobuf.ITimestamp|null} [executeTime] OneTimeSchedule executeTime + */ + + /** + * Constructs a new OneTimeSchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an OneTimeSchedule. + * @implements IOneTimeSchedule + * @constructor + * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set + */ + function OneTimeSchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneTimeSchedule executeTime. + * @member {google.protobuf.ITimestamp|null|undefined} executeTime + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @instance + */ + OneTimeSchedule.prototype.executeTime = null; + + /** + * Creates a new OneTimeSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule instance + */ + OneTimeSchedule.create = function create(properties) { + return new OneTimeSchedule(properties); + }; + + /** + * Encodes the specified OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneTimeSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executeTime != null && Object.hasOwnProperty.call(message, "executeTime")) + $root.google.protobuf.Timestamp.encode(message.executeTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneTimeSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneTimeSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.executeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneTimeSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneTimeSchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneTimeSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executeTime != null && message.hasOwnProperty("executeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.executeTime); + if (error) + return "executeTime." + error; + } + return null; + }; + + /** + * Creates an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + */ + OneTimeSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OneTimeSchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); + if (object.executeTime != null) { + if (typeof object.executeTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.OneTimeSchedule.executeTime: object expected"); + message.executeTime = $root.google.protobuf.Timestamp.fromObject(object.executeTime); + } + return message; + }; + + /** + * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.OneTimeSchedule} message OneTimeSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneTimeSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.executeTime = null; + if (message.executeTime != null && message.hasOwnProperty("executeTime")) + object.executeTime = $root.google.protobuf.Timestamp.toObject(message.executeTime, options); + return object; + }; + + /** + * Converts this OneTimeSchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @instance + * @returns {Object.} JSON object + */ + OneTimeSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneTimeSchedule; + })(); + + v1.RecurringSchedule = (function() { + + /** + * Properties of a RecurringSchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IRecurringSchedule + * @property {google.type.ITimeZone|null} [timeZone] RecurringSchedule timeZone + * @property {google.protobuf.ITimestamp|null} [startTime] RecurringSchedule startTime + * @property {google.protobuf.ITimestamp|null} [endTime] RecurringSchedule endTime + * @property {google.type.ITimeOfDay|null} [timeOfDay] RecurringSchedule timeOfDay + * @property {google.cloud.osconfig.v1.RecurringSchedule.Frequency|null} [frequency] RecurringSchedule frequency + * @property {google.cloud.osconfig.v1.IWeeklySchedule|null} [weekly] RecurringSchedule weekly + * @property {google.cloud.osconfig.v1.IMonthlySchedule|null} [monthly] RecurringSchedule monthly + * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] RecurringSchedule lastExecuteTime + * @property {google.protobuf.ITimestamp|null} [nextExecuteTime] RecurringSchedule nextExecuteTime + */ + + /** + * Constructs a new RecurringSchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a RecurringSchedule. + * @implements IRecurringSchedule + * @constructor + * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set + */ + function RecurringSchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecurringSchedule timeZone. + * @member {google.type.ITimeZone|null|undefined} timeZone + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.timeZone = null; + + /** + * RecurringSchedule startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.startTime = null; + + /** + * RecurringSchedule endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.endTime = null; + + /** + * RecurringSchedule timeOfDay. + * @member {google.type.ITimeOfDay|null|undefined} timeOfDay + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.timeOfDay = null; + + /** + * RecurringSchedule frequency. + * @member {google.cloud.osconfig.v1.RecurringSchedule.Frequency} frequency + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.frequency = 0; + + /** + * RecurringSchedule weekly. + * @member {google.cloud.osconfig.v1.IWeeklySchedule|null|undefined} weekly + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.weekly = null; + + /** + * RecurringSchedule monthly. + * @member {google.cloud.osconfig.v1.IMonthlySchedule|null|undefined} monthly + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.monthly = null; + + /** + * RecurringSchedule lastExecuteTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.lastExecuteTime = null; + + /** + * RecurringSchedule nextExecuteTime. + * @member {google.protobuf.ITimestamp|null|undefined} nextExecuteTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.nextExecuteTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RecurringSchedule scheduleConfig. + * @member {"weekly"|"monthly"|undefined} scheduleConfig + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + Object.defineProperty(RecurringSchedule.prototype, "scheduleConfig", { + get: $util.oneOfGetter($oneOfFields = ["weekly", "monthly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RecurringSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule instance + */ + RecurringSchedule.create = function create(properties) { + return new RecurringSchedule(properties); + }; + + /** + * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timeOfDay != null && Object.hasOwnProperty.call(message, "timeOfDay")) + $root.google.type.TimeOfDay.encode(message.timeOfDay, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frequency); + if (message.weekly != null && Object.hasOwnProperty.call(message, "weekly")) + $root.google.cloud.osconfig.v1.WeeklySchedule.encode(message.weekly, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.monthly != null && Object.hasOwnProperty.call(message, "monthly")) + $root.google.cloud.osconfig.v1.MonthlySchedule.encode(message.monthly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) + $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.nextExecuteTime != null && Object.hasOwnProperty.call(message, "nextExecuteTime")) + $root.google.protobuf.Timestamp.encode(message.nextExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecurringSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + break; + case 2: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.timeOfDay = $root.google.type.TimeOfDay.decode(reader, reader.uint32()); + break; + case 5: + message.frequency = reader.int32(); + break; + case 6: + message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.decode(reader, reader.uint32()); + break; + case 7: + message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.decode(reader, reader.uint32()); + break; + case 9: + message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.nextExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecurringSchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecurringSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + var error = $root.google.type.TimeZone.verify(message.timeZone); + if (error) + return "timeZone." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) { + var error = $root.google.type.TimeOfDay.verify(message.timeOfDay); + if (error) + return "timeOfDay." + error; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.weekly != null && message.hasOwnProperty("weekly")) { + properties.scheduleConfig = 1; + { + var error = $root.google.cloud.osconfig.v1.WeeklySchedule.verify(message.weekly); + if (error) + return "weekly." + error; + } + } + if (message.monthly != null && message.hasOwnProperty("monthly")) { + if (properties.scheduleConfig === 1) + return "scheduleConfig: multiple values"; + properties.scheduleConfig = 1; + { + var error = $root.google.cloud.osconfig.v1.MonthlySchedule.verify(message.monthly); + if (error) + return "monthly." + error; + } + } + if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); + if (error) + return "lastExecuteTime." + error; + } + if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.nextExecuteTime); + if (error) + return "nextExecuteTime." + error; + } + return null; + }; + + /** + * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + */ + RecurringSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.RecurringSchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); + if (object.timeZone != null) { + if (typeof object.timeZone !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeZone: object expected"); + message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.timeOfDay != null) { + if (typeof object.timeOfDay !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeOfDay: object expected"); + message.timeOfDay = $root.google.type.TimeOfDay.fromObject(object.timeOfDay); + } + switch (object.frequency) { + case "FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "WEEKLY": + case 1: + message.frequency = 1; + break; + case "MONTHLY": + case 2: + message.frequency = 2; + break; + } + if (object.weekly != null) { + if (typeof object.weekly !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.weekly: object expected"); + message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.fromObject(object.weekly); + } + if (object.monthly != null) { + if (typeof object.monthly !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.monthly: object expected"); + message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.fromObject(object.monthly); + } + if (object.lastExecuteTime != null) { + if (typeof object.lastExecuteTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.lastExecuteTime: object expected"); + message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); + } + if (object.nextExecuteTime != null) { + if (typeof object.nextExecuteTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.nextExecuteTime: object expected"); + message.nextExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.nextExecuteTime); + } + return message; + }; + + /** + * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.RecurringSchedule} message RecurringSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecurringSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeZone = null; + object.startTime = null; + object.endTime = null; + object.timeOfDay = null; + object.frequency = options.enums === String ? "FREQUENCY_UNSPECIFIED" : 0; + object.lastExecuteTime = null; + object.nextExecuteTime = null; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) + object.timeOfDay = $root.google.type.TimeOfDay.toObject(message.timeOfDay, options); + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.cloud.osconfig.v1.RecurringSchedule.Frequency[message.frequency] : message.frequency; + if (message.weekly != null && message.hasOwnProperty("weekly")) { + object.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.toObject(message.weekly, options); + if (options.oneofs) + object.scheduleConfig = "weekly"; + } + if (message.monthly != null && message.hasOwnProperty("monthly")) { + object.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.toObject(message.monthly, options); + if (options.oneofs) + object.scheduleConfig = "monthly"; + } + if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) + object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); + if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) + object.nextExecuteTime = $root.google.protobuf.Timestamp.toObject(message.nextExecuteTime, options); + return object; + }; + + /** + * Converts this RecurringSchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + * @returns {Object.} JSON object + */ + RecurringSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Frequency enum. + * @name google.cloud.osconfig.v1.RecurringSchedule.Frequency + * @enum {number} + * @property {number} FREQUENCY_UNSPECIFIED=0 FREQUENCY_UNSPECIFIED value + * @property {number} WEEKLY=1 WEEKLY value + * @property {number} MONTHLY=2 MONTHLY value + */ + RecurringSchedule.Frequency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FREQUENCY_UNSPECIFIED"] = 0; + values[valuesById[1] = "WEEKLY"] = 1; + values[valuesById[2] = "MONTHLY"] = 2; + return values; + })(); + + return RecurringSchedule; + })(); + + v1.WeeklySchedule = (function() { + + /** + * Properties of a WeeklySchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IWeeklySchedule + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeeklySchedule dayOfWeek + */ + + /** + * Constructs a new WeeklySchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a WeeklySchedule. + * @implements IWeeklySchedule + * @constructor + * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set + */ + function WeeklySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeeklySchedule dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.dayOfWeek = 0; + + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule instance + */ + WeeklySchedule.create = function create(properties) { + return new WeeklySchedule(properties); + }; + + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dayOfWeek); + return writer; + }; + + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dayOfWeek = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeeklySchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeeklySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + */ + WeeklySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.WeeklySchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); + switch (object.dayOfWeek) { + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.WeeklySchedule} message WeeklySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeeklySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; + + /** + * Converts this WeeklySchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @instance + * @returns {Object.} JSON object + */ + WeeklySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WeeklySchedule; + })(); + + v1.MonthlySchedule = (function() { + + /** + * Properties of a MonthlySchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IMonthlySchedule + * @property {google.cloud.osconfig.v1.IWeekDayOfMonth|null} [weekDayOfMonth] MonthlySchedule weekDayOfMonth + * @property {number|null} [monthDay] MonthlySchedule monthDay + */ + + /** + * Constructs a new MonthlySchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a MonthlySchedule. + * @implements IMonthlySchedule + * @constructor + * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set + */ + function MonthlySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonthlySchedule weekDayOfMonth. + * @member {google.cloud.osconfig.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.weekDayOfMonth = null; + + /** + * MonthlySchedule monthDay. + * @member {number} monthDay + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.monthDay = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MonthlySchedule dayOfMonth. + * @member {"weekDayOfMonth"|"monthDay"|undefined} dayOfMonth + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + */ + Object.defineProperty(MonthlySchedule.prototype, "dayOfMonth", { + get: $util.oneOfGetter($oneOfFields = ["weekDayOfMonth", "monthDay"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule instance + */ + MonthlySchedule.create = function create(properties) { + return new MonthlySchedule(properties); + }; + + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) + $root.google.cloud.osconfig.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.monthDay != null && Object.hasOwnProperty.call(message, "monthDay")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.monthDay); + return writer; + }; + + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.decode(reader, reader.uint32()); + break; + case 2: + message.monthDay = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonthlySchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonthlySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + properties.dayOfMonth = 1; + { + var error = $root.google.cloud.osconfig.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); + if (error) + return "weekDayOfMonth." + error; + } + } + if (message.monthDay != null && message.hasOwnProperty("monthDay")) { + if (properties.dayOfMonth === 1) + return "dayOfMonth: multiple values"; + properties.dayOfMonth = 1; + if (!$util.isInteger(message.monthDay)) + return "monthDay: integer expected"; + } + return null; + }; + + /** + * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + */ + MonthlySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.MonthlySchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); + if (object.weekDayOfMonth != null) { + if (typeof object.weekDayOfMonth !== "object") + throw TypeError(".google.cloud.osconfig.v1.MonthlySchedule.weekDayOfMonth: object expected"); + message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); + } + if (object.monthDay != null) + message.monthDay = object.monthDay | 0; + return message; + }; + + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.MonthlySchedule} message MonthlySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonthlySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + object.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); + if (options.oneofs) + object.dayOfMonth = "weekDayOfMonth"; + } + if (message.monthDay != null && message.hasOwnProperty("monthDay")) { + object.monthDay = message.monthDay; + if (options.oneofs) + object.dayOfMonth = "monthDay"; + } + return object; + }; + + /** + * Converts this MonthlySchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + * @returns {Object.} JSON object + */ + MonthlySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonthlySchedule; + })(); + + v1.WeekDayOfMonth = (function() { + + /** + * Properties of a WeekDayOfMonth. + * @memberof google.cloud.osconfig.v1 + * @interface IWeekDayOfMonth + * @property {number|null} [weekOrdinal] WeekDayOfMonth weekOrdinal + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek + */ + + /** + * Constructs a new WeekDayOfMonth. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a WeekDayOfMonth. + * @implements IWeekDayOfMonth + * @constructor + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set + */ + function WeekDayOfMonth(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeekDayOfMonth weekOrdinal. + * @member {number} weekOrdinal + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.weekOrdinal = 0; + + /** + * WeekDayOfMonth dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.dayOfWeek = 0; + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth instance + */ + WeekDayOfMonth.create = function create(properties) { + return new WeekDayOfMonth(properties); + }; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekOrdinal != null && Object.hasOwnProperty.call(message, "weekOrdinal")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOrdinal); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + return writer; + }; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weekOrdinal = reader.int32(); + break; + case 2: + message.dayOfWeek = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeekDayOfMonth message. + * @function verify + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeekDayOfMonth.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) + if (!$util.isInteger(message.weekOrdinal)) + return "weekOrdinal: integer expected"; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + */ + WeekDayOfMonth.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.WeekDayOfMonth) + return object; + var message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); + if (object.weekOrdinal != null) + message.weekOrdinal = object.weekOrdinal | 0; + switch (object.dayOfWeek) { + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.WeekDayOfMonth} message WeekDayOfMonth + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeekDayOfMonth.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.weekOrdinal = 0; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + } + if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) + object.weekOrdinal = message.weekOrdinal; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + * @returns {Object.} JSON object + */ + WeekDayOfMonth.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WeekDayOfMonth; + })(); + + v1.CreatePatchDeploymentRequest = (function() { + + /** + * Properties of a CreatePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface ICreatePatchDeploymentRequest + * @property {string|null} [parent] CreatePatchDeploymentRequest parent + * @property {string|null} [patchDeploymentId] CreatePatchDeploymentRequest patchDeploymentId + * @property {google.cloud.osconfig.v1.IPatchDeployment|null} [patchDeployment] CreatePatchDeploymentRequest patchDeployment + */ + + /** + * Constructs a new CreatePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a CreatePatchDeploymentRequest. + * @implements ICreatePatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set + */ + function CreatePatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePatchDeploymentRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + */ + CreatePatchDeploymentRequest.prototype.parent = ""; + + /** + * CreatePatchDeploymentRequest patchDeploymentId. + * @member {string} patchDeploymentId + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + */ + CreatePatchDeploymentRequest.prototype.patchDeploymentId = ""; + + /** + * CreatePatchDeploymentRequest patchDeployment. + * @member {google.cloud.osconfig.v1.IPatchDeployment|null|undefined} patchDeployment + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + */ + CreatePatchDeploymentRequest.prototype.patchDeployment = null; + + /** + * Creates a new CreatePatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest instance + */ + CreatePatchDeploymentRequest.create = function create(properties) { + return new CreatePatchDeploymentRequest(properties); + }; + + /** + * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePatchDeploymentRequest.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.patchDeploymentId != null && Object.hasOwnProperty.call(message, "patchDeploymentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.patchDeploymentId); + if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) + $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.patchDeploymentId = reader.string(); + break; + case 3: + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePatchDeploymentRequest.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.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) + if (!$util.isString(message.patchDeploymentId)) + return "patchDeploymentId: string expected"; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) { + var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployment); + if (error) + return "patchDeployment." + error; + } + return null; + }; + + /** + * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + */ + CreatePatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.patchDeploymentId != null) + message.patchDeploymentId = String(object.patchDeploymentId); + if (object.patchDeployment != null) { + if (typeof object.patchDeployment !== "object") + throw TypeError(".google.cloud.osconfig.v1.CreatePatchDeploymentRequest.patchDeployment: object expected"); + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployment); + } + return message; + }; + + /** + * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} message CreatePatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePatchDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.patchDeploymentId = ""; + object.patchDeployment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) + object.patchDeploymentId = message.patchDeploymentId; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + object.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployment, options); + return object; + }; + + /** + * Converts this CreatePatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreatePatchDeploymentRequest; + })(); + + v1.GetPatchDeploymentRequest = (function() { + + /** + * Properties of a GetPatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IGetPatchDeploymentRequest + * @property {string|null} [name] GetPatchDeploymentRequest name + */ + + /** + * Constructs a new GetPatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GetPatchDeploymentRequest. + * @implements IGetPatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set + */ + function GetPatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPatchDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @instance + */ + GetPatchDeploymentRequest.prototype.name = ""; + + /** + * Creates a new GetPatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest instance + */ + GetPatchDeploymentRequest.create = function create(properties) { + return new GetPatchDeploymentRequest(properties); + }; + + /** + * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchDeploymentRequest.encode = function encode(message, writer) { + 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 GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPatchDeploymentRequest.verify = function verify(message) { + if (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 GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + */ + GetPatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.GetPatchDeploymentRequest} message GetPatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPatchDeploymentRequest.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 GetPatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + GetPatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetPatchDeploymentRequest; + })(); + + v1.ListPatchDeploymentsRequest = (function() { + + /** + * Properties of a ListPatchDeploymentsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchDeploymentsRequest + * @property {string|null} [parent] ListPatchDeploymentsRequest parent + * @property {number|null} [pageSize] ListPatchDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListPatchDeploymentsRequest pageToken + */ + + /** + * Constructs a new ListPatchDeploymentsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchDeploymentsRequest. + * @implements IListPatchDeploymentsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set + */ + function ListPatchDeploymentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPatchDeploymentsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + */ + ListPatchDeploymentsRequest.prototype.parent = ""; + + /** + * ListPatchDeploymentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + */ + ListPatchDeploymentsRequest.prototype.pageSize = 0; + + /** + * ListPatchDeploymentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + */ + ListPatchDeploymentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPatchDeploymentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest instance + */ + ListPatchDeploymentsRequest.create = function create(properties) { + return new ListPatchDeploymentsRequest(properties); + }; + + /** + * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPatchDeploymentsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchDeploymentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + */ + ListPatchDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} message ListPatchDeploymentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchDeploymentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListPatchDeploymentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPatchDeploymentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPatchDeploymentsRequest; + })(); + + v1.ListPatchDeploymentsResponse = (function() { + + /** + * Properties of a ListPatchDeploymentsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchDeploymentsResponse + * @property {Array.|null} [patchDeployments] ListPatchDeploymentsResponse patchDeployments + * @property {string|null} [nextPageToken] ListPatchDeploymentsResponse nextPageToken + */ + + /** + * Constructs a new ListPatchDeploymentsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchDeploymentsResponse. + * @implements IListPatchDeploymentsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set + */ + function ListPatchDeploymentsResponse(properties) { + this.patchDeployments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPatchDeploymentsResponse patchDeployments. + * @member {Array.} patchDeployments + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @instance + */ + ListPatchDeploymentsResponse.prototype.patchDeployments = $util.emptyArray; + + /** + * ListPatchDeploymentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @instance + */ + ListPatchDeploymentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPatchDeploymentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse instance + */ + ListPatchDeploymentsResponse.create = function create(properties) { + return new ListPatchDeploymentsResponse(properties); + }; + + /** + * Encodes the specified ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchDeployments != null && message.patchDeployments.length) + for (var i = 0; i < message.patchDeployments.length; ++i) + $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployments[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 ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.patchDeployments && message.patchDeployments.length)) + message.patchDeployments = []; + message.patchDeployments.push($root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPatchDeploymentsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchDeploymentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchDeployments != null && message.hasOwnProperty("patchDeployments")) { + if (!Array.isArray(message.patchDeployments)) + return "patchDeployments: array expected"; + for (var i = 0; i < message.patchDeployments.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployments[i]); + if (error) + return "patchDeployments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse + */ + ListPatchDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); + if (object.patchDeployments) { + if (!Array.isArray(object.patchDeployments)) + throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: array expected"); + message.patchDeployments = []; + for (var i = 0; i < object.patchDeployments.length; ++i) { + if (typeof object.patchDeployments[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: object expected"); + message.patchDeployments[i] = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} message ListPatchDeploymentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchDeploymentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patchDeployments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.patchDeployments && message.patchDeployments.length) { + object.patchDeployments = []; + for (var j = 0; j < message.patchDeployments.length; ++j) + object.patchDeployments[j] = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPatchDeploymentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPatchDeploymentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPatchDeploymentsResponse; + })(); + + v1.DeletePatchDeploymentRequest = (function() { + + /** + * Properties of a DeletePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IDeletePatchDeploymentRequest + * @property {string|null} [name] DeletePatchDeploymentRequest name + */ + + /** + * Constructs a new DeletePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a DeletePatchDeploymentRequest. + * @implements IDeletePatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set + */ + function DeletePatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePatchDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @instance + */ + DeletePatchDeploymentRequest.prototype.name = ""; + + /** + * Creates a new DeletePatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest instance + */ + DeletePatchDeploymentRequest.create = function create(properties) { + return new DeletePatchDeploymentRequest(properties); + }; + + /** + * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePatchDeploymentRequest.encode = function encode(message, writer) { + 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 DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePatchDeploymentRequest.verify = function verify(message) { + if (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 DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + */ + DeletePatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} message DeletePatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePatchDeploymentRequest.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 DeletePatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeletePatchDeploymentRequest; + })(); + + v1.ExecutePatchJobRequest = (function() { + + /** + * Properties of an ExecutePatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IExecutePatchJobRequest + * @property {string|null} [parent] ExecutePatchJobRequest parent + * @property {string|null} [description] ExecutePatchJobRequest description + * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] ExecutePatchJobRequest instanceFilter + * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] ExecutePatchJobRequest patchConfig + * @property {google.protobuf.IDuration|null} [duration] ExecutePatchJobRequest duration + * @property {boolean|null} [dryRun] ExecutePatchJobRequest dryRun + * @property {string|null} [displayName] ExecutePatchJobRequest displayName + */ + + /** + * Constructs a new ExecutePatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an ExecutePatchJobRequest. + * @implements IExecutePatchJobRequest + * @constructor + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set + */ + function ExecutePatchJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutePatchJobRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.parent = ""; + + /** + * ExecutePatchJobRequest description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.description = ""; + + /** + * ExecutePatchJobRequest instanceFilter. + * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.instanceFilter = null; + + /** + * ExecutePatchJobRequest patchConfig. + * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.patchConfig = null; + + /** + * ExecutePatchJobRequest duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.duration = null; + + /** + * ExecutePatchJobRequest dryRun. + * @member {boolean} dryRun + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.dryRun = false; + + /** + * ExecutePatchJobRequest displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.displayName = ""; + + /** + * Creates a new ExecutePatchJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest instance + */ + ExecutePatchJobRequest.create = function create(properties) { + return new ExecutePatchJobRequest(properties); + }; + + /** + * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutePatchJobRequest.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) + $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutePatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutePatchJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 7: + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + case 4: + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + case 5: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.dryRun = reader.bool(); + break; + case 8: + message.displayName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutePatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutePatchJobRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutePatchJobRequest.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { + var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); + if (error) + return "patchConfig." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest + */ + ExecutePatchJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ExecutePatchJobRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.description != null) + message.description = String(object.description); + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); + } + if (object.patchConfig != null) { + if (typeof object.patchConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.patchConfig: object expected"); + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an ExecutePatchJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ExecutePatchJobRequest} message ExecutePatchJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutePatchJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.description = ""; + object.patchConfig = null; + object.duration = null; + object.dryRun = false; + object.instanceFilter = null; + object.displayName = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) + object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ExecutePatchJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + * @returns {Object.} JSON object + */ + ExecutePatchJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExecutePatchJobRequest; + })(); + + v1.GetPatchJobRequest = (function() { + + /** + * Properties of a GetPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IGetPatchJobRequest + * @property {string|null} [name] GetPatchJobRequest name + */ + + /** + * Constructs a new GetPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GetPatchJobRequest. + * @implements IGetPatchJobRequest + * @constructor + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set + */ + function GetPatchJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPatchJobRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @instance + */ + GetPatchJobRequest.prototype.name = ""; + + /** + * Creates a new GetPatchJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest instance + */ + GetPatchJobRequest.create = function create(properties) { + return new GetPatchJobRequest(properties); + }; + + /** + * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchJobRequest.encode = function encode(message, writer) { + 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 GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPatchJobRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPatchJobRequest.verify = function verify(message) { + if (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 GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + */ + GetPatchJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetPatchJobRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.GetPatchJobRequest} message GetPatchJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPatchJobRequest.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 GetPatchJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetPatchJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetPatchJobRequest; + })(); + + v1.ListPatchJobInstanceDetailsRequest = (function() { + + /** + * Properties of a ListPatchJobInstanceDetailsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobInstanceDetailsRequest + * @property {string|null} [parent] ListPatchJobInstanceDetailsRequest parent + * @property {number|null} [pageSize] ListPatchJobInstanceDetailsRequest pageSize + * @property {string|null} [pageToken] ListPatchJobInstanceDetailsRequest pageToken + * @property {string|null} [filter] ListPatchJobInstanceDetailsRequest filter + */ + + /** + * Constructs a new ListPatchJobInstanceDetailsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobInstanceDetailsRequest. + * @implements IListPatchJobInstanceDetailsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set + */ + function ListPatchJobInstanceDetailsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPatchJobInstanceDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.parent = ""; + + /** + * ListPatchJobInstanceDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.pageSize = 0; + + /** + * ListPatchJobInstanceDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.pageToken = ""; + + /** + * ListPatchJobInstanceDetailsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.filter = ""; + + /** + * Creates a new ListPatchJobInstanceDetailsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest instance + */ + ListPatchJobInstanceDetailsRequest.create = function create(properties) { + return new ListPatchJobInstanceDetailsRequest(properties); + }; + + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPatchJobInstanceDetailsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobInstanceDetailsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest + */ + ListPatchJobInstanceDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobInstanceDetailsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListPatchJobInstanceDetailsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobInstanceDetailsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPatchJobInstanceDetailsRequest; + })(); + + v1.ListPatchJobInstanceDetailsResponse = (function() { + + /** + * Properties of a ListPatchJobInstanceDetailsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobInstanceDetailsResponse + * @property {Array.|null} [patchJobInstanceDetails] ListPatchJobInstanceDetailsResponse patchJobInstanceDetails + * @property {string|null} [nextPageToken] ListPatchJobInstanceDetailsResponse nextPageToken + */ + + /** + * Constructs a new ListPatchJobInstanceDetailsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobInstanceDetailsResponse. + * @implements IListPatchJobInstanceDetailsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set + */ + function ListPatchJobInstanceDetailsResponse(properties) { + this.patchJobInstanceDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. + * @member {Array.} patchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @instance + */ + ListPatchJobInstanceDetailsResponse.prototype.patchJobInstanceDetails = $util.emptyArray; + + /** + * ListPatchJobInstanceDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @instance + */ + ListPatchJobInstanceDetailsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse instance + */ + ListPatchJobInstanceDetailsResponse.create = function create(properties) { + return new ListPatchJobInstanceDetailsResponse(properties); + }; + + /** + * Encodes the specified ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchJobInstanceDetails != null && message.patchJobInstanceDetails.length) + for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) + $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.encode(message.patchJobInstanceDetails[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 ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.patchJobInstanceDetails && message.patchJobInstanceDetails.length)) + message.patchJobInstanceDetails = []; + message.patchJobInstanceDetails.push($root.google.cloud.osconfig.v1.PatchJobInstanceDetails.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPatchJobInstanceDetailsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobInstanceDetailsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchJobInstanceDetails != null && message.hasOwnProperty("patchJobInstanceDetails")) { + if (!Array.isArray(message.patchJobInstanceDetails)) + return "patchJobInstanceDetails: array expected"; + for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.verify(message.patchJobInstanceDetails[i]); + if (error) + return "patchJobInstanceDetails." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + */ + ListPatchJobInstanceDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); + if (object.patchJobInstanceDetails) { + if (!Array.isArray(object.patchJobInstanceDetails)) + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: array expected"); + message.patchJobInstanceDetails = []; + for (var i = 0; i < object.patchJobInstanceDetails.length; ++i) { + if (typeof object.patchJobInstanceDetails[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: object expected"); + message.patchJobInstanceDetails[i] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.fromObject(object.patchJobInstanceDetails[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobInstanceDetailsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patchJobInstanceDetails = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.patchJobInstanceDetails && message.patchJobInstanceDetails.length) { + object.patchJobInstanceDetails = []; + for (var j = 0; j < message.patchJobInstanceDetails.length; ++j) + object.patchJobInstanceDetails[j] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.toObject(message.patchJobInstanceDetails[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPatchJobInstanceDetailsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobInstanceDetailsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPatchJobInstanceDetailsResponse; + })(); + + v1.PatchJobInstanceDetails = (function() { + + /** + * Properties of a PatchJobInstanceDetails. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchJobInstanceDetails + * @property {string|null} [name] PatchJobInstanceDetails name + * @property {string|null} [instanceSystemId] PatchJobInstanceDetails instanceSystemId + * @property {google.cloud.osconfig.v1.Instance.PatchState|null} [state] PatchJobInstanceDetails state + * @property {string|null} [failureReason] PatchJobInstanceDetails failureReason + * @property {number|Long|null} [attemptCount] PatchJobInstanceDetails attemptCount + */ + + /** + * Constructs a new PatchJobInstanceDetails. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchJobInstanceDetails. + * @implements IPatchJobInstanceDetails + * @constructor + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set + */ + function PatchJobInstanceDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PatchJobInstanceDetails name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.name = ""; + + /** + * PatchJobInstanceDetails instanceSystemId. + * @member {string} instanceSystemId + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.instanceSystemId = ""; + + /** + * PatchJobInstanceDetails state. + * @member {google.cloud.osconfig.v1.Instance.PatchState} state + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.state = 0; + + /** + * PatchJobInstanceDetails failureReason. + * @member {string} failureReason + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.failureReason = ""; + + /** + * PatchJobInstanceDetails attemptCount. + * @member {number|Long} attemptCount + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.attemptCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PatchJobInstanceDetails instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails instance + */ + PatchJobInstanceDetails.create = function create(properties) { + return new PatchJobInstanceDetails(properties); + }; + + /** + * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJobInstanceDetails.encode = function encode(message, writer) { + 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.instanceSystemId != null && Object.hasOwnProperty.call(message, "instanceSystemId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceSystemId); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.failureReason); + if (message.attemptCount != null && Object.hasOwnProperty.call(message, "attemptCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.attemptCount); + return writer; + }; + + /** + * Encodes the specified PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJobInstanceDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJobInstanceDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.instanceSystemId = reader.string(); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.failureReason = reader.string(); + break; + case 5: + message.attemptCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJobInstanceDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PatchJobInstanceDetails message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchJobInstanceDetails.verify = function verify(message) { + if (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.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) + if (!$util.isString(message.instanceSystemId)) + return "instanceSystemId: 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: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) + if (!$util.isInteger(message.attemptCount) && !(message.attemptCount && $util.isInteger(message.attemptCount.low) && $util.isInteger(message.attemptCount.high))) + return "attemptCount: integer|Long expected"; + return null; + }; + + /** + * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + */ + PatchJobInstanceDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchJobInstanceDetails) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); + if (object.name != null) + message.name = String(object.name); + if (object.instanceSystemId != null) + message.instanceSystemId = String(object.instanceSystemId); + switch (object.state) { + case "PATCH_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "INACTIVE": + case 2: + message.state = 2; + break; + case "NOTIFIED": + case 3: + message.state = 3; + break; + case "STARTED": + case 4: + message.state = 4; + break; + case "DOWNLOADING_PATCHES": + case 5: + message.state = 5; + break; + case "APPLYING_PATCHES": + case 6: + message.state = 6; + break; + case "REBOOTING": + case 7: + message.state = 7; + break; + case "SUCCEEDED": + case 8: + message.state = 8; + break; + case "SUCCEEDED_REBOOT_REQUIRED": + case 9: + message.state = 9; + break; + case "FAILED": + case 10: + message.state = 10; + break; + case "ACKED": + case 11: + message.state = 11; + break; + case "TIMED_OUT": + case 12: + message.state = 12; + break; + case "RUNNING_PRE_PATCH_STEP": + case 13: + message.state = 13; + break; + case "RUNNING_POST_PATCH_STEP": + case 14: + message.state = 14; + break; + case "NO_AGENT_DETECTED": + case 15: + message.state = 15; + break; + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.attemptCount != null) + if ($util.Long) + (message.attemptCount = $util.Long.fromValue(object.attemptCount)).unsigned = false; + else if (typeof object.attemptCount === "string") + message.attemptCount = parseInt(object.attemptCount, 10); + else if (typeof object.attemptCount === "number") + message.attemptCount = object.attemptCount; + else if (typeof object.attemptCount === "object") + message.attemptCount = new $util.LongBits(object.attemptCount.low >>> 0, object.attemptCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.PatchJobInstanceDetails} message PatchJobInstanceDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchJobInstanceDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.instanceSystemId = ""; + object.state = options.enums === String ? "PATCH_STATE_UNSPECIFIED" : 0; + object.failureReason = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.attemptCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.attemptCount = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) + object.instanceSystemId = message.instanceSystemId; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.Instance.PatchState[message.state] : message.state; + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) + if (typeof message.attemptCount === "number") + object.attemptCount = options.longs === String ? String(message.attemptCount) : message.attemptCount; + else + object.attemptCount = options.longs === String ? $util.Long.prototype.toString.call(message.attemptCount) : options.longs === Number ? new $util.LongBits(message.attemptCount.low >>> 0, message.attemptCount.high >>> 0).toNumber() : message.attemptCount; + return object; + }; + + /** + * Converts this PatchJobInstanceDetails to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + * @returns {Object.} JSON object + */ + PatchJobInstanceDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PatchJobInstanceDetails; + })(); + + v1.ListPatchJobsRequest = (function() { + + /** + * Properties of a ListPatchJobsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobsRequest + * @property {string|null} [parent] ListPatchJobsRequest parent + * @property {number|null} [pageSize] ListPatchJobsRequest pageSize + * @property {string|null} [pageToken] ListPatchJobsRequest pageToken + * @property {string|null} [filter] ListPatchJobsRequest filter + */ + + /** + * Constructs a new ListPatchJobsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobsRequest. + * @implements IListPatchJobsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set + */ + function ListPatchJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPatchJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.parent = ""; + + /** + * ListPatchJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.pageSize = 0; + + /** + * ListPatchJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.pageToken = ""; + + /** + * ListPatchJobsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.filter = ""; + + /** + * Creates a new ListPatchJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest instance + */ + ListPatchJobsRequest.create = function create(properties) { + return new ListPatchJobsRequest(properties); + }; + + /** + * Encodes the specified ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPatchJobsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + */ + ListPatchJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobsRequest} message ListPatchJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListPatchJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPatchJobsRequest; + })(); + + v1.ListPatchJobsResponse = (function() { + + /** + * Properties of a ListPatchJobsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobsResponse + * @property {Array.|null} [patchJobs] ListPatchJobsResponse patchJobs + * @property {string|null} [nextPageToken] ListPatchJobsResponse nextPageToken + */ + + /** + * Constructs a new ListPatchJobsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobsResponse. + * @implements IListPatchJobsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set + */ + function ListPatchJobsResponse(properties) { + this.patchJobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPatchJobsResponse patchJobs. + * @member {Array.} patchJobs + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @instance + */ + ListPatchJobsResponse.prototype.patchJobs = $util.emptyArray; + + /** + * ListPatchJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @instance + */ + ListPatchJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPatchJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse instance + */ + ListPatchJobsResponse.create = function create(properties) { + return new ListPatchJobsResponse(properties); + }; + + /** + * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchJobs != null && message.patchJobs.length) + for (var i = 0; i < message.patchJobs.length; ++i) + $root.google.cloud.osconfig.v1.PatchJob.encode(message.patchJobs[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 ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.patchJobs && message.patchJobs.length)) + message.patchJobs = []; + message.patchJobs.push($root.google.cloud.osconfig.v1.PatchJob.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPatchJobsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchJobs != null && message.hasOwnProperty("patchJobs")) { + if (!Array.isArray(message.patchJobs)) + return "patchJobs: array expected"; + for (var i = 0; i < message.patchJobs.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchJob.verify(message.patchJobs[i]); + if (error) + return "patchJobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + */ + ListPatchJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); + if (object.patchJobs) { + if (!Array.isArray(object.patchJobs)) + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: array expected"); + message.patchJobs = []; + for (var i = 0; i < object.patchJobs.length; ++i) { + if (typeof object.patchJobs[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: object expected"); + message.patchJobs[i] = $root.google.cloud.osconfig.v1.PatchJob.fromObject(object.patchJobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} message ListPatchJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patchJobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.patchJobs && message.patchJobs.length) { + object.patchJobs = []; + for (var j = 0; j < message.patchJobs.length; ++j) + object.patchJobs[j] = $root.google.cloud.osconfig.v1.PatchJob.toObject(message.patchJobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPatchJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPatchJobsResponse; + })(); + + v1.PatchJob = (function() { + + /** + * Properties of a PatchJob. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchJob + * @property {string|null} [name] PatchJob name + * @property {string|null} [displayName] PatchJob displayName + * @property {string|null} [description] PatchJob description + * @property {google.protobuf.ITimestamp|null} [createTime] PatchJob createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PatchJob updateTime + * @property {google.cloud.osconfig.v1.PatchJob.State|null} [state] PatchJob state + * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchJob instanceFilter + * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchJob patchConfig + * @property {google.protobuf.IDuration|null} [duration] PatchJob duration + * @property {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null} [instanceDetailsSummary] PatchJob instanceDetailsSummary + * @property {boolean|null} [dryRun] PatchJob dryRun + * @property {string|null} [errorMessage] PatchJob errorMessage + * @property {number|null} [percentComplete] PatchJob percentComplete + * @property {string|null} [patchDeployment] PatchJob patchDeployment + */ + + /** + * Constructs a new PatchJob. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchJob. + * @implements IPatchJob + * @constructor + * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set + */ + function PatchJob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PatchJob name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.name = ""; + + /** + * PatchJob displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.displayName = ""; + + /** + * PatchJob description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.description = ""; + + /** + * PatchJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.createTime = null; + + /** + * PatchJob updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.updateTime = null; + + /** + * PatchJob state. + * @member {google.cloud.osconfig.v1.PatchJob.State} state + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.state = 0; + + /** + * PatchJob instanceFilter. + * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.instanceFilter = null; + + /** + * PatchJob patchConfig. + * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.patchConfig = null; + + /** + * PatchJob duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.duration = null; + + /** + * PatchJob instanceDetailsSummary. + * @member {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null|undefined} instanceDetailsSummary + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.instanceDetailsSummary = null; + + /** + * PatchJob dryRun. + * @member {boolean} dryRun + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.dryRun = false; + + /** + * PatchJob errorMessage. + * @member {string} errorMessage + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.errorMessage = ""; + + /** + * PatchJob percentComplete. + * @member {number} percentComplete + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.percentComplete = 0; + + /** + * PatchJob patchDeployment. + * @member {string} patchDeployment + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.patchDeployment = ""; + + /** + * Creates a new PatchJob instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob instance + */ + PatchJob.create = function create(properties) { + return new PatchJob(properties); + }; + + /** + * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) + $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.instanceDetailsSummary != null && Object.hasOwnProperty.call(message, "instanceDetailsSummary")) + $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.encode(message.instanceDetailsSummary, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.dryRun); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.errorMessage); + if (message.percentComplete != null && Object.hasOwnProperty.call(message, "percentComplete")) + writer.uint32(/* id 12, wireType 1 =*/97).double(message.percentComplete); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.displayName); + if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.patchDeployment); + return writer; + }; + + /** + * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PatchJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 14: + message.displayName = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.state = reader.int32(); + break; + case 13: + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + case 7: + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + case 8: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 9: + message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.decode(reader, reader.uint32()); + break; + case 10: + message.dryRun = reader.bool(); + break; + case 11: + message.errorMessage = reader.string(); + break; + case 12: + message.percentComplete = reader.double(); + break; + case 15: + message.patchDeployment = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PatchJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PatchJob message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + 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.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { + var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); + if (error) + return "patchConfig." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) { + var error = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify(message.instanceDetailsSummary); + if (error) + return "instanceDetailsSummary." + error; + } + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) + if (typeof message.percentComplete !== "number") + return "percentComplete: number expected"; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + if (!$util.isString(message.patchDeployment)) + return "patchDeployment: string expected"; + return null; + }; + + /** + * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + */ + PatchJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchJob) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchJob(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.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.osconfig.v1.PatchJob.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STARTED": + case 1: + message.state = 1; + break; + case "INSTANCE_LOOKUP": + case 2: + message.state = 2; + break; + case "PATCHING": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "COMPLETED_WITH_ERRORS": + case 5: + message.state = 5; + break; + case "CANCELED": + case 6: + message.state = 6; + break; + case "TIMED_OUT": + case 7: + message.state = 7; + break; + } + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); + } + if (object.patchConfig != null) { + if (typeof object.patchConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.patchConfig: object expected"); + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.instanceDetailsSummary != null) { + if (typeof object.instanceDetailsSummary !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceDetailsSummary: object expected"); + message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.fromObject(object.instanceDetailsSummary); + } + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.percentComplete != null) + message.percentComplete = Number(object.percentComplete); + if (object.patchDeployment != null) + message.patchDeployment = String(object.patchDeployment); + return message; + }; + + /** + * Creates a plain object from a PatchJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.PatchJob} message PatchJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.patchConfig = null; + object.duration = null; + object.instanceDetailsSummary = null; + object.dryRun = false; + object.errorMessage = ""; + object.percentComplete = 0; + object.instanceFilter = null; + object.displayName = ""; + object.patchDeployment = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchJob.State[message.state] : message.state; + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) + object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) + object.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.toObject(message.instanceDetailsSummary, options); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) + object.percentComplete = options.json && !isFinite(message.percentComplete) ? String(message.percentComplete) : message.percentComplete; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + object.patchDeployment = message.patchDeployment; + return object; + }; + + /** + * Converts this PatchJob to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + * @returns {Object.} JSON object + */ + PatchJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PatchJob.InstanceDetailsSummary = (function() { + + /** + * Properties of an InstanceDetailsSummary. + * @memberof google.cloud.osconfig.v1.PatchJob + * @interface IInstanceDetailsSummary + * @property {number|Long|null} [pendingInstanceCount] InstanceDetailsSummary pendingInstanceCount + * @property {number|Long|null} [inactiveInstanceCount] InstanceDetailsSummary inactiveInstanceCount + * @property {number|Long|null} [notifiedInstanceCount] InstanceDetailsSummary notifiedInstanceCount + * @property {number|Long|null} [startedInstanceCount] InstanceDetailsSummary startedInstanceCount + * @property {number|Long|null} [downloadingPatchesInstanceCount] InstanceDetailsSummary downloadingPatchesInstanceCount + * @property {number|Long|null} [applyingPatchesInstanceCount] InstanceDetailsSummary applyingPatchesInstanceCount + * @property {number|Long|null} [rebootingInstanceCount] InstanceDetailsSummary rebootingInstanceCount + * @property {number|Long|null} [succeededInstanceCount] InstanceDetailsSummary succeededInstanceCount + * @property {number|Long|null} [succeededRebootRequiredInstanceCount] InstanceDetailsSummary succeededRebootRequiredInstanceCount + * @property {number|Long|null} [failedInstanceCount] InstanceDetailsSummary failedInstanceCount + * @property {number|Long|null} [ackedInstanceCount] InstanceDetailsSummary ackedInstanceCount + * @property {number|Long|null} [timedOutInstanceCount] InstanceDetailsSummary timedOutInstanceCount + * @property {number|Long|null} [prePatchStepInstanceCount] InstanceDetailsSummary prePatchStepInstanceCount + * @property {number|Long|null} [postPatchStepInstanceCount] InstanceDetailsSummary postPatchStepInstanceCount + * @property {number|Long|null} [noAgentDetectedInstanceCount] InstanceDetailsSummary noAgentDetectedInstanceCount + */ + + /** + * Constructs a new InstanceDetailsSummary. + * @memberof google.cloud.osconfig.v1.PatchJob + * @classdesc Represents an InstanceDetailsSummary. + * @implements IInstanceDetailsSummary + * @constructor + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set + */ + function InstanceDetailsSummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceDetailsSummary pendingInstanceCount. + * @member {number|Long} pendingInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.pendingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary inactiveInstanceCount. + * @member {number|Long} inactiveInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.inactiveInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary notifiedInstanceCount. + * @member {number|Long} notifiedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.notifiedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary startedInstanceCount. + * @member {number|Long} startedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.startedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary downloadingPatchesInstanceCount. + * @member {number|Long} downloadingPatchesInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.downloadingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary applyingPatchesInstanceCount. + * @member {number|Long} applyingPatchesInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.applyingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary rebootingInstanceCount. + * @member {number|Long} rebootingInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.rebootingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary succeededInstanceCount. + * @member {number|Long} succeededInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.succeededInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary succeededRebootRequiredInstanceCount. + * @member {number|Long} succeededRebootRequiredInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.succeededRebootRequiredInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary failedInstanceCount. + * @member {number|Long} failedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.failedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary ackedInstanceCount. + * @member {number|Long} ackedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.ackedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary timedOutInstanceCount. + * @member {number|Long} timedOutInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.timedOutInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary prePatchStepInstanceCount. + * @member {number|Long} prePatchStepInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.prePatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary postPatchStepInstanceCount. + * @member {number|Long} postPatchStepInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.postPatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InstanceDetailsSummary noAgentDetectedInstanceCount. + * @member {number|Long} noAgentDetectedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.noAgentDetectedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new InstanceDetailsSummary instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary instance + */ + InstanceDetailsSummary.create = function create(properties) { + return new InstanceDetailsSummary(properties); + }; + + /** + * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceDetailsSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pendingInstanceCount != null && Object.hasOwnProperty.call(message, "pendingInstanceCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pendingInstanceCount); + if (message.inactiveInstanceCount != null && Object.hasOwnProperty.call(message, "inactiveInstanceCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.inactiveInstanceCount); + if (message.notifiedInstanceCount != null && Object.hasOwnProperty.call(message, "notifiedInstanceCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.notifiedInstanceCount); + if (message.startedInstanceCount != null && Object.hasOwnProperty.call(message, "startedInstanceCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.startedInstanceCount); + if (message.downloadingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "downloadingPatchesInstanceCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.downloadingPatchesInstanceCount); + if (message.applyingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "applyingPatchesInstanceCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.applyingPatchesInstanceCount); + if (message.rebootingInstanceCount != null && Object.hasOwnProperty.call(message, "rebootingInstanceCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.rebootingInstanceCount); + if (message.succeededInstanceCount != null && Object.hasOwnProperty.call(message, "succeededInstanceCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.succeededInstanceCount); + if (message.succeededRebootRequiredInstanceCount != null && Object.hasOwnProperty.call(message, "succeededRebootRequiredInstanceCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.succeededRebootRequiredInstanceCount); + if (message.failedInstanceCount != null && Object.hasOwnProperty.call(message, "failedInstanceCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.failedInstanceCount); + if (message.ackedInstanceCount != null && Object.hasOwnProperty.call(message, "ackedInstanceCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.ackedInstanceCount); + if (message.timedOutInstanceCount != null && Object.hasOwnProperty.call(message, "timedOutInstanceCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.timedOutInstanceCount); + if (message.prePatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "prePatchStepInstanceCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.prePatchStepInstanceCount); + if (message.postPatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "postPatchStepInstanceCount")) + writer.uint32(/* id 14, wireType 0 =*/112).int64(message.postPatchStepInstanceCount); + if (message.noAgentDetectedInstanceCount != null && Object.hasOwnProperty.call(message, "noAgentDetectedInstanceCount")) + writer.uint32(/* id 15, wireType 0 =*/120).int64(message.noAgentDetectedInstanceCount); + return writer; + }; + + /** + * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceDetailsSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceDetailsSummary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceDetailsSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pendingInstanceCount = reader.int64(); + break; + case 2: + message.inactiveInstanceCount = reader.int64(); + break; + case 3: + message.notifiedInstanceCount = reader.int64(); + break; + case 4: + message.startedInstanceCount = reader.int64(); + break; + case 5: + message.downloadingPatchesInstanceCount = reader.int64(); + break; + case 6: + message.applyingPatchesInstanceCount = reader.int64(); + break; + case 7: + message.rebootingInstanceCount = reader.int64(); + break; + case 8: + message.succeededInstanceCount = reader.int64(); + break; + case 9: + message.succeededRebootRequiredInstanceCount = reader.int64(); + break; + case 10: + message.failedInstanceCount = reader.int64(); + break; + case 11: + message.ackedInstanceCount = reader.int64(); + break; + case 12: + message.timedOutInstanceCount = reader.int64(); + break; + case 13: + message.prePatchStepInstanceCount = reader.int64(); + break; + case 14: + message.postPatchStepInstanceCount = reader.int64(); + break; + case 15: + message.noAgentDetectedInstanceCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceDetailsSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceDetailsSummary message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceDetailsSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) + if (!$util.isInteger(message.pendingInstanceCount) && !(message.pendingInstanceCount && $util.isInteger(message.pendingInstanceCount.low) && $util.isInteger(message.pendingInstanceCount.high))) + return "pendingInstanceCount: integer|Long expected"; + if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) + if (!$util.isInteger(message.inactiveInstanceCount) && !(message.inactiveInstanceCount && $util.isInteger(message.inactiveInstanceCount.low) && $util.isInteger(message.inactiveInstanceCount.high))) + return "inactiveInstanceCount: integer|Long expected"; + if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) + if (!$util.isInteger(message.notifiedInstanceCount) && !(message.notifiedInstanceCount && $util.isInteger(message.notifiedInstanceCount.low) && $util.isInteger(message.notifiedInstanceCount.high))) + return "notifiedInstanceCount: integer|Long expected"; + if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) + if (!$util.isInteger(message.startedInstanceCount) && !(message.startedInstanceCount && $util.isInteger(message.startedInstanceCount.low) && $util.isInteger(message.startedInstanceCount.high))) + return "startedInstanceCount: integer|Long expected"; + if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) + if (!$util.isInteger(message.downloadingPatchesInstanceCount) && !(message.downloadingPatchesInstanceCount && $util.isInteger(message.downloadingPatchesInstanceCount.low) && $util.isInteger(message.downloadingPatchesInstanceCount.high))) + return "downloadingPatchesInstanceCount: integer|Long expected"; + if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) + if (!$util.isInteger(message.applyingPatchesInstanceCount) && !(message.applyingPatchesInstanceCount && $util.isInteger(message.applyingPatchesInstanceCount.low) && $util.isInteger(message.applyingPatchesInstanceCount.high))) + return "applyingPatchesInstanceCount: integer|Long expected"; + if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) + if (!$util.isInteger(message.rebootingInstanceCount) && !(message.rebootingInstanceCount && $util.isInteger(message.rebootingInstanceCount.low) && $util.isInteger(message.rebootingInstanceCount.high))) + return "rebootingInstanceCount: integer|Long expected"; + if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) + if (!$util.isInteger(message.succeededInstanceCount) && !(message.succeededInstanceCount && $util.isInteger(message.succeededInstanceCount.low) && $util.isInteger(message.succeededInstanceCount.high))) + return "succeededInstanceCount: integer|Long expected"; + if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) + if (!$util.isInteger(message.succeededRebootRequiredInstanceCount) && !(message.succeededRebootRequiredInstanceCount && $util.isInteger(message.succeededRebootRequiredInstanceCount.low) && $util.isInteger(message.succeededRebootRequiredInstanceCount.high))) + return "succeededRebootRequiredInstanceCount: integer|Long expected"; + if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) + if (!$util.isInteger(message.failedInstanceCount) && !(message.failedInstanceCount && $util.isInteger(message.failedInstanceCount.low) && $util.isInteger(message.failedInstanceCount.high))) + return "failedInstanceCount: integer|Long expected"; + if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) + if (!$util.isInteger(message.ackedInstanceCount) && !(message.ackedInstanceCount && $util.isInteger(message.ackedInstanceCount.low) && $util.isInteger(message.ackedInstanceCount.high))) + return "ackedInstanceCount: integer|Long expected"; + if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) + if (!$util.isInteger(message.timedOutInstanceCount) && !(message.timedOutInstanceCount && $util.isInteger(message.timedOutInstanceCount.low) && $util.isInteger(message.timedOutInstanceCount.high))) + return "timedOutInstanceCount: integer|Long expected"; + if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) + if (!$util.isInteger(message.prePatchStepInstanceCount) && !(message.prePatchStepInstanceCount && $util.isInteger(message.prePatchStepInstanceCount.low) && $util.isInteger(message.prePatchStepInstanceCount.high))) + return "prePatchStepInstanceCount: integer|Long expected"; + if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) + if (!$util.isInteger(message.postPatchStepInstanceCount) && !(message.postPatchStepInstanceCount && $util.isInteger(message.postPatchStepInstanceCount.low) && $util.isInteger(message.postPatchStepInstanceCount.high))) + return "postPatchStepInstanceCount: integer|Long expected"; + if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) + if (!$util.isInteger(message.noAgentDetectedInstanceCount) && !(message.noAgentDetectedInstanceCount && $util.isInteger(message.noAgentDetectedInstanceCount.low) && $util.isInteger(message.noAgentDetectedInstanceCount.high))) + return "noAgentDetectedInstanceCount: integer|Long expected"; + return null; + }; + + /** + * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary + */ + InstanceDetailsSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); + if (object.pendingInstanceCount != null) + if ($util.Long) + (message.pendingInstanceCount = $util.Long.fromValue(object.pendingInstanceCount)).unsigned = false; + else if (typeof object.pendingInstanceCount === "string") + message.pendingInstanceCount = parseInt(object.pendingInstanceCount, 10); + else if (typeof object.pendingInstanceCount === "number") + message.pendingInstanceCount = object.pendingInstanceCount; + else if (typeof object.pendingInstanceCount === "object") + message.pendingInstanceCount = new $util.LongBits(object.pendingInstanceCount.low >>> 0, object.pendingInstanceCount.high >>> 0).toNumber(); + if (object.inactiveInstanceCount != null) + if ($util.Long) + (message.inactiveInstanceCount = $util.Long.fromValue(object.inactiveInstanceCount)).unsigned = false; + else if (typeof object.inactiveInstanceCount === "string") + message.inactiveInstanceCount = parseInt(object.inactiveInstanceCount, 10); + else if (typeof object.inactiveInstanceCount === "number") + message.inactiveInstanceCount = object.inactiveInstanceCount; + else if (typeof object.inactiveInstanceCount === "object") + message.inactiveInstanceCount = new $util.LongBits(object.inactiveInstanceCount.low >>> 0, object.inactiveInstanceCount.high >>> 0).toNumber(); + if (object.notifiedInstanceCount != null) + if ($util.Long) + (message.notifiedInstanceCount = $util.Long.fromValue(object.notifiedInstanceCount)).unsigned = false; + else if (typeof object.notifiedInstanceCount === "string") + message.notifiedInstanceCount = parseInt(object.notifiedInstanceCount, 10); + else if (typeof object.notifiedInstanceCount === "number") + message.notifiedInstanceCount = object.notifiedInstanceCount; + else if (typeof object.notifiedInstanceCount === "object") + message.notifiedInstanceCount = new $util.LongBits(object.notifiedInstanceCount.low >>> 0, object.notifiedInstanceCount.high >>> 0).toNumber(); + if (object.startedInstanceCount != null) + if ($util.Long) + (message.startedInstanceCount = $util.Long.fromValue(object.startedInstanceCount)).unsigned = false; + else if (typeof object.startedInstanceCount === "string") + message.startedInstanceCount = parseInt(object.startedInstanceCount, 10); + else if (typeof object.startedInstanceCount === "number") + message.startedInstanceCount = object.startedInstanceCount; + else if (typeof object.startedInstanceCount === "object") + message.startedInstanceCount = new $util.LongBits(object.startedInstanceCount.low >>> 0, object.startedInstanceCount.high >>> 0).toNumber(); + if (object.downloadingPatchesInstanceCount != null) + if ($util.Long) + (message.downloadingPatchesInstanceCount = $util.Long.fromValue(object.downloadingPatchesInstanceCount)).unsigned = false; + else if (typeof object.downloadingPatchesInstanceCount === "string") + message.downloadingPatchesInstanceCount = parseInt(object.downloadingPatchesInstanceCount, 10); + else if (typeof object.downloadingPatchesInstanceCount === "number") + message.downloadingPatchesInstanceCount = object.downloadingPatchesInstanceCount; + else if (typeof object.downloadingPatchesInstanceCount === "object") + message.downloadingPatchesInstanceCount = new $util.LongBits(object.downloadingPatchesInstanceCount.low >>> 0, object.downloadingPatchesInstanceCount.high >>> 0).toNumber(); + if (object.applyingPatchesInstanceCount != null) + if ($util.Long) + (message.applyingPatchesInstanceCount = $util.Long.fromValue(object.applyingPatchesInstanceCount)).unsigned = false; + else if (typeof object.applyingPatchesInstanceCount === "string") + message.applyingPatchesInstanceCount = parseInt(object.applyingPatchesInstanceCount, 10); + else if (typeof object.applyingPatchesInstanceCount === "number") + message.applyingPatchesInstanceCount = object.applyingPatchesInstanceCount; + else if (typeof object.applyingPatchesInstanceCount === "object") + message.applyingPatchesInstanceCount = new $util.LongBits(object.applyingPatchesInstanceCount.low >>> 0, object.applyingPatchesInstanceCount.high >>> 0).toNumber(); + if (object.rebootingInstanceCount != null) + if ($util.Long) + (message.rebootingInstanceCount = $util.Long.fromValue(object.rebootingInstanceCount)).unsigned = false; + else if (typeof object.rebootingInstanceCount === "string") + message.rebootingInstanceCount = parseInt(object.rebootingInstanceCount, 10); + else if (typeof object.rebootingInstanceCount === "number") + message.rebootingInstanceCount = object.rebootingInstanceCount; + else if (typeof object.rebootingInstanceCount === "object") + message.rebootingInstanceCount = new $util.LongBits(object.rebootingInstanceCount.low >>> 0, object.rebootingInstanceCount.high >>> 0).toNumber(); + if (object.succeededInstanceCount != null) + if ($util.Long) + (message.succeededInstanceCount = $util.Long.fromValue(object.succeededInstanceCount)).unsigned = false; + else if (typeof object.succeededInstanceCount === "string") + message.succeededInstanceCount = parseInt(object.succeededInstanceCount, 10); + else if (typeof object.succeededInstanceCount === "number") + message.succeededInstanceCount = object.succeededInstanceCount; + else if (typeof object.succeededInstanceCount === "object") + message.succeededInstanceCount = new $util.LongBits(object.succeededInstanceCount.low >>> 0, object.succeededInstanceCount.high >>> 0).toNumber(); + if (object.succeededRebootRequiredInstanceCount != null) + if ($util.Long) + (message.succeededRebootRequiredInstanceCount = $util.Long.fromValue(object.succeededRebootRequiredInstanceCount)).unsigned = false; + else if (typeof object.succeededRebootRequiredInstanceCount === "string") + message.succeededRebootRequiredInstanceCount = parseInt(object.succeededRebootRequiredInstanceCount, 10); + else if (typeof object.succeededRebootRequiredInstanceCount === "number") + message.succeededRebootRequiredInstanceCount = object.succeededRebootRequiredInstanceCount; + else if (typeof object.succeededRebootRequiredInstanceCount === "object") + message.succeededRebootRequiredInstanceCount = new $util.LongBits(object.succeededRebootRequiredInstanceCount.low >>> 0, object.succeededRebootRequiredInstanceCount.high >>> 0).toNumber(); + if (object.failedInstanceCount != null) + if ($util.Long) + (message.failedInstanceCount = $util.Long.fromValue(object.failedInstanceCount)).unsigned = false; + else if (typeof object.failedInstanceCount === "string") + message.failedInstanceCount = parseInt(object.failedInstanceCount, 10); + else if (typeof object.failedInstanceCount === "number") + message.failedInstanceCount = object.failedInstanceCount; + else if (typeof object.failedInstanceCount === "object") + message.failedInstanceCount = new $util.LongBits(object.failedInstanceCount.low >>> 0, object.failedInstanceCount.high >>> 0).toNumber(); + if (object.ackedInstanceCount != null) + if ($util.Long) + (message.ackedInstanceCount = $util.Long.fromValue(object.ackedInstanceCount)).unsigned = false; + else if (typeof object.ackedInstanceCount === "string") + message.ackedInstanceCount = parseInt(object.ackedInstanceCount, 10); + else if (typeof object.ackedInstanceCount === "number") + message.ackedInstanceCount = object.ackedInstanceCount; + else if (typeof object.ackedInstanceCount === "object") + message.ackedInstanceCount = new $util.LongBits(object.ackedInstanceCount.low >>> 0, object.ackedInstanceCount.high >>> 0).toNumber(); + if (object.timedOutInstanceCount != null) + if ($util.Long) + (message.timedOutInstanceCount = $util.Long.fromValue(object.timedOutInstanceCount)).unsigned = false; + else if (typeof object.timedOutInstanceCount === "string") + message.timedOutInstanceCount = parseInt(object.timedOutInstanceCount, 10); + else if (typeof object.timedOutInstanceCount === "number") + message.timedOutInstanceCount = object.timedOutInstanceCount; + else if (typeof object.timedOutInstanceCount === "object") + message.timedOutInstanceCount = new $util.LongBits(object.timedOutInstanceCount.low >>> 0, object.timedOutInstanceCount.high >>> 0).toNumber(); + if (object.prePatchStepInstanceCount != null) + if ($util.Long) + (message.prePatchStepInstanceCount = $util.Long.fromValue(object.prePatchStepInstanceCount)).unsigned = false; + else if (typeof object.prePatchStepInstanceCount === "string") + message.prePatchStepInstanceCount = parseInt(object.prePatchStepInstanceCount, 10); + else if (typeof object.prePatchStepInstanceCount === "number") + message.prePatchStepInstanceCount = object.prePatchStepInstanceCount; + else if (typeof object.prePatchStepInstanceCount === "object") + message.prePatchStepInstanceCount = new $util.LongBits(object.prePatchStepInstanceCount.low >>> 0, object.prePatchStepInstanceCount.high >>> 0).toNumber(); + if (object.postPatchStepInstanceCount != null) + if ($util.Long) + (message.postPatchStepInstanceCount = $util.Long.fromValue(object.postPatchStepInstanceCount)).unsigned = false; + else if (typeof object.postPatchStepInstanceCount === "string") + message.postPatchStepInstanceCount = parseInt(object.postPatchStepInstanceCount, 10); + else if (typeof object.postPatchStepInstanceCount === "number") + message.postPatchStepInstanceCount = object.postPatchStepInstanceCount; + else if (typeof object.postPatchStepInstanceCount === "object") + message.postPatchStepInstanceCount = new $util.LongBits(object.postPatchStepInstanceCount.low >>> 0, object.postPatchStepInstanceCount.high >>> 0).toNumber(); + if (object.noAgentDetectedInstanceCount != null) + if ($util.Long) + (message.noAgentDetectedInstanceCount = $util.Long.fromValue(object.noAgentDetectedInstanceCount)).unsigned = false; + else if (typeof object.noAgentDetectedInstanceCount === "string") + message.noAgentDetectedInstanceCount = parseInt(object.noAgentDetectedInstanceCount, 10); + else if (typeof object.noAgentDetectedInstanceCount === "number") + message.noAgentDetectedInstanceCount = object.noAgentDetectedInstanceCount; + else if (typeof object.noAgentDetectedInstanceCount === "object") + message.noAgentDetectedInstanceCount = new $util.LongBits(object.noAgentDetectedInstanceCount.low >>> 0, object.noAgentDetectedInstanceCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} message InstanceDetailsSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceDetailsSummary.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.pendingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pendingInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.inactiveInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.inactiveInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.notifiedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.notifiedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.downloadingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.downloadingPatchesInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applyingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applyingPatchesInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rebootingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rebootingInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.succeededInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.succeededInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.succeededRebootRequiredInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.succeededRebootRequiredInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.ackedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ackedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timedOutInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timedOutInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.prePatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.prePatchStepInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.postPatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.postPatchStepInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.noAgentDetectedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.noAgentDetectedInstanceCount = options.longs === String ? "0" : 0; + } + if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) + if (typeof message.pendingInstanceCount === "number") + object.pendingInstanceCount = options.longs === String ? String(message.pendingInstanceCount) : message.pendingInstanceCount; + else + object.pendingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.pendingInstanceCount) : options.longs === Number ? new $util.LongBits(message.pendingInstanceCount.low >>> 0, message.pendingInstanceCount.high >>> 0).toNumber() : message.pendingInstanceCount; + if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) + if (typeof message.inactiveInstanceCount === "number") + object.inactiveInstanceCount = options.longs === String ? String(message.inactiveInstanceCount) : message.inactiveInstanceCount; + else + object.inactiveInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.inactiveInstanceCount) : options.longs === Number ? new $util.LongBits(message.inactiveInstanceCount.low >>> 0, message.inactiveInstanceCount.high >>> 0).toNumber() : message.inactiveInstanceCount; + if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) + if (typeof message.notifiedInstanceCount === "number") + object.notifiedInstanceCount = options.longs === String ? String(message.notifiedInstanceCount) : message.notifiedInstanceCount; + else + object.notifiedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.notifiedInstanceCount) : options.longs === Number ? new $util.LongBits(message.notifiedInstanceCount.low >>> 0, message.notifiedInstanceCount.high >>> 0).toNumber() : message.notifiedInstanceCount; + if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) + if (typeof message.startedInstanceCount === "number") + object.startedInstanceCount = options.longs === String ? String(message.startedInstanceCount) : message.startedInstanceCount; + else + object.startedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.startedInstanceCount) : options.longs === Number ? new $util.LongBits(message.startedInstanceCount.low >>> 0, message.startedInstanceCount.high >>> 0).toNumber() : message.startedInstanceCount; + if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) + if (typeof message.downloadingPatchesInstanceCount === "number") + object.downloadingPatchesInstanceCount = options.longs === String ? String(message.downloadingPatchesInstanceCount) : message.downloadingPatchesInstanceCount; + else + object.downloadingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.downloadingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.downloadingPatchesInstanceCount.low >>> 0, message.downloadingPatchesInstanceCount.high >>> 0).toNumber() : message.downloadingPatchesInstanceCount; + if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) + if (typeof message.applyingPatchesInstanceCount === "number") + object.applyingPatchesInstanceCount = options.longs === String ? String(message.applyingPatchesInstanceCount) : message.applyingPatchesInstanceCount; + else + object.applyingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.applyingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.applyingPatchesInstanceCount.low >>> 0, message.applyingPatchesInstanceCount.high >>> 0).toNumber() : message.applyingPatchesInstanceCount; + if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) + if (typeof message.rebootingInstanceCount === "number") + object.rebootingInstanceCount = options.longs === String ? String(message.rebootingInstanceCount) : message.rebootingInstanceCount; + else + object.rebootingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.rebootingInstanceCount) : options.longs === Number ? new $util.LongBits(message.rebootingInstanceCount.low >>> 0, message.rebootingInstanceCount.high >>> 0).toNumber() : message.rebootingInstanceCount; + if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) + if (typeof message.succeededInstanceCount === "number") + object.succeededInstanceCount = options.longs === String ? String(message.succeededInstanceCount) : message.succeededInstanceCount; + else + object.succeededInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededInstanceCount.low >>> 0, message.succeededInstanceCount.high >>> 0).toNumber() : message.succeededInstanceCount; + if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) + if (typeof message.succeededRebootRequiredInstanceCount === "number") + object.succeededRebootRequiredInstanceCount = options.longs === String ? String(message.succeededRebootRequiredInstanceCount) : message.succeededRebootRequiredInstanceCount; + else + object.succeededRebootRequiredInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededRebootRequiredInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededRebootRequiredInstanceCount.low >>> 0, message.succeededRebootRequiredInstanceCount.high >>> 0).toNumber() : message.succeededRebootRequiredInstanceCount; + if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) + if (typeof message.failedInstanceCount === "number") + object.failedInstanceCount = options.longs === String ? String(message.failedInstanceCount) : message.failedInstanceCount; + else + object.failedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedInstanceCount) : options.longs === Number ? new $util.LongBits(message.failedInstanceCount.low >>> 0, message.failedInstanceCount.high >>> 0).toNumber() : message.failedInstanceCount; + if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) + if (typeof message.ackedInstanceCount === "number") + object.ackedInstanceCount = options.longs === String ? String(message.ackedInstanceCount) : message.ackedInstanceCount; + else + object.ackedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.ackedInstanceCount) : options.longs === Number ? new $util.LongBits(message.ackedInstanceCount.low >>> 0, message.ackedInstanceCount.high >>> 0).toNumber() : message.ackedInstanceCount; + if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) + if (typeof message.timedOutInstanceCount === "number") + object.timedOutInstanceCount = options.longs === String ? String(message.timedOutInstanceCount) : message.timedOutInstanceCount; + else + object.timedOutInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.timedOutInstanceCount) : options.longs === Number ? new $util.LongBits(message.timedOutInstanceCount.low >>> 0, message.timedOutInstanceCount.high >>> 0).toNumber() : message.timedOutInstanceCount; + if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) + if (typeof message.prePatchStepInstanceCount === "number") + object.prePatchStepInstanceCount = options.longs === String ? String(message.prePatchStepInstanceCount) : message.prePatchStepInstanceCount; + else + object.prePatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.prePatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.prePatchStepInstanceCount.low >>> 0, message.prePatchStepInstanceCount.high >>> 0).toNumber() : message.prePatchStepInstanceCount; + if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) + if (typeof message.postPatchStepInstanceCount === "number") + object.postPatchStepInstanceCount = options.longs === String ? String(message.postPatchStepInstanceCount) : message.postPatchStepInstanceCount; + else + object.postPatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.postPatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.postPatchStepInstanceCount.low >>> 0, message.postPatchStepInstanceCount.high >>> 0).toNumber() : message.postPatchStepInstanceCount; + if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) + if (typeof message.noAgentDetectedInstanceCount === "number") + object.noAgentDetectedInstanceCount = options.longs === String ? String(message.noAgentDetectedInstanceCount) : message.noAgentDetectedInstanceCount; + else + object.noAgentDetectedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.noAgentDetectedInstanceCount) : options.longs === Number ? new $util.LongBits(message.noAgentDetectedInstanceCount.low >>> 0, message.noAgentDetectedInstanceCount.high >>> 0).toNumber() : message.noAgentDetectedInstanceCount; + return object; + }; + + /** + * Converts this InstanceDetailsSummary to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + * @returns {Object.} JSON object + */ + InstanceDetailsSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InstanceDetailsSummary; + })(); + + /** + * State enum. + * @name google.cloud.osconfig.v1.PatchJob.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTED=1 STARTED value + * @property {number} INSTANCE_LOOKUP=2 INSTANCE_LOOKUP value + * @property {number} PATCHING=3 PATCHING value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} COMPLETED_WITH_ERRORS=5 COMPLETED_WITH_ERRORS value + * @property {number} CANCELED=6 CANCELED value + * @property {number} TIMED_OUT=7 TIMED_OUT value + */ + PatchJob.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STARTED"] = 1; + values[valuesById[2] = "INSTANCE_LOOKUP"] = 2; + values[valuesById[3] = "PATCHING"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "COMPLETED_WITH_ERRORS"] = 5; + values[valuesById[6] = "CANCELED"] = 6; + values[valuesById[7] = "TIMED_OUT"] = 7; + return values; + })(); + + return PatchJob; + })(); + + v1.PatchConfig = (function() { + + /** + * Properties of a PatchConfig. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchConfig + * @property {google.cloud.osconfig.v1.PatchConfig.RebootConfig|null} [rebootConfig] PatchConfig rebootConfig + * @property {google.cloud.osconfig.v1.IAptSettings|null} [apt] PatchConfig apt + * @property {google.cloud.osconfig.v1.IYumSettings|null} [yum] PatchConfig yum + * @property {google.cloud.osconfig.v1.IGooSettings|null} [goo] PatchConfig goo + * @property {google.cloud.osconfig.v1.IZypperSettings|null} [zypper] PatchConfig zypper + * @property {google.cloud.osconfig.v1.IWindowsUpdateSettings|null} [windowsUpdate] PatchConfig windowsUpdate + * @property {google.cloud.osconfig.v1.IExecStep|null} [preStep] PatchConfig preStep + * @property {google.cloud.osconfig.v1.IExecStep|null} [postStep] PatchConfig postStep + */ + + /** + * Constructs a new PatchConfig. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchConfig. + * @implements IPatchConfig + * @constructor + * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set + */ + function PatchConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PatchConfig rebootConfig. + * @member {google.cloud.osconfig.v1.PatchConfig.RebootConfig} rebootConfig + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.rebootConfig = 0; + + /** + * PatchConfig apt. + * @member {google.cloud.osconfig.v1.IAptSettings|null|undefined} apt + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.apt = null; + + /** + * PatchConfig yum. + * @member {google.cloud.osconfig.v1.IYumSettings|null|undefined} yum + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.yum = null; + + /** + * PatchConfig goo. + * @member {google.cloud.osconfig.v1.IGooSettings|null|undefined} goo + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.goo = null; + + /** + * PatchConfig zypper. + * @member {google.cloud.osconfig.v1.IZypperSettings|null|undefined} zypper + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.zypper = null; + + /** + * PatchConfig windowsUpdate. + * @member {google.cloud.osconfig.v1.IWindowsUpdateSettings|null|undefined} windowsUpdate + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.windowsUpdate = null; + + /** + * PatchConfig preStep. + * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} preStep + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.preStep = null; + + /** + * PatchConfig postStep. + * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} postStep + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.postStep = null; + + /** + * Creates a new PatchConfig instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig instance + */ + PatchConfig.create = function create(properties) { + return new PatchConfig(properties); + }; + + /** + * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rebootConfig != null && Object.hasOwnProperty.call(message, "rebootConfig")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rebootConfig); + if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) + $root.google.cloud.osconfig.v1.AptSettings.encode(message.apt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) + $root.google.cloud.osconfig.v1.YumSettings.encode(message.yum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.goo != null && Object.hasOwnProperty.call(message, "goo")) + $root.google.cloud.osconfig.v1.GooSettings.encode(message.goo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) + $root.google.cloud.osconfig.v1.ZypperSettings.encode(message.zypper, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.windowsUpdate != null && Object.hasOwnProperty.call(message, "windowsUpdate")) + $root.google.cloud.osconfig.v1.WindowsUpdateSettings.encode(message.windowsUpdate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.preStep != null && Object.hasOwnProperty.call(message, "preStep")) + $root.google.cloud.osconfig.v1.ExecStep.encode(message.preStep, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.postStep != null && Object.hasOwnProperty.call(message, "postStep")) + $root.google.cloud.osconfig.v1.ExecStep.encode(message.postStep, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PatchConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rebootConfig = reader.int32(); + break; + case 3: + message.apt = $root.google.cloud.osconfig.v1.AptSettings.decode(reader, reader.uint32()); + break; + case 4: + message.yum = $root.google.cloud.osconfig.v1.YumSettings.decode(reader, reader.uint32()); + break; + case 5: + message.goo = $root.google.cloud.osconfig.v1.GooSettings.decode(reader, reader.uint32()); + break; + case 6: + message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.decode(reader, reader.uint32()); + break; + case 7: + message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.decode(reader, reader.uint32()); + break; + case 8: + message.preStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); + break; + case 9: + message.postStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PatchConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PatchConfig message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) + switch (message.rebootConfig) { + default: + return "rebootConfig: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.apt != null && message.hasOwnProperty("apt")) { + var error = $root.google.cloud.osconfig.v1.AptSettings.verify(message.apt); + if (error) + return "apt." + error; + } + if (message.yum != null && message.hasOwnProperty("yum")) { + var error = $root.google.cloud.osconfig.v1.YumSettings.verify(message.yum); + if (error) + return "yum." + error; + } + if (message.goo != null && message.hasOwnProperty("goo")) { + var error = $root.google.cloud.osconfig.v1.GooSettings.verify(message.goo); + if (error) + return "goo." + error; + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + var error = $root.google.cloud.osconfig.v1.ZypperSettings.verify(message.zypper); + if (error) + return "zypper." + error; + } + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { + var error = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.verify(message.windowsUpdate); + if (error) + return "windowsUpdate." + error; + } + if (message.preStep != null && message.hasOwnProperty("preStep")) { + var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.preStep); + if (error) + return "preStep." + error; + } + if (message.postStep != null && message.hasOwnProperty("postStep")) { + var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.postStep); + if (error) + return "postStep." + error; + } + return null; + }; + + /** + * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig + */ + PatchConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchConfig) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchConfig(); + switch (object.rebootConfig) { + case "REBOOT_CONFIG_UNSPECIFIED": + case 0: + message.rebootConfig = 0; + break; + case "DEFAULT": + case 1: + message.rebootConfig = 1; + break; + case "ALWAYS": + case 2: + message.rebootConfig = 2; + break; + case "NEVER": + case 3: + message.rebootConfig = 3; + break; + } + if (object.apt != null) { + if (typeof object.apt !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.apt: object expected"); + message.apt = $root.google.cloud.osconfig.v1.AptSettings.fromObject(object.apt); + } + if (object.yum != null) { + if (typeof object.yum !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.yum: object expected"); + message.yum = $root.google.cloud.osconfig.v1.YumSettings.fromObject(object.yum); + } + if (object.goo != null) { + if (typeof object.goo !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.goo: object expected"); + message.goo = $root.google.cloud.osconfig.v1.GooSettings.fromObject(object.goo); + } + if (object.zypper != null) { + if (typeof object.zypper !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.zypper: object expected"); + message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.fromObject(object.zypper); + } + if (object.windowsUpdate != null) { + if (typeof object.windowsUpdate !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.windowsUpdate: object expected"); + message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.fromObject(object.windowsUpdate); + } + if (object.preStep != null) { + if (typeof object.preStep !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.preStep: object expected"); + message.preStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.preStep); + } + if (object.postStep != null) { + if (typeof object.postStep !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.postStep: object expected"); + message.postStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.postStep); + } + return message; + }; + + /** + * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {google.cloud.osconfig.v1.PatchConfig} message PatchConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rebootConfig = options.enums === String ? "REBOOT_CONFIG_UNSPECIFIED" : 0; + object.apt = null; + object.yum = null; + object.goo = null; + object.zypper = null; + object.windowsUpdate = null; + object.preStep = null; + object.postStep = null; + } + if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) + object.rebootConfig = options.enums === String ? $root.google.cloud.osconfig.v1.PatchConfig.RebootConfig[message.rebootConfig] : message.rebootConfig; + if (message.apt != null && message.hasOwnProperty("apt")) + object.apt = $root.google.cloud.osconfig.v1.AptSettings.toObject(message.apt, options); + if (message.yum != null && message.hasOwnProperty("yum")) + object.yum = $root.google.cloud.osconfig.v1.YumSettings.toObject(message.yum, options); + if (message.goo != null && message.hasOwnProperty("goo")) + object.goo = $root.google.cloud.osconfig.v1.GooSettings.toObject(message.goo, options); + if (message.zypper != null && message.hasOwnProperty("zypper")) + object.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.toObject(message.zypper, options); + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) + object.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.toObject(message.windowsUpdate, options); + if (message.preStep != null && message.hasOwnProperty("preStep")) + object.preStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.preStep, options); + if (message.postStep != null && message.hasOwnProperty("postStep")) + object.postStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.postStep, options); + return object; + }; + + /** + * Converts this PatchConfig to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + * @returns {Object.} JSON object + */ + PatchConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * RebootConfig enum. + * @name google.cloud.osconfig.v1.PatchConfig.RebootConfig + * @enum {number} + * @property {number} REBOOT_CONFIG_UNSPECIFIED=0 REBOOT_CONFIG_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} ALWAYS=2 ALWAYS value + * @property {number} NEVER=3 NEVER value + */ + PatchConfig.RebootConfig = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REBOOT_CONFIG_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "ALWAYS"] = 2; + values[valuesById[3] = "NEVER"] = 3; + return values; + })(); + + return PatchConfig; + })(); + + v1.Instance = (function() { + + /** + * Properties of an Instance. + * @memberof google.cloud.osconfig.v1 + * @interface IInstance + */ + + /** + * Constructs a new Instance. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an Instance. + * @implements IInstance + * @constructor + * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set + */ + function Instance(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Instance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Instance} Instance instance + */ + Instance.create = function create(properties) { + return new Instance(properties); + }; + + /** + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Instance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Instance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Instance message. + * @function verify + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Instance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Instance} Instance + */ + Instance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Instance) + return object; + return new $root.google.cloud.osconfig.v1.Instance(); + }; + + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.Instance} message Instance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Instance.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Instance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Instance + * @instance + * @returns {Object.} JSON object + */ + Instance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PatchState enum. + * @name google.cloud.osconfig.v1.Instance.PatchState + * @enum {number} + * @property {number} PATCH_STATE_UNSPECIFIED=0 PATCH_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} INACTIVE=2 INACTIVE value + * @property {number} NOTIFIED=3 NOTIFIED value + * @property {number} STARTED=4 STARTED value + * @property {number} DOWNLOADING_PATCHES=5 DOWNLOADING_PATCHES value + * @property {number} APPLYING_PATCHES=6 APPLYING_PATCHES value + * @property {number} REBOOTING=7 REBOOTING value + * @property {number} SUCCEEDED=8 SUCCEEDED value + * @property {number} SUCCEEDED_REBOOT_REQUIRED=9 SUCCEEDED_REBOOT_REQUIRED value + * @property {number} FAILED=10 FAILED value + * @property {number} ACKED=11 ACKED value + * @property {number} TIMED_OUT=12 TIMED_OUT value + * @property {number} RUNNING_PRE_PATCH_STEP=13 RUNNING_PRE_PATCH_STEP value + * @property {number} RUNNING_POST_PATCH_STEP=14 RUNNING_POST_PATCH_STEP value + * @property {number} NO_AGENT_DETECTED=15 NO_AGENT_DETECTED value + */ + Instance.PatchState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PATCH_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + values[valuesById[3] = "NOTIFIED"] = 3; + values[valuesById[4] = "STARTED"] = 4; + values[valuesById[5] = "DOWNLOADING_PATCHES"] = 5; + values[valuesById[6] = "APPLYING_PATCHES"] = 6; + values[valuesById[7] = "REBOOTING"] = 7; + values[valuesById[8] = "SUCCEEDED"] = 8; + values[valuesById[9] = "SUCCEEDED_REBOOT_REQUIRED"] = 9; + values[valuesById[10] = "FAILED"] = 10; + values[valuesById[11] = "ACKED"] = 11; + values[valuesById[12] = "TIMED_OUT"] = 12; + values[valuesById[13] = "RUNNING_PRE_PATCH_STEP"] = 13; + values[valuesById[14] = "RUNNING_POST_PATCH_STEP"] = 14; + values[valuesById[15] = "NO_AGENT_DETECTED"] = 15; + return values; + })(); + + return Instance; + })(); + + v1.CancelPatchJobRequest = (function() { + + /** + * Properties of a CancelPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @interface ICancelPatchJobRequest + * @property {string|null} [name] CancelPatchJobRequest name + */ + + /** + * Constructs a new CancelPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a CancelPatchJobRequest. + * @implements ICancelPatchJobRequest + * @constructor + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set + */ + function CancelPatchJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelPatchJobRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @instance + */ + CancelPatchJobRequest.prototype.name = ""; + + /** + * Creates a new CancelPatchJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest instance + */ + CancelPatchJobRequest.create = function create(properties) { + return new CancelPatchJobRequest(properties); + }; + + /** + * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelPatchJobRequest.encode = function encode(message, writer) { + 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 CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelPatchJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelPatchJobRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelPatchJobRequest.verify = function verify(message) { + if (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 CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + */ + CancelPatchJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.CancelPatchJobRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.CancelPatchJobRequest} message CancelPatchJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelPatchJobRequest.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 CancelPatchJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @instance + * @returns {Object.} JSON object + */ + CancelPatchJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelPatchJobRequest; + })(); + + v1.AptSettings = (function() { + + /** + * Properties of an AptSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IAptSettings + * @property {google.cloud.osconfig.v1.AptSettings.Type|null} [type] AptSettings type + * @property {Array.|null} [excludes] AptSettings excludes + * @property {Array.|null} [exclusivePackages] AptSettings exclusivePackages + */ + + /** + * Constructs a new AptSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an AptSettings. + * @implements IAptSettings + * @constructor + * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set + */ + function AptSettings(properties) { + this.excludes = []; + this.exclusivePackages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AptSettings type. + * @member {google.cloud.osconfig.v1.AptSettings.Type} type + * @memberof google.cloud.osconfig.v1.AptSettings + * @instance + */ + AptSettings.prototype.type = 0; + + /** + * AptSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.AptSettings + * @instance + */ + AptSettings.prototype.excludes = $util.emptyArray; + + /** + * AptSettings exclusivePackages. + * @member {Array.} exclusivePackages + * @memberof google.cloud.osconfig.v1.AptSettings + * @instance + */ + AptSettings.prototype.exclusivePackages = $util.emptyArray; + + /** + * Creates a new AptSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings instance + */ + AptSettings.create = function create(properties) { + return new AptSettings(properties); + }; + + /** + * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); + if (message.exclusivePackages != null && message.exclusivePackages.length) + for (var i = 0; i < message.exclusivePackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePackages[i]); + return writer; + }; + + /** + * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AptSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.AptSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 3: + if (!(message.exclusivePackages && message.exclusivePackages.length)) + message.exclusivePackages = []; + message.exclusivePackages.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AptSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AptSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AptSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { + if (!Array.isArray(message.exclusivePackages)) + return "exclusivePackages: array expected"; + for (var i = 0; i < message.exclusivePackages.length; ++i) + if (!$util.isString(message.exclusivePackages[i])) + return "exclusivePackages: string[] expected"; + } + return null; + }; + + /** + * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings + */ + AptSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.AptSettings) + return object; + var message = new $root.google.cloud.osconfig.v1.AptSettings(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DIST": + case 1: + message.type = 1; + break; + case "UPGRADE": + case 2: + message.type = 2; + break; + } + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.AptSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePackages) { + if (!Array.isArray(object.exclusivePackages)) + throw TypeError(".google.cloud.osconfig.v1.AptSettings.exclusivePackages: array expected"); + message.exclusivePackages = []; + for (var i = 0; i < object.exclusivePackages.length; ++i) + message.exclusivePackages[i] = String(object.exclusivePackages[i]); + } + return message; + }; + + /** + * Creates a plain object from an AptSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {google.cloud.osconfig.v1.AptSettings} message AptSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AptSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.excludes = []; + object.exclusivePackages = []; + } + if (options.defaults) + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1.AptSettings.Type[message.type] : message.type; + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePackages && message.exclusivePackages.length) { + object.exclusivePackages = []; + for (var j = 0; j < message.exclusivePackages.length; ++j) + object.exclusivePackages[j] = message.exclusivePackages[j]; + } + return object; + }; + + /** + * Converts this AptSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.AptSettings + * @instance + * @returns {Object.} JSON object + */ + AptSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.osconfig.v1.AptSettings.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} DIST=1 DIST value + * @property {number} UPGRADE=2 UPGRADE value + */ + AptSettings.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIST"] = 1; + values[valuesById[2] = "UPGRADE"] = 2; + return values; + })(); + + return AptSettings; + })(); + + v1.YumSettings = (function() { + + /** + * Properties of a YumSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IYumSettings + * @property {boolean|null} [security] YumSettings security + * @property {boolean|null} [minimal] YumSettings minimal + * @property {Array.|null} [excludes] YumSettings excludes + * @property {Array.|null} [exclusivePackages] YumSettings exclusivePackages + */ + + /** + * Constructs a new YumSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a YumSettings. + * @implements IYumSettings + * @constructor + * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set + */ + function YumSettings(properties) { + this.excludes = []; + this.exclusivePackages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * YumSettings security. + * @member {boolean} security + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.security = false; + + /** + * YumSettings minimal. + * @member {boolean} minimal + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.minimal = false; + + /** + * YumSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.excludes = $util.emptyArray; + + /** + * YumSettings exclusivePackages. + * @member {Array.} exclusivePackages + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.exclusivePackages = $util.emptyArray; + + /** + * Creates a new YumSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings instance + */ + YumSettings.create = function create(properties) { + return new YumSettings(properties); + }; + + /** + * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.security != null && Object.hasOwnProperty.call(message, "security")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.security); + if (message.minimal != null && Object.hasOwnProperty.call(message, "minimal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.minimal); + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludes[i]); + if (message.exclusivePackages != null && message.exclusivePackages.length) + for (var i = 0; i < message.exclusivePackages.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.exclusivePackages[i]); + return writer; + }; + + /** + * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YumSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.YumSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.security = reader.bool(); + break; + case 2: + message.minimal = reader.bool(); + break; + case 3: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 4: + if (!(message.exclusivePackages && message.exclusivePackages.length)) + message.exclusivePackages = []; + message.exclusivePackages.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a YumSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a YumSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YumSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.security != null && message.hasOwnProperty("security")) + if (typeof message.security !== "boolean") + return "security: boolean expected"; + if (message.minimal != null && message.hasOwnProperty("minimal")) + if (typeof message.minimal !== "boolean") + return "minimal: boolean expected"; + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { + if (!Array.isArray(message.exclusivePackages)) + return "exclusivePackages: array expected"; + for (var i = 0; i < message.exclusivePackages.length; ++i) + if (!$util.isString(message.exclusivePackages[i])) + return "exclusivePackages: string[] expected"; + } + return null; + }; + + /** + * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings + */ + YumSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.YumSettings) + return object; + var message = new $root.google.cloud.osconfig.v1.YumSettings(); + if (object.security != null) + message.security = Boolean(object.security); + if (object.minimal != null) + message.minimal = Boolean(object.minimal); + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.YumSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePackages) { + if (!Array.isArray(object.exclusivePackages)) + throw TypeError(".google.cloud.osconfig.v1.YumSettings.exclusivePackages: array expected"); + message.exclusivePackages = []; + for (var i = 0; i < object.exclusivePackages.length; ++i) + message.exclusivePackages[i] = String(object.exclusivePackages[i]); + } + return message; + }; + + /** + * Creates a plain object from a YumSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {google.cloud.osconfig.v1.YumSettings} message YumSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YumSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.excludes = []; + object.exclusivePackages = []; + } + if (options.defaults) { + object.security = false; + object.minimal = false; + } + if (message.security != null && message.hasOwnProperty("security")) + object.security = message.security; + if (message.minimal != null && message.hasOwnProperty("minimal")) + object.minimal = message.minimal; + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePackages && message.exclusivePackages.length) { + object.exclusivePackages = []; + for (var j = 0; j < message.exclusivePackages.length; ++j) + object.exclusivePackages[j] = message.exclusivePackages[j]; + } + return object; + }; + + /** + * Converts this YumSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + * @returns {Object.} JSON object + */ + YumSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return YumSettings; + })(); + + v1.GooSettings = (function() { + + /** + * Properties of a GooSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IGooSettings + */ + + /** + * Constructs a new GooSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GooSettings. + * @implements IGooSettings + * @constructor + * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set + */ + function GooSettings(properties) { + if (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 GooSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings instance + */ + GooSettings.create = function create(properties) { + return new GooSettings(properties); + }; + + /** + * Encodes the specified GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GooSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GooSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GooSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GooSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GooSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a GooSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings + */ + GooSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GooSettings) + return object; + return new $root.google.cloud.osconfig.v1.GooSettings(); + }; + + /** + * Creates a plain object from a GooSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {google.cloud.osconfig.v1.GooSettings} message GooSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GooSettings.toObject = function toObject() { + return {}; + }; + + /** + * Converts this GooSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GooSettings + * @instance + * @returns {Object.} JSON object + */ + GooSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GooSettings; + })(); + + v1.ZypperSettings = (function() { + + /** + * Properties of a ZypperSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IZypperSettings + * @property {boolean|null} [withOptional] ZypperSettings withOptional + * @property {boolean|null} [withUpdate] ZypperSettings withUpdate + * @property {Array.|null} [categories] ZypperSettings categories + * @property {Array.|null} [severities] ZypperSettings severities + * @property {Array.|null} [excludes] ZypperSettings excludes + * @property {Array.|null} [exclusivePatches] ZypperSettings exclusivePatches + */ + + /** + * Constructs a new ZypperSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ZypperSettings. + * @implements IZypperSettings + * @constructor + * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set + */ + function ZypperSettings(properties) { + this.categories = []; + this.severities = []; + this.excludes = []; + this.exclusivePatches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ZypperSettings withOptional. + * @member {boolean} withOptional + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.withOptional = false; + + /** + * ZypperSettings withUpdate. + * @member {boolean} withUpdate + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.withUpdate = false; + + /** + * ZypperSettings categories. + * @member {Array.} categories + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.categories = $util.emptyArray; + + /** + * ZypperSettings severities. + * @member {Array.} severities + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.severities = $util.emptyArray; + + /** + * ZypperSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.excludes = $util.emptyArray; + + /** + * ZypperSettings exclusivePatches. + * @member {Array.} exclusivePatches + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.exclusivePatches = $util.emptyArray; + + /** + * Creates a new ZypperSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings instance + */ + ZypperSettings.create = function create(properties) { + return new ZypperSettings(properties); + }; + + /** + * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.withOptional != null && Object.hasOwnProperty.call(message, "withOptional")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.withOptional); + if (message.withUpdate != null && Object.hasOwnProperty.call(message, "withUpdate")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.withUpdate); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.categories[i]); + if (message.severities != null && message.severities.length) + for (var i = 0; i < message.severities.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.severities[i]); + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.excludes[i]); + if (message.exclusivePatches != null && message.exclusivePatches.length) + for (var i = 0; i < message.exclusivePatches.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.exclusivePatches[i]); + return writer; + }; + + /** + * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ZypperSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ZypperSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.withOptional = reader.bool(); + break; + case 2: + message.withUpdate = reader.bool(); + break; + case 3: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push(reader.string()); + break; + case 4: + if (!(message.severities && message.severities.length)) + message.severities = []; + message.severities.push(reader.string()); + break; + case 5: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 6: + if (!(message.exclusivePatches && message.exclusivePatches.length)) + message.exclusivePatches = []; + message.exclusivePatches.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ZypperSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ZypperSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.withOptional != null && message.hasOwnProperty("withOptional")) + if (typeof message.withOptional !== "boolean") + return "withOptional: boolean expected"; + if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) + if (typeof message.withUpdate !== "boolean") + return "withUpdate: boolean expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) + if (!$util.isString(message.categories[i])) + return "categories: string[] expected"; + } + if (message.severities != null && message.hasOwnProperty("severities")) { + if (!Array.isArray(message.severities)) + return "severities: array expected"; + for (var i = 0; i < message.severities.length; ++i) + if (!$util.isString(message.severities[i])) + return "severities: string[] expected"; + } + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { + if (!Array.isArray(message.exclusivePatches)) + return "exclusivePatches: array expected"; + for (var i = 0; i < message.exclusivePatches.length; ++i) + if (!$util.isString(message.exclusivePatches[i])) + return "exclusivePatches: string[] expected"; + } + return null; + }; + + /** + * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings + */ + ZypperSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ZypperSettings) + return object; + var message = new $root.google.cloud.osconfig.v1.ZypperSettings(); + if (object.withOptional != null) + message.withOptional = Boolean(object.withOptional); + if (object.withUpdate != null) + message.withUpdate = Boolean(object.withUpdate); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) + message.categories[i] = String(object.categories[i]); + } + if (object.severities) { + if (!Array.isArray(object.severities)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.severities: array expected"); + message.severities = []; + for (var i = 0; i < object.severities.length; ++i) + message.severities[i] = String(object.severities[i]); + } + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePatches) { + if (!Array.isArray(object.exclusivePatches)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.exclusivePatches: array expected"); + message.exclusivePatches = []; + for (var i = 0; i < object.exclusivePatches.length; ++i) + message.exclusivePatches[i] = String(object.exclusivePatches[i]); + } + return message; + }; + + /** + * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {google.cloud.osconfig.v1.ZypperSettings} message ZypperSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ZypperSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.categories = []; + object.severities = []; + object.excludes = []; + object.exclusivePatches = []; + } + if (options.defaults) { + object.withOptional = false; + object.withUpdate = false; + } + if (message.withOptional != null && message.hasOwnProperty("withOptional")) + object.withOptional = message.withOptional; + if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) + object.withUpdate = message.withUpdate; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = message.categories[j]; + } + if (message.severities && message.severities.length) { + object.severities = []; + for (var j = 0; j < message.severities.length; ++j) + object.severities[j] = message.severities[j]; + } + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePatches && message.exclusivePatches.length) { + object.exclusivePatches = []; + for (var j = 0; j < message.exclusivePatches.length; ++j) + object.exclusivePatches[j] = message.exclusivePatches[j]; + } + return object; + }; + + /** + * Converts this ZypperSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + * @returns {Object.} JSON object + */ + ZypperSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ZypperSettings; + })(); + + v1.WindowsUpdateSettings = (function() { + + /** + * Properties of a WindowsUpdateSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IWindowsUpdateSettings + * @property {Array.|null} [classifications] WindowsUpdateSettings classifications + * @property {Array.|null} [excludes] WindowsUpdateSettings excludes + * @property {Array.|null} [exclusivePatches] WindowsUpdateSettings exclusivePatches + */ + + /** + * Constructs a new WindowsUpdateSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a WindowsUpdateSettings. + * @implements IWindowsUpdateSettings + * @constructor + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set + */ + function WindowsUpdateSettings(properties) { + this.classifications = []; + this.excludes = []; + this.exclusivePatches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsUpdateSettings classifications. + * @member {Array.} classifications + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @instance + */ + WindowsUpdateSettings.prototype.classifications = $util.emptyArray; + + /** + * WindowsUpdateSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @instance + */ + WindowsUpdateSettings.prototype.excludes = $util.emptyArray; + + /** + * WindowsUpdateSettings exclusivePatches. + * @member {Array.} exclusivePatches + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @instance + */ + WindowsUpdateSettings.prototype.exclusivePatches = $util.emptyArray; + + /** + * Creates a new WindowsUpdateSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings instance + */ + WindowsUpdateSettings.create = function create(properties) { + return new WindowsUpdateSettings(properties); + }; + + /** + * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.classifications != null && message.classifications.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.classifications.length; ++i) + writer.int32(message.classifications[i]); + writer.ldelim(); + } + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); + if (message.exclusivePatches != null && message.exclusivePatches.length) + for (var i = 0; i < message.exclusivePatches.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePatches[i]); + return writer; + }; + + /** + * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsUpdateSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.classifications && message.classifications.length)) + message.classifications = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.classifications.push(reader.int32()); + } else + message.classifications.push(reader.int32()); + break; + case 2: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 3: + if (!(message.exclusivePatches && message.exclusivePatches.length)) + message.exclusivePatches = []; + message.exclusivePatches.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsUpdateSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsUpdateSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdateSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.classifications != null && message.hasOwnProperty("classifications")) { + if (!Array.isArray(message.classifications)) + return "classifications: array expected"; + for (var i = 0; i < message.classifications.length; ++i) + switch (message.classifications[i]) { + default: + return "classifications: 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.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { + if (!Array.isArray(message.exclusivePatches)) + return "exclusivePatches: array expected"; + for (var i = 0; i < message.exclusivePatches.length; ++i) + if (!$util.isString(message.exclusivePatches[i])) + return "exclusivePatches: string[] expected"; + } + return null; + }; + + /** + * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings + */ + WindowsUpdateSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.WindowsUpdateSettings) + return object; + var message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); + if (object.classifications) { + if (!Array.isArray(object.classifications)) + throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.classifications: array expected"); + message.classifications = []; + for (var i = 0; i < object.classifications.length; ++i) + switch (object.classifications[i]) { + default: + case "CLASSIFICATION_UNSPECIFIED": + case 0: + message.classifications[i] = 0; + break; + case "CRITICAL": + case 1: + message.classifications[i] = 1; + break; + case "SECURITY": + case 2: + message.classifications[i] = 2; + break; + case "DEFINITION": + case 3: + message.classifications[i] = 3; + break; + case "DRIVER": + case 4: + message.classifications[i] = 4; + break; + case "FEATURE_PACK": + case 5: + message.classifications[i] = 5; + break; + case "SERVICE_PACK": + case 6: + message.classifications[i] = 6; + break; + case "TOOL": + case 7: + message.classifications[i] = 7; + break; + case "UPDATE_ROLLUP": + case 8: + message.classifications[i] = 8; + break; + case "UPDATE": + case 9: + message.classifications[i] = 9; + break; + } + } + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePatches) { + if (!Array.isArray(object.exclusivePatches)) + throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.exclusivePatches: array expected"); + message.exclusivePatches = []; + for (var i = 0; i < object.exclusivePatches.length; ++i) + message.exclusivePatches[i] = String(object.exclusivePatches[i]); + } + return message; + }; + + /** + * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {google.cloud.osconfig.v1.WindowsUpdateSettings} message WindowsUpdateSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdateSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.classifications = []; + object.excludes = []; + object.exclusivePatches = []; + } + if (message.classifications && message.classifications.length) { + object.classifications = []; + for (var j = 0; j < message.classifications.length; ++j) + object.classifications[j] = options.enums === String ? $root.google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[message.classifications[j]] : message.classifications[j]; + } + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePatches && message.exclusivePatches.length) { + object.exclusivePatches = []; + for (var j = 0; j < message.exclusivePatches.length; ++j) + object.exclusivePatches[j] = message.exclusivePatches[j]; + } + return object; + }; + + /** + * Converts this WindowsUpdateSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdateSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Classification enum. + * @name google.cloud.osconfig.v1.WindowsUpdateSettings.Classification + * @enum {number} + * @property {number} CLASSIFICATION_UNSPECIFIED=0 CLASSIFICATION_UNSPECIFIED value + * @property {number} CRITICAL=1 CRITICAL value + * @property {number} SECURITY=2 SECURITY value + * @property {number} DEFINITION=3 DEFINITION value + * @property {number} DRIVER=4 DRIVER value + * @property {number} FEATURE_PACK=5 FEATURE_PACK value + * @property {number} SERVICE_PACK=6 SERVICE_PACK value + * @property {number} TOOL=7 TOOL value + * @property {number} UPDATE_ROLLUP=8 UPDATE_ROLLUP value + * @property {number} UPDATE=9 UPDATE value + */ + WindowsUpdateSettings.Classification = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLASSIFICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CRITICAL"] = 1; + values[valuesById[2] = "SECURITY"] = 2; + values[valuesById[3] = "DEFINITION"] = 3; + values[valuesById[4] = "DRIVER"] = 4; + values[valuesById[5] = "FEATURE_PACK"] = 5; + values[valuesById[6] = "SERVICE_PACK"] = 6; + values[valuesById[7] = "TOOL"] = 7; + values[valuesById[8] = "UPDATE_ROLLUP"] = 8; + values[valuesById[9] = "UPDATE"] = 9; + return values; + })(); + + return WindowsUpdateSettings; + })(); + + v1.ExecStep = (function() { + + /** + * Properties of an ExecStep. + * @memberof google.cloud.osconfig.v1 + * @interface IExecStep + * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [linuxExecStepConfig] ExecStep linuxExecStepConfig + * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [windowsExecStepConfig] ExecStep windowsExecStepConfig + */ + + /** + * Constructs a new ExecStep. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an ExecStep. + * @implements IExecStep + * @constructor + * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set + */ + function ExecStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecStep linuxExecStepConfig. + * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} linuxExecStepConfig + * @memberof google.cloud.osconfig.v1.ExecStep + * @instance + */ + ExecStep.prototype.linuxExecStepConfig = null; + + /** + * ExecStep windowsExecStepConfig. + * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} windowsExecStepConfig + * @memberof google.cloud.osconfig.v1.ExecStep + * @instance + */ + ExecStep.prototype.windowsExecStepConfig = null; + + /** + * Creates a new ExecStep instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep instance + */ + ExecStep.create = function create(properties) { + return new ExecStep(properties); + }; + + /** + * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linuxExecStepConfig != null && Object.hasOwnProperty.call(message, "linuxExecStepConfig")) + $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.linuxExecStepConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.windowsExecStepConfig != null && Object.hasOwnProperty.call(message, "windowsExecStepConfig")) + $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.windowsExecStepConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecStep message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); + break; + case 2: + message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecStep message. + * @function verify + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) { + var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.linuxExecStepConfig); + if (error) + return "linuxExecStepConfig." + error; + } + if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) { + var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.windowsExecStepConfig); + if (error) + return "windowsExecStepConfig." + error; + } + return null; + }; + + /** + * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep + */ + ExecStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ExecStep) + return object; + var message = new $root.google.cloud.osconfig.v1.ExecStep(); + if (object.linuxExecStepConfig != null) { + if (typeof object.linuxExecStepConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecStep.linuxExecStepConfig: object expected"); + message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.linuxExecStepConfig); + } + if (object.windowsExecStepConfig != null) { + if (typeof object.windowsExecStepConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecStep.windowsExecStepConfig: object expected"); + message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.windowsExecStepConfig); + } + return message; + }; + + /** + * Creates a plain object from an ExecStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {google.cloud.osconfig.v1.ExecStep} message ExecStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.linuxExecStepConfig = null; + object.windowsExecStepConfig = null; + } + if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) + object.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.linuxExecStepConfig, options); + if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) + object.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.windowsExecStepConfig, options); + return object; + }; + + /** + * Converts this ExecStep to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ExecStep + * @instance + * @returns {Object.} JSON object + */ + ExecStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExecStep; + })(); + + v1.ExecStepConfig = (function() { + + /** + * Properties of an ExecStepConfig. + * @memberof google.cloud.osconfig.v1 + * @interface IExecStepConfig + * @property {string|null} [localPath] ExecStepConfig localPath + * @property {google.cloud.osconfig.v1.IGcsObject|null} [gcsObject] ExecStepConfig gcsObject + * @property {Array.|null} [allowedSuccessCodes] ExecStepConfig allowedSuccessCodes + * @property {google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null} [interpreter] ExecStepConfig interpreter + */ + + /** + * Constructs a new ExecStepConfig. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an ExecStepConfig. + * @implements IExecStepConfig + * @constructor + * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set + */ + function ExecStepConfig(properties) { + this.allowedSuccessCodes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecStepConfig localPath. + * @member {string} localPath + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + ExecStepConfig.prototype.localPath = ""; + + /** + * ExecStepConfig gcsObject. + * @member {google.cloud.osconfig.v1.IGcsObject|null|undefined} gcsObject + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + ExecStepConfig.prototype.gcsObject = null; + + /** + * ExecStepConfig allowedSuccessCodes. + * @member {Array.} allowedSuccessCodes + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + ExecStepConfig.prototype.allowedSuccessCodes = $util.emptyArray; + + /** + * ExecStepConfig interpreter. + * @member {google.cloud.osconfig.v1.ExecStepConfig.Interpreter} interpreter + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + ExecStepConfig.prototype.interpreter = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecStepConfig executable. + * @member {"localPath"|"gcsObject"|undefined} executable + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + Object.defineProperty(ExecStepConfig.prototype, "executable", { + get: $util.oneOfGetter($oneOfFields = ["localPath", "gcsObject"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecStepConfig instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig instance + */ + ExecStepConfig.create = function create(properties) { + return new ExecStepConfig(properties); + }; + + /** + * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecStepConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath); + if (message.gcsObject != null && Object.hasOwnProperty.call(message, "gcsObject")) + $root.google.cloud.osconfig.v1.GcsObject.encode(message.gcsObject, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowedSuccessCodes != null && message.allowedSuccessCodes.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.allowedSuccessCodes.length; ++i) + writer.int32(message.allowedSuccessCodes[i]); + writer.ldelim(); + } + if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); + return writer; + }; + + /** + * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecStepConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecStepConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecStepConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.localPath = reader.string(); + break; + case 2: + message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.allowedSuccessCodes && message.allowedSuccessCodes.length)) + message.allowedSuccessCodes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowedSuccessCodes.push(reader.int32()); + } else + message.allowedSuccessCodes.push(reader.int32()); + break; + case 4: + message.interpreter = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecStepConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecStepConfig message. + * @function verify + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecStepConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.localPath != null && message.hasOwnProperty("localPath")) { + properties.executable = 1; + if (!$util.isString(message.localPath)) + return "localPath: string expected"; + } + if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { + if (properties.executable === 1) + return "executable: multiple values"; + properties.executable = 1; + { + var error = $root.google.cloud.osconfig.v1.GcsObject.verify(message.gcsObject); + if (error) + return "gcsObject." + error; + } + } + if (message.allowedSuccessCodes != null && message.hasOwnProperty("allowedSuccessCodes")) { + if (!Array.isArray(message.allowedSuccessCodes)) + return "allowedSuccessCodes: array expected"; + for (var i = 0; i < message.allowedSuccessCodes.length; ++i) + if (!$util.isInteger(message.allowedSuccessCodes[i])) + return "allowedSuccessCodes: integer[] expected"; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + switch (message.interpreter) { + default: + return "interpreter: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig + */ + ExecStepConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ExecStepConfig) + return object; + var message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); + if (object.localPath != null) + message.localPath = String(object.localPath); + if (object.gcsObject != null) { + if (typeof object.gcsObject !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.gcsObject: object expected"); + message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.fromObject(object.gcsObject); + } + if (object.allowedSuccessCodes) { + if (!Array.isArray(object.allowedSuccessCodes)) + throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.allowedSuccessCodes: array expected"); + message.allowedSuccessCodes = []; + for (var i = 0; i < object.allowedSuccessCodes.length; ++i) + message.allowedSuccessCodes[i] = object.allowedSuccessCodes[i] | 0; + } + switch (object.interpreter) { + case "INTERPRETER_UNSPECIFIED": + case 0: + message.interpreter = 0; + break; + case "SHELL": + case 1: + message.interpreter = 1; + break; + case "POWERSHELL": + case 2: + message.interpreter = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {google.cloud.osconfig.v1.ExecStepConfig} message ExecStepConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecStepConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedSuccessCodes = []; + if (options.defaults) + object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; + if (message.localPath != null && message.hasOwnProperty("localPath")) { + object.localPath = message.localPath; + if (options.oneofs) + object.executable = "localPath"; + } + if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { + object.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.toObject(message.gcsObject, options); + if (options.oneofs) + object.executable = "gcsObject"; + } + if (message.allowedSuccessCodes && message.allowedSuccessCodes.length) { + object.allowedSuccessCodes = []; + for (var j = 0; j < message.allowedSuccessCodes.length; ++j) + object.allowedSuccessCodes[j] = message.allowedSuccessCodes[j]; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.ExecStepConfig.Interpreter[message.interpreter] : message.interpreter; + return object; + }; + + /** + * Converts this ExecStepConfig to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + * @returns {Object.} JSON object + */ + ExecStepConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Interpreter enum. + * @name google.cloud.osconfig.v1.ExecStepConfig.Interpreter + * @enum {number} + * @property {number} INTERPRETER_UNSPECIFIED=0 INTERPRETER_UNSPECIFIED value + * @property {number} SHELL=1 SHELL value + * @property {number} POWERSHELL=2 POWERSHELL value + */ + ExecStepConfig.Interpreter = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTERPRETER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SHELL"] = 1; + values[valuesById[2] = "POWERSHELL"] = 2; + return values; + })(); + + return ExecStepConfig; + })(); + + v1.GcsObject = (function() { + + /** + * Properties of a GcsObject. + * @memberof google.cloud.osconfig.v1 + * @interface IGcsObject + * @property {string|null} [bucket] GcsObject bucket + * @property {string|null} [object] GcsObject object + * @property {number|Long|null} [generationNumber] GcsObject generationNumber + */ + + /** + * Constructs a new GcsObject. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GcsObject. + * @implements IGcsObject + * @constructor + * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set + */ + function GcsObject(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsObject bucket. + * @member {string} bucket + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + */ + GcsObject.prototype.bucket = ""; + + /** + * GcsObject object. + * @member {string} object + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + */ + GcsObject.prototype.object = ""; + + /** + * GcsObject generationNumber. + * @member {number|Long} generationNumber + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + */ + GcsObject.prototype.generationNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GcsObject instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject instance + */ + GcsObject.create = function create(properties) { + return new GcsObject(properties); + }; + + /** + * Encodes the specified GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsObject.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.object != null && Object.hasOwnProperty.call(message, "object")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); + if (message.generationNumber != null && Object.hasOwnProperty.call(message, "generationNumber")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generationNumber); + return writer; + }; + + /** + * Encodes the specified GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsObject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsObject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsObject.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GcsObject(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bucket = reader.string(); + break; + case 2: + message.object = reader.string(); + break; + case 3: + message.generationNumber = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsObject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsObject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsObject message. + * @function verify + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsObject.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.object != null && message.hasOwnProperty("object")) + if (!$util.isString(message.object)) + return "object: string expected"; + if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) + if (!$util.isInteger(message.generationNumber) && !(message.generationNumber && $util.isInteger(message.generationNumber.low) && $util.isInteger(message.generationNumber.high))) + return "generationNumber: integer|Long expected"; + return null; + }; + + /** + * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject + */ + GcsObject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GcsObject) + return object; + var message = new $root.google.cloud.osconfig.v1.GcsObject(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.object != null) + message.object = String(object.object); + if (object.generationNumber != null) + if ($util.Long) + (message.generationNumber = $util.Long.fromValue(object.generationNumber)).unsigned = false; + else if (typeof object.generationNumber === "string") + message.generationNumber = parseInt(object.generationNumber, 10); + else if (typeof object.generationNumber === "number") + message.generationNumber = object.generationNumber; + else if (typeof object.generationNumber === "object") + message.generationNumber = new $util.LongBits(object.generationNumber.low >>> 0, object.generationNumber.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GcsObject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {google.cloud.osconfig.v1.GcsObject} message GcsObject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsObject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.object = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.generationNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.generationNumber = options.longs === String ? "0" : 0; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.object != null && message.hasOwnProperty("object")) + object.object = message.object; + if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) + if (typeof message.generationNumber === "number") + object.generationNumber = options.longs === String ? String(message.generationNumber) : message.generationNumber; + else + object.generationNumber = options.longs === String ? $util.Long.prototype.toString.call(message.generationNumber) : options.longs === Number ? new $util.LongBits(message.generationNumber.low >>> 0, message.generationNumber.high >>> 0).toNumber() : message.generationNumber; + return object; + }; + + /** + * Converts this GcsObject to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + * @returns {Object.} JSON object + */ + GcsObject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GcsObject; + })(); + + v1.PatchInstanceFilter = (function() { + + /** + * Properties of a PatchInstanceFilter. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchInstanceFilter + * @property {boolean|null} [all] PatchInstanceFilter all + * @property {Array.|null} [groupLabels] PatchInstanceFilter groupLabels + * @property {Array.|null} [zones] PatchInstanceFilter zones + * @property {Array.|null} [instances] PatchInstanceFilter instances + * @property {Array.|null} [instanceNamePrefixes] PatchInstanceFilter instanceNamePrefixes + */ + + /** + * Constructs a new PatchInstanceFilter. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchInstanceFilter. + * @implements IPatchInstanceFilter + * @constructor + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set + */ + function PatchInstanceFilter(properties) { + this.groupLabels = []; + this.zones = []; + this.instances = []; + this.instanceNamePrefixes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PatchInstanceFilter all. + * @member {boolean} all + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.all = false; + + /** + * PatchInstanceFilter groupLabels. + * @member {Array.} groupLabels + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.groupLabels = $util.emptyArray; + + /** + * PatchInstanceFilter zones. + * @member {Array.} zones + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.zones = $util.emptyArray; + + /** + * PatchInstanceFilter instances. + * @member {Array.} instances + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.instances = $util.emptyArray; + + /** + * PatchInstanceFilter instanceNamePrefixes. + * @member {Array.} instanceNamePrefixes + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.instanceNamePrefixes = $util.emptyArray; + + /** + * Creates a new PatchInstanceFilter instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter instance + */ + PatchInstanceFilter.create = function create(properties) { + return new PatchInstanceFilter(properties); + }; + + /** + * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchInstanceFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.all != null && Object.hasOwnProperty.call(message, "all")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all); + if (message.groupLabels != null && message.groupLabels.length) + for (var i = 0; i < message.groupLabels.length; ++i) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.encode(message.groupLabels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zones != null && message.zones.length) + for (var i = 0; i < message.zones.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.zones[i]); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instances[i]); + if (message.instanceNamePrefixes != null && message.instanceNamePrefixes.length) + for (var i = 0; i < message.instanceNamePrefixes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.instanceNamePrefixes[i]); + return writer; + }; + + /** + * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchInstanceFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PatchInstanceFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchInstanceFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.all = reader.bool(); + break; + case 2: + if (!(message.groupLabels && message.groupLabels.length)) + message.groupLabels = []; + message.groupLabels.push($root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push(reader.string()); + break; + case 4: + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push(reader.string()); + break; + case 5: + if (!(message.instanceNamePrefixes && message.instanceNamePrefixes.length)) + message.instanceNamePrefixes = []; + message.instanceNamePrefixes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchInstanceFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PatchInstanceFilter message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchInstanceFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.all != null && message.hasOwnProperty("all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; + if (message.groupLabels != null && message.hasOwnProperty("groupLabels")) { + if (!Array.isArray(message.groupLabels)) + return "groupLabels: array expected"; + for (var i = 0; i < message.groupLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify(message.groupLabels[i]); + if (error) + return "groupLabels." + error; + } + } + if (message.zones != null && message.hasOwnProperty("zones")) { + if (!Array.isArray(message.zones)) + return "zones: array expected"; + for (var i = 0; i < message.zones.length; ++i) + if (!$util.isString(message.zones[i])) + return "zones: string[] expected"; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) + if (!$util.isString(message.instances[i])) + return "instances: string[] expected"; + } + if (message.instanceNamePrefixes != null && message.hasOwnProperty("instanceNamePrefixes")) { + if (!Array.isArray(message.instanceNamePrefixes)) + return "instanceNamePrefixes: array expected"; + for (var i = 0; i < message.instanceNamePrefixes.length; ++i) + if (!$util.isString(message.instanceNamePrefixes[i])) + return "instanceNamePrefixes: string[] expected"; + } + return null; + }; + + /** + * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter + */ + PatchInstanceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); + if (object.all != null) + message.all = Boolean(object.all); + if (object.groupLabels) { + if (!Array.isArray(object.groupLabels)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: array expected"); + message.groupLabels = []; + for (var i = 0; i < object.groupLabels.length; ++i) { + if (typeof object.groupLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: object expected"); + message.groupLabels[i] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.fromObject(object.groupLabels[i]); + } + } + if (object.zones) { + if (!Array.isArray(object.zones)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.zones: array expected"); + message.zones = []; + for (var i = 0; i < object.zones.length; ++i) + message.zones[i] = String(object.zones[i]); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) + message.instances[i] = String(object.instances[i]); + } + if (object.instanceNamePrefixes) { + if (!Array.isArray(object.instanceNamePrefixes)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instanceNamePrefixes: array expected"); + message.instanceNamePrefixes = []; + for (var i = 0; i < object.instanceNamePrefixes.length; ++i) + message.instanceNamePrefixes[i] = String(object.instanceNamePrefixes[i]); + } + return message; + }; + + /** + * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter} message PatchInstanceFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchInstanceFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.groupLabels = []; + object.zones = []; + object.instances = []; + object.instanceNamePrefixes = []; + } + if (options.defaults) + object.all = false; + if (message.all != null && message.hasOwnProperty("all")) + object.all = message.all; + if (message.groupLabels && message.groupLabels.length) { + object.groupLabels = []; + for (var j = 0; j < message.groupLabels.length; ++j) + object.groupLabels[j] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.toObject(message.groupLabels[j], options); + } + if (message.zones && message.zones.length) { + object.zones = []; + for (var j = 0; j < message.zones.length; ++j) + object.zones[j] = message.zones[j]; + } + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = message.instances[j]; + } + if (message.instanceNamePrefixes && message.instanceNamePrefixes.length) { + object.instanceNamePrefixes = []; + for (var j = 0; j < message.instanceNamePrefixes.length; ++j) + object.instanceNamePrefixes[j] = message.instanceNamePrefixes[j]; + } + return object; + }; + + /** + * Converts this PatchInstanceFilter to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + * @returns {Object.} JSON object + */ + PatchInstanceFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PatchInstanceFilter.GroupLabel = (function() { + + /** + * Properties of a GroupLabel. + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @interface IGroupLabel + * @property {Object.|null} [labels] GroupLabel labels + */ + + /** + * Constructs a new GroupLabel. + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @classdesc Represents a GroupLabel. + * @implements IGroupLabel + * @constructor + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set + */ + function GroupLabel(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GroupLabel labels. + * @member {Object.} labels + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @instance + */ + GroupLabel.prototype.labels = $util.emptyObject; + + /** + * Creates a new GroupLabel instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel instance + */ + GroupLabel.create = function create(properties) { + return new GroupLabel(properties); + }; + + /** + * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupLabel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupLabel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupLabel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupLabel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupLabel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupLabel message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupLabel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a GroupLabel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + */ + GroupLabel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} message GroupLabel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupLabel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this GroupLabel to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @instance + * @returns {Object.} JSON object + */ + GroupLabel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupLabel; + })(); + + return PatchInstanceFilter; + })(); + + return v1; + })(); + + return osconfig; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * 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 = ""; + + /** + * 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); + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + 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"; + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pattern = []; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && 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); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = false; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = false; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.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; + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.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"]); + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + return protobuf; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.DateTime = (function() { + + /** + * Properties of a DateTime. + * @memberof google.type + * @interface IDateTime + * @property {number|null} [year] DateTime year + * @property {number|null} [month] DateTime month + * @property {number|null} [day] DateTime day + * @property {number|null} [hours] DateTime hours + * @property {number|null} [minutes] DateTime minutes + * @property {number|null} [seconds] DateTime seconds + * @property {number|null} [nanos] DateTime nanos + * @property {google.protobuf.IDuration|null} [utcOffset] DateTime utcOffset + * @property {google.type.ITimeZone|null} [timeZone] DateTime timeZone + */ + + /** + * Constructs a new DateTime. + * @memberof google.type + * @classdesc Represents a DateTime. + * @implements IDateTime + * @constructor + * @param {google.type.IDateTime=} [properties] Properties to set + */ + function DateTime(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DateTime year. + * @member {number} year + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.year = 0; + + /** + * DateTime month. + * @member {number} month + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.month = 0; + + /** + * DateTime day. + * @member {number} day + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.day = 0; + + /** + * DateTime hours. + * @member {number} hours + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.hours = 0; + + /** + * DateTime minutes. + * @member {number} minutes + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.minutes = 0; + + /** + * DateTime seconds. + * @member {number} seconds + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.seconds = 0; + + /** + * DateTime nanos. + * @member {number} nanos + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.nanos = 0; + + /** + * DateTime utcOffset. + * @member {google.protobuf.IDuration|null|undefined} utcOffset + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.utcOffset = null; + + /** + * DateTime timeZone. + * @member {google.type.ITimeZone|null|undefined} timeZone + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.timeZone = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DateTime timeOffset. + * @member {"utcOffset"|"timeZone"|undefined} timeOffset + * @memberof google.type.DateTime + * @instance + */ + Object.defineProperty(DateTime.prototype, "timeOffset", { + get: $util.oneOfGetter($oneOfFields = ["utcOffset", "timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DateTime instance using the specified properties. + * @function create + * @memberof google.type.DateTime + * @static + * @param {google.type.IDateTime=} [properties] Properties to set + * @returns {google.type.DateTime} DateTime instance + */ + DateTime.create = function create(properties) { + return new DateTime(properties); + }; + + /** + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @function encode + * @memberof google.type.DateTime + * @static + * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateTime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.nanos); + if (message.utcOffset != null && Object.hasOwnProperty.call(message, "utcOffset")) + $root.google.protobuf.Duration.encode(message.utcOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.DateTime + * @static + * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateTime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateTime message from the specified reader or buffer. + * @function decode + * @memberof google.type.DateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.DateTime} DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateTime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.DateTime(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.year = reader.int32(); + break; + case 2: + message.month = reader.int32(); + break; + case 3: + message.day = reader.int32(); + break; + case 4: + message.hours = reader.int32(); + break; + case 5: + message.minutes = reader.int32(); + break; + case 6: + message.seconds = reader.int32(); + break; + case 7: + message.nanos = reader.int32(); + break; + case 8: + message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 9: + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DateTime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.DateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.DateTime} DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateTime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateTime message. + * @function verify + * @memberof google.type.DateTime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateTime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + properties.timeOffset = 1; + { + var error = $root.google.protobuf.Duration.verify(message.utcOffset); + if (error) + return "utcOffset." + error; + } + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + if (properties.timeOffset === 1) + return "timeOffset: multiple values"; + properties.timeOffset = 1; + { + var error = $root.google.type.TimeZone.verify(message.timeZone); + if (error) + return "timeZone." + error; + } + } + return null; + }; + + /** + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.DateTime + * @static + * @param {Object.} object Plain object + * @returns {google.type.DateTime} DateTime + */ + DateTime.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.DateTime) + return object; + var message = new $root.google.type.DateTime(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; + if (object.utcOffset != null) { + if (typeof object.utcOffset !== "object") + throw TypeError(".google.type.DateTime.utcOffset: object expected"); + message.utcOffset = $root.google.protobuf.Duration.fromObject(object.utcOffset); + } + if (object.timeZone != null) { + if (typeof object.timeZone !== "object") + throw TypeError(".google.type.DateTime.timeZone: object expected"); + message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); + } + return message; + }; + + /** + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.DateTime + * @static + * @param {google.type.DateTime} message DateTime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateTime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + object.utcOffset = $root.google.protobuf.Duration.toObject(message.utcOffset, options); + if (options.oneofs) + object.timeOffset = "utcOffset"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); + if (options.oneofs) + object.timeOffset = "timeZone"; + } + return object; + }; + + /** + * Converts this DateTime to JSON. + * @function toJSON + * @memberof google.type.DateTime + * @instance + * @returns {Object.} JSON object + */ + DateTime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DateTime; + })(); + + type.TimeZone = (function() { + + /** + * Properties of a TimeZone. + * @memberof google.type + * @interface ITimeZone + * @property {string|null} [id] TimeZone id + * @property {string|null} [version] TimeZone version + */ + + /** + * Constructs a new TimeZone. + * @memberof google.type + * @classdesc Represents a TimeZone. + * @implements ITimeZone + * @constructor + * @param {google.type.ITimeZone=} [properties] Properties to set + */ + function TimeZone(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeZone id. + * @member {string} id + * @memberof google.type.TimeZone + * @instance + */ + TimeZone.prototype.id = ""; + + /** + * TimeZone version. + * @member {string} version + * @memberof google.type.TimeZone + * @instance + */ + TimeZone.prototype.version = ""; + + /** + * Creates a new TimeZone instance using the specified properties. + * @function create + * @memberof google.type.TimeZone + * @static + * @param {google.type.ITimeZone=} [properties] Properties to set + * @returns {google.type.TimeZone} TimeZone instance + */ + TimeZone.create = function create(properties) { + return new TimeZone(properties); + }; + + /** + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @function encode + * @memberof google.type.TimeZone + * @static + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeZone.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + return writer; + }; + + /** + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.TimeZone + * @static + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeZone.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeZone message from the specified reader or buffer. + * @function decode + * @memberof google.type.TimeZone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.TimeZone} TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeZone.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeZone(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.TimeZone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.TimeZone} TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeZone.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeZone message. + * @function verify + * @memberof google.type.TimeZone + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeZone.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.TimeZone + * @static + * @param {Object.} object Plain object + * @returns {google.type.TimeZone} TimeZone + */ + TimeZone.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeZone) + return object; + var message = new $root.google.type.TimeZone(); + if (object.id != null) + message.id = String(object.id); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.TimeZone + * @static + * @param {google.type.TimeZone} message TimeZone + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeZone.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.version = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this TimeZone to JSON. + * @function toJSON + * @memberof google.type.TimeZone + * @instance + * @returns {Object.} JSON object + */ + TimeZone.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeZone; + })(); + + /** + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); + + type.TimeOfDay = (function() { + + /** + * Properties of a TimeOfDay. + * @memberof google.type + * @interface ITimeOfDay + * @property {number|null} [hours] TimeOfDay hours + * @property {number|null} [minutes] TimeOfDay minutes + * @property {number|null} [seconds] TimeOfDay seconds + * @property {number|null} [nanos] TimeOfDay nanos + */ + + /** + * Constructs a new TimeOfDay. + * @memberof google.type + * @classdesc Represents a TimeOfDay. + * @implements ITimeOfDay + * @constructor + * @param {google.type.ITimeOfDay=} [properties] Properties to set + */ + function TimeOfDay(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeOfDay hours. + * @member {number} hours + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.hours = 0; + + /** + * TimeOfDay minutes. + * @member {number} minutes + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.minutes = 0; + + /** + * TimeOfDay seconds. + * @member {number} seconds + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.seconds = 0; + + /** + * TimeOfDay nanos. + * @member {number} nanos + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.nanos = 0; + + /** + * Creates a new TimeOfDay instance using the specified properties. + * @function create + * @memberof google.type.TimeOfDay + * @static + * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @returns {google.type.TimeOfDay} TimeOfDay instance + */ + TimeOfDay.create = function create(properties) { + return new TimeOfDay(properties); + }; + + /** + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @function encode + * @memberof google.type.TimeOfDay + * @static + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeOfDay.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.TimeOfDay + * @static + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer. + * @function decode + * @memberof google.type.TimeOfDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.TimeOfDay} TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeOfDay.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hours = reader.int32(); + break; + case 2: + message.minutes = reader.int32(); + break; + case 3: + message.seconds = reader.int32(); + break; + case 4: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.TimeOfDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.TimeOfDay} TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeOfDay.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeOfDay message. + * @function verify + * @memberof google.type.TimeOfDay + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeOfDay.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.TimeOfDay + * @static + * @param {Object.} object Plain object + * @returns {google.type.TimeOfDay} TimeOfDay + */ + TimeOfDay.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeOfDay) + return object; + var message = new $root.google.type.TimeOfDay(); + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.TimeOfDay + * @static + * @param {google.type.TimeOfDay} message TimeOfDay + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeOfDay.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; + } + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this TimeOfDay to JSON. + * @function toJSON + * @memberof google.type.TimeOfDay + * @instance + * @returns {Object.} JSON object + */ + TimeOfDay.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeOfDay; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json new file mode 100644 index 00000000000..cdd8b51b8ad --- /dev/null +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -0,0 +1,2268 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "osconfig": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.OsConfig.V1", + "go_package": "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig", + "java_outer_classname": "PatchJobs", + "java_package": "com.google.cloud.osconfig.v1", + "php_namespace": "Google\\Cloud\\OsConfig\\V1", + "ruby_package": "Google::Cloud::OsConfig::V1", + "(google.api.resource_definition).type": "compute.googleapis.com/Instance", + "(google.api.resource_definition).pattern": "projects/{project}/zones/{zone}/instances/{instance}" + }, + "nested": { + "OsConfigService": { + "options": { + "(google.api.default_host)": "osconfig.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ExecutePatchJob": { + "requestType": "ExecutePatchJobRequest", + "responseType": "PatchJob", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/patchJobs:execute", + "(google.api.http).body": "*" + } + }, + "GetPatchJob": { + "requestType": "GetPatchJobRequest", + "responseType": "PatchJob", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/patchJobs/*}", + "(google.api.method_signature)": "name" + } + }, + "CancelPatchJob": { + "requestType": "CancelPatchJobRequest", + "responseType": "PatchJob", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/patchJobs/*}:cancel", + "(google.api.http).body": "*" + } + }, + "ListPatchJobs": { + "requestType": "ListPatchJobsRequest", + "responseType": "ListPatchJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/patchJobs", + "(google.api.method_signature)": "parent" + } + }, + "ListPatchJobInstanceDetails": { + "requestType": "ListPatchJobInstanceDetailsRequest", + "responseType": "ListPatchJobInstanceDetailsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/patchJobs/*}/instanceDetails", + "(google.api.method_signature)": "parent" + } + }, + "CreatePatchDeployment": { + "requestType": "CreatePatchDeploymentRequest", + "responseType": "PatchDeployment", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/patchDeployments", + "(google.api.http).body": "patch_deployment", + "(google.api.method_signature)": "parent,patch_deployment,patch_deployment_id" + } + }, + "GetPatchDeployment": { + "requestType": "GetPatchDeploymentRequest", + "responseType": "PatchDeployment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/patchDeployments/*}", + "(google.api.method_signature)": "name" + } + }, + "ListPatchDeployments": { + "requestType": "ListPatchDeploymentsRequest", + "responseType": "ListPatchDeploymentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/patchDeployments", + "(google.api.method_signature)": "parent" + } + }, + "DeletePatchDeployment": { + "requestType": "DeletePatchDeploymentRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/patchDeployments/*}", + "(google.api.method_signature)": "name" + } + } + } + }, + "PatchDeployment": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/PatchDeployment", + "(google.api.resource).pattern": "projects/{project}/patchDeployments/{patch_deployment}" + }, + "oneofs": { + "schedule": { + "oneof": [ + "oneTimeSchedule", + "recurringSchedule" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "instanceFilter": { + "type": "PatchInstanceFilter", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "patchConfig": { + "type": "PatchConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oneTimeSchedule": { + "type": "OneTimeSchedule", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "recurringSchedule": { + "type": "RecurringSchedule", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastExecuteTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "OneTimeSchedule": { + "fields": { + "executeTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RecurringSchedule": { + "oneofs": { + "scheduleConfig": { + "oneof": [ + "weekly", + "monthly" + ] + } + }, + "fields": { + "timeZone": { + "type": "google.type.TimeZone", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "timeOfDay": { + "type": "google.type.TimeOfDay", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "frequency": { + "type": "Frequency", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "weekly": { + "type": "WeeklySchedule", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "monthly": { + "type": "MonthlySchedule", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lastExecuteTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nextExecuteTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Frequency": { + "values": { + "FREQUENCY_UNSPECIFIED": 0, + "WEEKLY": 1, + "MONTHLY": 2 + } + } + } + }, + "WeeklySchedule": { + "fields": { + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MonthlySchedule": { + "oneofs": { + "dayOfMonth": { + "oneof": [ + "weekDayOfMonth", + "monthDay" + ] + } + }, + "fields": { + "weekDayOfMonth": { + "type": "WeekDayOfMonth", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "monthDay": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WeekDayOfMonth": { + "fields": { + "weekOrdinal": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreatePatchDeploymentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "patchDeploymentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "patchDeployment": { + "type": "PatchDeployment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetPatchDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" + } + } + } + }, + "ListPatchDeploymentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPatchDeploymentsResponse": { + "fields": { + "patchDeployments": { + "rule": "repeated", + "type": "PatchDeployment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeletePatchDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" + } + } + } + }, + "ExecutePatchJobRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "description": { + "type": "string", + "id": 2 + }, + "instanceFilter": { + "type": "PatchInstanceFilter", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "patchConfig": { + "type": "PatchConfig", + "id": 4 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 5 + }, + "dryRun": { + "type": "bool", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 8 + } + } + }, + "GetPatchJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" + } + } + } + }, + "ListPatchJobInstanceDetailsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListPatchJobInstanceDetailsResponse": { + "fields": { + "patchJobInstanceDetails": { + "rule": "repeated", + "type": "PatchJobInstanceDetails", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "PatchJobInstanceDetails": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "compute.googleapis.com/Instance" + } + }, + "instanceSystemId": { + "type": "string", + "id": 2 + }, + "state": { + "type": "Instance.PatchState", + "id": 3 + }, + "failureReason": { + "type": "string", + "id": 4 + }, + "attemptCount": { + "type": "int64", + "id": 5 + } + } + }, + "ListPatchJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListPatchJobsResponse": { + "fields": { + "patchJobs": { + "rule": "repeated", + "type": "PatchJob", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "PatchJob": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/PatchJob", + "(google.api.resource).pattern": "projects/{project}/patchJobs/{patch_job}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 14 + }, + "description": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "state": { + "type": "State", + "id": 5 + }, + "instanceFilter": { + "type": "PatchInstanceFilter", + "id": 13 + }, + "patchConfig": { + "type": "PatchConfig", + "id": 7 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 8 + }, + "instanceDetailsSummary": { + "type": "InstanceDetailsSummary", + "id": 9 + }, + "dryRun": { + "type": "bool", + "id": 10 + }, + "errorMessage": { + "type": "string", + "id": 11 + }, + "percentComplete": { + "type": "double", + "id": 12 + }, + "patchDeployment": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" + } + } + }, + "nested": { + "InstanceDetailsSummary": { + "fields": { + "pendingInstanceCount": { + "type": "int64", + "id": 1 + }, + "inactiveInstanceCount": { + "type": "int64", + "id": 2 + }, + "notifiedInstanceCount": { + "type": "int64", + "id": 3 + }, + "startedInstanceCount": { + "type": "int64", + "id": 4 + }, + "downloadingPatchesInstanceCount": { + "type": "int64", + "id": 5 + }, + "applyingPatchesInstanceCount": { + "type": "int64", + "id": 6 + }, + "rebootingInstanceCount": { + "type": "int64", + "id": 7 + }, + "succeededInstanceCount": { + "type": "int64", + "id": 8 + }, + "succeededRebootRequiredInstanceCount": { + "type": "int64", + "id": 9 + }, + "failedInstanceCount": { + "type": "int64", + "id": 10 + }, + "ackedInstanceCount": { + "type": "int64", + "id": 11 + }, + "timedOutInstanceCount": { + "type": "int64", + "id": 12 + }, + "prePatchStepInstanceCount": { + "type": "int64", + "id": 13 + }, + "postPatchStepInstanceCount": { + "type": "int64", + "id": 14 + }, + "noAgentDetectedInstanceCount": { + "type": "int64", + "id": 15 + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STARTED": 1, + "INSTANCE_LOOKUP": 2, + "PATCHING": 3, + "SUCCEEDED": 4, + "COMPLETED_WITH_ERRORS": 5, + "CANCELED": 6, + "TIMED_OUT": 7 + } + } + } + }, + "PatchConfig": { + "fields": { + "rebootConfig": { + "type": "RebootConfig", + "id": 1 + }, + "apt": { + "type": "AptSettings", + "id": 3 + }, + "yum": { + "type": "YumSettings", + "id": 4 + }, + "goo": { + "type": "GooSettings", + "id": 5 + }, + "zypper": { + "type": "ZypperSettings", + "id": 6 + }, + "windowsUpdate": { + "type": "WindowsUpdateSettings", + "id": 7 + }, + "preStep": { + "type": "ExecStep", + "id": 8 + }, + "postStep": { + "type": "ExecStep", + "id": 9 + } + }, + "nested": { + "RebootConfig": { + "values": { + "REBOOT_CONFIG_UNSPECIFIED": 0, + "DEFAULT": 1, + "ALWAYS": 2, + "NEVER": 3 + } + } + } + }, + "Instance": { + "fields": {}, + "nested": { + "PatchState": { + "values": { + "PATCH_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "INACTIVE": 2, + "NOTIFIED": 3, + "STARTED": 4, + "DOWNLOADING_PATCHES": 5, + "APPLYING_PATCHES": 6, + "REBOOTING": 7, + "SUCCEEDED": 8, + "SUCCEEDED_REBOOT_REQUIRED": 9, + "FAILED": 10, + "ACKED": 11, + "TIMED_OUT": 12, + "RUNNING_PRE_PATCH_STEP": 13, + "RUNNING_POST_PATCH_STEP": 14, + "NO_AGENT_DETECTED": 15 + } + } + } + }, + "CancelPatchJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" + } + } + } + }, + "AptSettings": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "exclusivePackages": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "DIST": 1, + "UPGRADE": 2 + } + } + } + }, + "YumSettings": { + "fields": { + "security": { + "type": "bool", + "id": 1 + }, + "minimal": { + "type": "bool", + "id": 2 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "exclusivePackages": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "GooSettings": { + "fields": {} + }, + "ZypperSettings": { + "fields": { + "withOptional": { + "type": "bool", + "id": 1 + }, + "withUpdate": { + "type": "bool", + "id": 2 + }, + "categories": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "severities": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "exclusivePatches": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "WindowsUpdateSettings": { + "fields": { + "classifications": { + "rule": "repeated", + "type": "Classification", + "id": 1 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "exclusivePatches": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Classification": { + "values": { + "CLASSIFICATION_UNSPECIFIED": 0, + "CRITICAL": 1, + "SECURITY": 2, + "DEFINITION": 3, + "DRIVER": 4, + "FEATURE_PACK": 5, + "SERVICE_PACK": 6, + "TOOL": 7, + "UPDATE_ROLLUP": 8, + "UPDATE": 9 + } + } + } + }, + "ExecStep": { + "fields": { + "linuxExecStepConfig": { + "type": "ExecStepConfig", + "id": 1 + }, + "windowsExecStepConfig": { + "type": "ExecStepConfig", + "id": 2 + } + } + }, + "ExecStepConfig": { + "oneofs": { + "executable": { + "oneof": [ + "localPath", + "gcsObject" + ] + } + }, + "fields": { + "localPath": { + "type": "string", + "id": 1 + }, + "gcsObject": { + "type": "GcsObject", + "id": 2 + }, + "allowedSuccessCodes": { + "rule": "repeated", + "type": "int32", + "id": 3 + }, + "interpreter": { + "type": "Interpreter", + "id": 4 + } + }, + "nested": { + "Interpreter": { + "values": { + "INTERPRETER_UNSPECIFIED": 0, + "SHELL": 1, + "POWERSHELL": 2 + } + } + } + }, + "GcsObject": { + "fields": { + "bucket": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "object": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "generationNumber": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PatchInstanceFilter": { + "fields": { + "all": { + "type": "bool", + "id": 1 + }, + "groupLabels": { + "rule": "repeated", + "type": "GroupLabel", + "id": 2 + }, + "zones": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "instances": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "instanceNamePrefixes": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "GroupLabel": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "FieldBehaviorProto", + "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" + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + } + } + }, + "protobuf": { + "options": { + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": false + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/timeofday;timeofday", + "java_multiple_files": true, + "java_outer_classname": "TimeOfDayProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "DateTime": { + "oneofs": { + "timeOffset": { + "oneof": [ + "utcOffset", + "timeZone" + ] + } + }, + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + }, + "hours": { + "type": "int32", + "id": 4 + }, + "minutes": { + "type": "int32", + "id": 5 + }, + "seconds": { + "type": "int32", + "id": 6 + }, + "nanos": { + "type": "int32", + "id": 7 + }, + "utcOffset": { + "type": "google.protobuf.Duration", + "id": 8 + }, + "timeZone": { + "type": "TimeZone", + "id": 9 + } + } + }, + "TimeZone": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "version": { + "type": "string", + "id": 2 + } + } + }, + "DayOfWeek": { + "values": { + "DAY_OF_WEEK_UNSPECIFIED": 0, + "MONDAY": 1, + "TUESDAY": 2, + "WEDNESDAY": 3, + "THURSDAY": 4, + "FRIDAY": 5, + "SATURDAY": 6, + "SUNDAY": 7 + } + }, + "TimeOfDay": { + "fields": { + "hours": { + "type": "int32", + "id": 1 + }, + "minutes": { + "type": "int32", + "id": 2 + }, + "seconds": { + "type": "int32", + "id": 3 + }, + "nanos": { + "type": "int32", + "id": 4 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-osconfig/samples/README.md b/packages/google-cloud-osconfig/samples/README.md new file mode 100644 index 00000000000..46c752d6b30 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/README.md @@ -0,0 +1,50 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [OS Config API: Node.js Samples](https://github.com/googleapis/nodejs-os-config) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-os-config#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-os-config/blob/master/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-os-config&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-os-config&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/compute/docs/os-patch-management diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json new file mode 100644 index 00000000000..d9a08076131 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-os-config", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/os-config": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^7.1.2" + } +} diff --git a/packages/google-cloud-osconfig/samples/quickstart.js b/packages/google-cloud-osconfig/samples/quickstart.js new file mode 100644 index 00000000000..651e8f37413 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/quickstart.js @@ -0,0 +1,46 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +'use strict'; + +async function quickstart( + project = 'my-project' // Project to list deployments for. +) { + // [START os_config_quickstart] + // Imports the Google Cloud client library + const {OsConfigServiceClient} = require('@google-cloud/os-config'); + + // Creates a client + const client = new OsConfigServiceClient(); + + // project = 'my-project' // Project to list deployments for. + + async function listPatchDeployments() { + const [deployments] = await client.listPatchDeployments({ + parent: `projects/${project}`, + }); + console.info(`found ${deployments.length} deployments:`); + console.info(deployments); + } + const listPatchDeploymentsResponse = listPatchDeployments(); + // [END os_config_quickstart] + return listPatchDeploymentsResponse; +} + +const args = process.argv.slice(2); +quickstart(...args).catch(err => { + console.error(err); + process.exitCode = 1; +}); diff --git a/packages/google-cloud-osconfig/src/index.ts b/packages/google-cloud-osconfig/src/index.ts new file mode 100644 index 00000000000..a8ab505dc91 --- /dev/null +++ b/packages/google-cloud-osconfig/src/index.ts @@ -0,0 +1,26 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const OsConfigServiceClient = v1.OsConfigServiceClient; + +export {v1, OsConfigServiceClient}; +export default {v1, OsConfigServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-osconfig/src/v1/index.ts b/packages/google-cloud-osconfig/src/v1/index.ts new file mode 100644 index 00000000000..74686c95d8f --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {OsConfigServiceClient} from './os_config_service_client'; diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts new file mode 100644 index 00000000000..229853f638c --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -0,0 +1,1581 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import * as gapicConfig from './os_config_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * OS Config API + * + * The OS Config service is a server-side component that you can use to + * manage package installations and patch jobs for virtual machine instances. + * @class + * @memberof v1 + */ +export class OsConfigServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + osConfigServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of OsConfigServiceClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof OsConfigServiceClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof OsConfigServiceClient).scopes; + 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; + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + patchDeploymentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/patchDeployments/{patch_deployment}' + ), + patchJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/patchJobs/{patch_job}' + ), + }; + + // 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 = { + listPatchJobs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'patchJobs' + ), + listPatchJobInstanceDetails: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'patchJobInstanceDetails' + ), + listPatchDeployments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'patchDeployments' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.osconfig.v1.OsConfigService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.osConfigServiceStub) { + return this.osConfigServiceStub; + } + + // Put together the "service stub" for + // google.cloud.osconfig.v1.OsConfigService. + this.osConfigServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.osconfig.v1.OsConfigService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.osconfig.v1.OsConfigService, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const osConfigServiceStubMethods = [ + 'executePatchJob', + 'getPatchJob', + 'cancelPatchJob', + 'listPatchJobs', + 'listPatchJobInstanceDetails', + 'createPatchDeployment', + 'getPatchDeployment', + 'listPatchDeployments', + 'deletePatchDeployment', + ]; + for (const methodName of osConfigServiceStubMethods) { + const callPromise = this.osConfigServiceStub.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 apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.osConfigServiceStub; + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'osconfig.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'osconfig.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + executePatchJob( + request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.IExecutePatchJobRequest | undefined, + {} | undefined + ] + >; + executePatchJob( + request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + executePatchJob( + request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Patch VM instances by creating and running a patch job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project in which to run this patch in the form `projects/*` + * @param {string} request.description + * Description of the patch job. Length of the description is limited + * to 1024 characters. + * @param {google.cloud.osconfig.v1.PatchInstanceFilter} request.instanceFilter + * Required. Instances to patch, either explicitly or filtered by some criteria such + * as zone or labels. + * @param {google.cloud.osconfig.v1.PatchConfig} request.patchConfig + * Patch configuration being applied. If omitted, instances are + * patched using the default configurations. + * @param {google.protobuf.Duration} request.duration + * Duration of the patch job. After the duration ends, the patch job + * times out. + * @param {boolean} request.dryRun + * If this patch is a dry-run only, instances are contacted but + * will do nothing. + * @param {string} request.displayName + * Display name for this patch job. This does not have to be unique. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + executePatchJob( + request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.IExecutePatchJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.executePatchJob(request, options, callback); + } + getPatchJob( + request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.IGetPatchJobRequest | undefined, + {} | undefined + ] + >; + getPatchJob( + request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.IGetPatchJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getPatchJob( + request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.IGetPatchJobRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Get the patch job. This can be used to track the progress of an + * ongoing patch job or review the details of completed jobs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the patch in the form `projects/* /patchJobs/*` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getPatchJob( + request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + | protos.google.cloud.osconfig.v1.IGetPatchJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.IGetPatchJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.IGetPatchJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getPatchJob(request, options, callback); + } + cancelPatchJob( + request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.ICancelPatchJobRequest | undefined, + {} | undefined + ] + >; + cancelPatchJob( + request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.ICancelPatchJobRequest | null | undefined, + {} | null | undefined + > + ): void; + cancelPatchJob( + request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.ICancelPatchJobRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Cancel a patch job. The patch job must be active. Canceled patch jobs + * cannot be restarted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the patch in the form `projects/* /patchJobs/*` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + cancelPatchJob( + request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + | protos.google.cloud.osconfig.v1.ICancelPatchJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.ICancelPatchJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.ICancelPatchJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.cancelPatchJob(request, options, callback); + } + createPatchDeployment( + request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest | undefined, + {} | undefined + ] + >; + createPatchDeployment( + request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createPatchDeployment( + request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Create an OS Config patch deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project to apply this patch deployment to in the form `projects/*`. + * @param {string} request.patchDeploymentId + * Required. A name for the patch deployment in the project. When creating a name + * the following rules apply: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * @param {google.cloud.osconfig.v1.PatchDeployment} request.patchDeployment + * Required. The patch deployment to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createPatchDeployment( + request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createPatchDeployment(request, options, callback); + } + getPatchDeployment( + request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest | undefined, + {} | undefined + ] + >; + getPatchDeployment( + request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPatchDeployment( + request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Get an OS Config patch deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getPatchDeployment( + request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getPatchDeployment(request, options, callback); + } + deletePatchDeployment( + request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest | undefined, + {} | undefined + ] + >; + deletePatchDeployment( + request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deletePatchDeployment( + request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Delete an OS Config patch deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deletePatchDeployment( + request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deletePatchDeployment(request, options, callback); + } + + listPatchJobs( + request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob[], + protos.google.cloud.osconfig.v1.IListPatchJobsRequest | null, + protos.google.cloud.osconfig.v1.IListPatchJobsResponse + ] + >; + listPatchJobs( + request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + protos.google.cloud.osconfig.v1.IListPatchJobsResponse | null | undefined, + protos.google.cloud.osconfig.v1.IPatchJob + > + ): void; + listPatchJobs( + request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + protos.google.cloud.osconfig.v1.IListPatchJobsResponse | null | undefined, + protos.google.cloud.osconfig.v1.IPatchJob + > + ): void; + /** + * Get a list of patch jobs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. In the form of `projects/*` + * @param {number} request.pageSize + * The maximum number of instance status to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by patch + * jobs to be included in the response. + * Currently, filtering is only available on the patch_deployment field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [PatchJob]{@link google.cloud.osconfig.v1.PatchJob} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListPatchJobsRequest]{@link google.cloud.osconfig.v1.ListPatchJobsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListPatchJobsResponse]{@link google.cloud.osconfig.v1.ListPatchJobsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listPatchJobs( + request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + | protos.google.cloud.osconfig.v1.IListPatchJobsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IPatchJob + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + protos.google.cloud.osconfig.v1.IListPatchJobsResponse | null | undefined, + protos.google.cloud.osconfig.v1.IPatchJob + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob[], + protos.google.cloud.osconfig.v1.IListPatchJobsRequest | null, + protos.google.cloud.osconfig.v1.IListPatchJobsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listPatchJobs(request, options, callback); + } + + /** + * Equivalent to {@link listPatchJobs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listPatchJobs} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. In the form of `projects/*` + * @param {number} request.pageSize + * The maximum number of instance status to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by patch + * jobs to be included in the response. + * Currently, filtering is only available on the patch_deployment field. + * @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 [PatchJob]{@link google.cloud.osconfig.v1.PatchJob} on 'data' event. + */ + listPatchJobsStream( + request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listPatchJobs.createStream( + this.innerApiCalls.listPatchJobs as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listPatchJobs}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. In the form of `projects/*` + * @param {number} request.pageSize + * The maximum number of instance status to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by patch + * jobs to be included in the response. + * Currently, filtering is only available on the patch_deployment field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listPatchJobsAsync( + request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listPatchJobs.asyncIterate( + this.innerApiCalls['listPatchJobs'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + listPatchJobInstanceDetails( + request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[], + protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest | null, + protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse + ] + >; + listPatchJobInstanceDetails( + request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + | protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails + > + ): void; + listPatchJobInstanceDetails( + request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + | protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails + > + ): void; + /** + * Get a list of instance details for a given patch job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent for the instances are in the form of `projects/* /patchJobs/*`. + * @param {number} request.pageSize + * The maximum number of instance details records to return. Default is 100. + * @param {string} request.pageToken + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * @param {string} request.filter + * A filter expression that filters results listed in the response. This + * field supports filtering results by instance zone, name, state, or + * `failure_reason`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchJobInstanceDetails]{@link google.cloud.osconfig.v1.PatchJobInstanceDetails}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [PatchJobInstanceDetails]{@link google.cloud.osconfig.v1.PatchJobInstanceDetails} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListPatchJobInstanceDetailsRequest]{@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListPatchJobInstanceDetailsResponse]{@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listPatchJobInstanceDetails( + request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + | protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + | protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[], + protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest | null, + protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listPatchJobInstanceDetails( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listPatchJobInstanceDetails}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listPatchJobInstanceDetails} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent for the instances are in the form of `projects/* /patchJobs/*`. + * @param {number} request.pageSize + * The maximum number of instance details records to return. Default is 100. + * @param {string} request.pageToken + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * @param {string} request.filter + * A filter expression that filters results listed in the response. This + * field supports filtering results by instance zone, name, state, or + * `failure_reason`. + * @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 [PatchJobInstanceDetails]{@link google.cloud.osconfig.v1.PatchJobInstanceDetails} on 'data' event. + */ + listPatchJobInstanceDetailsStream( + request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listPatchJobInstanceDetails.createStream( + this.innerApiCalls.listPatchJobInstanceDetails as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listPatchJobInstanceDetails}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent for the instances are in the form of `projects/* /patchJobs/*`. + * @param {number} request.pageSize + * The maximum number of instance details records to return. Default is 100. + * @param {string} request.pageToken + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * @param {string} request.filter + * A filter expression that filters results listed in the response. This + * field supports filtering results by instance zone, name, state, or + * `failure_reason`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listPatchJobInstanceDetailsAsync( + request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listPatchJobInstanceDetails.asyncIterate( + this.innerApiCalls['listPatchJobInstanceDetails'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable< + protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails + >; + } + listPatchDeployments( + request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment[], + protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest | null, + protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse + ] + >; + listPatchDeployments( + request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + | protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IPatchDeployment + > + ): void; + listPatchDeployments( + request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + | protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IPatchDeployment + > + ): void; + /** + * Get a page of OS Config patch deployments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent in the form `projects/*`. + * @param {number} [request.pageSize] + * Optional. The maximum number of patch deployments to return. Default is 100. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to ListPatchDeployments + * that indicates where this listing should continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. + * The client library support auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListPatchDeploymentsRequest]{@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListPatchDeploymentsResponse]{@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listPatchDeployments( + request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + | protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IPatchDeployment + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + | protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IPatchDeployment + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment[], + protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest | null, + protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listPatchDeployments(request, options, callback); + } + + /** + * Equivalent to {@link listPatchDeployments}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listPatchDeployments} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent in the form `projects/*`. + * @param {number} [request.pageSize] + * Optional. The maximum number of patch deployments to return. Default is 100. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to ListPatchDeployments + * that indicates where this listing should continue from. + * @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 [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment} on 'data' event. + */ + listPatchDeploymentsStream( + request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listPatchDeployments.createStream( + this.innerApiCalls.listPatchDeployments as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listPatchDeployments}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent in the form `projects/*`. + * @param {number} [request.pageSize] + * Optional. The maximum number of patch deployments to return. Default is 100. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to ListPatchDeployments + * that indicates where this listing should continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listPatchDeploymentsAsync( + request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listPatchDeployments.asyncIterate( + this.innerApiCalls['listPatchDeployments'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified patchDeployment resource name string. + * + * @param {string} project + * @param {string} patch_deployment + * @returns {string} Resource name string. + */ + patchDeploymentPath(project: string, patchDeployment: string) { + return this.pathTemplates.patchDeploymentPathTemplate.render({ + project: project, + patch_deployment: patchDeployment, + }); + } + + /** + * Parse the project from PatchDeployment resource. + * + * @param {string} patchDeploymentName + * A fully-qualified path representing PatchDeployment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPatchDeploymentName(patchDeploymentName: string) { + return this.pathTemplates.patchDeploymentPathTemplate.match( + patchDeploymentName + ).project; + } + + /** + * Parse the patch_deployment from PatchDeployment resource. + * + * @param {string} patchDeploymentName + * A fully-qualified path representing PatchDeployment resource. + * @returns {string} A string representing the patch_deployment. + */ + matchPatchDeploymentFromPatchDeploymentName(patchDeploymentName: string) { + return this.pathTemplates.patchDeploymentPathTemplate.match( + patchDeploymentName + ).patch_deployment; + } + + /** + * Return a fully-qualified patchJob resource name string. + * + * @param {string} project + * @param {string} patch_job + * @returns {string} Resource name string. + */ + patchJobPath(project: string, patchJob: string) { + return this.pathTemplates.patchJobPathTemplate.render({ + project: project, + patch_job: patchJob, + }); + } + + /** + * Parse the project from PatchJob resource. + * + * @param {string} patchJobName + * A fully-qualified path representing PatchJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPatchJobName(patchJobName: string) { + return this.pathTemplates.patchJobPathTemplate.match(patchJobName).project; + } + + /** + * Parse the patch_job from PatchJob resource. + * + * @param {string} patchJobName + * A fully-qualified path representing PatchJob resource. + * @returns {string} A string representing the patch_job. + */ + matchPatchJobFromPatchJobName(patchJobName: string) { + return this.pathTemplates.patchJobPathTemplate.match(patchJobName) + .patch_job; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.osConfigServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client_config.json b/packages/google-cloud-osconfig/src/v1/os_config_service_client_config.json new file mode 100644 index 00000000000..69ef45789ef --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client_config.json @@ -0,0 +1,83 @@ +{ + "interfaces": { + "google.cloud.osconfig.v1.OsConfigService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ExecutePatchJob": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetPatchJob": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CancelPatchJob": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListPatchJobs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListPatchJobInstanceDetails": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreatePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetPatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListPatchDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeletePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json b/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json new file mode 100644 index 00000000000..cf705ae88ac --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/osconfig/v1/osconfig_service.proto", + "../../protos/google/cloud/osconfig/v1/patch_deployments.proto", + "../../protos/google/cloud/osconfig/v1/patch_jobs.proto" +] diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata new file mode 100644 index 00000000000..fae3fa3d65c --- /dev/null +++ b/packages/google-cloud-osconfig/synth.metadata @@ -0,0 +1,30 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "sso://user/bencoe/nodejs-os-config", + "sha": "e819d0b69ae3314cb4ccd9272c89212c4309a325" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "aed11c01e52921613b9ee469c2d85f5f33175fb7", + "internalRef": "310660461" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "osconfig", + "apiVersion": "v1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-osconfig/synth.py b/packages/google-cloud-osconfig/synth.py index 8d5c97efcbc..a59fc5d7e73 100644 --- a/packages/google-cloud-osconfig/synth.py +++ b/packages/google-cloud-osconfig/synth.py @@ -15,6 +15,7 @@ import synthtool as s import synthtool.gcp as gcp +import synthtool.languages.node as node import subprocess import logging @@ -35,7 +36,7 @@ extra_proto_files=['google/cloud/common_resources.proto'], proto_path=f'/google/cloud/{name}/{version}', version=version) -s.copy(library, excludes=['README.md']) +s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates common_templates = gcp.CommonTemplates() @@ -43,8 +44,4 @@ source_location='build/src', versions=['v1'], default_version='v1') s.copy(templates, excludes=[]) -# Node.js specific cleanup -subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) -subprocess.run(['npx', 'compileProtos', 'src']) - +node.postprocess_gapic_library() diff --git a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..c9ed2b1ffb4 --- /dev/null +++ b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const osconfig = require('@google-cloud/os-config'); + +function main() { + const osConfigServiceClient = new osconfig.OsConfigServiceClient(); +} + +main(); diff --git a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..4368acddf61 --- /dev/null +++ b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {OsConfigServiceClient} from '@google-cloud/os-config'; + +function main() { + new OsConfigServiceClient(); +} + +main(); diff --git a/packages/google-cloud-osconfig/system-test/install.ts b/packages/google-cloud-osconfig/system-test/install.ts new file mode 100644 index 00000000000..4c1ba3eb79a --- /dev/null +++ b/packages/google-cloud-osconfig/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('typescript consumer tests', () => { + it('should have correct type signature for typescript users', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); + + it('should have correct type signature for javascript users', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); +}); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts new file mode 100644 index 00000000000..1c40b61bff4 --- /dev/null +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -0,0 +1,1920 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as osconfigserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.OsConfigServiceClient', () => { + it('has servicePath', () => { + const servicePath = + osconfigserviceModule.v1.OsConfigServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + osconfigserviceModule.v1.OsConfigServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = osconfigserviceModule.v1.OsConfigServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigServiceStub, undefined); + await client.initialize(); + assert(client.osConfigServiceStub); + }); + + it('has close method', () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + 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 osconfigserviceModule.v1.OsConfigServiceClient({ + 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('executePatchJob', () => { + it('invokes executePatchJob without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJob() + ); + client.innerApiCalls.executePatchJob = stubSimpleCall(expectedResponse); + const [response] = await client.executePatchJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.executePatchJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes executePatchJob without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJob() + ); + client.innerApiCalls.executePatchJob = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.executePatchJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.executePatchJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes executePatchJob with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.executePatchJob = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.executePatchJob(request), expectedError); + assert( + (client.innerApiCalls.executePatchJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getPatchJob', () => { + it('invokes getPatchJob without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetPatchJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJob() + ); + client.innerApiCalls.getPatchJob = stubSimpleCall(expectedResponse); + const [response] = await client.getPatchJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getPatchJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getPatchJob without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetPatchJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJob() + ); + client.innerApiCalls.getPatchJob = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getPatchJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getPatchJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getPatchJob with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetPatchJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getPatchJob = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getPatchJob(request), expectedError); + assert( + (client.innerApiCalls.getPatchJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('cancelPatchJob', () => { + it('invokes cancelPatchJob without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJob() + ); + client.innerApiCalls.cancelPatchJob = stubSimpleCall(expectedResponse); + const [response] = await client.cancelPatchJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelPatchJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelPatchJob without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJob() + ); + client.innerApiCalls.cancelPatchJob = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.cancelPatchJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelPatchJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes cancelPatchJob with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelPatchJob = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.cancelPatchJob(request), expectedError); + assert( + (client.innerApiCalls.cancelPatchJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createPatchDeployment', () => { + it('invokes createPatchDeployment without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.createPatchDeployment = stubSimpleCall( + expectedResponse + ); + const [response] = await client.createPatchDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createPatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createPatchDeployment without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.createPatchDeployment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createPatchDeployment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createPatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createPatchDeployment with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createPatchDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createPatchDeployment(request), + expectedError + ); + assert( + (client.innerApiCalls.createPatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getPatchDeployment', () => { + it('invokes getPatchDeployment without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.getPatchDeployment = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getPatchDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getPatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getPatchDeployment without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.getPatchDeployment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getPatchDeployment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getPatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getPatchDeployment with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getPatchDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getPatchDeployment(request), expectedError); + assert( + (client.innerApiCalls.getPatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deletePatchDeployment', () => { + it('invokes deletePatchDeployment without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePatchDeployment = stubSimpleCall( + expectedResponse + ); + const [response] = await client.deletePatchDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deletePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deletePatchDeployment without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePatchDeployment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deletePatchDeployment( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deletePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deletePatchDeployment with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePatchDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deletePatchDeployment(request), + expectedError + ); + assert( + (client.innerApiCalls.deletePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listPatchJobs', () => { + it('invokes listPatchJobs without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + ]; + client.innerApiCalls.listPatchJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listPatchJobs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPatchJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPatchJobs without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + ]; + client.innerApiCalls.listPatchJobs = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listPatchJobs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchJob[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPatchJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listPatchJobs with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listPatchJobs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listPatchJobs(request), expectedError); + assert( + (client.innerApiCalls.listPatchJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPatchJobsStream without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + ]; + client.descriptors.page.listPatchJobs.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listPatchJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.PatchJob[] = []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.PatchJob) => { + 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.listPatchJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPatchJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listPatchJobs + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listPatchJobsStream with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPatchJobs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listPatchJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.PatchJob[] = []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.PatchJob) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listPatchJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPatchJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listPatchJobs + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPatchJobs without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), + ]; + client.descriptors.page.listPatchJobs.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.osconfig.v1.IPatchJob[] = []; + const iterable = client.listPatchJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPatchJobs + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listPatchJobs + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPatchJobs with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPatchJobs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listPatchJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1.IPatchJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPatchJobs + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listPatchJobs + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listPatchJobInstanceDetails', () => { + it('invokes listPatchJobInstanceDetails without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + ]; + client.innerApiCalls.listPatchJobInstanceDetails = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listPatchJobInstanceDetails(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPatchJobInstanceDetails as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPatchJobInstanceDetails without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + ]; + client.innerApiCalls.listPatchJobInstanceDetails = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listPatchJobInstanceDetails( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPatchJobInstanceDetails as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listPatchJobInstanceDetails with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listPatchJobInstanceDetails = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listPatchJobInstanceDetails(request), + expectedError + ); + assert( + (client.innerApiCalls.listPatchJobInstanceDetails as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPatchJobInstanceDetailsStream without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + ]; + client.descriptors.page.listPatchJobInstanceDetails.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listPatchJobInstanceDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.PatchJobInstanceDetails[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1.PatchJobInstanceDetails + ) => { + 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.listPatchJobInstanceDetails + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPatchJobInstanceDetails, request) + ); + assert.strictEqual( + (client.descriptors.page.listPatchJobInstanceDetails + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listPatchJobInstanceDetailsStream with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPatchJobInstanceDetails.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listPatchJobInstanceDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.PatchJobInstanceDetails[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1.PatchJobInstanceDetails + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listPatchJobInstanceDetails + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPatchJobInstanceDetails, request) + ); + assert.strictEqual( + (client.descriptors.page.listPatchJobInstanceDetails + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPatchJobInstanceDetails without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() + ), + ]; + client.descriptors.page.listPatchJobInstanceDetails.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[] = []; + const iterable = client.listPatchJobInstanceDetailsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPatchJobInstanceDetails + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listPatchJobInstanceDetails + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPatchJobInstanceDetails with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPatchJobInstanceDetails.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listPatchJobInstanceDetailsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPatchJobInstanceDetails + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listPatchJobInstanceDetails + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listPatchDeployments', () => { + it('invokes listPatchDeployments without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + ]; + client.innerApiCalls.listPatchDeployments = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listPatchDeployments(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPatchDeployments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPatchDeployments without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + ]; + client.innerApiCalls.listPatchDeployments = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listPatchDeployments( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchDeployment[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPatchDeployments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listPatchDeployments with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listPatchDeployments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listPatchDeployments(request), expectedError); + assert( + (client.innerApiCalls.listPatchDeployments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPatchDeploymentsStream without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + ]; + client.descriptors.page.listPatchDeployments.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listPatchDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.PatchDeployment[] = []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.PatchDeployment) => { + 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.listPatchDeployments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPatchDeployments, request) + ); + assert.strictEqual( + (client.descriptors.page.listPatchDeployments + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listPatchDeploymentsStream with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPatchDeployments.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listPatchDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.PatchDeployment[] = []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.PatchDeployment) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listPatchDeployments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPatchDeployments, request) + ); + assert.strictEqual( + (client.descriptors.page.listPatchDeployments + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPatchDeployments without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ), + ]; + client.descriptors.page.listPatchDeployments.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.osconfig.v1.IPatchDeployment[] = []; + const iterable = client.listPatchDeploymentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPatchDeployments + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listPatchDeployments + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPatchDeployments with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPatchDeployments.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listPatchDeploymentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1.IPatchDeployment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPatchDeployments + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listPatchDeployments + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('patchDeployment', () => { + const fakePath = '/rendered/path/patchDeployment'; + const expectedParameters = { + project: 'projectValue', + patch_deployment: 'patchDeploymentValue', + }; + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.patchDeploymentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.patchDeploymentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('patchDeploymentPath', () => { + const result = client.patchDeploymentPath( + 'projectValue', + 'patchDeploymentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.patchDeploymentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPatchDeploymentName', () => { + const result = client.matchProjectFromPatchDeploymentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.patchDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPatchDeploymentFromPatchDeploymentName', () => { + const result = client.matchPatchDeploymentFromPatchDeploymentName( + fakePath + ); + assert.strictEqual(result, 'patchDeploymentValue'); + assert( + (client.pathTemplates.patchDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('patchJob', () => { + const fakePath = '/rendered/path/patchJob'; + const expectedParameters = { + project: 'projectValue', + patch_job: 'patchJobValue', + }; + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.patchJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.patchJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('patchJobPath', () => { + const result = client.patchJobPath('projectValue', 'patchJobValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.patchJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPatchJobName', () => { + const result = client.matchProjectFromPatchJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.patchJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPatchJobFromPatchJobName', () => { + const result = client.matchPatchJobFromPatchJobName(fakePath); + assert.strictEqual(result, 'patchJobValue'); + assert( + (client.pathTemplates.patchJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-osconfig/tsconfig.json b/packages/google-cloud-osconfig/tsconfig.json new file mode 100644 index 00000000000..613d35597b5 --- /dev/null +++ b/packages/google-cloud-osconfig/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2016", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-osconfig/webpack.config.js b/packages/google-cloud-osconfig/webpack.config.js new file mode 100644 index 00000000000..1a57ca2b072 --- /dev/null +++ b/packages/google-cloud-osconfig/webpack.config.js @@ -0,0 +1,65 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'OsConOsConOsConOsConOsConOsConOsConOsConOsConfigServiceClient', + filename: + './os-con-os-con-os-con-os-con-os-con-os-con-os-con-os-con-os-config-service-client.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 e044587a713f3144d86792c0b386fff04304bbe9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 12 May 2020 19:11:02 +0200 Subject: [PATCH 003/154] chore(deps): update dependency @types/mocha to v7 (#4) --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index e2219a28d2d..886a71ebffc 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -29,7 +29,7 @@ "google-gax": "^2.3.1" }, "devDependencies": { - "@types/mocha": "^5.2.7", + "@types/mocha": "^7.0.0", "@types/node": "^12.12.37", "@types/sinon": "^9.0.0", "c8": "^7.1.2", From 9588416a9249c1c36d0791f1cbe419f3fd5d12b0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 May 2020 17:05:24 -0700 Subject: [PATCH 004/154] chore: release 1.0.0 (#3) --- packages/google-cloud-osconfig/CHANGELOG.md | 12 ++++++ packages/google-cloud-osconfig/package.json | 2 +- .../samples/package.json | 42 +++++++++---------- 3 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 packages/google-cloud-osconfig/CHANGELOG.md diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md new file mode 100644 index 00000000000..d103034506a --- /dev/null +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +## 1.0.0 (2020-05-12) + + +### ⚠ BREAKING CHANGES + +* initial generation of library (#1) + +### Features + +* initial generation of library ([#1](https://www.github.com/googleapis/nodejs-os-config/issues/1)) ([b526b74](https://www.github.com/googleapis/nodejs-os-config/commit/b526b74051bd6dc093f3afb4dc2692cbb6bd8c3a)) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 886a71ebffc..a106c9edfaf 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "0.1.0", + "version": "1.0.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index d9a08076131..0bbec17d528 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -1,23 +1,23 @@ { - "name": "nodejs-os-config", - "private": true, - "license": "Apache-2.0", - "author": "Google LLC", - "engines": { - "node": ">=10" - }, - "files": [ - "*.js" - ], - "scripts": { - "test": "c8 mocha --timeout 600000 test/*.js" - }, - "dependencies": { - "@google-cloud/os-config": "^0.1.0" - }, - "devDependencies": { - "c8": "^7.1.0", - "chai": "^4.2.0", - "mocha": "^7.1.2" - } + "name": "nodejs-os-config", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/os-config": "^1.0.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^7.1.2" + } } From 734c2ce47baedbbc4235f500585a3ede717735fb Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 12 May 2020 17:16:13 -0700 Subject: [PATCH 005/154] build: fix library generation (#6) --- packages/google-cloud-osconfig/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index a106c9edfaf..3df39aee29f 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -18,6 +18,7 @@ "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", + "prefix": "cd samples; npm link ../; npm install", "lint": "gts check", "prelint": "cd samples; npm link ../; npm install", "prepare": "npm run compile-protos && npm run compile", From c8062d8a5d78f687d22d7a1658c945ab90f8b0c7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 13 May 2020 10:56:19 -0700 Subject: [PATCH 006/154] build: update codecov settings --- packages/google-cloud-osconfig/linkinator.config.json | 4 +--- packages/google-cloud-osconfig/protos/protos.js | 2 +- packages/google-cloud-osconfig/synth.metadata | 11 +++++++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-osconfig/linkinator.config.json b/packages/google-cloud-osconfig/linkinator.config.json index de4c600f026..29a223b6db6 100644 --- a/packages/google-cloud-osconfig/linkinator.config.json +++ b/packages/google-cloud-osconfig/linkinator.config.json @@ -3,9 +3,7 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io", - "github.com/googleapis/nodejs-os-config.*", - "googleapis.dev/nodejs/osconfig/latest/index.html" + "img.shields.io" ], "silent": true, "concurrency": 10 diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 3acd393aa36..dd70f959d52 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_os_config_0_1_0_protos || ($protobuf.roots._google_cloud_os_config_0_1_0_protos = {}); + var $root = $protobuf.roots._google_cloud_os_config_1_0_0_protos || ($protobuf.roots._google_cloud_os_config_1_0_0_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index fae3fa3d65c..7b33506e2f9 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "sso://user/bencoe/nodejs-os-config", - "sha": "e819d0b69ae3314cb4ccd9272c89212c4309a325" + "remote": "https://github.com/googleapis/nodejs-os-config.git", + "sha": "b084af7ad1e1100a39564b6d076b374c7005c5e9" } }, { @@ -14,6 +14,13 @@ "sha": "aed11c01e52921613b9ee469c2d85f5f33175fb7", "internalRef": "310660461" } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "84c4156c49be9dcabacc8fd7b0585b6fd789ae47" + } } ], "destinations": [ From cdbc2a4a8014b258cb0a3ccb2d8623da35ae5885 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Jun 2020 17:42:38 -0700 Subject: [PATCH 007/154] build: update protos.js (#8) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/041f5df7-f5d3-4b2a-9ede-0752bf41c185/targets --- .../google-cloud-osconfig/protos/protos.d.ts | 6 +++++ .../google-cloud-osconfig/protos/protos.js | 26 +++++++++++++++++-- .../google-cloud-osconfig/protos/protos.json | 6 ++++- packages/google-cloud-osconfig/synth.metadata | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index a8b9fcb42d0..e4fd7aa49c1 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -5194,6 +5194,9 @@ export namespace google { /** FieldDescriptorProto options */ options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } /** Represents a FieldDescriptorProto. */ @@ -5235,6 +5238,9 @@ export namespace google { /** FieldDescriptorProto options. */ public options?: (google.protobuf.IFieldOptions|null); + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + /** * Creates a new FieldDescriptorProto instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index dd70f959d52..29743a7be5a 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -13636,6 +13636,7 @@ * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex * @property {string|null} [jsonName] FieldDescriptorProto jsonName * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional */ /** @@ -13733,6 +13734,14 @@ */ FieldDescriptorProto.prototype.options = null; + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + /** * Creates a new FieldDescriptorProto instance using the specified properties. * @function create @@ -13777,6 +13786,8 @@ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); return writer; }; @@ -13841,6 +13852,9 @@ case 8: message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); break; + case 17: + message.proto3Optional = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -13935,6 +13949,9 @@ if (error) return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; @@ -14057,6 +14074,8 @@ throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); return message; }; @@ -14084,6 +14103,7 @@ object.options = null; object.oneofIndex = 0; object.jsonName = ""; + object.proto3Optional = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -14105,6 +14125,8 @@ object.oneofIndex = message.oneofIndex; if (message.jsonName != null && message.hasOwnProperty("jsonName")) object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; return object; }; @@ -15898,7 +15920,7 @@ * @memberof google.protobuf.FileOptions * @instance */ - FileOptions.prototype.ccEnableArenas = false; + FileOptions.prototype.ccEnableArenas = true; /** * FileOptions objcClassPrefix. @@ -16384,7 +16406,7 @@ object.javaGenerateEqualsAndHash = false; object.deprecated = false; object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; + object.ccEnableArenas = true; object.objcClassPrefix = ""; object.csharpNamespace = ""; object.swiftPrefix = ""; diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index cdd8b51b8ad..8549feeca0d 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -1461,6 +1461,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -1696,7 +1700,7 @@ "type": "bool", "id": 31, "options": { - "default": false + "default": true } }, "objcClassPrefix": { diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 7b33506e2f9..1eac2718964 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "b084af7ad1e1100a39564b6d076b374c7005c5e9" + "sha": "881ff3e69f323f11d14c081e72de14936d8501c9" } }, { From f3f4269d1673b6260bf69606a35c01f44815cb9f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 9 Jun 2020 17:40:42 -0700 Subject: [PATCH 008/154] feat: move ts target to es2018 from es2016 (#11) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9b55eba7-85ee-48d5-a737-8b677439db4d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/1c92077459db3dc50741e878f98b08c6261181e0 --- packages/google-cloud-osconfig/protos/protos.js | 2 +- .../src/v1/os_config_service_client.ts | 7 +++++++ packages/google-cloud-osconfig/synth.metadata | 4 ++-- packages/google-cloud-osconfig/tsconfig.json | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 29743a7be5a..c49234b13ae 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_os_config_1_0_0_protos || ($protobuf.roots._google_cloud_os_config_1_0_0_protos = {}); + var $root = $protobuf.roots._google_cloud_os_config_protos || ($protobuf.roots._google_cloud_os_config_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 229853f638c..2284c95358f 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -102,6 +102,13 @@ export class OsConfigServiceClient { } opts.servicePath = opts.servicePath || servicePath; opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; const isBrowser = typeof window !== 'undefined'; diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 1eac2718964..235b7d4c5c8 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "881ff3e69f323f11d14c081e72de14936d8501c9" + "sha": "8227f2897ad638041eb0126604ccc8873b7410eb" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "84c4156c49be9dcabacc8fd7b0585b6fd789ae47" + "sha": "1c92077459db3dc50741e878f98b08c6261181e0" } } ], diff --git a/packages/google-cloud-osconfig/tsconfig.json b/packages/google-cloud-osconfig/tsconfig.json index 613d35597b5..c78f1c884ef 100644 --- a/packages/google-cloud-osconfig/tsconfig.json +++ b/packages/google-cloud-osconfig/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2016", + "es2018", "dom" ] }, From 01d79c45f288d384edad0427f55202b82cd288a1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Jun 2020 17:47:07 +0200 Subject: [PATCH 009/154] chore(deps): update dependency mocha to v8 (#13) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [mocha](https://mochajs.org/) ([source](https://togithub.com/mochajs/mocha)) | devDependencies | major | [`^7.1.2` -> `^8.0.0`](https://renovatebot.com/diffs/npm/mocha/7.2.0/8.0.1) | --- ### Release Notes
mochajs/mocha ### [`v8.0.1`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​801--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v8.0.0...v8.0.1) The obligatory patch after a major. #### :bug: Fixes - [#​4328](https://togithub.com/mochajs/mocha/issues/4328): Fix `--parallel` when combined with `--watch` ([**@​boneskull**](https://togithub.com/boneskull)) ### [`v8.0.0`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​800--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v7.2.0...v8.0.0) In this major release, Mocha adds the ability to _run tests in parallel_. Better late than never! Please note the **breaking changes** detailed below. Let's welcome [**@​giltayar**](https://togithub.com/giltayar) and [**@​nicojs**](https://togithub.com/nicojs) to the maintenance team! #### :boom: Breaking Changes - [#​4164](https://togithub.com/mochajs/mocha/issues/4164): **Mocha v8.0.0 now requires Node.js v10.0.0 or newer.** Mocha no longer supports the Node.js v8.x line ("Carbon"), which entered End-of-Life at the end of 2019 ([**@​UlisesGascon**](https://togithub.com/UlisesGascon)) - [#​4175](https://togithub.com/mochajs/mocha/issues/4175): Having been deprecated with a warning since v7.0.0, **`mocha.opts` is no longer supported** ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND:** Replace `mocha.opts` with a [configuration file](https://mochajs.org/#configuring-mocha-nodejs). - [#​4260](https://togithub.com/mochajs/mocha/issues/4260): Remove `enableTimeout()` (`this.enableTimeout()`) from the context object ([**@​craigtaub**](https://togithub.com/craigtaub)) :sparkles: **WORKAROUND:** Replace usage of `this.enableTimeout(false)` in your tests with `this.timeout(0)`. - [#​4315](https://togithub.com/mochajs/mocha/issues/4315): The `spec` option no longer supports a comma-delimited list of files ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND**: Use an array instead (e.g., `"spec": "foo.js,bar.js"` becomes `"spec": ["foo.js", "bar.js"]`). - [#​4309](https://togithub.com/mochajs/mocha/issues/4309): Drop support for Node.js v13.x line, which is now End-of-Life ([**@​juergba**](https://togithub.com/juergba)) - [#​4282](https://togithub.com/mochajs/mocha/issues/4282): `--forbid-only` will throw an error even if exclusive tests are avoided via `--grep` or other means ([**@​arvidOtt**](https://togithub.com/arvidOtt)) - [#​4223](https://togithub.com/mochajs/mocha/issues/4223): The context object's `skip()` (`this.skip()`) in a "before all" (`before()`) hook will no longer execute subsequent sibling hooks, in addition to hooks in child suites ([**@​juergba**](https://togithub.com/juergba)) - [#​4178](https://togithub.com/mochajs/mocha/issues/4178): Remove previously soft-deprecated APIs ([**@​wnghdcjfe**](https://togithub.com/wnghdcjfe)): - `Mocha.prototype.ignoreLeaks()` - `Mocha.prototype.useColors()` - `Mocha.prototype.useInlineDiffs()` - `Mocha.prototype.hideDiff()` #### :tada: Enhancements - [#​4245](https://togithub.com/mochajs/mocha/issues/4245): Add ability to run tests in parallel for Node.js (see [docs](https://mochajs.org/#parallel-tests)) ([**@​boneskull**](https://togithub.com/boneskull)) :exclamation: See also [#​4244](https://togithub.com/mochajs/mocha/issues/4244); [Root Hook Plugins (docs)](https://mochajs.org/#root-hook-plugins) -- _root hooks must be defined via Root Hook Plugins to work in parallel mode_ - [#​4304](https://togithub.com/mochajs/mocha/issues/4304): `--require` now works with ES modules ([**@​JacobLey**](https://togithub.com/JacobLey)) - [#​4299](https://togithub.com/mochajs/mocha/issues/4299): In some circumstances, Mocha can run ES modules under Node.js v10 -- _use at your own risk!_ ([**@​giltayar**](https://togithub.com/giltayar)) #### :book: Documentation - [#​4246](https://togithub.com/mochajs/mocha/issues/4246): Add documentation for parallel mode and Root Hook plugins ([**@​boneskull**](https://togithub.com/boneskull)) #### :bug: Fixes (All bug fixes in Mocha v8.0.0 are also breaking changes, and are listed above)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 3df39aee29f..9b42aa0fe9d 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -39,7 +39,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.4", "linkinator": "^2.1.0", - "mocha": "^7.1.2", + "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.2", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 0bbec17d528..6f5ce9779ce 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^7.1.0", "chai": "^4.2.0", - "mocha": "^7.1.2" + "mocha": "^8.0.0" } } From 213411936ae89593c7fd3df9f0bf302df5a14583 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 11 Jun 2020 14:59:27 -0700 Subject: [PATCH 010/154] chore(nodejs_templates): add script logging to node_library populate-secrets.sh (#14) --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 235b7d4c5c8..735b1013dda 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "8227f2897ad638041eb0126604ccc8873b7410eb" + "sha": "eec48b072d3eeb802b0736494ffba6f39d23ae19" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1c92077459db3dc50741e878f98b08c6261181e0" + "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" } } ], From 758ea2ed1275221b4497ce958751d0ede816d6ee Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 15 Jun 2020 11:21:31 -0700 Subject: [PATCH 011/154] fix: proper fallback option handling autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- .../src/v1/os_config_service_client.ts | 13 +++++-------- packages/google-cloud-osconfig/synth.metadata | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 2284c95358f..eb150f88476 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -111,14 +111,11 @@ export class OsConfigServiceClient { // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { - opts.fallback = true; - } - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the OsConfigServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 735b1013dda..2e4453cc5c3 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "eec48b072d3eeb802b0736494ffba6f39d23ae19" + "sha": "9776d1507de387bcc35c188f21748fd42780c833" } }, { From c002bd07ecc1d66d20b03981b4887a2c6363db6f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2020 14:30:46 -0700 Subject: [PATCH 012/154] chore: release 1.1.0 (#12) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index d103034506a..b0a7e0900c2 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.1.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.0.0...v1.1.0) (2020-06-15) + + +### Features + +* move ts target to es2018 from es2016 ([#11](https://www.github.com/googleapis/nodejs-os-config/issues/11)) ([eec48b0](https://www.github.com/googleapis/nodejs-os-config/commit/eec48b072d3eeb802b0736494ffba6f39d23ae19)) + + +### Bug Fixes + +* proper fallback option handling ([40f5d76](https://www.github.com/googleapis/nodejs-os-config/commit/40f5d76a8401f5a534e17fe7d5613fc839671383)) + ## 1.0.0 (2020-05-12) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 9b42aa0fe9d..dc35f5f9615 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.0.0", + "version": "1.1.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 6f5ce9779ce..84cc11b942d 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.0.0" + "@google-cloud/os-config": "^1.1.0" }, "devDependencies": { "c8": "^7.1.0", From bc9d5460b354025dcaf7c08a3909fdb34f82f498 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Tue, 16 Jun 2020 09:29:29 -0700 Subject: [PATCH 013/154] feat: promote library to GA (#16) --- packages/google-cloud-osconfig/.repo-metadata.json | 2 +- packages/google-cloud-osconfig/README.md | 11 ++++++----- packages/google-cloud-osconfig/synth.metadata | 10 +++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/google-cloud-osconfig/.repo-metadata.json b/packages/google-cloud-osconfig/.repo-metadata.json index 7d706deebc7..d14c13a3e39 100644 --- a/packages/google-cloud-osconfig/.repo-metadata.json +++ b/packages/google-cloud-osconfig/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/compute/docs/os-patch-management", "api_description": "provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", "client_documentation": "https://googleapis.dev/nodejs/osconfig/latest/index.html", - "release_level": "beta", + "release_level": "ga", "language": "nodejs", "repo": "googleapis/nodejs-os-config", "repo_short": "nodejs-os-config", diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index f2566d49503..58155b37ead 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -4,7 +4,7 @@ # [OS Config API: Node.js Client](https://github.com/googleapis/nodejs-os-config) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/os-config.svg)](https://www.npmjs.org/package/@google-cloud/os-config) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-os-config/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-os-config) @@ -115,11 +115,12 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **GA** libraries +are addressed with the highest priority. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 2e4453cc5c3..0658423284c 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "9776d1507de387bcc35c188f21748fd42780c833" + "remote": "git@github.com:googleapis/nodejs-os-config.git", + "sha": "a69ea09bba6154e4fd7a3b41184aca83a2622215" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aed11c01e52921613b9ee469c2d85f5f33175fb7", - "internalRef": "310660461" + "sha": "1174f4ab1ef1cb75e0674c9244f7608fdf9e37f7", + "internalRef": "316514980" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" + "sha": "d1addcdf80aa9ddef8c932c89c919024bbad7af3" } } ], From d2a907a1d107a0e74ef142fcd242d2cdeebec564 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2020 11:38:24 -0700 Subject: [PATCH 014/154] chore: release 1.2.0 (#17) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index b0a7e0900c2..3a6d7a6ecf7 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.1.0...v1.2.0) (2020-06-16) + + +### Features + +* promote library to GA ([#16](https://www.github.com/googleapis/nodejs-os-config/issues/16)) ([04b3c63](https://www.github.com/googleapis/nodejs-os-config/commit/04b3c63d188e2b8da10594bae80b4e47b7a89390)) + ## [1.1.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.0.0...v1.1.0) (2020-06-15) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index dc35f5f9615..fae8aff0dc8 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.1.0", + "version": "1.2.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 84cc11b942d..660672987c5 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.1.0" + "@google-cloud/os-config": "^1.2.0" }, "devDependencies": { "c8": "^7.1.0", From 816bc12a06e64175a12049a3f6762cffa6364dc8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 18 Jun 2020 11:04:08 -0700 Subject: [PATCH 015/154] fix: update node issue template (#18) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/37f383f8-7560-459e-b66c-def10ff830cb/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/b10590a4a1568548dd13cfcea9aa11d40898144b --- packages/google-cloud-osconfig/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 0658423284c..d31b7dc458a 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-os-config.git", - "sha": "a69ea09bba6154e4fd7a3b41184aca83a2622215" + "remote": "https://github.com/googleapis/nodejs-os-config.git", + "sha": "01eba677366e480f7980faee312d5a005a7073a9" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d1addcdf80aa9ddef8c932c89c919024bbad7af3" + "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" } } ], From cfa6b2d47e1d0f537e33289c41e401e0c36cc9f3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2020 14:17:21 -0700 Subject: [PATCH 016/154] chore: release 1.2.1 (#19) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 3a6d7a6ecf7..66eafdd989f 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.2.1](https://www.github.com/googleapis/nodejs-os-config/compare/v1.2.0...v1.2.1) (2020-06-18) + + +### Bug Fixes + +* update node issue template ([#18](https://www.github.com/googleapis/nodejs-os-config/issues/18)) ([3d03605](https://www.github.com/googleapis/nodejs-os-config/commit/3d0360512d98ecdc11fd0267a0d4bfed5bc52900)) + ## [1.2.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.1.0...v1.2.0) (2020-06-16) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index fae8aff0dc8..c76cc8b1f1a 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.2.0", + "version": "1.2.1", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 660672987c5..13e719c73b0 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.2.0" + "@google-cloud/os-config": "^1.2.1" }, "devDependencies": { "c8": "^7.1.0", From d8aae1874e3885de7785bee8c8a68eb41e8a53de Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 23 Jun 2020 07:26:52 -0700 Subject: [PATCH 017/154] docs: Fix several broken links in reference documentation (#20) PiperOrigin-RevId: 317658441 Source-Author: Google APIs Source-Date: Mon Jun 22 08:26:49 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 02c23d62c7a133608fcf6ea33aea90ed0e0d098a Source-Link: https://github.com/googleapis/googleapis/commit/02c23d62c7a133608fcf6ea33aea90ed0e0d098a --- .../protos/google/cloud/osconfig/v1/patch_deployments.proto | 2 +- .../protos/google/cloud/osconfig/v1/patch_jobs.proto | 2 +- packages/google-cloud-osconfig/synth.metadata | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto index 7d699222209..10ea5d1a7ff 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto @@ -76,7 +76,7 @@ message PatchDeployment { google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time the patch deployment was last updated. Timestamp is in - // [RFC3339]("https://www.ietf.org/rfc/rfc3339.txt) text format. + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last time a patch job was started by this deployment. diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto index cd274d646f9..553c9e4713c 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto @@ -673,7 +673,7 @@ message PatchInstanceFilter { repeated string zones = 3; // Targets any of the VM instances specified. Instances are specified by their - // URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME], + // URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, // `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or // `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` repeated string instances = 4; diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index d31b7dc458a..22a9b4a8d3f 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "01eba677366e480f7980faee312d5a005a7073a9" + "sha": "a0c984866849e208256971169074e96d05fbb5f4" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1174f4ab1ef1cb75e0674c9244f7608fdf9e37f7", - "internalRef": "316514980" + "sha": "02c23d62c7a133608fcf6ea33aea90ed0e0d098a", + "internalRef": "317658441" } }, { From aee07843e5c80d1f39ede5a8e720b8a0b2bd421c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 29 Jun 2020 10:31:11 -0700 Subject: [PATCH 018/154] build: add config .gitattributes (#21) Source-Author: Summer Ji Source-Date: Fri Jun 26 15:23:23 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: dc9caca650c77b7039e2bbc3339ffb34ae78e5b7 Source-Link: https://github.com/googleapis/synthtool/commit/dc9caca650c77b7039e2bbc3339ffb34ae78e5b7 --- packages/google-cloud-osconfig/.gitattributes | 3 +++ packages/google-cloud-osconfig/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-osconfig/.gitattributes diff --git a/packages/google-cloud-osconfig/.gitattributes b/packages/google-cloud-osconfig/.gitattributes new file mode 100644 index 00000000000..2e63216ae9c --- /dev/null +++ b/packages/google-cloud-osconfig/.gitattributes @@ -0,0 +1,3 @@ +*.ts text eol=lf +*.js test eol=lf +protos/* linguist-generated diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 22a9b4a8d3f..88080cfd80a 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "a0c984866849e208256971169074e96d05fbb5f4" + "sha": "ece6ed5551a144070931e38343a6f64b34fb1011" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" + "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" } } ], From d30c248b0cedc42f26e50e04c66fb9fc7a4a523c Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 6 Jul 2020 10:16:32 -0700 Subject: [PATCH 019/154] build: use bazel build (#22) --- packages/google-cloud-osconfig/synth.metadata | 18 +++++------------- packages/google-cloud-osconfig/synth.py | 13 ++----------- .../google-cloud-osconfig/webpack.config.js | 5 ++--- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 88080cfd80a..6135429ca53 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "ece6ed5551a144070931e38343a6f64b34fb1011" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "02c23d62c7a133608fcf6ea33aea90ed0e0d098a", - "internalRef": "317658441" + "remote": "git@github.com:googleapis/nodejs-os-config.git", + "sha": "2a82bd167656dec6db7eee9752217edfc2732216" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], @@ -29,8 +21,8 @@ "source": "googleapis", "apiName": "osconfig", "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } } ] diff --git a/packages/google-cloud-osconfig/synth.py b/packages/google-cloud-osconfig/synth.py index a59fc5d7e73..f23b478e6d0 100644 --- a/packages/google-cloud-osconfig/synth.py +++ b/packages/google-cloud-osconfig/synth.py @@ -22,20 +22,11 @@ logging.basicConfig(level=logging.DEBUG) # run the gapic generator -gapic = gcp.GAPICMicrogenerator() +gapic = gcp.GAPICBazel() versions = ['v1'] name = 'osconfig' for version in versions: - library = gapic.typescript_library( - name, - generator_args={ - "grpc-service-config": f"google/cloud/{name}/{version}/{name}_grpc_service_config.json", - "package-name": "@google-cloud/os-config", - "main-service": "OsConOsConOsConOsConOsConOsConOsConOsConOsConfigServiceClient" - }, - extra_proto_files=['google/cloud/common_resources.proto'], - proto_path=f'/google/cloud/{name}/{version}', - version=version) + library = gapic.node_library(name, version) s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates diff --git a/packages/google-cloud-osconfig/webpack.config.js b/packages/google-cloud-osconfig/webpack.config.js index 1a57ca2b072..b18d0e76432 100644 --- a/packages/google-cloud-osconfig/webpack.config.js +++ b/packages/google-cloud-osconfig/webpack.config.js @@ -17,9 +17,8 @@ const path = require('path'); module.exports = { entry: './src/index.ts', output: { - library: 'OsConOsConOsConOsConOsConOsConOsConOsConOsConfigServiceClient', - filename: - './os-con-os-con-os-con-os-con-os-con-os-con-os-con-os-con-os-config-service-client.js', + library: 'OsConfigServiceClient', + filename: './os-config-service-client.js', }, node: { child_process: 'empty', From be52a3062395f2e59f5d80e58d51201441cf544f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Jul 2020 23:26:20 -0700 Subject: [PATCH 020/154] build: typeo in nodejs .gitattribute (#25) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/cc99acfa-05b8-434b-9500-2f6faf2eaa02/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b --- packages/google-cloud-osconfig/.gitattributes | 2 +- packages/google-cloud-osconfig/synth.metadata | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/.gitattributes b/packages/google-cloud-osconfig/.gitattributes index 2e63216ae9c..d4f4169b28b 100644 --- a/packages/google-cloud-osconfig/.gitattributes +++ b/packages/google-cloud-osconfig/.gitattributes @@ -1,3 +1,3 @@ *.ts text eol=lf -*.js test eol=lf +*.js text eol=lf protos/* linguist-generated diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 6135429ca53..96da5df0e57 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-os-config.git", - "sha": "2a82bd167656dec6db7eee9752217edfc2732216" + "remote": "https://github.com/googleapis/nodejs-os-config.git", + "sha": "2f47891c2982167c43fb2351bf7b987429e92e19" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", + "internalRef": "320300472" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "303271797a360f8a439203413f13a160f2f5b3b4" + "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" } } ], From bdb3961d59221a7ce0eee43c753c101f39a3395a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jul 2020 21:38:29 +0200 Subject: [PATCH 021/154] chore(deps): update dependency ts-loader to v8 (#24) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | devDependencies | major | [`^7.0.2` -> `^8.0.0`](https://renovatebot.com/diffs/npm/ts-loader/7.0.5/8.0.0) | --- ### Release Notes
TypeStrong/ts-loader ### [`v8.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v800) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v7.0.5...v8.0.0) - [Support for symlinks in project references](https://togithub.com/TypeStrong/ts-loader/pull/1136) - thanks [@​sheetalkamat](https://togithub.com/sheetalkamat)! - `ts-loader` now supports TypeScript 3.6 and greater **BREAKING CHANGE**
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index c76cc8b1f1a..c28b733bc41 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -43,7 +43,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.2", - "ts-loader": "^7.0.2", + "ts-loader": "^8.0.0", "typescript": "~3.8.3", "webpack": "^4.43.0", "webpack-cli": "^3.3.11" From 8560a82e1f4e579c96ccb387a8956ced7e63a944 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 12 Jul 2020 18:50:11 +0200 Subject: [PATCH 022/154] chore(deps): update dependency @types/mocha to v8 (#26) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/7.0.2/8.0.0) | --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index c28b733bc41..c936ab563ed 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -30,7 +30,7 @@ "google-gax": "^2.3.1" }, "devDependencies": { - "@types/mocha": "^7.0.0", + "@types/mocha": "^8.0.0", "@types/node": "^12.12.37", "@types/sinon": "^9.0.0", "c8": "^7.1.2", From 5877e388f7c6d96e53200d962973237172547413 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Jul 2020 15:37:17 -0700 Subject: [PATCH 023/154] build: missing closing paren in publish script, delete template for Node 8, add config files for cloud-rad (#31) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * build: missing closing paren in publish script Source-Author: Benjamin E. Coe Source-Date: Mon Jul 13 09:56:30 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: d82deccf657a66e31bd5da9efdb96c6fa322fc7e Source-Link: https://github.com/googleapis/synthtool/commit/d82deccf657a66e31bd5da9efdb96c6fa322fc7e * chore: delete template for Node 8 tests Source-Author: F. Hinkelmann Source-Date: Tue Jul 14 19:56:02 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 388e10f5ae302d3e8de1fac99f3a95d1ab8f824a Source-Link: https://github.com/googleapis/synthtool/commit/388e10f5ae302d3e8de1fac99f3a95d1ab8f824a * chore: add config files for cloud-rad for node.js * chore: add config files for cloud-rad for node.js Generate and upload yaml files for ref docs * Add gitattributes for json with comments * Fix extra char Source-Author: F. Hinkelmann Source-Date: Thu Jul 16 12:19:00 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 21f1470ecd01424dc91c70f1a7c798e4e87d1eec Source-Link: https://github.com/googleapis/synthtool/commit/21f1470ecd01424dc91c70f1a7c798e4e87d1eec --- .../google-cloud-osconfig/api-extractor.json | 369 ++++++++++++++++++ .../google-cloud-osconfig/protos/protos.js | 24 +- packages/google-cloud-osconfig/synth.metadata | 4 +- 3 files changed, 390 insertions(+), 7 deletions(-) create mode 100644 packages/google-cloud-osconfig/api-extractor.json diff --git a/packages/google-cloud-osconfig/api-extractor.json b/packages/google-cloud-osconfig/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-cloud-osconfig/api-extractor.json @@ -0,0 +1,369 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/protos/protos.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [ ], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true, + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true, + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning", + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + }, + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + }, + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } + +} diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index c49234b13ae..e478847738e 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -9981,17 +9981,31 @@ GroupLabel.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; if (message.labels === $util.emptyObject) message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; default: reader.skipType(tag & 7); diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 96da5df0e57..d8bc943daeb 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "2f47891c2982167c43fb2351bf7b987429e92e19" + "sha": "a65ada1687fbcdee25d1ab54acb660780896d4fe" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" + "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" } } ], From 33dbcb0773c0ecfce3f08b17b73226fcac91cf81 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Tue, 21 Jul 2020 14:46:13 -0400 Subject: [PATCH 024/154] chore: add dev dependencies for cloud-rad ref docs (#32) --- packages/google-cloud-osconfig/package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index c936ab563ed..7ff2475b0ce 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -24,7 +24,9 @@ "prepare": "npm run compile-protos && npm run compile", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" + "test": "c8 mocha build/test", + "api-extractor": "api-extractor run --local", + "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { "google-gax": "^2.3.1" @@ -46,7 +48,9 @@ "ts-loader": "^8.0.0", "typescript": "~3.8.3", "webpack": "^4.43.0", - "webpack-cli": "^3.3.11" + "webpack-cli": "^3.3.11", + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10" }, "engines": { "node": ">=10.0.0" From 0c276daf1d936eca9915dbfd4739d9432856bb29 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 22 Jul 2020 17:41:36 -0700 Subject: [PATCH 025/154] build: rename _toc to toc (#33) Source-Author: F. Hinkelmann Source-Date: Tue Jul 21 10:53:20 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Source-Link: https://github.com/googleapis/synthtool/commit/99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index d8bc943daeb..fb4066a0bf7 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "a65ada1687fbcdee25d1ab54acb660780896d4fe" + "sha": "ec317210929ef6503c96277f7253140fd86deb92" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" + "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" } } ], From 8af6d0bb6a66b410ccfffeee757ea3fe78414166 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 23 Jul 2020 21:14:36 -0700 Subject: [PATCH 026/154] fix: move gitattributes files to node templates (#34) Source-Author: F. Hinkelmann Source-Date: Thu Jul 23 01:45:04 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 Source-Link: https://github.com/googleapis/synthtool/commit/3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 --- packages/google-cloud-osconfig/.gitattributes | 1 + packages/google-cloud-osconfig/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/.gitattributes b/packages/google-cloud-osconfig/.gitattributes index d4f4169b28b..33739cb74e4 100644 --- a/packages/google-cloud-osconfig/.gitattributes +++ b/packages/google-cloud-osconfig/.gitattributes @@ -1,3 +1,4 @@ *.ts text eol=lf *.js text eol=lf protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index fb4066a0bf7..bb44771f24d 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "ec317210929ef6503c96277f7253140fd86deb92" + "sha": "56aea197658430e34241095116fc214270d93371" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" + "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" } } ], From b9ad734eeb4253d56e735dba9e493323a8444fa5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jul 2020 16:36:12 -0700 Subject: [PATCH 027/154] chore(node): fix kokoro build path for cloud-rad (#36) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4bdc1826-2f69-49f1-a63b-94f99cceb5ee/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index bb44771f24d..fb7f2676412 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "56aea197658430e34241095116fc214270d93371" + "sha": "6d2276d2b7b55672b61385b998bb490baf59bbbc" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" + "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" } } ], From b697c2f568bae669bdea6ad33edefac02378af6b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2020 17:32:32 -0700 Subject: [PATCH 028/154] chore: release 1.2.2 (#35) --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 66eafdd989f..4e0a35dade5 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.2.2](https://www.github.com/googleapis/nodejs-os-config/compare/v1.2.1...v1.2.2) (2020-07-29) + + +### Bug Fixes + +* move gitattributes files to node templates ([#34](https://www.github.com/googleapis/nodejs-os-config/issues/34)) ([6d2276d](https://www.github.com/googleapis/nodejs-os-config/commit/6d2276d2b7b55672b61385b998bb490baf59bbbc)) + ### [1.2.1](https://www.github.com/googleapis/nodejs-os-config/compare/v1.2.0...v1.2.1) (2020-06-18) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 7ff2475b0ce..a52f4c2a303 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.2.1", + "version": "1.2.2", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 13e719c73b0..b7614dfba51 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.2.1" + "@google-cloud/os-config": "^1.2.2" }, "devDependencies": { "c8": "^7.1.0", From d508a0d36c21b82987c07c4465caaee4c4964dc5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 30 Jul 2020 19:10:14 -0700 Subject: [PATCH 029/154] build: update protos (#37) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b205fd33-200c-4298-88b8-18b0d1c79a3e/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-osconfig/protos/protos.d.ts | 2 +- packages/google-cloud-osconfig/protos/protos.js | 2 +- packages/google-cloud-osconfig/synth.metadata | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index e4fd7aa49c1..10b51e9fba6 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import * as Long from "long"; -import * as $protobuf from "protobufjs"; +import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index e478847738e..68631b67432 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("protobufjs/minimal")); + module.exports = factory(require("google-gax").protobufMinimal); })(this, function($protobuf) { "use strict"; diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index fb7f2676412..664d9b549a4 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "6d2276d2b7b55672b61385b998bb490baf59bbbc" + "sha": "7af6d68011224d3ce266f117a1f184aa1da2f4e6" } }, { From ff7ceda2c138b48366ad003493c5d413bdb659df Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 2 Aug 2020 21:48:05 -0700 Subject: [PATCH 030/154] docs: add links to the CHANGELOG from the README.md for Java and Node (#38) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7b446397-88f3-4463-9e7d-d2ce7069989d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5936421202fb53ed4641bcb824017dd393a3dbcc --- packages/google-cloud-osconfig/README.md | 3 +++ packages/google-cloud-osconfig/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index 58155b37ead..430ae01c707 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -14,6 +14,9 @@ Osconfig client for Node.js +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-os-config/blob/master/CHANGELOG.md). + * [OS Config API Node.js Client API Reference][client-docs] * [OS Config API Documentation][product-docs] * [github.com/googleapis/nodejs-os-config](https://github.com/googleapis/nodejs-os-config) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 664d9b549a4..e50815cdbad 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "7af6d68011224d3ce266f117a1f184aa1da2f4e6" + "sha": "e9166e94a75f85958d003b84519bf519fb268a41" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" + "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" } } ], From 603ca1c7895b338aaf1eb309aa42775b8941c1d4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 10 Aug 2020 10:56:09 -0700 Subject: [PATCH 031/154] build: --credential-file-override is no longer required (#40) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4de22315-84b1-493d-8da2-dfa7688128f5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/94421c47802f56a44c320257b2b4c190dc7d6b68 --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index e50815cdbad..1cd59d5b426 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "e9166e94a75f85958d003b84519bf519fb268a41" + "sha": "5fbafec55e1d6a1c46600f75356181d64c37bb92" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" + "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" } } ], From 2d5e88c732a363caabcc8b627c837d156bc0f2f6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 12:36:09 -0700 Subject: [PATCH 032/154] chore: update cloud rad kokoro build job (#42) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/bd0deaa1113b588d70449535ab9cbf0f2bd0e72f --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 1cd59d5b426..098842bc6bc 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "5fbafec55e1d6a1c46600f75356181d64c37bb92" + "sha": "7a04d3a9fe5c998712960222b874d3185cf54fa5" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" + "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" } } ], From a7bbe623b61034d797dd2232d4b86582d638bdad Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 13:00:09 -0700 Subject: [PATCH 033/154] build: use gapic-generator-typescript v1.0.7. (#41) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 325949033 Source-Link: https://github.com/googleapis/googleapis/commit/94006b3cb8d2fb44703cf535da15608eed6bf7db --- .../google-cloud-osconfig/src/v1/os_config_service_client.ts | 5 ++--- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index eb150f88476..4bf7d994a06 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -262,12 +262,11 @@ export class OsConfigServiceClient { } ); + const descriptor = this.descriptors.page[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + descriptor ); this.innerApiCalls[methodName] = apiCall; diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 098842bc6bc..154a8f9f87b 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", - "internalRef": "320300472" + "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", + "internalRef": "325949033" } }, { From 14096afb6289529de11fe6a41f036bd1ce6bea51 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 13 Aug 2020 12:40:12 -0700 Subject: [PATCH 034/154] build: perform publish using Node 12 (#43) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/c36c6dbc-ab79-4f17-b70b-523b420b2a70/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5747555f7620113d9a2078a48f4c047a99d31b3e --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 154a8f9f87b..819dda0a531 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "7a04d3a9fe5c998712960222b874d3185cf54fa5" + "sha": "9c6dd4b2ee95b674bba6e4123fba99bd7122055e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" + "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" } } ], From 28332b3ea37dd738f3ec964cd106bfd48054be01 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 19 Aug 2020 22:08:26 -0700 Subject: [PATCH 035/154] chore: start tracking obsolete files --- packages/google-cloud-osconfig/synth.metadata | 82 ++++++++++++++++++- 1 file changed, 78 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 819dda0a531..8e3abc5252b 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "9c6dd4b2ee95b674bba6e4123fba99bd7122055e" + "sha": "8e98b3011db5928dd437c07ddc0cfe9ef85a8e06" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", - "internalRef": "325949033" + "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", + "internalRef": "327369997" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" + "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" } } ], @@ -33,5 +33,79 @@ "generator": "bazel" } } + ], + "generatedFiles": [ + ".eslintignore", + ".eslintrc.json", + ".gitattributes", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/publish.yml", + ".github/release-please.yml", + ".github/workflows/ci.yaml", + ".gitignore", + ".jsdoc.js", + ".kokoro/.gitattributes", + ".kokoro/common.cfg", + ".kokoro/continuous/node10/common.cfg", + ".kokoro/continuous/node10/docs.cfg", + ".kokoro/continuous/node10/lint.cfg", + ".kokoro/continuous/node10/samples-test.cfg", + ".kokoro/continuous/node10/system-test.cfg", + ".kokoro/continuous/node10/test.cfg", + ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/test.cfg", + ".kokoro/docs.sh", + ".kokoro/lint.sh", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/node10/common.cfg", + ".kokoro/presubmit/node10/samples-test.cfg", + ".kokoro/presubmit/node10/system-test.cfg", + ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/test.cfg", + ".kokoro/publish.sh", + ".kokoro/release/docs-devsite.cfg", + ".kokoro/release/docs-devsite.sh", + ".kokoro/release/docs.cfg", + ".kokoro/release/docs.sh", + ".kokoro/release/publish.cfg", + ".kokoro/samples-test.sh", + ".kokoro/system-test.sh", + ".kokoro/test.bat", + ".kokoro/test.sh", + ".kokoro/trampoline.sh", + ".mocharc.js", + ".nycrc", + ".prettierignore", + ".prettierrc.js", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "README.md", + "api-extractor.json", + "linkinator.config.json", + "package-lock.json.2192533954", + "protos/google/cloud/osconfig/v1/osconfig_service.proto", + "protos/google/cloud/osconfig/v1/patch_deployments.proto", + "protos/google/cloud/osconfig/v1/patch_jobs.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "samples/package-lock.json.600467714", + "src/index.ts", + "src/v1/index.ts", + "src/v1/os_config_service_client.ts", + "src/v1/os_config_service_client_config.json", + "src/v1/os_config_service_proto_list.json", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts", + "system-test/install.ts", + "test/gapic_os_config_service_v1.ts", + "tsconfig.json", + "webpack.config.js" ] } \ No newline at end of file From 36f7062d15ed8cd7291436384405958760c5c81d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 21 Aug 2020 11:12:22 -0700 Subject: [PATCH 036/154] build: move system and samples test from Node 10 to Node 12 (#45) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/ba2d388f-b3b2-4ad7-a163-0c6b4d86894f/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/05de3e1e14a0b07eab8b474e669164dbd31f81fb --- packages/google-cloud-osconfig/synth.metadata | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 8e3abc5252b..80eee293bc3 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "8e98b3011db5928dd437c07ddc0cfe9ef85a8e06" + "sha": "89163b5fafaf48e3b3346b2437f30112db6c1539" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" + "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" } } ], @@ -51,19 +51,19 @@ ".kokoro/common.cfg", ".kokoro/continuous/node10/common.cfg", ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/lint.cfg", - ".kokoro/continuous/node10/samples-test.cfg", - ".kokoro/continuous/node10/system-test.cfg", ".kokoro/continuous/node10/test.cfg", ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/lint.cfg", + ".kokoro/continuous/node12/samples-test.cfg", + ".kokoro/continuous/node12/system-test.cfg", ".kokoro/continuous/node12/test.cfg", ".kokoro/docs.sh", ".kokoro/lint.sh", ".kokoro/populate-secrets.sh", ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node10/samples-test.cfg", - ".kokoro/presubmit/node10/system-test.cfg", ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/samples-test.cfg", + ".kokoro/presubmit/node12/system-test.cfg", ".kokoro/presubmit/node12/test.cfg", ".kokoro/publish.sh", ".kokoro/release/docs-devsite.cfg", @@ -86,7 +86,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.2192533954", "protos/google/cloud/osconfig/v1/osconfig_service.proto", "protos/google/cloud/osconfig/v1/patch_deployments.proto", "protos/google/cloud/osconfig/v1/patch_jobs.proto", @@ -95,7 +94,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.600467714", "src/index.ts", "src/v1/index.ts", "src/v1/os_config_service_client.ts", From 7f8871bd059af5d9fa191ddaee8bbe48ec46c502 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 27 Aug 2020 21:10:07 -0700 Subject: [PATCH 037/154] build: track flaky tests for "nightly", add new secrets for tagging (#46) Source-Author: Benjamin E. Coe Source-Date: Wed Aug 26 14:28:22 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 8cf6d2834ad14318e64429c3b94f6443ae83daf9 Source-Link: https://github.com/googleapis/synthtool/commit/8cf6d2834ad14318e64429c3b94f6443ae83daf9 --- packages/google-cloud-osconfig/synth.metadata | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 80eee293bc3..6832169fe5c 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "89163b5fafaf48e3b3346b2437f30112db6c1539" + "sha": "415da89c236682f6c92ab378863ffdb2bfe40663" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" + "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" } } ], @@ -42,7 +42,6 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", - ".github/publish.yml", ".github/release-please.yml", ".github/workflows/ci.yaml", ".gitignore", From feddb5d48573928ed61cc17aec02f28ba7de3595 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 12 Sep 2020 14:06:27 -0700 Subject: [PATCH 038/154] build(test): recursively find test files; fail on unsupported dependency versions (#49) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0832b96d-f20d-428a-9244-9373d24004a9/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/fdd03c161003ab97657cc0218f25c82c89ddf4b6 --- packages/google-cloud-osconfig/.mocharc.js | 3 ++- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-osconfig/.mocharc.js b/packages/google-cloud-osconfig/.mocharc.js index ff7b34fa5d1..0b600509bed 100644 --- a/packages/google-cloud-osconfig/.mocharc.js +++ b/packages/google-cloud-osconfig/.mocharc.js @@ -14,7 +14,8 @@ const config = { "enable-source-maps": true, "throw-deprecation": true, - "timeout": 10000 + "timeout": 10000, + "recursive": true } if (process.env.MOCHA_THROW_DEPRECATION === 'false') { delete config['throw-deprecation']; diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 6832169fe5c..bc3f9fbe576 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "415da89c236682f6c92ab378863ffdb2bfe40663" + "sha": "82ce45246c88d0bff775b2155ce9e651656fc113" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" + "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" } } ], From d5dc6ee142c8787ab60844a9dbe4a5c6f95a8bb3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 2 Oct 2020 08:10:07 -0700 Subject: [PATCH 039/154] chore: update bucket for cloud-rad (#50) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/abddcc47-cb76-4fc4-b8c1-feafeaf13e14/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/079dcce498117f9570cebe6e6cff254b38ba3860 --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index bc3f9fbe576..da3c502fc87 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "82ce45246c88d0bff775b2155ce9e651656fc113" + "sha": "dc2d96b9449e9f1d9bca6e2eeff6199f9440e86e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" + "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" } } ], From 676dea3c851970262a37c4ef5958daf27d0f402c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 5 Oct 2020 10:42:24 -0700 Subject: [PATCH 040/154] build(node_library): migrate to Trampoline V2 (#51) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1e3d0729-fe1f-4f75-babe-29f5584e5b6a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 --- packages/google-cloud-osconfig/synth.metadata | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index da3c502fc87..f32eace4b16 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "dc2d96b9449e9f1d9bca6e2eeff6199f9440e86e" + "sha": "9e0ab6668d8aa1a32e73d43d899fc2007112f8fa" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" + "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" } } ], @@ -75,10 +75,12 @@ ".kokoro/test.bat", ".kokoro/test.sh", ".kokoro/trampoline.sh", + ".kokoro/trampoline_v2.sh", ".mocharc.js", ".nycrc", ".prettierignore", ".prettierrc.js", + ".trampolinerc", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", From e50081a3c6cc65a2f324bb477f8ad4ede3ef18d7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 16 Oct 2020 10:08:40 -0700 Subject: [PATCH 041/154] build: only check --engine-strict for production deps (#52) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/05b05b53-a254-4e87-acf9-e9bae7f17a4e/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5451633881133e5573cc271a18e73b18caca8b1b --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index f32eace4b16..39d7c24cabc 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "9e0ab6668d8aa1a32e73d43d899fc2007112f8fa" + "sha": "03b88add36f522aca428833af8b942c316c0aa5f" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" + "sha": "5451633881133e5573cc271a18e73b18caca8b1b" } } ], From c0c57e2684a10311b35fa674865acf81cc0f9fb5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 21 Oct 2020 16:16:16 -0700 Subject: [PATCH 042/154] chore: clean up Node.js TOC for cloud-rad (#53) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/53e2a61c-af19-4be7-b9af-c352b89a29fb/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/901ddd44e9ef7887ee681b9183bbdea99437fdcc Source-Link: https://github.com/googleapis/synthtool/commit/f96d3b455fe27c3dc7bc37c3c9cd27b1c6d269c8 --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 39d7c24cabc..8a19cf93656 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "03b88add36f522aca428833af8b942c316c0aa5f" + "sha": "8b1311f130626dbffe641d1f1637e44e12cf7b74" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5451633881133e5573cc271a18e73b18caca8b1b" + "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" } } ], From f5885f85f4ed9673cbf86ff5525c85a36e8378d2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Oct 2020 11:12:14 -0700 Subject: [PATCH 043/154] docs: updated code of conduct (includes update to actions) (#56) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/8603a334-7a64-49dc-bf6d-29ff55473bfe/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89c849ba5013e45e8fb688b138f33c2ec6083dc5 Source-Link: https://github.com/googleapis/synthtool/commit/a783321fd55f010709294455584a553f4b24b944 Source-Link: https://github.com/googleapis/synthtool/commit/b7413d38b763827c72c0360f0a3d286c84656eeb Source-Link: https://github.com/googleapis/synthtool/commit/5f6ef0ec5501d33c4667885b37a7685a30d41a76 --- .../google-cloud-osconfig/CODE_OF_CONDUCT.md | 123 +++++++++++++----- packages/google-cloud-osconfig/synth.metadata | 4 +- 2 files changed, 89 insertions(+), 38 deletions(-) diff --git a/packages/google-cloud-osconfig/CODE_OF_CONDUCT.md b/packages/google-cloud-osconfig/CODE_OF_CONDUCT.md index 46b2a08ea6d..2add2547a81 100644 --- a/packages/google-cloud-osconfig/CODE_OF_CONDUCT.md +++ b/packages/google-cloud-osconfig/CODE_OF_CONDUCT.md @@ -1,43 +1,94 @@ -# Contributor Code of Conduct + +# Code of Conduct -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 8a19cf93656..37e1e24081e 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "8b1311f130626dbffe641d1f1637e44e12cf7b74" + "sha": "50844c98c287263d4bcf54030e1341120d5c7d66" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" + "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" } } ], From 0a350d285fa0aae133592d2b0a9fb2a45916c6ae Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Nov 2020 16:00:07 -0800 Subject: [PATCH 044/154] build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#57) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2b12f6c9-10d8-4a5e-b86e-af5827858559/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591 --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 37e1e24081e..f03785ace95 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "50844c98c287263d4bcf54030e1341120d5c7d66" + "sha": "61d68e6f1ad8b24bcaf3e379c1e395dc75b4c1c0" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" + "sha": "ba9918cd22874245b55734f57470c719b577e591" } } ], From 6fcab37a16eb675d4af6c096c52439c56a8108b8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 6 Nov 2020 15:09:04 -0800 Subject: [PATCH 045/154] build: add v1.OsConfigServiceClient type (#58) --- packages/google-cloud-osconfig/src/index.ts | 1 + packages/google-cloud-osconfig/synth.metadata | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/src/index.ts b/packages/google-cloud-osconfig/src/index.ts index a8ab505dc91..d16eee7ef0a 100644 --- a/packages/google-cloud-osconfig/src/index.ts +++ b/packages/google-cloud-osconfig/src/index.ts @@ -19,6 +19,7 @@ import * as v1 from './v1'; const OsConfigServiceClient = v1.OsConfigServiceClient; +type OsConfigServiceClient = v1.OsConfigServiceClient; export {v1, OsConfigServiceClient}; export default {v1, OsConfigServiceClient}; diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index f03785ace95..13f83ea9f08 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "61d68e6f1ad8b24bcaf3e379c1e395dc75b4c1c0" + "sha": "ff5fe1c8a8fdc7ffd358baf76358249dfcaf3ccb" } }, { From a598604d11b0413616c6beec0f50bac5cf432f3f Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 6 Nov 2020 17:04:09 -0800 Subject: [PATCH 046/154] fix: do not modify options object, use defaultScopes (#59) Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1. --- packages/google-cloud-osconfig/package.json | 2 +- .../src/v1/os_config_service_client.ts | 273 ++++++++++-------- packages/google-cloud-osconfig/synth.metadata | 4 +- .../system-test/fixtures/sample/src/index.ts | 9 +- .../system-test/install.ts | 18 +- 5 files changed, 172 insertions(+), 134 deletions(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index a52f4c2a303..b436e30a76a 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -29,7 +29,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "google-gax": "^2.3.1" + "google-gax": "^2.9.2" }, "devDependencies": { "@types/mocha": "^8.0.0", diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 4bf7d994a06..a871bfcd116 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -63,8 +63,10 @@ export class OsConfigServiceClient { /** * Construct an instance of OsConfigServiceClient. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] @@ -84,42 +86,33 @@ export class OsConfigServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. + * TODO(@alexander-fenster): link to gax documentation. + * @param {boolean} fallback - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. */ - constructor(opts?: ClientOptions) { - // Ensure that options include the service address and port. + // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof OsConfigServiceClient; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? typeof window !== 'undefined'; + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - if (!opts) { - opts = {servicePath, port}; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - - // users can override the config from client side, like retry codes name. - // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 - // The way to override client config for Showcase API: - // - // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} - // const showcaseClient = new showcaseClient({ projectId, customConfig }); - opts.clientConfig = opts.clientConfig || {}; - // If we're running in browser, it's OK to omit `fallback` since - // google-gax has `browser` field in its `package.json`. - // For Electron (which does not respect `browser` field), - // pass `{fallback: true}` to the OsConfigServiceClient constructor. + // Choose either gRPC or proto-over-HTTP implementation of google-gax. this._gaxModule = opts.fallback ? gax.fallback : gax; - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = (this.constructor as typeof OsConfigServiceClient).scopes; + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); // Save options to use in initialize() method. @@ -128,6 +121,11 @@ export class OsConfigServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { @@ -277,6 +275,7 @@ export class OsConfigServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'osconfig.googleapis.com'; @@ -285,6 +284,7 @@ export class OsConfigServiceClient { /** * The DNS address for this API service - same as servicePath(), * exists for compatibility reasons. + * @returns {string} The DNS address for this service. */ static get apiEndpoint() { return 'osconfig.googleapis.com'; @@ -292,6 +292,7 @@ export class OsConfigServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -300,6 +301,7 @@ export class OsConfigServiceClient { /** * 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']; @@ -309,8 +311,7 @@ export class OsConfigServiceClient { getProjectId(callback: Callback): void; /** * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. + * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback @@ -384,7 +385,11 @@ export class OsConfigServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.executePatchJob(request); */ executePatchJob( request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, @@ -469,7 +474,11 @@ export class OsConfigServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getPatchJob(request); */ getPatchJob( request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, @@ -552,7 +561,11 @@ export class OsConfigServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.cancelPatchJob(request); */ cancelPatchJob( request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, @@ -648,7 +661,11 @@ export class OsConfigServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createPatchDeployment(request); */ createPatchDeployment( request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, @@ -737,7 +754,11 @@ export class OsConfigServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getPatchDeployment(request); */ getPatchDeployment( request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, @@ -826,7 +847,11 @@ export class OsConfigServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deletePatchDeployment(request); */ deletePatchDeployment( request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, @@ -920,19 +945,14 @@ export class OsConfigServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [PatchJob]{@link google.cloud.osconfig.v1.PatchJob} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListPatchJobsRequest]{@link google.cloud.osconfig.v1.ListPatchJobsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListPatchJobsResponse]{@link google.cloud.osconfig.v1.ListPatchJobsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listPatchJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listPatchJobs( request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, @@ -978,18 +998,7 @@ export class OsConfigServiceClient { } /** - * Equivalent to {@link listPatchJobs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listPatchJobs} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -1007,6 +1016,13 @@ export class OsConfigServiceClient { * 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 [PatchJob]{@link google.cloud.osconfig.v1.PatchJob} 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 `listPatchJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listPatchJobsStream( request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, @@ -1031,10 +1047,9 @@ export class OsConfigServiceClient { } /** - * Equivalent to {@link listPatchJobs}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listPatchJobs`, 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 @@ -1051,7 +1066,18 @@ export class OsConfigServiceClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listPatchJobsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listPatchJobsAsync( request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, @@ -1126,19 +1152,14 @@ export class OsConfigServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchJobInstanceDetails]{@link google.cloud.osconfig.v1.PatchJobInstanceDetails}. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [PatchJobInstanceDetails]{@link google.cloud.osconfig.v1.PatchJobInstanceDetails} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListPatchJobInstanceDetailsRequest]{@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListPatchJobInstanceDetailsResponse]{@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listPatchJobInstanceDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listPatchJobInstanceDetails( request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, @@ -1190,18 +1211,7 @@ export class OsConfigServiceClient { } /** - * Equivalent to {@link listPatchJobInstanceDetails}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listPatchJobInstanceDetails} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -1219,6 +1229,13 @@ export class OsConfigServiceClient { * 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 [PatchJobInstanceDetails]{@link google.cloud.osconfig.v1.PatchJobInstanceDetails} 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 `listPatchJobInstanceDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listPatchJobInstanceDetailsStream( request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, @@ -1243,10 +1260,9 @@ export class OsConfigServiceClient { } /** - * Equivalent to {@link listPatchJobInstanceDetails}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listPatchJobInstanceDetails`, 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 @@ -1263,7 +1279,18 @@ export class OsConfigServiceClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [PatchJobInstanceDetails]{@link google.cloud.osconfig.v1.PatchJobInstanceDetails}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listPatchJobInstanceDetailsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listPatchJobInstanceDetailsAsync( request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, @@ -1336,19 +1363,14 @@ export class OsConfigServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. - * The client library support auto-pagination by default: it will call the API as many + * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListPatchDeploymentsRequest]{@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListPatchDeploymentsResponse]{@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listPatchDeploymentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listPatchDeployments( request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, @@ -1396,18 +1418,7 @@ export class OsConfigServiceClient { } /** - * Equivalent to {@link listPatchDeployments}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listPatchDeployments} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -1421,6 +1432,13 @@ export class OsConfigServiceClient { * 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 [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment} 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 `listPatchDeploymentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ listPatchDeploymentsStream( request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, @@ -1445,10 +1463,9 @@ export class OsConfigServiceClient { } /** - * Equivalent to {@link listPatchDeployments}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listPatchDeployments`, 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 @@ -1461,7 +1478,18 @@ export class OsConfigServiceClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listPatchDeploymentsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listPatchDeploymentsAsync( request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, @@ -1567,9 +1595,10 @@ export class OsConfigServiceClient { } /** - * Terminate the GRPC channel and close the client. + * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { this.initialize(); diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 13f83ea9f08..3a74a57e19a 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ba9918cd22874245b55734f57470c719b577e591" + "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" } } ], @@ -87,6 +87,7 @@ "README.md", "api-extractor.json", "linkinator.config.json", + "package-lock.json.3313539706", "protos/google/cloud/osconfig/v1/osconfig_service.proto", "protos/google/cloud/osconfig/v1/patch_deployments.proto", "protos/google/cloud/osconfig/v1/patch_jobs.proto", @@ -95,6 +96,7 @@ "protos/protos.json", "renovate.json", "samples/README.md", + "samples/package-lock.json.3934198833", "src/index.ts", "src/v1/index.ts", "src/v1/os_config_service_client.ts", diff --git a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts index 4368acddf61..c7f15c4ddda 100644 --- a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts @@ -18,8 +18,15 @@ import {OsConfigServiceClient} from '@google-cloud/os-config'; +// check that the client class type name can be used +function doStuffWithOsConfigServiceClient(client: OsConfigServiceClient) { + client.close(); +} + function main() { - new OsConfigServiceClient(); + // check that the client instance can be created + const osConfigServiceClient = new OsConfigServiceClient(); + doStuffWithOsConfigServiceClient(osConfigServiceClient); } main(); diff --git a/packages/google-cloud-osconfig/system-test/install.ts b/packages/google-cloud-osconfig/system-test/install.ts index 4c1ba3eb79a..39d90f771de 100644 --- a/packages/google-cloud-osconfig/system-test/install.ts +++ b/packages/google-cloud-osconfig/system-test/install.ts @@ -20,32 +20,32 @@ import {packNTest} from 'pack-n-play'; import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; -describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function () { +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'TypeScript user can use the type definitions', ts: readFileSync( './system-test/fixtures/sample/src/index.ts' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); - it('should have correct type signature for javascript users', async function () { + it('JavaScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'JavaScript user can use the library', ts: readFileSync( './system-test/fixtures/sample/src/index.js' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); }); From 9115c967ce10a907b06c441a8fc3f9d8cab9a8e9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2020 12:49:26 -0800 Subject: [PATCH 047/154] chore: release 1.2.3 (#60) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 4e0a35dade5..189d28cc687 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.2.3](https://www.github.com/googleapis/nodejs-os-config/compare/v1.2.2...v1.2.3) (2020-11-07) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#59](https://www.github.com/googleapis/nodejs-os-config/issues/59)) ([c6409f8](https://www.github.com/googleapis/nodejs-os-config/commit/c6409f8f5eae987853369a4206671b353d1da983)) + ### [1.2.2](https://www.github.com/googleapis/nodejs-os-config/compare/v1.2.1...v1.2.2) (2020-07-29) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index b436e30a76a..8f6482202c4 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.2.2", + "version": "1.2.3", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index b7614dfba51..95469225c35 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.2.2" + "@google-cloud/os-config": "^1.2.3" }, "devDependencies": { "c8": "^7.1.0", From 8d264828fbe9f4c07fa6a7c1cf14ec3a51fe2df3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 12 Nov 2020 14:18:16 -0800 Subject: [PATCH 048/154] feat: Added PatchRollout feature to PatchDeployments inventory proto definitions for VM Manager Inventory (#62) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * fix: do not modify options object, use defaultScopes docs: regenerated jsdoc comments with examples build: use gapic-generator-typescript v1.2.1 Note: these change require google-gax "^2.9.2". @alexander-fenster will make sure the google-gax version is bumped across libraries. PiperOrigin-RevId: 341102751 Source-Author: Google APIs Source-Date: Fri Nov 6 12:56:54 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: b759c563bacf9cd15749be4d2bdd276d3f48ee29 Source-Link: https://github.com/googleapis/googleapis/commit/b759c563bacf9cd15749be4d2bdd276d3f48ee29 * feat: Added PatchRollout feature to PatchDeployments feat: Added Inventory proto definitions for VM Manager Inventory. PiperOrigin-RevId: 341842584 Source-Author: Google APIs Source-Date: Wed Nov 11 09:10:56 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 4b0ad15b0ff483486ae90d73092e7be00f8c1848 Source-Link: https://github.com/googleapis/googleapis/commit/4b0ad15b0ff483486ae90d73092e7be00f8c1848 --- .../google/cloud/osconfig/v1/inventory.proto | 258 + .../cloud/osconfig/v1/osconfig_common.proto | 38 + .../cloud/osconfig/v1/patch_deployments.proto | 89 +- .../google/cloud/osconfig/v1/patch_jobs.proto | 80 +- .../google-cloud-osconfig/protos/protos.d.ts | 13627 ++--- .../google-cloud-osconfig/protos/protos.js | 41356 +++++++++------- .../google-cloud-osconfig/protos/protos.json | 3900 +- .../src/v1/os_config_service_client.ts | 46 +- .../src/v1/os_config_service_proto_list.json | 2 + packages/google-cloud-osconfig/synth.metadata | 10 +- 10 files changed, 32413 insertions(+), 26993 deletions(-) create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_common.proto diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto new file mode 100644 index 00000000000..ba3318e70e4 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto @@ -0,0 +1,258 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "Inventories"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// OS Config Inventory is a service for collecting and reporting operating +// system and package information on VM instances. + +// The inventory details of a VM. +message Inventory { + // Operating system information for the VM. + message OsInfo { + // The VM hostname. + string hostname = 9; + + // The operating system long name. + // For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 + // Datacenter'. + string long_name = 2; + + // The operating system short name. + // For example, 'windows' or 'debian'. + string short_name = 3; + + // The version of the operating system. + string version = 4; + + // The system architecture of the operating system. + string architecture = 5; + + // The kernel version of the operating system. + string kernel_version = 6; + + // The kernel release of the operating system. + string kernel_release = 7; + + // The current version of the OS Config agent running on the VM. + string osconfig_agent_version = 8; + } + + // A single piece of inventory on a VM. + message Item { + // The origin of a specific inventory item. + enum OriginType { + // Invalid. An origin type must be specified. + ORIGIN_TYPE_UNSPECIFIED = 0; + + // This inventory item was discovered as the result of the agent + // reporting inventory via the reporting API. + INVENTORY_REPORT = 1; + } + + // The different types of inventory that are tracked on a VM. + enum Type { + // Invalid. An type must be specified. + TYPE_UNSPECIFIED = 0; + + // This represents a package that is installed on the VM. + INSTALLED_PACKAGE = 1; + + // This represents an update that is available for a package. + AVAILABLE_PACKAGE = 2; + } + + // Identifier for this item, unique across items for this VM. + string id = 1; + + // The origin of this inventory item. + OriginType origin_type = 2; + + // When this inventory item was first detected. + google.protobuf.Timestamp create_time = 8; + + // When this inventory item was last modified. + google.protobuf.Timestamp update_time = 9; + + // The specific type of inventory, correlating to its specific details. + Type type = 5; + + // Specific details of this inventory item based on its type. + oneof details { + // Software package present on the VM instance. + SoftwarePackage installed_package = 6; + + // Software package available to be installed on the VM instance. + SoftwarePackage available_package = 7; + } + } + + // Software package information of the operating system. + message SoftwarePackage { + // Information about the different types of software packages. + oneof details { + // Yum package info. + // For details about the yum package manager, see + // https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. + VersionedPackage yum_package = 1; + + // Details of an APT package. + // For details about the apt package manager, see + // https://wiki.debian.org/Apt. + VersionedPackage apt_package = 2; + + // Details of a Zypper package. + // For details about the Zypper package manager, see + // https://en.opensuse.org/SDB:Zypper_manual. + VersionedPackage zypper_package = 3; + + // Details of a Googet package. + // For details about the googet package manager, see + // https://github.com/google/googet. + VersionedPackage googet_package = 4; + + // Details of a Zypper patch. + // For details about the Zypper package manager, see + // https://en.opensuse.org/SDB:Zypper_manual. + ZypperPatch zypper_patch = 5; + + // Details of a Windows Update package. + // See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for + // information about Windows Update. + WindowsUpdatePackage wua_package = 6; + + // Details of a Windows Quick Fix engineering package. + // See + // https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + // for info in Windows Quick Fix Engineering. + WindowsQuickFixEngineeringPackage qfe_package = 7; + + // Details of a COS package. + VersionedPackage cos_package = 8; + } + } + + // Information related to the a standard versioned package. This includes + // package info for APT, Yum, Zypper, and Googet package managers. + message VersionedPackage { + // The name of the package. + string package_name = 4; + + // The system architecture this package is intended for. + string architecture = 2; + + // The version of the package. + string version = 3; + } + + // Details related to a Windows Update package. + // Field data and names are taken from Windows Update API IUpdate Interface: + // https://docs.microsoft.com/en-us/windows/win32/api/_wua/ + // Descriptive fields like title, and description are localized based on + // the locale of the VM being updated. + message WindowsUpdatePackage { + // Categories specified by the Windows Update. + message WindowsUpdateCategory { + // The identifier of the windows update category. + string id = 1; + + // The name of the windows update category. + string name = 2; + } + + // The localized title of the update package. + string title = 1; + + // The localized description of the update package. + string description = 2; + + // The categories that are associated with this update package. + repeated WindowsUpdateCategory categories = 3; + + // A collection of Microsoft Knowledge Base article IDs that are associated + // with the update package. + repeated string kb_article_ids = 4; + + // A hyperlink to the language-specific support information for the update. + string support_url = 11; + + // A collection of URLs that provide more information about the update + // package. + repeated string more_info_urls = 5; + + // Gets the identifier of an update package. Stays the same across + // revisions. + string update_id = 6; + + // The revision number of this update package. + int32 revision_number = 7; + + // The last published date of the update, in (UTC) date and time. + google.protobuf.Timestamp last_deployment_change_time = 10; + } + + // Details related to a Zypper Patch. + message ZypperPatch { + // The name of the patch. + string patch_name = 5; + + // The category of the patch. + string category = 2; + + // The severity specified for this patch + string severity = 3; + + // Any summary information provided about this patch. + string summary = 4; + } + + // Information related to a Quick Fix Engineering package. + // Fields are taken from Windows QuickFixEngineering Interface and match + // the source names: + // https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + message WindowsQuickFixEngineeringPackage { + // A short textual description of the QFE update. + string caption = 1; + + // A textual description of the QFE update. + string description = 2; + + // Unique identifier associated with a particular QFE update. + string hot_fix_id = 3; + + // Date that the QFE update was installed. Mapped from installed_on field. + google.protobuf.Timestamp install_time = 5; + } + + // Base level operating system information for the VM. + OsInfo os_info = 1; + + // Inventory items related to the VM keyed by an opaque unique identifier for + // each inventory item. The identifier is unique to each distinct and + // addressable inventory item and will change, when there is a new package + // version. + map items = 2; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_common.proto new file mode 100644 index 00000000000..43059e9a62e --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_common.proto @@ -0,0 +1,38 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_outer_classname = "Common"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// Message encapsulating a value that can be either absolute ("fixed") or +// relative ("percent") to a value. +message FixedOrPercent { + // Type of the value. + oneof mode { + // Specifies a fixed value. + int32 fixed = 1; + + // Specifies the relative value defined as a percentage, which will be + // multiplied by a reference value. + int32 percent = 2; + } +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto index 10ea5d1a7ff..d8bb84a91e5 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto @@ -49,47 +49,59 @@ message PatchDeployment { // This field is ignored when you create a new patch deployment. string name = 1; - // Optional. Description of the patch deployment. Length of the description is limited - // to 1024 characters. + // Optional. Description of the patch deployment. Length of the description is + // limited to 1024 characters. string description = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. VM instances to patch. - PatchInstanceFilter instance_filter = 3 [(google.api.field_behavior) = REQUIRED]; + PatchInstanceFilter instance_filter = 3 + [(google.api.field_behavior) = REQUIRED]; // Optional. Patch configuration that is applied. PatchConfig patch_config = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Duration of the patch. After the duration ends, the patch times out. - google.protobuf.Duration duration = 5 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Duration of the patch. After the duration ends, the patch times + // out. + google.protobuf.Duration duration = 5 + [(google.api.field_behavior) = OPTIONAL]; // Schedule for the patch. oneof schedule { // Required. Schedule a one-time execution. - OneTimeSchedule one_time_schedule = 6 [(google.api.field_behavior) = REQUIRED]; + OneTimeSchedule one_time_schedule = 6 + [(google.api.field_behavior) = REQUIRED]; // Required. Schedule recurring executions. - RecurringSchedule recurring_schedule = 7 [(google.api.field_behavior) = REQUIRED]; + RecurringSchedule recurring_schedule = 7 + [(google.api.field_behavior) = REQUIRED]; } // Output only. Time the patch deployment was created. Timestamp is in // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time the patch deployment was last updated. Timestamp is in // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last time a patch job was started by this deployment. // Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text // format. - google.protobuf.Timestamp last_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp last_execute_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Rollout strategy of the patch job. + PatchRollout rollout = 11 [(google.api.field_behavior) = OPTIONAL]; } // Sets the time for a one time patch deployment. Timestamp is in // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. message OneTimeSchedule { // Required. The desired patch job execution time. - google.protobuf.Timestamp execute_time = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp execute_time = 1 + [(google.api.field_behavior) = REQUIRED]; } // Sets the time for recurring patch deployments. @@ -114,14 +126,17 @@ message RecurringSchedule { // Optional. The time that the recurring schedule becomes effective. // Defaults to `create_time` of the patch deployment. - google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Timestamp start_time = 2 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. The end time at which a recurring patch deployment schedule is no longer - // active. - google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The end time at which a recurring patch deployment schedule is no + // longer active. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OPTIONAL]; // Required. Time of the day to run a recurring deployment. - google.type.TimeOfDay time_of_day = 4 [(google.api.field_behavior) = REQUIRED]; + google.type.TimeOfDay time_of_day = 4 + [(google.api.field_behavior) = REQUIRED]; // Required. The frequency unit of this recurring schedule. Frequency frequency = 5 [(google.api.field_behavior) = REQUIRED]; @@ -137,16 +152,19 @@ message RecurringSchedule { } // Output only. The time the last patch job ran successfully. - google.protobuf.Timestamp last_execute_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp last_execute_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the next patch job is scheduled to run. - google.protobuf.Timestamp next_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp next_execute_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Represents a weekly schedule. message WeeklySchedule { // Required. Day of the week. - google.type.DayOfWeek day_of_week = 1 [(google.api.field_behavior) = REQUIRED]; + google.type.DayOfWeek day_of_week = 1 + [(google.api.field_behavior) = REQUIRED]; } // Represents a monthly schedule. An example of a valid monthly schedule is @@ -155,29 +173,32 @@ message MonthlySchedule { // One day in a month. oneof day_of_month { // Required. Week day in a month. - WeekDayOfMonth week_day_of_month = 1 [(google.api.field_behavior) = REQUIRED]; + WeekDayOfMonth week_day_of_month = 1 + [(google.api.field_behavior) = REQUIRED]; - // Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1 - // indicates the last day of the month. - // Months without the target day will be skipped. For example, a schedule to - // run "every month on the 31st" will not run in February, April, June, etc. + // Required. One day of the month. 1-31 indicates the 1st to the 31st day. + // -1 indicates the last day of the month. Months without the target day + // will be skipped. For example, a schedule to run "every month on the 31st" + // will not run in February, April, June, etc. int32 month_day = 2 [(google.api.field_behavior) = REQUIRED]; } } // Represents one week day in a month. An example is "the 4th Sunday". message WeekDayOfMonth { - // Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1 - // indicates the last week of the month. + // Required. Week number in a month. 1-4 indicates the 1st to 4th week of the + // month. -1 indicates the last week of the month. int32 week_ordinal = 1 [(google.api.field_behavior) = REQUIRED]; // Required. A day of the week. - google.type.DayOfWeek day_of_week = 2 [(google.api.field_behavior) = REQUIRED]; + google.type.DayOfWeek day_of_week = 2 + [(google.api.field_behavior) = REQUIRED]; } // A request message for creating a patch deployment. message CreatePatchDeploymentRequest { - // Required. The project to apply this patch deployment to in the form `projects/*`. + // Required. The project to apply this patch deployment to in the form + // `projects/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -185,8 +206,8 @@ message CreatePatchDeploymentRequest { } ]; - // Required. A name for the patch deployment in the project. When creating a name - // the following rules apply: + // Required. A name for the patch deployment in the project. When creating a + // name the following rules apply: // * Must contain only lowercase letters, numbers, and hyphens. // * Must start with a letter. // * Must be between 1-63 characters. @@ -220,11 +241,13 @@ message ListPatchDeploymentsRequest { } ]; - // Optional. The maximum number of patch deployments to return. Default is 100. + // Optional. The maximum number of patch deployments to return. Default is + // 100. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to ListPatchDeployments - // that indicates where this listing should continue from. + // Optional. A pagination token returned from a previous call to + // ListPatchDeployments that indicates where this listing should continue + // from. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto index 553c9e4713c..1fffb532a11 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto @@ -18,6 +18,7 @@ package google.cloud.osconfig.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/osconfig/v1/osconfig_common.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -43,9 +44,10 @@ message ExecutePatchJobRequest { // to 1024 characters. string description = 2; - // Required. Instances to patch, either explicitly or filtered by some criteria such - // as zone or labels. - PatchInstanceFilter instance_filter = 7 [(google.api.field_behavior) = REQUIRED]; + // Required. Instances to patch, either explicitly or filtered by some + // criteria such as zone or labels. + PatchInstanceFilter instance_filter = 7 + [(google.api.field_behavior) = REQUIRED]; // Patch configuration being applied. If omitted, instances are // patched using the default configurations. @@ -61,6 +63,9 @@ message ExecutePatchJobRequest { // Display name for this patch job. This does not have to be unique. string display_name = 8; + + // Rollout strategy of the patch job. + PatchRollout rollout = 9; } // Request to get an active or completed patch job. @@ -76,7 +81,8 @@ message GetPatchJobRequest { // Request to list details for all instances that are part of a patch job. message ListPatchJobInstanceDetailsRequest { - // Required. The parent for the instances are in the form of `projects/*/patchJobs/*`. + // Required. The parent for the instances are in the form of + // `projects/*/patchJobs/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -113,8 +119,8 @@ message ListPatchJobInstanceDetailsResponse { message PatchJobInstanceDetails { // The instance name in the form `projects/*/zones/*/instances/*` string name = 1 [(google.api.resource_reference) = { - type: "compute.googleapis.com/Instance" - }]; + type: "compute.googleapis.com/Instance" + }]; // The unique identifier for the instance. This identifier is // defined by the server. @@ -165,7 +171,7 @@ message ListPatchJobsResponse { // A high level representation of a patch job that is either in progress // or has completed. // -// Instances details are not included in the job. To paginate through instance +// Instance details are not included in the job. To paginate through instance // details, use ListPatchJobInstanceDetails. // // For more information about patch jobs, see @@ -275,7 +281,7 @@ message PatchJob { // Last time this patch job was updated. google.protobuf.Timestamp update_time = 4; - // The current state of the PatchJob . + // The current state of the PatchJob. State state = 5; // Instances to patch. @@ -310,6 +316,9 @@ message PatchJob { type: "osconfig.googleapis.com/PatchDeployment" } ]; + + // Rollout strategy being applied. + PatchRollout rollout = 16; } // Patch configuration specifications. Contains details on how to apply the @@ -416,8 +425,6 @@ message Instance { // service. NO_AGENT_DETECTED = 15; } - - } // Message for canceling a patch job. @@ -484,9 +491,7 @@ message YumSettings { } // Googet patching is performed by running `googet update`. -message GooSettings { - -} +message GooSettings {} // Zypper patching is performed by running `zypper patch`. // See also https://en.opensuse.org/SDB:Zypper_manual. @@ -683,3 +688,52 @@ message PatchInstanceFilter { // example prefix="prod-". repeated string instance_name_prefixes = 5; } + +// Patch rollout configuration specifications. Contains details on the +// concurrency control when applying patch(es) to all targeted VMs. +message PatchRollout { + // Type of the rollout. + enum Mode { + // Mode must be specified. + MODE_UNSPECIFIED = 0; + + // Patches are applied one zone at a time. The patch job begins in the + // region with the lowest number of targeted VMs. Within the region, + // patching begins in the zone with the lowest number of targeted VMs. If + // multiple regions (or zones within a region) have the same number of + // targeted VMs, a tie-breaker is achieved by sorting the regions or zones + // in alphabetical order. + ZONE_BY_ZONE = 1; + + // Patches are applied to VMs in all zones at the same time. + CONCURRENT_ZONES = 2; + } + + // Mode of the patch rollout. + Mode mode = 1; + + // The maximum number (or percentage) of VMs per zone to disrupt at any given + // moment. The number of VMs calculated from multiplying the percentage by the + // total number of VMs in a zone is rounded up. + // + // During patching, a VM is considered disrupted from the time the agent is + // notified to begin until patching has completed. This disruption time + // includes the time to complete reboot and any post-patch steps. + // + // A VM contributes to the disruption budget if its patching operation fails + // either when applying the patches, running pre or post patch steps, or if it + // fails to respond with a success notification before timing out. VMs that + // are not running or do not have an active agent do not count toward this + // disruption budget. + // + // For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, + // the patch job stops, because continuing to the next zone requires + // completion of the patch process in the previous zone. + // + // For example, if the disruption budget has a fixed value of `10`, and 8 VMs + // fail to patch in the current zone, the patch job continues to patch 2 VMs + // at a time until the zone is completed. When that zone is completed + // successfully, patching begins with 10 VMs at a time in the next zone. If 10 + // VMs in the next zone fail to patch, the patch job stops. + FixedOrPercent disruption_budget = 2; +} diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 10b51e9fba6..500a38dbeb3 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -17,7871 +17,9160 @@ import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { - /** Namespace cloud. */ - namespace cloud { - - /** Namespace osconfig. */ - namespace osconfig { + /** Namespace protobuf. */ + namespace protobuf { - /** Namespace v1. */ - namespace v1 { + /** Properties of a Timestamp. */ + interface ITimestamp { - /** Represents an OsConfigService */ - class OsConfigService extends $protobuf.rpc.Service { + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** - * Constructs a new OsConfigService 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); + /** Timestamp nanos */ + nanos?: (number|null); + } - /** - * Creates new OsConfigService 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): OsConfigService; + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { - /** - * Calls ExecutePatchJob. - * @param request ExecutePatchJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchJob - */ - public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback): void; + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); - /** - * Calls ExecutePatchJob. - * @param request ExecutePatchJobRequest message or plain object - * @returns Promise - */ - public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest): Promise; + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** - * Calls GetPatchJob. - * @param request GetPatchJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchJob - */ - public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback): void; + /** Timestamp nanos. */ + public nanos: number; - /** - * Calls GetPatchJob. - * @param request GetPatchJobRequest message or plain object - * @returns Promise - */ - public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest): Promise; + /** + * 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; - /** - * Calls CancelPatchJob. - * @param request CancelPatchJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchJob - */ - public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback): void; + /** + * 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; - /** - * Calls CancelPatchJob. - * @param request CancelPatchJobRequest message or plain object - * @returns Promise - */ - public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest): Promise; + /** + * 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; - /** - * Calls ListPatchJobs. - * @param request ListPatchJobsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPatchJobsResponse - */ - public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback): void; + /** + * 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; - /** - * Calls ListPatchJobs. - * @param request ListPatchJobsRequest message or plain object - * @returns Promise - */ - public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest): Promise; + /** + * 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; - /** - * Calls ListPatchJobInstanceDetails. - * @param request ListPatchJobInstanceDetailsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse - */ - public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback): void; + /** + * 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); - /** - * Calls ListPatchJobInstanceDetails. - * @param request ListPatchJobInstanceDetailsRequest message or plain object - * @returns Promise - */ - public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): Promise; + /** + * 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; - /** - * Calls CreatePatchDeployment. - * @param request CreatePatchDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchDeployment - */ - public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback): void; + /** + * 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 }; - /** - * Calls CreatePatchDeployment. - * @param request CreatePatchDeploymentRequest message or plain object - * @returns Promise - */ - public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): Promise; + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Calls GetPatchDeployment. - * @param request GetPatchDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchDeployment - */ - public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback): void; + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** - * Calls GetPatchDeployment. - * @param request GetPatchDeploymentRequest message or plain object - * @returns Promise - */ - public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): Promise; + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } - /** - * Calls ListPatchDeployments. - * @param request ListPatchDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse - */ - public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback): void; + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { - /** - * Calls ListPatchDeployments. - * @param request ListPatchDeploymentsRequest message or plain object - * @returns Promise - */ - public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): Promise; + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** - * Calls DeletePatchDeployment. - * @param request DeletePatchDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback): void; + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; - /** - * Calls DeletePatchDeployment. - * @param request DeletePatchDeploymentRequest message or plain object - * @returns Promise - */ - public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): Promise; - } + /** + * 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; - namespace OsConfigService { + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. - * @param error Error, if any - * @param [response] PatchJob - */ - type ExecutePatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. - * @param error Error, if any - * @param [response] PatchJob - */ - type GetPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. - * @param error Error, if any - * @param [response] PatchJob - */ - type CancelPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. - * @param error Error, if any - * @param [response] ListPatchJobsResponse - */ - type ListPatchJobsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobsResponse) => void; + /** + * 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); - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. - * @param error Error, if any - * @param [response] ListPatchJobInstanceDetailsResponse - */ - type ListPatchJobInstanceDetailsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) => void; + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. - * @param error Error, if any - * @param [response] PatchDeployment - */ - type CreatePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; + /** + * 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 }; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. - * @param error Error, if any - * @param [response] PatchDeployment - */ - type GetPatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. - * @param error Error, if any - * @param [response] ListPatchDeploymentsResponse - */ - type ListPatchDeploymentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchDeploymentsResponse) => void; + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. - * @param error Error, if any - * @param [response] Empty - */ - type DeletePatchDeploymentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + /** FileDescriptorProto name */ + name?: (string|null); - /** Properties of a PatchDeployment. */ - interface IPatchDeployment { + /** FileDescriptorProto package */ + "package"?: (string|null); - /** PatchDeployment name */ - name?: (string|null); + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** PatchDeployment description */ - description?: (string|null); + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** PatchDeployment instanceFilter */ - instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** PatchDeployment patchConfig */ - patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** PatchDeployment duration */ - duration?: (google.protobuf.IDuration|null); + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** PatchDeployment oneTimeSchedule */ - oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** PatchDeployment recurringSchedule */ - recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** PatchDeployment createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); - /** PatchDeployment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** PatchDeployment lastExecuteTime */ - lastExecuteTime?: (google.protobuf.ITimestamp|null); - } + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } - /** Represents a PatchDeployment. */ - class PatchDeployment implements IPatchDeployment { + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { - /** - * Constructs a new PatchDeployment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IPatchDeployment); + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** PatchDeployment name. */ - public name: string; + /** FileDescriptorProto name. */ + public name: string; - /** PatchDeployment description. */ - public description: string; + /** FileDescriptorProto package. */ + public package: string; - /** PatchDeployment instanceFilter. */ - public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** PatchDeployment patchConfig. */ - public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** PatchDeployment duration. */ - public duration?: (google.protobuf.IDuration|null); + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** PatchDeployment oneTimeSchedule. */ - public oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** PatchDeployment recurringSchedule. */ - public recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** PatchDeployment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** PatchDeployment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** PatchDeployment lastExecuteTime. */ - public lastExecuteTime?: (google.protobuf.ITimestamp|null); + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** PatchDeployment schedule. */ - public schedule?: ("oneTimeSchedule"|"recurringSchedule"); + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * Creates a new PatchDeployment instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchDeployment instance - */ - public static create(properties?: google.cloud.osconfig.v1.IPatchDeployment): google.cloud.osconfig.v1.PatchDeployment; + /** FileDescriptorProto syntax. */ + public syntax: string; - /** - * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. - * @param message PatchDeployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. - * @param message PatchDeployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a PatchDeployment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchDeployment; + /** + * 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 PatchDeployment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchDeployment; + /** + * 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; - /** - * Verifies a PatchDeployment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a 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; - /** - * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchDeployment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchDeployment; + /** + * 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 plain object from a PatchDeployment message. Also converts values to other types if specified. - * @param message PatchDeployment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this PatchDeployment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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 }; - /** Properties of an OneTimeSchedule. */ - interface IOneTimeSchedule { + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** OneTimeSchedule executeTime */ - executeTime?: (google.protobuf.ITimestamp|null); - } + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** Represents an OneTimeSchedule. */ - class OneTimeSchedule implements IOneTimeSchedule { + /** DescriptorProto name */ + name?: (string|null); - /** - * Constructs a new OneTimeSchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IOneTimeSchedule); + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** OneTimeSchedule executeTime. */ - public executeTime?: (google.protobuf.ITimestamp|null); + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Creates a new OneTimeSchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns OneTimeSchedule instance - */ - public static create(properties?: google.cloud.osconfig.v1.IOneTimeSchedule): google.cloud.osconfig.v1.OneTimeSchedule; + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** - * Encodes the specified OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. - * @param message OneTimeSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IOneTimeSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** - * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. - * @param message OneTimeSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IOneTimeSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** - * Decodes an OneTimeSchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneTimeSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OneTimeSchedule; + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** - * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneTimeSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OneTimeSchedule; + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - /** - * Verifies an OneTimeSchedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - /** - * Creates an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneTimeSchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OneTimeSchedule; + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** - * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. - * @param message OneTimeSchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.OneTimeSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { - /** - * Converts this OneTimeSchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); - /** Properties of a RecurringSchedule. */ - interface IRecurringSchedule { + /** DescriptorProto name. */ + public name: string; - /** RecurringSchedule timeZone */ - timeZone?: (google.type.ITimeZone|null); + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** RecurringSchedule startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** RecurringSchedule endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; - /** RecurringSchedule timeOfDay */ - timeOfDay?: (google.type.ITimeOfDay|null); + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** RecurringSchedule frequency */ - frequency?: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency|null); + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - /** RecurringSchedule weekly */ - weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** RecurringSchedule monthly */ - monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - /** RecurringSchedule lastExecuteTime */ - lastExecuteTime?: (google.protobuf.ITimestamp|null); + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** RecurringSchedule nextExecuteTime */ - nextExecuteTime?: (google.protobuf.ITimestamp|null); - } + /** DescriptorProto reservedName. */ + public reservedName: string[]; - /** Represents a RecurringSchedule. */ - class RecurringSchedule implements IRecurringSchedule { + /** + * 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; - /** - * Constructs a new RecurringSchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IRecurringSchedule); + /** + * 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; - /** RecurringSchedule timeZone. */ - public timeZone?: (google.type.ITimeZone|null); + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** RecurringSchedule startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - /** RecurringSchedule endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** + * 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; - /** RecurringSchedule timeOfDay. */ - public timeOfDay?: (google.type.ITimeOfDay|null); + /** + * 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); - /** RecurringSchedule frequency. */ - public frequency: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency); + /** + * 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; - /** RecurringSchedule weekly. */ - public weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); + /** + * 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 }; - /** RecurringSchedule monthly. */ - public monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** RecurringSchedule lastExecuteTime. */ - public lastExecuteTime?: (google.protobuf.ITimestamp|null); + namespace DescriptorProto { - /** RecurringSchedule nextExecuteTime. */ - public nextExecuteTime?: (google.protobuf.ITimestamp|null); + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** RecurringSchedule scheduleConfig. */ - public scheduleConfig?: ("weekly"|"monthly"); + /** ExtensionRange start */ + start?: (number|null); - /** - * Creates a new RecurringSchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns RecurringSchedule instance - */ - public static create(properties?: google.cloud.osconfig.v1.IRecurringSchedule): google.cloud.osconfig.v1.RecurringSchedule; + /** ExtensionRange end */ + end?: (number|null); - /** - * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. - * @param message RecurringSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** - * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. - * @param message RecurringSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** - * Decodes a RecurringSchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecurringSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.RecurringSchedule; + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** - * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecurringSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.RecurringSchedule; + /** ExtensionRange start. */ + public start: number; - /** - * Verifies a RecurringSchedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ExtensionRange end. */ + public end: number; - /** - * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecurringSchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.RecurringSchedule; + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** - * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. - * @param message RecurringSchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.RecurringSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this RecurringSchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - namespace RecurringSchedule { + /** + * 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; - /** Frequency enum. */ - enum Frequency { - FREQUENCY_UNSPECIFIED = 0, - WEEKLY = 1, - MONTHLY = 2 - } - } + /** + * 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; - /** Properties of a WeeklySchedule. */ - interface IWeeklySchedule { + /** + * 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; - /** WeeklySchedule dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); - } + /** + * 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); - /** Represents a WeeklySchedule. */ - class WeeklySchedule implements IWeeklySchedule { + /** + * 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; - /** - * Constructs a new WeeklySchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IWeeklySchedule); + /** + * 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 }; - /** WeeklySchedule dayOfWeek. */ - public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new WeeklySchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns WeeklySchedule instance - */ - public static create(properties?: google.cloud.osconfig.v1.IWeeklySchedule): google.cloud.osconfig.v1.WeeklySchedule; + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** - * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. - * @param message WeeklySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** ReservedRange start */ + start?: (number|null); - /** - * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. - * @param message WeeklySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** ReservedRange end */ + end?: (number|null); + } - /** - * Decodes a WeeklySchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeeklySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeeklySchedule; + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** - * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeeklySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeeklySchedule; + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** - * Verifies a WeeklySchedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ReservedRange start. */ + public start: number; - /** - * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeeklySchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeeklySchedule; + /** ReservedRange end. */ + public end: number; - /** - * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. - * @param message WeeklySchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this WeeklySchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a MonthlySchedule. */ - interface IMonthlySchedule { + /** + * 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; - /** MonthlySchedule weekDayOfMonth */ - weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - /** MonthlySchedule monthDay */ - monthDay?: (number|null); - } + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - /** Represents a MonthlySchedule. */ - class MonthlySchedule implements IMonthlySchedule { + /** + * 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); - /** - * Constructs a new MonthlySchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IMonthlySchedule); + /** + * 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; - /** MonthlySchedule weekDayOfMonth. */ - public weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MonthlySchedule monthDay. */ - public monthDay: number; + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** MonthlySchedule dayOfMonth. */ - public dayOfMonth?: ("weekDayOfMonth"|"monthDay"); + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** - * Creates a new MonthlySchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns MonthlySchedule instance - */ - public static create(properties?: google.cloud.osconfig.v1.IMonthlySchedule): google.cloud.osconfig.v1.MonthlySchedule; + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. - * @param message MonthlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { - /** - * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. - * @param message MonthlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** - * Decodes a MonthlySchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.MonthlySchedule; + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.MonthlySchedule; + /** + * 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; - /** - * Verifies a MonthlySchedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonthlySchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.MonthlySchedule; + /** + * 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; - /** - * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. - * @param message MonthlySchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - /** - * Converts this MonthlySchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - /** Properties of a WeekDayOfMonth. */ - interface IWeekDayOfMonth { + /** + * 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); - /** WeekDayOfMonth weekOrdinal */ - weekOrdinal?: (number|null); + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - /** WeekDayOfMonth dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); - } - - /** Represents a WeekDayOfMonth. */ - class WeekDayOfMonth implements IWeekDayOfMonth { + /** + * 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 }; - /** - * Constructs a new WeekDayOfMonth. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth); + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** WeekDayOfMonth weekOrdinal. */ - public weekOrdinal: number; + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** WeekDayOfMonth dayOfWeek. */ - public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + /** FieldDescriptorProto name */ + name?: (string|null); - /** - * Creates a new WeekDayOfMonth instance using the specified properties. - * @param [properties] Properties to set - * @returns WeekDayOfMonth instance - */ - public static create(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth): google.cloud.osconfig.v1.WeekDayOfMonth; + /** FieldDescriptorProto number */ + number?: (number|null); - /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeekDayOfMonth; + /** FieldDescriptorProto typeName */ + typeName?: (string|null); - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeekDayOfMonth; + /** FieldDescriptorProto extendee */ + extendee?: (string|null); - /** - * Verifies a WeekDayOfMonth message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); - /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeekDayOfMonth - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeekDayOfMonth; + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); - /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. - * @param message WeekDayOfMonth - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); - /** - * Converts this WeekDayOfMonth to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); - /** Properties of a CreatePatchDeploymentRequest. */ - interface ICreatePatchDeploymentRequest { + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } - /** CreatePatchDeploymentRequest parent */ - parent?: (string|null); + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { - /** CreatePatchDeploymentRequest patchDeploymentId */ - patchDeploymentId?: (string|null); + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** CreatePatchDeploymentRequest patchDeployment */ - patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); - } + /** FieldDescriptorProto name. */ + public name: string; - /** Represents a CreatePatchDeploymentRequest. */ - class CreatePatchDeploymentRequest implements ICreatePatchDeploymentRequest { + /** FieldDescriptorProto number. */ + public number: number; - /** - * Constructs a new CreatePatchDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest); + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - /** CreatePatchDeploymentRequest parent. */ - public parent: string; + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - /** CreatePatchDeploymentRequest patchDeploymentId. */ - public patchDeploymentId: string; + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** CreatePatchDeploymentRequest patchDeployment. */ - public patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** - * Creates a new CreatePatchDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreatePatchDeploymentRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; - /** - * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. - * @param message CreatePatchDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; - /** - * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. - * @param message CreatePatchDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto jsonName. */ + public jsonName: string; - /** - * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreatePatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); - /** - * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreatePatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; - /** - * Verifies a CreatePatchDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - /** - * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreatePatchDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. - * @param message CreatePatchDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.CreatePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this CreatePatchDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - /** Properties of a GetPatchDeploymentRequest. */ - interface IGetPatchDeploymentRequest { + /** + * 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; - /** GetPatchDeploymentRequest name */ - name?: (string|null); - } + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a GetPatchDeploymentRequest. */ - class GetPatchDeploymentRequest implements IGetPatchDeploymentRequest { + /** + * 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; - /** - * Constructs a new GetPatchDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest); + /** + * 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 }; - /** GetPatchDeploymentRequest name. */ - public name: string; + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new GetPatchDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPatchDeploymentRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + namespace FieldDescriptorProto { - /** - * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. - * @param message GetPatchDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** 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 + } - /** - * Encodes the specified GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. - * @param message GetPatchDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } - /** - * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** - * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + /** OneofDescriptorProto name */ + name?: (string|null); - /** - * Verifies a GetPatchDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } - /** - * Creates a GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPatchDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { - /** - * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. - * @param message GetPatchDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.GetPatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** - * Converts this GetPatchDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** OneofDescriptorProto name. */ + public name: string; - /** Properties of a ListPatchDeploymentsRequest. */ - interface IListPatchDeploymentsRequest { + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); - /** ListPatchDeploymentsRequest parent */ - parent?: (string|null); + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - /** ListPatchDeploymentsRequest pageSize */ - pageSize?: (number|null); + /** + * 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; - /** ListPatchDeploymentsRequest pageToken */ - pageToken?: (string|null); - } + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a ListPatchDeploymentsRequest. */ - class ListPatchDeploymentsRequest implements IListPatchDeploymentsRequest { + /** + * 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; - /** - * Constructs a new ListPatchDeploymentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest); + /** + * 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; - /** ListPatchDeploymentsRequest parent. */ - public parent: string; + /** + * 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); - /** ListPatchDeploymentsRequest pageSize. */ - public pageSize: number; + /** + * 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; - /** ListPatchDeploymentsRequest pageToken. */ - public pageToken: string; + /** + * 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 }; - /** - * Creates a new ListPatchDeploymentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPatchDeploymentsRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. - * @param message ListPatchDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** - * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. - * @param message ListPatchDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumDescriptorProto name */ + name?: (string|null); - /** - * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPatchDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** - * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPatchDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** - * Verifies a ListPatchDeploymentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** - * Creates a ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPatchDeploymentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** - * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListPatchDeploymentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { - /** - * Converts this ListPatchDeploymentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** Properties of a ListPatchDeploymentsResponse. */ - interface IListPatchDeploymentsResponse { + /** EnumDescriptorProto name. */ + public name: string; - /** ListPatchDeploymentsResponse patchDeployments */ - patchDeployments?: (google.cloud.osconfig.v1.IPatchDeployment[]|null); + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; - /** ListPatchDeploymentsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); - /** Represents a ListPatchDeploymentsResponse. */ - class ListPatchDeploymentsResponse implements IListPatchDeploymentsResponse { + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - /** - * Constructs a new ListPatchDeploymentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse); + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; - /** ListPatchDeploymentsResponse patchDeployments. */ - public patchDeployments: google.cloud.osconfig.v1.IPatchDeployment[]; + /** + * 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; - /** ListPatchDeploymentsResponse nextPageToken. */ - public nextPageToken: string; + /** + * 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; - /** - * Creates a new ListPatchDeploymentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPatchDeploymentsResponse instance - */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + /** + * 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; - /** - * Encodes the specified ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. - * @param message ListPatchDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, 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; - /** - * Encodes the specified ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. - * @param message ListPatchDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPatchDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + /** + * 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); - /** - * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPatchDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + /** + * 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; - /** - * Verifies a ListPatchDeploymentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from an 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 }; - /** - * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPatchDeploymentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListPatchDeploymentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace EnumDescriptorProto { - /** - * Converts this ListPatchDeploymentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { - /** Properties of a DeletePatchDeploymentRequest. */ - interface IDeletePatchDeploymentRequest { + /** EnumReservedRange start */ + start?: (number|null); - /** DeletePatchDeploymentRequest name */ - name?: (string|null); - } + /** EnumReservedRange end */ + end?: (number|null); + } - /** Represents a DeletePatchDeploymentRequest. */ - class DeletePatchDeploymentRequest implements IDeletePatchDeploymentRequest { + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { - /** - * Constructs a new DeletePatchDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest); + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - /** DeletePatchDeploymentRequest name. */ - public name: string; + /** EnumReservedRange start. */ + public start: number; - /** - * Creates a new DeletePatchDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePatchDeploymentRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + /** EnumReservedRange end. */ + public end: number; - /** - * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. - * @param message DeletePatchDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. - * @param message DeletePatchDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + /** + * 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 a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + /** + * 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; - /** - * Verifies a DeletePatchDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** - * Creates a DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePatchDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. - * @param message DeletePatchDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.DeletePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this DeletePatchDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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 }; - /** Properties of an ExecutePatchJobRequest. */ - interface IExecutePatchJobRequest { + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** ExecutePatchJobRequest parent */ - parent?: (string|null); + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { - /** ExecutePatchJobRequest description */ - description?: (string|null); + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** ExecutePatchJobRequest instanceFilter */ - instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** EnumValueDescriptorProto number */ + number?: (number|null); - /** ExecutePatchJobRequest patchConfig */ - patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } - /** ExecutePatchJobRequest duration */ - duration?: (google.protobuf.IDuration|null); + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - /** ExecutePatchJobRequest dryRun */ - dryRun?: (boolean|null); + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** ExecutePatchJobRequest displayName */ - displayName?: (string|null); - } + /** EnumValueDescriptorProto name. */ + public name: string; - /** Represents an ExecutePatchJobRequest. */ - class ExecutePatchJobRequest implements IExecutePatchJobRequest { + /** EnumValueDescriptorProto number. */ + public number: number; - /** - * Constructs a new ExecutePatchJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest); + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); - /** ExecutePatchJobRequest parent. */ - public parent: string; + /** + * 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; - /** ExecutePatchJobRequest description. */ - public description: string; + /** + * 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; - /** ExecutePatchJobRequest instanceFilter. */ - public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** + * 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; - /** ExecutePatchJobRequest patchConfig. */ - public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - /** ExecutePatchJobRequest duration. */ - public duration?: (google.protobuf.IDuration|null); + /** + * 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; - /** ExecutePatchJobRequest dryRun. */ - public dryRun: boolean; + /** + * 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); - /** ExecutePatchJobRequest displayName. */ - public displayName: string; + /** + * 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 new ExecutePatchJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecutePatchJobRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest): google.cloud.osconfig.v1.ExecutePatchJobRequest; + /** + * 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 }; - /** - * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. - * @param message ExecutePatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. - * @param message ExecutePatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecutePatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecutePatchJobRequest; + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** - * Decodes an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecutePatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecutePatchJobRequest; + /** ServiceDescriptorProto name */ + name?: (string|null); - /** - * Verifies an ExecutePatchJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** - * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecutePatchJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecutePatchJobRequest; + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } - /** - * Creates a plain object from an ExecutePatchJobRequest message. Also converts values to other types if specified. - * @param message ExecutePatchJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.ExecutePatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { - /** - * Converts this ExecutePatchJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** Properties of a GetPatchJobRequest. */ - interface IGetPatchJobRequest { + /** ServiceDescriptorProto name. */ + public name: string; - /** GetPatchJobRequest name */ - name?: (string|null); - } + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** Represents a GetPatchJobRequest. */ - class GetPatchJobRequest implements IGetPatchJobRequest { + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); - /** - * Constructs a new GetPatchJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest); + /** + * 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; - /** GetPatchJobRequest name. */ - public name: string; + /** + * 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; - /** - * Creates a new GetPatchJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPatchJobRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest): google.cloud.osconfig.v1.GetPatchJobRequest; + /** + * 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; - /** - * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. - * @param message GetPatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IGetPatchJobRequest, 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; - /** - * Encodes the specified GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. - * @param message GetPatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a GetPatchJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchJobRequest; + /** + * 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); - /** - * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchJobRequest; + /** + * 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; - /** - * Verifies a GetPatchJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a 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 }; - /** - * Creates a GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPatchJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchJobRequest; + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. - * @param message GetPatchJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.GetPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** - * Converts this GetPatchJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MethodDescriptorProto name */ + name?: (string|null); - /** Properties of a ListPatchJobInstanceDetailsRequest. */ - interface IListPatchJobInstanceDetailsRequest { + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** ListPatchJobInstanceDetailsRequest parent */ - parent?: (string|null); + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** ListPatchJobInstanceDetailsRequest pageSize */ - pageSize?: (number|null); + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** ListPatchJobInstanceDetailsRequest pageToken */ - pageToken?: (string|null); + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** ListPatchJobInstanceDetailsRequest filter */ - filter?: (string|null); - } + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } - /** Represents a ListPatchJobInstanceDetailsRequest. */ - class ListPatchJobInstanceDetailsRequest implements IListPatchJobInstanceDetailsRequest { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { - /** - * Constructs a new ListPatchJobInstanceDetailsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest); + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** ListPatchJobInstanceDetailsRequest parent. */ - public parent: string; + /** MethodDescriptorProto name. */ + public name: string; - /** ListPatchJobInstanceDetailsRequest pageSize. */ - public pageSize: number; + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** ListPatchJobInstanceDetailsRequest pageToken. */ - public pageToken: string; + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** ListPatchJobInstanceDetailsRequest filter. */ - public filter: string; + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** - * Creates a new ListPatchJobInstanceDetailsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPatchJobInstanceDetailsRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** - * Encodes the specified ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. - * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; - /** - * Encodes the specified ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. - * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPatchJobInstanceDetailsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + /** + * 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; - /** - * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPatchJobInstanceDetailsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + /** + * 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; - /** - * Verifies a ListPatchJobInstanceDetailsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a 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; - /** - * Creates a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPatchJobInstanceDetailsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + /** + * 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; - /** - * Creates a plain object from a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. - * @param message ListPatchJobInstanceDetailsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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); - /** - * Converts this ListPatchJobInstanceDetailsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a ListPatchJobInstanceDetailsResponse. */ - interface IListPatchJobInstanceDetailsResponse { + /** + * 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 }; - /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails */ - patchJobInstanceDetails?: (google.cloud.osconfig.v1.IPatchJobInstanceDetails[]|null); + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ListPatchJobInstanceDetailsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Properties of a FileOptions. */ + interface IFileOptions { - /** Represents a ListPatchJobInstanceDetailsResponse. */ - class ListPatchJobInstanceDetailsResponse implements IListPatchJobInstanceDetailsResponse { + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** - * Constructs a new ListPatchJobInstanceDetailsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse); + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. */ - public patchJobInstanceDetails: google.cloud.osconfig.v1.IPatchJobInstanceDetails[]; + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** ListPatchJobInstanceDetailsResponse nextPageToken. */ - public nextPageToken: string; + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** - * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPatchJobInstanceDetailsResponse instance - */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** - * Encodes the specified ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. - * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - /** - * Encodes the specified ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. - * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions goPackage */ + goPackage?: (string|null); - /** - * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPatchJobInstanceDetailsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); - /** - * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPatchJobInstanceDetailsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); - /** - * Verifies a ListPatchJobInstanceDetailsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); - /** - * Creates a ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPatchJobInstanceDetailsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); - /** - * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. - * @param message ListPatchJobInstanceDetailsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** - * Converts this ListPatchJobInstanceDetailsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - /** Properties of a PatchJobInstanceDetails. */ - interface IPatchJobInstanceDetails { + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** PatchJobInstanceDetails name */ - name?: (string|null); + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** PatchJobInstanceDetails instanceSystemId */ - instanceSystemId?: (string|null); + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** PatchJobInstanceDetails state */ - state?: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState|null); + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** PatchJobInstanceDetails failureReason */ - failureReason?: (string|null); + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); - /** PatchJobInstanceDetails attemptCount */ - attemptCount?: (number|Long|string|null); - } + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); - /** Represents a PatchJobInstanceDetails. */ - class PatchJobInstanceDetails implements IPatchJobInstanceDetails { + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); - /** - * Constructs a new PatchJobInstanceDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails); + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** PatchJobInstanceDetails name. */ - public name: string; + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } - /** PatchJobInstanceDetails instanceSystemId. */ - public instanceSystemId: string; + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { - /** PatchJobInstanceDetails state. */ - public state: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState); + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); - /** PatchJobInstanceDetails failureReason. */ - public failureReason: string; + /** FileOptions javaPackage. */ + public javaPackage: string; - /** PatchJobInstanceDetails attemptCount. */ - public attemptCount: (number|Long|string); + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** - * Creates a new PatchJobInstanceDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchJobInstanceDetails instance - */ - public static create(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails): google.cloud.osconfig.v1.PatchJobInstanceDetails; + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** - * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. - * @param message PatchJobInstanceDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - /** - * Encodes the specified PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. - * @param message PatchJobInstanceDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** - * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchJobInstanceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJobInstanceDetails; + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - /** - * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchJobInstanceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJobInstanceDetails; + /** FileOptions goPackage. */ + public goPackage: string; - /** - * Verifies a PatchJobInstanceDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** - * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchJobInstanceDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJobInstanceDetails; + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** - * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. - * @param message PatchJobInstanceDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchJobInstanceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** - * Converts this PatchJobInstanceDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; - /** Properties of a ListPatchJobsRequest. */ - interface IListPatchJobsRequest { + /** FileOptions deprecated. */ + public deprecated: boolean; - /** ListPatchJobsRequest parent */ - parent?: (string|null); + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** ListPatchJobsRequest pageSize */ - pageSize?: (number|null); + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** ListPatchJobsRequest pageToken */ - pageToken?: (string|null); + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** ListPatchJobsRequest filter */ - filter?: (string|null); - } + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** Represents a ListPatchJobsRequest. */ - class ListPatchJobsRequest implements IListPatchJobsRequest { + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** - * Constructs a new ListPatchJobsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest); + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** ListPatchJobsRequest parent. */ - public parent: string; + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** ListPatchJobsRequest pageSize. */ - public pageSize: number; + /** FileOptions rubyPackage. */ + public rubyPackage: string; - /** ListPatchJobsRequest pageToken. */ - public pageToken: string; + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** ListPatchJobsRequest filter. */ - public filter: string; + /** + * 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; - /** - * Creates a new ListPatchJobsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPatchJobsRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest): google.cloud.osconfig.v1.ListPatchJobsRequest; + /** + * 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 ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. - * @param message ListPatchJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IListPatchJobsRequest, 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; - /** - * Encodes the specified ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. - * @param message ListPatchJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsRequest, 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 ListPatchJobsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPatchJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsRequest; + /** + * 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; - /** - * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPatchJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsRequest; + /** + * 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); - /** - * Verifies a ListPatchJobsRequest message. - * @param message Plain object 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 ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPatchJobsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsRequest; + /** + * 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 }; - /** - * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. - * @param message ListPatchJobsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this ListPatchJobsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + namespace FileOptions { - /** Properties of a ListPatchJobsResponse. */ - interface IListPatchJobsResponse { + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } - /** ListPatchJobsResponse patchJobs */ - patchJobs?: (google.cloud.osconfig.v1.IPatchJob[]|null); + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** ListPatchJobsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** Represents a ListPatchJobsResponse. */ - class ListPatchJobsResponse implements IListPatchJobsResponse { + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** - * Constructs a new ListPatchJobsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse); + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** ListPatchJobsResponse patchJobs. */ - public patchJobs: google.cloud.osconfig.v1.IPatchJob[]; + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** ListPatchJobsResponse nextPageToken. */ - public nextPageToken: string; + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Creates a new ListPatchJobsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPatchJobsResponse instance - */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse): google.cloud.osconfig.v1.ListPatchJobsResponse; + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } - /** - * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. - * @param message ListPatchJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { - /** - * Encodes the specified ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. - * @param message ListPatchJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); - /** - * Decodes a ListPatchJobsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPatchJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsResponse; + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** - * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPatchJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsResponse; + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; - /** - * Verifies a ListPatchJobsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MessageOptions deprecated. */ + public deprecated: boolean; - /** - * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPatchJobsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsResponse; + /** MessageOptions mapEntry. */ + public mapEntry: boolean; - /** - * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. - * @param message ListPatchJobsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Converts this ListPatchJobsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a PatchJob. */ - interface IPatchJob { + /** + * 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; - /** PatchJob name */ - name?: (string|null); + /** + * 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; - /** PatchJob displayName */ - displayName?: (string|null); + /** + * 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; - /** PatchJob description */ - description?: (string|null); + /** + * 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; - /** PatchJob createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * 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); - /** PatchJob updateTime */ - updateTime?: (google.protobuf.ITimestamp|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; - /** PatchJob state */ - state?: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State|null); + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** PatchJob instanceFilter */ - instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** PatchJob patchConfig */ - patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** PatchJob duration */ - duration?: (google.protobuf.IDuration|null); + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** PatchJob instanceDetailsSummary */ - instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); + /** FieldOptions packed */ + packed?: (boolean|null); - /** PatchJob dryRun */ - dryRun?: (boolean|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** PatchJob errorMessage */ - errorMessage?: (string|null); - - /** PatchJob percentComplete */ - percentComplete?: (number|null); + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** PatchJob patchDeployment */ - patchDeployment?: (string|null); - } + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** Represents a PatchJob. */ - class PatchJob implements IPatchJob { + /** FieldOptions weak */ + weak?: (boolean|null); - /** - * Constructs a new PatchJob. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IPatchJob); + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** PatchJob name. */ - public name: string; + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); - /** PatchJob displayName. */ - public displayName: string; + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } - /** PatchJob description. */ - public description: string; + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { - /** PatchJob createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); - /** PatchJob updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - /** PatchJob state. */ - public state: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State); + /** FieldOptions packed. */ + public packed: boolean; - /** PatchJob instanceFilter. */ - public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - /** PatchJob patchConfig. */ - public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** FieldOptions lazy. */ + public lazy: boolean; - /** PatchJob duration. */ - public duration?: (google.protobuf.IDuration|null); + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** PatchJob instanceDetailsSummary. */ - public instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); + /** FieldOptions weak. */ + public weak: boolean; - /** PatchJob dryRun. */ - public dryRun: boolean; + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** PatchJob errorMessage. */ - public errorMessage: string; + /** + * 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; - /** PatchJob percentComplete. */ - public percentComplete: number; + /** + * 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; - /** PatchJob patchDeployment. */ - public patchDeployment: string; + /** + * 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; - /** - * Creates a new PatchJob instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchJob instance - */ - public static create(properties?: google.cloud.osconfig.v1.IPatchJob): google.cloud.osconfig.v1.PatchJob; + /** + * 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; - /** - * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. - * @param message PatchJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. - * @param message PatchJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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); - /** - * Decodes a PatchJob message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob; + /** + * 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; - /** - * Decodes a PatchJob message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob; + /** + * 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 }; - /** - * Verifies a PatchJob message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchJob - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob; + namespace FieldOptions { - /** - * Creates a plain object from a PatchJob message. Also converts values to other types if specified. - * @param message PatchJob - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } - /** - * Converts this PatchJob to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } - namespace PatchJob { + /** Properties of an OneofOptions. */ + interface IOneofOptions { - /** Properties of an InstanceDetailsSummary. */ - interface IInstanceDetailsSummary { + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** InstanceDetailsSummary pendingInstanceCount */ - pendingInstanceCount?: (number|Long|string|null); + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { - /** InstanceDetailsSummary inactiveInstanceCount */ - inactiveInstanceCount?: (number|Long|string|null); + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); - /** InstanceDetailsSummary notifiedInstanceCount */ - notifiedInstanceCount?: (number|Long|string|null); + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** InstanceDetailsSummary startedInstanceCount */ - startedInstanceCount?: (number|Long|string|null); + /** + * 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; - /** InstanceDetailsSummary downloadingPatchesInstanceCount */ - downloadingPatchesInstanceCount?: (number|Long|string|null); + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** InstanceDetailsSummary applyingPatchesInstanceCount */ - applyingPatchesInstanceCount?: (number|Long|string|null); - - /** InstanceDetailsSummary rebootingInstanceCount */ - rebootingInstanceCount?: (number|Long|string|null); + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** InstanceDetailsSummary succeededInstanceCount */ - succeededInstanceCount?: (number|Long|string|null); + /** + * 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; - /** InstanceDetailsSummary succeededRebootRequiredInstanceCount */ - succeededRebootRequiredInstanceCount?: (number|Long|string|null); + /** + * 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; - /** InstanceDetailsSummary failedInstanceCount */ - failedInstanceCount?: (number|Long|string|null); + /** + * 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); - /** InstanceDetailsSummary ackedInstanceCount */ - ackedInstanceCount?: (number|Long|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; - /** InstanceDetailsSummary timedOutInstanceCount */ - timedOutInstanceCount?: (number|Long|string|null); + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** InstanceDetailsSummary prePatchStepInstanceCount */ - prePatchStepInstanceCount?: (number|Long|string|null); + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** InstanceDetailsSummary postPatchStepInstanceCount */ - postPatchStepInstanceCount?: (number|Long|string|null); + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** InstanceDetailsSummary noAgentDetectedInstanceCount */ - noAgentDetectedInstanceCount?: (number|Long|string|null); - } + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** Represents an InstanceDetailsSummary. */ - class InstanceDetailsSummary implements IInstanceDetailsSummary { + /** EnumOptions deprecated */ + deprecated?: (boolean|null); - /** - * Constructs a new InstanceDetailsSummary. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary); + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** InstanceDetailsSummary pendingInstanceCount. */ - public pendingInstanceCount: (number|Long|string); + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { - /** InstanceDetailsSummary inactiveInstanceCount. */ - public inactiveInstanceCount: (number|Long|string); + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); - /** InstanceDetailsSummary notifiedInstanceCount. */ - public notifiedInstanceCount: (number|Long|string); + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** InstanceDetailsSummary startedInstanceCount. */ - public startedInstanceCount: (number|Long|string); + /** EnumOptions deprecated. */ + public deprecated: boolean; - /** InstanceDetailsSummary downloadingPatchesInstanceCount. */ - public downloadingPatchesInstanceCount: (number|Long|string); + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** InstanceDetailsSummary applyingPatchesInstanceCount. */ - public applyingPatchesInstanceCount: (number|Long|string); + /** + * 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; - /** InstanceDetailsSummary rebootingInstanceCount. */ - public rebootingInstanceCount: (number|Long|string); + /** + * 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; - /** InstanceDetailsSummary succeededInstanceCount. */ - public succeededInstanceCount: (number|Long|string); + /** + * 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; - /** InstanceDetailsSummary succeededRebootRequiredInstanceCount. */ - public succeededRebootRequiredInstanceCount: (number|Long|string); + /** + * 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; - /** InstanceDetailsSummary failedInstanceCount. */ - public failedInstanceCount: (number|Long|string); + /** + * 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; - /** InstanceDetailsSummary ackedInstanceCount. */ - public ackedInstanceCount: (number|Long|string); + /** + * 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); - /** InstanceDetailsSummary timedOutInstanceCount. */ - public timedOutInstanceCount: (number|Long|string); + /** + * 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; - /** InstanceDetailsSummary prePatchStepInstanceCount. */ - public prePatchStepInstanceCount: (number|Long|string); + /** + * 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 }; - /** InstanceDetailsSummary postPatchStepInstanceCount. */ - public postPatchStepInstanceCount: (number|Long|string); + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** InstanceDetailsSummary noAgentDetectedInstanceCount. */ - public noAgentDetectedInstanceCount: (number|Long|string); + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** - * Creates a new InstanceDetailsSummary instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceDetailsSummary instance - */ - public static create(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); - /** - * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. - * @param message InstanceDetailsSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. - * @param message InstanceDetailsSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { - /** - * Decodes an InstanceDetailsSummary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceDetailsSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); - /** - * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceDetailsSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** - * Verifies an InstanceDetailsSummary message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceDetailsSummary - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + /** + * 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; - /** - * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. - * @param message InstanceDetailsSummary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this InstanceDetailsSummary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - STARTED = 1, - INSTANCE_LOOKUP = 2, - PATCHING = 3, - SUCCEEDED = 4, - COMPLETED_WITH_ERRORS = 5, - CANCELED = 6, - TIMED_OUT = 7 - } - } + /** + * 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; - /** Properties of a PatchConfig. */ - interface IPatchConfig { + /** + * 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; - /** PatchConfig rebootConfig */ - rebootConfig?: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig|null); + /** + * 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); - /** PatchConfig apt */ - apt?: (google.cloud.osconfig.v1.IAptSettings|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; - /** PatchConfig yum */ - yum?: (google.cloud.osconfig.v1.IYumSettings|null); + /** + * 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 }; - /** PatchConfig goo */ - goo?: (google.cloud.osconfig.v1.IGooSettings|null); + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** PatchConfig zypper */ - zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** PatchConfig windowsUpdate */ - windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** PatchConfig preStep */ - preStep?: (google.cloud.osconfig.v1.IExecStep|null); + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** PatchConfig postStep */ - postStep?: (google.cloud.osconfig.v1.IExecStep|null); - } + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); - /** Represents a PatchConfig. */ - class PatchConfig implements IPatchConfig { + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } - /** - * Constructs a new PatchConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IPatchConfig); + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { - /** PatchConfig rebootConfig. */ - public rebootConfig: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig); + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); - /** PatchConfig apt. */ - public apt?: (google.cloud.osconfig.v1.IAptSettings|null); + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** PatchConfig yum. */ - public yum?: (google.cloud.osconfig.v1.IYumSettings|null); + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** PatchConfig goo. */ - public goo?: (google.cloud.osconfig.v1.IGooSettings|null); + /** + * 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; - /** PatchConfig zypper. */ - public zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); + /** + * 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; - /** PatchConfig windowsUpdate. */ - public windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** PatchConfig preStep. */ - public preStep?: (google.cloud.osconfig.v1.IExecStep|null); + /** + * 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; - /** PatchConfig postStep. */ - public postStep?: (google.cloud.osconfig.v1.IExecStep|null); + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - /** - * Creates a new PatchConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchConfig instance - */ - public static create(properties?: google.cloud.osconfig.v1.IPatchConfig): google.cloud.osconfig.v1.PatchConfig; + /** + * 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); - /** - * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. - * @param message PatchConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - /** - * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. - * @param message PatchConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a PatchConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchConfig; + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a PatchConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchConfig; + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** - * Verifies a PatchConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** - * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchConfig; + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - /** - * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. - * @param message PatchConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Converts this PatchConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); - namespace PatchConfig { + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } - /** RebootConfig enum. */ - enum RebootConfig { - REBOOT_CONFIG_UNSPECIFIED = 0, - DEFAULT = 1, - ALWAYS = 2, - NEVER = 3 - } - } + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { - /** Properties of an Instance. */ - interface IInstance { - } + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); - /** Represents an Instance. */ - class Instance implements IInstance { + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** - * Constructs a new Instance. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IInstance); + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - /** - * Creates a new Instance instance using the specified properties. - * @param [properties] Properties to set - * @returns Instance instance - */ - public static create(properties?: google.cloud.osconfig.v1.IInstance): google.cloud.osconfig.v1.Instance; + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. - * @param message Instance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. - * @param message Instance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes an Instance message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Instance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Instance; + /** + * 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 an Instance message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Instance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Instance; + /** + * 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; - /** - * Verifies an Instance message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * 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; - /** - * Creates an Instance message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Instance - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Instance; + /** + * 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 plain object from an Instance message. Also converts values to other types if specified. - * @param message Instance - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Instance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this Instance to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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 }; - namespace Instance { + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** PatchState enum. */ - enum PatchState { - PATCH_STATE_UNSPECIFIED = 0, - PENDING = 1, - INACTIVE = 2, - NOTIFIED = 3, - STARTED = 4, - DOWNLOADING_PATCHES = 5, - APPLYING_PATCHES = 6, - REBOOTING = 7, - SUCCEEDED = 8, - SUCCEEDED_REBOOT_REQUIRED = 9, - FAILED = 10, - ACKED = 11, - TIMED_OUT = 12, - RUNNING_PRE_PATCH_STEP = 13, - RUNNING_POST_PATCH_STEP = 14, - NO_AGENT_DETECTED = 15 - } - } + namespace MethodOptions { - /** Properties of a CancelPatchJobRequest. */ - interface ICancelPatchJobRequest { + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } - /** CancelPatchJobRequest name */ - name?: (string|null); - } + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** Represents a CancelPatchJobRequest. */ - class CancelPatchJobRequest implements ICancelPatchJobRequest { + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - /** - * Constructs a new CancelPatchJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest); + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); - /** CancelPatchJobRequest name. */ - public name: string; + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); - /** - * Creates a new CancelPatchJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelPatchJobRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest): google.cloud.osconfig.v1.CancelPatchJobRequest; + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); - /** - * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. - * @param message CancelPatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. - * @param message CancelPatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); - /** - * Decodes a CancelPatchJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CancelPatchJobRequest; + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); - /** - * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CancelPatchJobRequest; + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } - /** - * Verifies a CancelPatchJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { - /** - * Creates a CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelPatchJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CancelPatchJobRequest; + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); - /** - * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. - * @param message CancelPatchJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.CancelPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; - /** - * Converts this CancelPatchJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** UninterpretedOption identifierValue. */ + public identifierValue: string; - /** Properties of an AptSettings. */ - interface IAptSettings { + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); - /** AptSettings type */ - type?: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type|null); + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); - /** AptSettings excludes */ - excludes?: (string[]|null); + /** UninterpretedOption doubleValue. */ + public doubleValue: number; - /** AptSettings exclusivePackages */ - exclusivePackages?: (string[]|null); - } + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); - /** Represents an AptSettings. */ - class AptSettings implements IAptSettings { + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; - /** - * Constructs a new AptSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IAptSettings); + /** + * 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; - /** AptSettings type. */ - public type: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type); + /** + * 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; - /** AptSettings excludes. */ - public excludes: string[]; + /** + * 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; - /** AptSettings exclusivePackages. */ - public exclusivePackages: string[]; + /** + * 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; - /** - * Creates a new AptSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns AptSettings instance - */ - public static create(properties?: google.cloud.osconfig.v1.IAptSettings): google.cloud.osconfig.v1.AptSettings; + /** + * 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; - /** - * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. - * @param message AptSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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); - /** - * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. - * @param message AptSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes an AptSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AptSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.AptSettings; + /** + * 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 }; - /** - * Decodes an AptSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AptSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.AptSettings; + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies an AptSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + namespace UninterpretedOption { - /** - * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AptSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.AptSettings; + /** Properties of a NamePart. */ + interface INamePart { - /** - * Creates a plain object from an AptSettings message. Also converts values to other types if specified. - * @param message AptSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.AptSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** NamePart namePart */ + namePart: string; - /** - * Converts this AptSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** NamePart isExtension */ + isExtension: boolean; + } - namespace AptSettings { + /** Represents a NamePart. */ + class NamePart implements INamePart { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - DIST = 1, - UPGRADE = 2 - } - } + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - /** Properties of a YumSettings. */ - interface IYumSettings { + /** NamePart namePart. */ + public namePart: string; - /** YumSettings security */ - security?: (boolean|null); + /** NamePart isExtension. */ + public isExtension: boolean; - /** YumSettings minimal */ - minimal?: (boolean|null); + /** + * 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; - /** YumSettings excludes */ - excludes?: (string[]|null); + /** + * 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; - /** YumSettings exclusivePackages */ - exclusivePackages?: (string[]|null); - } + /** + * 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; - /** Represents a YumSettings. */ - class YumSettings implements IYumSettings { + /** + * 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; - /** - * Constructs a new YumSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IYumSettings); + /** + * 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; - /** YumSettings security. */ - public security: boolean; + /** + * 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); - /** YumSettings minimal. */ - public minimal: boolean; + /** + * 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; - /** YumSettings excludes. */ - public excludes: string[]; + /** + * 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 }; - /** YumSettings exclusivePackages. */ - public exclusivePackages: string[]; + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Creates a new YumSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns YumSettings instance - */ - public static create(properties?: google.cloud.osconfig.v1.IYumSettings): google.cloud.osconfig.v1.YumSettings; + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { - /** - * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. - * @param message YumSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } - /** - * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. - * @param message YumSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { - /** - * Decodes a YumSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns YumSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.YumSettings; + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** - * Decodes a YumSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns YumSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.YumSettings; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; - /** - * Verifies a YumSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - /** - * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns YumSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.YumSettings; + /** + * 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; - /** - * Creates a plain object from a YumSettings message. Also converts values to other types if specified. - * @param message YumSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.YumSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this YumSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a GooSettings. */ - interface IGooSettings { - } + /** + * 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; - /** Represents a GooSettings. */ - class GooSettings implements IGooSettings { + /** + * 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); - /** - * Constructs a new GooSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IGooSettings); + /** + * 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 new GooSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GooSettings instance - */ - public static create(properties?: google.cloud.osconfig.v1.IGooSettings): google.cloud.osconfig.v1.GooSettings; + /** + * 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 }; - /** - * Encodes the specified GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. - * @param message GooSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IGooSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. - * @param message GooSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IGooSettings, writer?: $protobuf.Writer): $protobuf.Writer; + namespace SourceCodeInfo { - /** - * Decodes a GooSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GooSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GooSettings; - - /** - * Decodes a GooSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GooSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GooSettings; + /** Properties of a Location. */ + interface ILocation { - /** - * Verifies a GooSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Location path */ + path?: (number[]|null); - /** - * Creates a GooSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GooSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GooSettings; + /** Location span */ + span?: (number[]|null); - /** - * Creates a plain object from a GooSettings message. Also converts values to other types if specified. - * @param message GooSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.GooSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Location leadingComments */ + leadingComments?: (string|null); - /** - * Converts this GooSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Location trailingComments */ + trailingComments?: (string|null); - /** Properties of a ZypperSettings. */ - interface IZypperSettings { + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } - /** ZypperSettings withOptional */ - withOptional?: (boolean|null); + /** Represents a Location. */ + class Location implements ILocation { - /** ZypperSettings withUpdate */ - withUpdate?: (boolean|null); + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** ZypperSettings categories */ - categories?: (string[]|null); + /** Location path. */ + public path: number[]; - /** ZypperSettings severities */ - severities?: (string[]|null); + /** Location span. */ + public span: number[]; - /** ZypperSettings excludes */ - excludes?: (string[]|null); + /** Location leadingComments. */ + public leadingComments: string; - /** ZypperSettings exclusivePatches */ - exclusivePatches?: (string[]|null); - } + /** Location trailingComments. */ + public trailingComments: string; - /** Represents a ZypperSettings. */ - class ZypperSettings implements IZypperSettings { + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; - /** - * Constructs a new ZypperSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IZypperSettings); + /** + * 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; - /** ZypperSettings withOptional. */ - public withOptional: boolean; + /** + * 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; - /** ZypperSettings withUpdate. */ - public withUpdate: boolean; + /** + * 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; - /** ZypperSettings categories. */ - public categories: string[]; + /** + * 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; - /** ZypperSettings severities. */ - public severities: string[]; + /** + * 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; - /** ZypperSettings excludes. */ - public excludes: string[]; + /** + * 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); - /** ZypperSettings exclusivePatches. */ - public exclusivePatches: string[]; + /** + * 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 new ZypperSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ZypperSettings instance - */ - public static create(properties?: google.cloud.osconfig.v1.IZypperSettings): google.cloud.osconfig.v1.ZypperSettings; + /** + * 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 }; - /** - * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. - * @param message ZypperSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. - * @param message ZypperSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { - /** - * Decodes a ZypperSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ZypperSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ZypperSettings; + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } - /** - * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ZypperSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ZypperSettings; + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { - /** - * Verifies a ZypperSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** - * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ZypperSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ZypperSettings; + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - /** - * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. - * @param message ZypperSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.ZypperSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this ZypperSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a WindowsUpdateSettings. */ - interface IWindowsUpdateSettings { - - /** WindowsUpdateSettings classifications */ - classifications?: (google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]|null); + /** + * 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; - /** WindowsUpdateSettings excludes */ - excludes?: (string[]|null); + /** + * 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; - /** WindowsUpdateSettings exclusivePatches */ - exclusivePatches?: (string[]|null); - } + /** + * 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; - /** Represents a WindowsUpdateSettings. */ - class WindowsUpdateSettings implements IWindowsUpdateSettings { + /** + * 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); - /** - * Constructs a new WindowsUpdateSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings); + /** + * 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; - /** WindowsUpdateSettings classifications. */ - public classifications: google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]; + /** + * 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 }; - /** WindowsUpdateSettings excludes. */ - public excludes: string[]; + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** WindowsUpdateSettings exclusivePatches. */ - public exclusivePatches: string[]; + namespace GeneratedCodeInfo { - /** - * Creates a new WindowsUpdateSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsUpdateSettings instance - */ - public static create(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings): google.cloud.osconfig.v1.WindowsUpdateSettings; + /** Properties of an Annotation. */ + interface IAnnotation { - /** - * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. - * @param message WindowsUpdateSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** Annotation path */ + path?: (number[]|null); - /** - * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. - * @param message WindowsUpdateSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** - * Decodes a WindowsUpdateSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsUpdateSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WindowsUpdateSettings; + /** Annotation begin */ + begin?: (number|null); - /** - * Decodes a WindowsUpdateSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsUpdateSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WindowsUpdateSettings; + /** Annotation end */ + end?: (number|null); + } - /** - * Verifies a WindowsUpdateSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents an Annotation. */ + class Annotation implements IAnnotation { - /** - * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsUpdateSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WindowsUpdateSettings; + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** - * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. - * @param message WindowsUpdateSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.WindowsUpdateSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Annotation path. */ + public path: number[]; - /** - * Converts this WindowsUpdateSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Annotation sourceFile. */ + public sourceFile: string; - namespace WindowsUpdateSettings { + /** Annotation begin. */ + public begin: number; - /** Classification enum. */ - enum Classification { - CLASSIFICATION_UNSPECIFIED = 0, - CRITICAL = 1, - SECURITY = 2, - DEFINITION = 3, - DRIVER = 4, - FEATURE_PACK = 5, - SERVICE_PACK = 6, - TOOL = 7, - UPDATE_ROLLUP = 8, - UPDATE = 9 - } - } + /** Annotation end. */ + public end: number; - /** Properties of an ExecStep. */ - interface IExecStep { + /** + * 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; - /** ExecStep linuxExecStepConfig */ - linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + /** + * 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; - /** ExecStep windowsExecStepConfig */ - windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); - } + /** + * 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; - /** Represents an ExecStep. */ - class ExecStep implements IExecStep { + /** + * 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; - /** - * Constructs a new ExecStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IExecStep); + /** + * 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; - /** ExecStep linuxExecStepConfig. */ - public linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + /** + * 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); - /** ExecStep windowsExecStepConfig. */ - public windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|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 new ExecStep instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecStep instance - */ - public static create(properties?: google.cloud.osconfig.v1.IExecStep): google.cloud.osconfig.v1.ExecStep; + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of 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 }; + } + } + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace osconfig. */ + namespace osconfig { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of an Inventory. */ + interface IInventory { + + /** Inventory osInfo */ + osInfo?: (google.cloud.osconfig.v1.Inventory.IOsInfo|null); + + /** Inventory items */ + items?: ({ [k: string]: google.cloud.osconfig.v1.Inventory.IItem }|null); + } + + /** Represents an Inventory. */ + class Inventory implements IInventory { /** - * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. - * @param message ExecStep message or plain object to encode + * Constructs a new Inventory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IInventory); + + /** Inventory osInfo. */ + public osInfo?: (google.cloud.osconfig.v1.Inventory.IOsInfo|null); + + /** Inventory items. */ + public items: { [k: string]: google.cloud.osconfig.v1.Inventory.IItem }; + + /** + * Creates a new Inventory instance using the specified properties. + * @param [properties] Properties to set + * @returns Inventory instance + */ + public static create(properties?: google.cloud.osconfig.v1.IInventory): google.cloud.osconfig.v1.Inventory; + + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. - * @param message ExecStep message or plain object to encode + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecStep message from the specified reader or buffer. + * Decodes an Inventory message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecStep + * @returns Inventory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStep; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory; /** - * Decodes an ExecStep message from the specified reader or buffer, length delimited. + * Decodes an Inventory message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecStep + * @returns Inventory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStep; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory; /** - * Verifies an ExecStep message. + * Verifies an Inventory message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecStep + * @returns Inventory */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStep; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory; /** - * Creates a plain object from an ExecStep message. Also converts values to other types if specified. - * @param message ExecStep + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @param message Inventory * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ExecStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.Inventory, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecStep to JSON. + * Converts this Inventory to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecStepConfig. */ - interface IExecStepConfig { + namespace Inventory { - /** ExecStepConfig localPath */ - localPath?: (string|null); + /** Properties of an OsInfo. */ + interface IOsInfo { - /** ExecStepConfig gcsObject */ - gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); + /** OsInfo hostname */ + hostname?: (string|null); - /** ExecStepConfig allowedSuccessCodes */ - allowedSuccessCodes?: (number[]|null); + /** OsInfo longName */ + longName?: (string|null); - /** ExecStepConfig interpreter */ - interpreter?: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null); - } + /** OsInfo shortName */ + shortName?: (string|null); - /** Represents an ExecStepConfig. */ - class ExecStepConfig implements IExecStepConfig { + /** OsInfo version */ + version?: (string|null); - /** - * Constructs a new ExecStepConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IExecStepConfig); + /** OsInfo architecture */ + architecture?: (string|null); - /** ExecStepConfig localPath. */ - public localPath: string; + /** OsInfo kernelVersion */ + kernelVersion?: (string|null); - /** ExecStepConfig gcsObject. */ - public gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); + /** OsInfo kernelRelease */ + kernelRelease?: (string|null); - /** ExecStepConfig allowedSuccessCodes. */ - public allowedSuccessCodes: number[]; + /** OsInfo osconfigAgentVersion */ + osconfigAgentVersion?: (string|null); + } - /** ExecStepConfig interpreter. */ - public interpreter: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter); + /** Represents an OsInfo. */ + class OsInfo implements IOsInfo { - /** ExecStepConfig executable. */ - public executable?: ("localPath"|"gcsObject"); + /** + * Constructs a new OsInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IOsInfo); - /** - * Creates a new ExecStepConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecStepConfig instance - */ - public static create(properties?: google.cloud.osconfig.v1.IExecStepConfig): google.cloud.osconfig.v1.ExecStepConfig; + /** OsInfo hostname. */ + public hostname: string; - /** - * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. - * @param message ExecStepConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** OsInfo longName. */ + public longName: string; - /** - * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. - * @param message ExecStepConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** OsInfo shortName. */ + public shortName: string; - /** - * Decodes an ExecStepConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecStepConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStepConfig; + /** OsInfo version. */ + public version: string; - /** - * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecStepConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStepConfig; + /** OsInfo architecture. */ + public architecture: string; - /** - * Verifies an ExecStepConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** OsInfo kernelVersion. */ + public kernelVersion: string; - /** - * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecStepConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStepConfig; + /** OsInfo kernelRelease. */ + public kernelRelease: string; - /** - * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. - * @param message ExecStepConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.ExecStepConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** OsInfo osconfigAgentVersion. */ + public osconfigAgentVersion: string; - /** - * Converts this ExecStepConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new OsInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OsInfo instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IOsInfo): google.cloud.osconfig.v1.Inventory.OsInfo; - namespace ExecStepConfig { + /** + * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. + * @param message OsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** Interpreter enum. */ - enum Interpreter { - INTERPRETER_UNSPECIFIED = 0, - SHELL = 1, - POWERSHELL = 2 - } - } + /** + * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. + * @param message OsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a GcsObject. */ - interface IGcsObject { + /** + * Decodes an OsInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.OsInfo; - /** GcsObject bucket */ - bucket?: (string|null); + /** + * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.OsInfo; - /** GcsObject object */ - object?: (string|null); + /** + * Verifies an OsInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** GcsObject generationNumber */ - generationNumber?: (number|Long|string|null); - } + /** + * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OsInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.OsInfo; - /** Represents a GcsObject. */ - class GcsObject implements IGcsObject { + /** + * Creates a plain object from an OsInfo message. Also converts values to other types if specified. + * @param message OsInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.OsInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new GcsObject. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IGcsObject); + /** + * Converts this OsInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** GcsObject bucket. */ - public bucket: string; + /** Properties of an Item. */ + interface IItem { - /** GcsObject object. */ - public object: string; + /** Item id */ + id?: (string|null); - /** GcsObject generationNumber. */ - public generationNumber: (number|Long|string); + /** Item originType */ + originType?: (google.cloud.osconfig.v1.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1.Inventory.Item.OriginType|null); - /** - * Creates a new GcsObject instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsObject instance - */ - public static create(properties?: google.cloud.osconfig.v1.IGcsObject): google.cloud.osconfig.v1.GcsObject; + /** Item createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. - * @param message GcsObject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IGcsObject, writer?: $protobuf.Writer): $protobuf.Writer; + /** Item updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. - * @param message GcsObject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IGcsObject, writer?: $protobuf.Writer): $protobuf.Writer; + /** Item type */ + type?: (google.cloud.osconfig.v1.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1.Inventory.Item.Type|null); - /** - * Decodes a GcsObject message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GcsObject; + /** Item installedPackage */ + installedPackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); - /** - * Decodes a GcsObject message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GcsObject; + /** Item availablePackage */ + availablePackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); + } - /** - * Verifies a GcsObject message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents an Item. */ + class Item implements IItem { - /** - * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsObject - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GcsObject; + /** + * Constructs a new Item. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IItem); - /** - * Creates a plain object from a GcsObject message. Also converts values to other types if specified. - * @param message GcsObject - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.GcsObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Item id. */ + public id: string; - /** - * Converts this GcsObject to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Item originType. */ + public originType: (google.cloud.osconfig.v1.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1.Inventory.Item.OriginType); - /** Properties of a PatchInstanceFilter. */ - interface IPatchInstanceFilter { + /** Item createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** PatchInstanceFilter all */ - all?: (boolean|null); + /** Item updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** PatchInstanceFilter groupLabels */ - groupLabels?: (google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]|null); + /** Item type. */ + public type: (google.cloud.osconfig.v1.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1.Inventory.Item.Type); - /** PatchInstanceFilter zones */ - zones?: (string[]|null); + /** Item installedPackage. */ + public installedPackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); - /** PatchInstanceFilter instances */ - instances?: (string[]|null); + /** Item availablePackage. */ + public availablePackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); - /** PatchInstanceFilter instanceNamePrefixes */ - instanceNamePrefixes?: (string[]|null); - } + /** Item details. */ + public details?: ("installedPackage"|"availablePackage"); - /** Represents a PatchInstanceFilter. */ - class PatchInstanceFilter implements IPatchInstanceFilter { + /** + * Creates a new Item instance using the specified properties. + * @param [properties] Properties to set + * @returns Item instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IItem): google.cloud.osconfig.v1.Inventory.Item; - /** - * Constructs a new PatchInstanceFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter); + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; - /** PatchInstanceFilter all. */ - public all: boolean; + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; - /** PatchInstanceFilter groupLabels. */ - public groupLabels: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]; + /** + * Decodes an Item message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.Item; - /** PatchInstanceFilter zones. */ - public zones: string[]; + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.Item; - /** PatchInstanceFilter instances. */ - public instances: string[]; + /** + * Verifies an Item message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** PatchInstanceFilter instanceNamePrefixes. */ - public instanceNamePrefixes: string[]; + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Item + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.Item; - /** - * Creates a new PatchInstanceFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchInstanceFilter instance - */ - public static create(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter): google.cloud.osconfig.v1.PatchInstanceFilter; + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @param message Item + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. - * @param message PatchInstanceFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Item to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. - * @param message PatchInstanceFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + namespace Item { - /** - * Decodes a PatchInstanceFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchInstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchInstanceFilter; + /** OriginType enum. */ + enum OriginType { + ORIGIN_TYPE_UNSPECIFIED = 0, + INVENTORY_REPORT = 1 + } - /** - * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchInstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchInstanceFilter; + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + INSTALLED_PACKAGE = 1, + AVAILABLE_PACKAGE = 2 + } + } - /** - * Verifies a PatchInstanceFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a SoftwarePackage. */ + interface ISoftwarePackage { - /** - * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchInstanceFilter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter; + /** SoftwarePackage yumPackage */ + yumPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** - * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. - * @param message PatchInstanceFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchInstanceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** SoftwarePackage aptPackage */ + aptPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** - * Converts this PatchInstanceFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** SoftwarePackage zypperPackage */ + zypperPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - namespace PatchInstanceFilter { + /** SoftwarePackage googetPackage */ + googetPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** Properties of a GroupLabel. */ - interface IGroupLabel { + /** SoftwarePackage zypperPatch */ + zypperPatch?: (google.cloud.osconfig.v1.Inventory.IZypperPatch|null); - /** GroupLabel labels */ - labels?: ({ [k: string]: string }|null); + /** SoftwarePackage wuaPackage */ + wuaPackage?: (google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null); + + /** SoftwarePackage qfePackage */ + qfePackage?: (google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null); + + /** SoftwarePackage cosPackage */ + cosPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); } - /** Represents a GroupLabel. */ - class GroupLabel implements IGroupLabel { + /** Represents a SoftwarePackage. */ + class SoftwarePackage implements ISoftwarePackage { /** - * Constructs a new GroupLabel. + * Constructs a new SoftwarePackage. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel); + constructor(properties?: google.cloud.osconfig.v1.Inventory.ISoftwarePackage); - /** GroupLabel labels. */ - public labels: { [k: string]: string }; + /** SoftwarePackage yumPackage. */ + public yumPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + + /** SoftwarePackage aptPackage. */ + public aptPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + + /** SoftwarePackage zypperPackage. */ + public zypperPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + + /** SoftwarePackage googetPackage. */ + public googetPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + + /** SoftwarePackage zypperPatch. */ + public zypperPatch?: (google.cloud.osconfig.v1.Inventory.IZypperPatch|null); + + /** SoftwarePackage wuaPackage. */ + public wuaPackage?: (google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null); + + /** SoftwarePackage qfePackage. */ + public qfePackage?: (google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null); + + /** SoftwarePackage cosPackage. */ + public cosPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + + /** SoftwarePackage details. */ + public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"); /** - * Creates a new GroupLabel instance using the specified properties. + * Creates a new SoftwarePackage instance using the specified properties. * @param [properties] Properties to set - * @returns GroupLabel instance + * @returns SoftwarePackage instance */ - public static create(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + public static create(properties?: google.cloud.osconfig.v1.Inventory.ISoftwarePackage): google.cloud.osconfig.v1.Inventory.SoftwarePackage; /** - * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. - * @param message GroupLabel message or plain object to encode + * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. + * @param message SoftwarePackage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. - * @param message GroupLabel message or plain object to encode + * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. + * @param message SoftwarePackage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GroupLabel message from the specified reader or buffer. + * Decodes a SoftwarePackage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GroupLabel + * @returns SoftwarePackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.SoftwarePackage; /** - * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GroupLabel + * @returns SoftwarePackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.SoftwarePackage; /** - * Verifies a GroupLabel message. + * Verifies a SoftwarePackage message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GroupLabel message from a plain object. Also converts values to their respective internal types. + * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GroupLabel + * @returns SoftwarePackage */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.SoftwarePackage; /** - * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. - * @param message GroupLabel + * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. + * @param message SoftwarePackage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.Inventory.SoftwarePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GroupLabel to JSON. + * Converts this SoftwarePackage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** Properties of a VersionedPackage. */ + interface IVersionedPackage { - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } + /** VersionedPackage packageName */ + packageName?: (string|null); - /** Represents a Http. */ - class Http implements IHttp { + /** VersionedPackage architecture */ + architecture?: (string|null); - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); + /** VersionedPackage version */ + version?: (string|null); + } - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** Represents a VersionedPackage. */ + class VersionedPackage implements IVersionedPackage { - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** + * Constructs a new VersionedPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IVersionedPackage); - /** - * 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; + /** VersionedPackage packageName. */ + public packageName: string; - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + /** VersionedPackage architecture. */ + public architecture: string; - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + /** VersionedPackage version. */ + public version: string; - /** - * 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; + /** + * Creates a new VersionedPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionedPackage instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IVersionedPackage): google.cloud.osconfig.v1.Inventory.VersionedPackage; - /** - * 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; + /** + * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. + * @param message VersionedPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. + * @param message VersionedPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a VersionedPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.VersionedPackage; - /** - * 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 }; + /** + * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.VersionedPackage; - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a VersionedPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a HttpRule. */ - interface IHttpRule { + /** + * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionedPackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.VersionedPackage; - /** HttpRule selector */ - selector?: (string|null); + /** + * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. + * @param message VersionedPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.VersionedPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); + /** + * Converts this VersionedPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** HttpRule post */ - post?: (string|null); + /** Properties of a WindowsUpdatePackage. */ + interface IWindowsUpdatePackage { - /** HttpRule delete */ - "delete"?: (string|null); + /** WindowsUpdatePackage title */ + title?: (string|null); - /** HttpRule patch */ - patch?: (string|null); + /** WindowsUpdatePackage description */ + description?: (string|null); - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** WindowsUpdatePackage categories */ + categories?: (google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]|null); - /** HttpRule body */ - body?: (string|null); + /** WindowsUpdatePackage kbArticleIds */ + kbArticleIds?: (string[]|null); - /** HttpRule responseBody */ - responseBody?: (string|null); + /** WindowsUpdatePackage supportUrl */ + supportUrl?: (string|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } + /** WindowsUpdatePackage moreInfoUrls */ + moreInfoUrls?: (string[]|null); - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** WindowsUpdatePackage updateId */ + updateId?: (string|null); - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); + /** WindowsUpdatePackage revisionNumber */ + revisionNumber?: (number|null); - /** HttpRule selector. */ - public selector: string; + /** WindowsUpdatePackage lastDeploymentChangeTime */ + lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); + } - /** HttpRule get. */ - public get: string; + /** Represents a WindowsUpdatePackage. */ + class WindowsUpdatePackage implements IWindowsUpdatePackage { - /** HttpRule put. */ - public put: string; + /** + * Constructs a new WindowsUpdatePackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage); - /** HttpRule post. */ - public post: string; + /** WindowsUpdatePackage title. */ + public title: string; - /** HttpRule delete. */ - public delete: string; + /** WindowsUpdatePackage description. */ + public description: string; - /** HttpRule patch. */ - public patch: string; + /** WindowsUpdatePackage categories. */ + public categories: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]; - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** WindowsUpdatePackage kbArticleIds. */ + public kbArticleIds: string[]; - /** HttpRule body. */ - public body: string; + /** WindowsUpdatePackage supportUrl. */ + public supportUrl: string; - /** HttpRule responseBody. */ - public responseBody: string; + /** WindowsUpdatePackage moreInfoUrls. */ + public moreInfoUrls: string[]; - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** WindowsUpdatePackage updateId. */ + public updateId: string; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** WindowsUpdatePackage revisionNumber. */ + public revisionNumber: number; - /** - * 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; + /** WindowsUpdatePackage lastDeploymentChangeTime. */ + public lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** + * Creates a new WindowsUpdatePackage instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdatePackage instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; - /** - * 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; + /** + * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @param message WindowsUpdatePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage, 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; + /** + * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @param message WindowsUpdatePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; - /** - * 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); + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; - /** - * 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; + /** + * Verifies a WindowsUpdatePackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdatePackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. + * @param message WindowsUpdatePackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** + * Converts this WindowsUpdatePackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** CustomHttpPattern kind */ - kind?: (string|null); + namespace WindowsUpdatePackage { + + /** Properties of a WindowsUpdateCategory. */ + interface IWindowsUpdateCategory { + + /** WindowsUpdateCategory id */ + id?: (string|null); + + /** WindowsUpdateCategory name */ + name?: (string|null); + } + + /** Represents a WindowsUpdateCategory. */ + class WindowsUpdateCategory implements IWindowsUpdateCategory { + + /** + * Constructs a new WindowsUpdateCategory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory); + + /** WindowsUpdateCategory id. */ + public id: string; + + /** WindowsUpdateCategory name. */ + public name: string; + + /** + * Creates a new WindowsUpdateCategory instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdateCategory instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + + /** + * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @param message WindowsUpdateCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @param message WindowsUpdateCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + + /** + * Verifies a WindowsUpdateCategory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdateCategory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + + /** + * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. + * @param message WindowsUpdateCategory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsUpdateCategory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** CustomHttpPattern path */ - path?: (string|null); - } + /** Properties of a ZypperPatch. */ + interface IZypperPatch { - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** ZypperPatch patchName */ + patchName?: (string|null); - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); + /** ZypperPatch category */ + category?: (string|null); - /** CustomHttpPattern kind. */ - public kind: string; + /** ZypperPatch severity */ + severity?: (string|null); - /** CustomHttpPattern path. */ - public path: string; + /** ZypperPatch summary */ + summary?: (string|null); + } - /** - * 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; + /** Represents a ZypperPatch. */ + class ZypperPatch implements IZypperPatch { - /** - * 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; + /** + * Constructs a new ZypperPatch. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IZypperPatch); - /** - * 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; + /** ZypperPatch patchName. */ + public patchName: string; - /** - * 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; + /** ZypperPatch category. */ + public category: string; - /** - * 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; + /** ZypperPatch severity. */ + public severity: string; - /** - * 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); + /** ZypperPatch summary. */ + public summary: string; - /** - * 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 new ZypperPatch instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperPatch instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IZypperPatch): google.cloud.osconfig.v1.Inventory.ZypperPatch; - /** - * 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 }; + /** + * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. + * @param message ZypperPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. + * @param message ZypperPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** + * Decodes a ZypperPatch message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.ZypperPatch; - /** ResourceDescriptor type */ - type?: (string|null); + /** + * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.ZypperPatch; - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** + * Verifies a ZypperPatch message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** + * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperPatch + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.ZypperPatch; - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** + * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. + * @param message ZypperPatch + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.ZypperPatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ResourceDescriptor plural */ - plural?: (string|null); + /** + * Converts this ZypperPatch to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ResourceDescriptor singular */ - singular?: (string|null); - } + /** Properties of a WindowsQuickFixEngineeringPackage. */ + interface IWindowsQuickFixEngineeringPackage { - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** WindowsQuickFixEngineeringPackage caption */ + caption?: (string|null); - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); + /** WindowsQuickFixEngineeringPackage description */ + description?: (string|null); - /** ResourceDescriptor type. */ - public type: string; + /** WindowsQuickFixEngineeringPackage hotFixId */ + hotFixId?: (string|null); - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** WindowsQuickFixEngineeringPackage installTime */ + installTime?: (google.protobuf.ITimestamp|null); + } - /** ResourceDescriptor nameField. */ - public nameField: string; + /** Represents a WindowsQuickFixEngineeringPackage. */ + class WindowsQuickFixEngineeringPackage implements IWindowsQuickFixEngineeringPackage { - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** + * Constructs a new WindowsQuickFixEngineeringPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage); - /** ResourceDescriptor plural. */ - public plural: string; + /** WindowsQuickFixEngineeringPackage caption. */ + public caption: string; - /** ResourceDescriptor singular. */ - public singular: string; + /** WindowsQuickFixEngineeringPackage description. */ + public description: string; - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + /** WindowsQuickFixEngineeringPackage hotFixId. */ + public hotFixId: string; - /** - * 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; + /** WindowsQuickFixEngineeringPackage installTime. */ + public installTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** + * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsQuickFixEngineeringPackage instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; - /** - * 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; + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @param message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @param message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; - /** - * 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; + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; - /** - * 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 }; + /** + * Verifies a WindowsQuickFixEngineeringPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsQuickFixEngineeringPackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; - namespace ResourceDescriptor { + /** + * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. + * @param message WindowsQuickFixEngineeringPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - } + /** + * Converts this WindowsQuickFixEngineeringPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** Properties of a FixedOrPercent. */ + interface IFixedOrPercent { - /** ResourceReference type */ - type?: (string|null); + /** FixedOrPercent fixed */ + fixed?: (number|null); - /** ResourceReference childType */ - childType?: (string|null); - } + /** FixedOrPercent percent */ + percent?: (number|null); + } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a FixedOrPercent. */ + class FixedOrPercent implements IFixedOrPercent { - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** + * Constructs a new FixedOrPercent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IFixedOrPercent); - /** ResourceReference type. */ - public type: string; + /** FixedOrPercent fixed. */ + public fixed: number; - /** ResourceReference childType. */ - public childType: string; + /** FixedOrPercent percent. */ + public percent: number; - /** - * 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; + /** FixedOrPercent mode. */ + public mode?: ("fixed"|"percent"); - /** - * 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; + /** + * Creates a new FixedOrPercent instance using the specified properties. + * @param [properties] Properties to set + * @returns FixedOrPercent instance + */ + public static create(properties?: google.cloud.osconfig.v1.IFixedOrPercent): google.cloud.osconfig.v1.FixedOrPercent; - /** - * 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; + /** + * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * @param message FixedOrPercent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IFixedOrPercent, 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; + /** + * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * @param message FixedOrPercent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a FixedOrPercent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.FixedOrPercent; - /** - * 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; + /** + * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.FixedOrPercent; - /** - * 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 }; + /** + * Verifies a FixedOrPercent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FixedOrPercent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.FixedOrPercent; - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5 - } - } + /** + * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. + * @param message FixedOrPercent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.FixedOrPercent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Namespace protobuf. */ - namespace protobuf { + /** + * Converts this FixedOrPercent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** Represents an OsConfigService */ + class OsConfigService extends $protobuf.rpc.Service { - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } + /** + * Constructs a new OsConfigService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** + * Creates new OsConfigService 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): OsConfigService; - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + /** + * Calls ExecutePatchJob. + * @param request ExecutePatchJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchJob + */ + public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback): void; - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** + * Calls ExecutePatchJob. + * @param request ExecutePatchJobRequest message or plain object + * @returns Promise + */ + public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest): Promise; - /** - * 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; + /** + * Calls GetPatchJob. + * @param request GetPatchJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchJob + */ + public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback): void; - /** - * 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; + /** + * Calls GetPatchJob. + * @param request GetPatchJobRequest message or plain object + * @returns Promise + */ + public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest): Promise; - /** - * 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; + /** + * Calls CancelPatchJob. + * @param request CancelPatchJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchJob + */ + public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback): void; - /** - * 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; + /** + * Calls CancelPatchJob. + * @param request CancelPatchJobRequest message or plain object + * @returns Promise + */ + public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest): Promise; - /** - * 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; + /** + * Calls ListPatchJobs. + * @param request ListPatchJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPatchJobsResponse + */ + public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback): void; - /** - * 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); + /** + * Calls ListPatchJobs. + * @param request ListPatchJobsRequest message or plain object + * @returns Promise + */ + public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest): Promise; - /** - * 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; + /** + * Calls ListPatchJobInstanceDetails. + * @param request ListPatchJobInstanceDetailsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse + */ + public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback): void; - /** - * 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 }; + /** + * Calls ListPatchJobInstanceDetails. + * @param request ListPatchJobInstanceDetailsRequest message or plain object + * @returns Promise + */ + public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): Promise; - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Calls CreatePatchDeployment. + * @param request CreatePatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchDeployment + */ + public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback): void; - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { + /** + * Calls CreatePatchDeployment. + * @param request CreatePatchDeploymentRequest message or plain object + * @returns Promise + */ + public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): Promise; - /** FileDescriptorProto name */ - name?: (string|null); + /** + * Calls GetPatchDeployment. + * @param request GetPatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchDeployment + */ + public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback): void; - /** FileDescriptorProto package */ - "package"?: (string|null); + /** + * Calls GetPatchDeployment. + * @param request GetPatchDeploymentRequest message or plain object + * @returns Promise + */ + public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): Promise; - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); + /** + * Calls ListPatchDeployments. + * @param request ListPatchDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse + */ + public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback): void; - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); + /** + * Calls ListPatchDeployments. + * @param request ListPatchDeploymentsRequest message or plain object + * @returns Promise + */ + public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): Promise; - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); + /** + * Calls DeletePatchDeployment. + * @param request DeletePatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback): void; - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** + * Calls DeletePatchDeployment. + * @param request DeletePatchDeploymentRequest message or plain object + * @returns Promise + */ + public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): Promise; + } - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); + namespace OsConfigService { - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. + * @param error Error, if any + * @param [response] PatchJob + */ + type ExecutePatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. + * @param error Error, if any + * @param [response] PatchJob + */ + type GetPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. + * @param error Error, if any + * @param [response] PatchJob + */ + type CancelPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; - /** FileDescriptorProto syntax */ - syntax?: (string|null); - } + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. + * @param error Error, if any + * @param [response] ListPatchJobsResponse + */ + type ListPatchJobsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobsResponse) => void; - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. + * @param error Error, if any + * @param [response] ListPatchJobInstanceDetailsResponse + */ + type ListPatchJobInstanceDetailsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) => void; - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. + * @param error Error, if any + * @param [response] PatchDeployment + */ + type CreatePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; - /** FileDescriptorProto name. */ - public name: string; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. + * @param error Error, if any + * @param [response] PatchDeployment + */ + type GetPatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; - /** FileDescriptorProto package. */ - public package: string; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. + * @param error Error, if any + * @param [response] ListPatchDeploymentsResponse + */ + type ListPatchDeploymentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchDeploymentsResponse) => void; - /** FileDescriptorProto dependency. */ - public dependency: string[]; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePatchDeploymentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; + /** Properties of a PatchDeployment. */ + interface IPatchDeployment { - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; + /** PatchDeployment name */ + name?: (string|null); - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; + /** PatchDeployment description */ + description?: (string|null); - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** PatchDeployment instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; + /** PatchDeployment patchConfig */ + patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** PatchDeployment duration */ + duration?: (google.protobuf.IDuration|null); - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** PatchDeployment oneTimeSchedule */ + oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** PatchDeployment recurringSchedule */ + recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); - /** FileDescriptorProto syntax. */ - public syntax: string; + /** PatchDeployment createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** PatchDeployment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** PatchDeployment lastExecuteTime */ + lastExecuteTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** PatchDeployment rollout */ + rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + } - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + /** Represents a PatchDeployment. */ + class PatchDeployment implements IPatchDeployment { - /** - * 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; + /** + * Constructs a new PatchDeployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchDeployment); - /** - * 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); + /** PatchDeployment name. */ + public name: string; - /** - * 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; + /** PatchDeployment description. */ + public description: string; - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PatchDeployment instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** PatchDeployment patchConfig. */ + public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { + /** PatchDeployment duration. */ + public duration?: (google.protobuf.IDuration|null); - /** DescriptorProto name */ - name?: (string|null); + /** PatchDeployment oneTimeSchedule. */ + public oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); + /** PatchDeployment recurringSchedule. */ + public recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** PatchDeployment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); + /** PatchDeployment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** PatchDeployment lastExecuteTime. */ + public lastExecuteTime?: (google.protobuf.ITimestamp|null); - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** PatchDeployment rollout. */ + public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** PatchDeployment schedule. */ + public schedule?: ("oneTimeSchedule"|"recurringSchedule"); - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** + * Creates a new PatchDeployment instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchDeployment instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchDeployment): google.cloud.osconfig.v1.PatchDeployment; - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } + /** + * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @param message PatchDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** + * Encodes the specified PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @param message PatchDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); + /** + * Decodes a PatchDeployment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchDeployment; - /** DescriptorProto name. */ - public name: string; + /** + * Decodes a PatchDeployment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchDeployment; - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; + /** + * Verifies a PatchDeployment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** + * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchDeployment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchDeployment; - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; + /** + * Creates a plain object from a PatchDeployment message. Also converts values to other types if specified. + * @param message PatchDeployment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** + * Converts this PatchDeployment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** Properties of an OneTimeSchedule. */ + interface IOneTimeSchedule { - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** OneTimeSchedule executeTime */ + executeTime?: (google.protobuf.ITimestamp|null); + } - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** Represents an OneTimeSchedule. */ + class OneTimeSchedule implements IOneTimeSchedule { - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** + * Constructs a new OneTimeSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IOneTimeSchedule); - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** OneTimeSchedule executeTime. */ + public executeTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** + * Creates a new OneTimeSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns OneTimeSchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IOneTimeSchedule): google.cloud.osconfig.v1.OneTimeSchedule; - /** - * 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 OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @param message OneTimeSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IOneTimeSchedule, 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; + /** + * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @param message OneTimeSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IOneTimeSchedule, 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 an OneTimeSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OneTimeSchedule; - /** - * 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; + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OneTimeSchedule; - /** - * 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); + /** + * Verifies an OneTimeSchedule message. + * @param message Plain object 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 an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneTimeSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OneTimeSchedule; - /** - * 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 }; + /** + * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. + * @param message OneTimeSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OneTimeSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this OneTimeSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - namespace DescriptorProto { + /** Properties of a RecurringSchedule. */ + interface IRecurringSchedule { - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** RecurringSchedule timeZone */ + timeZone?: (google.type.ITimeZone|null); - /** ExtensionRange start */ - start?: (number|null); + /** RecurringSchedule startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** ExtensionRange end */ - end?: (number|null); + /** RecurringSchedule endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } + /** RecurringSchedule timeOfDay */ + timeOfDay?: (google.type.ITimeOfDay|null); - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** RecurringSchedule frequency */ + frequency?: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency|null); - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + /** RecurringSchedule weekly */ + weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; + /** RecurringSchedule monthly */ + monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** RecurringSchedule lastExecuteTime */ + lastExecuteTime?: (google.protobuf.ITimestamp|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; + /** RecurringSchedule nextExecuteTime */ + nextExecuteTime?: (google.protobuf.ITimestamp|null); + } - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a RecurringSchedule. */ + class RecurringSchedule implements IRecurringSchedule { - /** - * 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; + /** + * Constructs a new RecurringSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IRecurringSchedule); - /** - * 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; + /** RecurringSchedule timeZone. */ + public timeZone?: (google.type.ITimeZone|null); - /** - * 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; + /** RecurringSchedule startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** - * 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); + /** RecurringSchedule endTime. */ + public endTime?: (google.protobuf.ITimestamp|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; + /** RecurringSchedule timeOfDay. */ + public timeOfDay?: (google.type.ITimeOfDay|null); - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** RecurringSchedule frequency. */ + public frequency: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency); - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** RecurringSchedule weekly. */ + public weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** RecurringSchedule monthly. */ + public monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); - /** ReservedRange start */ - start?: (number|null); + /** RecurringSchedule lastExecuteTime. */ + public lastExecuteTime?: (google.protobuf.ITimestamp|null); - /** ReservedRange end */ - end?: (number|null); - } + /** RecurringSchedule nextExecuteTime. */ + public nextExecuteTime?: (google.protobuf.ITimestamp|null); - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** RecurringSchedule scheduleConfig. */ + public scheduleConfig?: ("weekly"|"monthly"); - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** + * Creates a new RecurringSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns RecurringSchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IRecurringSchedule): google.cloud.osconfig.v1.RecurringSchedule; - /** ReservedRange start. */ - public start: number; + /** + * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @param message RecurringSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** ReservedRange end. */ - public end: number; + /** + * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @param message RecurringSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + /** + * Decodes a RecurringSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.RecurringSchedule; - /** - * 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; + /** + * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.RecurringSchedule; - /** - * 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; + /** + * Verifies a RecurringSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + /** + * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecurringSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.RecurringSchedule; - /** - * 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; + /** + * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. + * @param message RecurringSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.RecurringSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this RecurringSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + namespace RecurringSchedule { - /** - * 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 }; + /** Frequency enum. */ + enum Frequency { + FREQUENCY_UNSPECIFIED = 0, + WEEKLY = 1, + MONTHLY = 2 + } + } - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Properties of a WeeklySchedule. */ + interface IWeeklySchedule { - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** WeeklySchedule dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a WeeklySchedule. */ + class WeeklySchedule implements IWeeklySchedule { + + /** + * Constructs a new WeeklySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IWeeklySchedule); + + /** WeeklySchedule dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns WeeklySchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IWeeklySchedule): google.cloud.osconfig.v1.WeeklySchedule; + + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeeklySchedule; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeeklySchedule; + + /** + * Verifies a WeeklySchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeeklySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeeklySchedule; + + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @param message WeeklySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeeklySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MonthlySchedule. */ + interface IMonthlySchedule { + + /** MonthlySchedule weekDayOfMonth */ + weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); + + /** MonthlySchedule monthDay */ + monthDay?: (number|null); + } + + /** Represents a MonthlySchedule. */ + class MonthlySchedule implements IMonthlySchedule { + + /** + * Constructs a new MonthlySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IMonthlySchedule); + + /** MonthlySchedule weekDayOfMonth. */ + public weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); + + /** MonthlySchedule monthDay. */ + public monthDay: number; + + /** MonthlySchedule dayOfMonth. */ + public dayOfMonth?: ("weekDayOfMonth"|"monthDay"); + + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns MonthlySchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IMonthlySchedule): google.cloud.osconfig.v1.MonthlySchedule; + + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.MonthlySchedule; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.MonthlySchedule; + + /** + * Verifies a MonthlySchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonthlySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.MonthlySchedule; + + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @param message MonthlySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonthlySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WeekDayOfMonth. */ + interface IWeekDayOfMonth { + + /** WeekDayOfMonth weekOrdinal */ + weekOrdinal?: (number|null); + + /** WeekDayOfMonth dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a WeekDayOfMonth. */ + class WeekDayOfMonth implements IWeekDayOfMonth { + + /** + * Constructs a new WeekDayOfMonth. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth); + + /** WeekDayOfMonth weekOrdinal. */ + public weekOrdinal: number; + + /** WeekDayOfMonth dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @param [properties] Properties to set + * @returns WeekDayOfMonth instance + */ + public static create(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth): google.cloud.osconfig.v1.WeekDayOfMonth; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeekDayOfMonth; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeekDayOfMonth; + + /** + * Verifies a WeekDayOfMonth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeekDayOfMonth + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeekDayOfMonth; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @param message WeekDayOfMonth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreatePatchDeploymentRequest. */ + interface ICreatePatchDeploymentRequest { + + /** CreatePatchDeploymentRequest parent */ + parent?: (string|null); + + /** CreatePatchDeploymentRequest patchDeploymentId */ + patchDeploymentId?: (string|null); + + /** CreatePatchDeploymentRequest patchDeployment */ + patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + } + + /** Represents a CreatePatchDeploymentRequest. */ + class CreatePatchDeploymentRequest implements ICreatePatchDeploymentRequest { + + /** + * Constructs a new CreatePatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest); + + /** CreatePatchDeploymentRequest parent. */ + public parent: string; + + /** CreatePatchDeploymentRequest patchDeploymentId. */ + public patchDeploymentId: string; + + /** CreatePatchDeploymentRequest patchDeployment. */ + public patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + + /** + * Creates a new CreatePatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + + /** + * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @param message CreatePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @param message CreatePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + + /** + * Verifies a CreatePatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + + /** + * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. + * @param message CreatePatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.CreatePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPatchDeploymentRequest. */ + interface IGetPatchDeploymentRequest { + + /** GetPatchDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a GetPatchDeploymentRequest. */ + class GetPatchDeploymentRequest implements IGetPatchDeploymentRequest { + + /** + * Constructs a new GetPatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest); + + /** GetPatchDeploymentRequest name. */ + public name: string; + + /** + * Creates a new GetPatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + + /** + * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @param message GetPatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @param message GetPatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + + /** + * Verifies a GetPatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + + /** + * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. + * @param message GetPatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GetPatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPatchDeploymentsRequest. */ + interface IListPatchDeploymentsRequest { + + /** ListPatchDeploymentsRequest parent */ + parent?: (string|null); + + /** ListPatchDeploymentsRequest pageSize */ + pageSize?: (number|null); + + /** ListPatchDeploymentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPatchDeploymentsRequest. */ + class ListPatchDeploymentsRequest implements IListPatchDeploymentsRequest { + + /** + * Constructs a new ListPatchDeploymentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest); + + /** ListPatchDeploymentsRequest parent. */ + public parent: string; + + /** ListPatchDeploymentsRequest pageSize. */ + public pageSize: number; + + /** ListPatchDeploymentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPatchDeploymentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchDeploymentsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + + /** + * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @param message ListPatchDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @param message ListPatchDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + + /** + * Verifies a ListPatchDeploymentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchDeploymentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + + /** + * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListPatchDeploymentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPatchDeploymentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPatchDeploymentsResponse. */ + interface IListPatchDeploymentsResponse { + + /** ListPatchDeploymentsResponse patchDeployments */ + patchDeployments?: (google.cloud.osconfig.v1.IPatchDeployment[]|null); + + /** ListPatchDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPatchDeploymentsResponse. */ + class ListPatchDeploymentsResponse implements IListPatchDeploymentsResponse { + + /** + * Constructs a new ListPatchDeploymentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse); + + /** ListPatchDeploymentsResponse patchDeployments. */ + public patchDeployments: google.cloud.osconfig.v1.IPatchDeployment[]; + + /** ListPatchDeploymentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPatchDeploymentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchDeploymentsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + + /** + * Encodes the specified ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @param message ListPatchDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @param message ListPatchDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + + /** + * Verifies a ListPatchDeploymentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchDeploymentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + + /** + * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListPatchDeploymentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPatchDeploymentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeletePatchDeploymentRequest. */ + interface IDeletePatchDeploymentRequest { + + /** DeletePatchDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a DeletePatchDeploymentRequest. */ + class DeletePatchDeploymentRequest implements IDeletePatchDeploymentRequest { + + /** + * Constructs a new DeletePatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest); + + /** DeletePatchDeploymentRequest name. */ + public name: string; + + /** + * Creates a new DeletePatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + + /** + * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @param message DeletePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @param message DeletePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + + /** + * Verifies a DeletePatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + + /** + * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. + * @param message DeletePatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.DeletePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExecutePatchJobRequest. */ + interface IExecutePatchJobRequest { + + /** ExecutePatchJobRequest parent */ + parent?: (string|null); + + /** ExecutePatchJobRequest description */ + description?: (string|null); + + /** ExecutePatchJobRequest instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + + /** ExecutePatchJobRequest patchConfig */ + patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + + /** ExecutePatchJobRequest duration */ + duration?: (google.protobuf.IDuration|null); + + /** ExecutePatchJobRequest dryRun */ + dryRun?: (boolean|null); + + /** ExecutePatchJobRequest displayName */ + displayName?: (string|null); + + /** ExecutePatchJobRequest rollout */ + rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + } + + /** Represents an ExecutePatchJobRequest. */ + class ExecutePatchJobRequest implements IExecutePatchJobRequest { + + /** + * Constructs a new ExecutePatchJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest); + + /** ExecutePatchJobRequest parent. */ + public parent: string; + + /** ExecutePatchJobRequest description. */ + public description: string; + + /** ExecutePatchJobRequest instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + + /** ExecutePatchJobRequest patchConfig. */ + public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + + /** ExecutePatchJobRequest duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** ExecutePatchJobRequest dryRun. */ + public dryRun: boolean; + + /** ExecutePatchJobRequest displayName. */ + public displayName: string; + + /** ExecutePatchJobRequest rollout. */ + public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + + /** + * Creates a new ExecutePatchJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutePatchJobRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest): google.cloud.osconfig.v1.ExecutePatchJobRequest; + + /** + * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @param message ExecutePatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @param message ExecutePatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecutePatchJobRequest; + + /** + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecutePatchJobRequest; + + /** + * Verifies an ExecutePatchJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutePatchJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecutePatchJobRequest; + + /** + * Creates a plain object from an ExecutePatchJobRequest message. Also converts values to other types if specified. + * @param message ExecutePatchJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ExecutePatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutePatchJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPatchJobRequest. */ + interface IGetPatchJobRequest { + + /** GetPatchJobRequest name */ + name?: (string|null); + } + + /** Represents a GetPatchJobRequest. */ + class GetPatchJobRequest implements IGetPatchJobRequest { + + /** + * Constructs a new GetPatchJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest); + + /** GetPatchJobRequest name. */ + public name: string; + + /** + * Creates a new GetPatchJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPatchJobRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest): google.cloud.osconfig.v1.GetPatchJobRequest; + + /** + * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @param message GetPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGetPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @param message GetPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchJobRequest; + + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchJobRequest; + + /** + * Verifies a GetPatchJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPatchJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchJobRequest; + + /** + * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. + * @param message GetPatchJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GetPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** + * Converts this GetPatchJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + /** Properties of a ListPatchJobInstanceDetailsRequest. */ + interface IListPatchJobInstanceDetailsRequest { - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ListPatchJobInstanceDetailsRequest parent */ + parent?: (string|null); - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + /** ListPatchJobInstanceDetailsRequest pageSize */ + pageSize?: (number|null); - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListPatchJobInstanceDetailsRequest pageToken */ + pageToken?: (string|null); - /** - * 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; + /** ListPatchJobInstanceDetailsRequest filter */ + filter?: (string|null); + } - /** - * 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; + /** Represents a ListPatchJobInstanceDetailsRequest. */ + class ListPatchJobInstanceDetailsRequest implements IListPatchJobInstanceDetailsRequest { - /** - * 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; + /** + * Constructs a new ListPatchJobInstanceDetailsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest); - /** - * 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); + /** ListPatchJobInstanceDetailsRequest parent. */ + public parent: string; - /** - * 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; + /** ListPatchJobInstanceDetailsRequest pageSize. */ + public pageSize: number; - /** - * 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 }; + /** ListPatchJobInstanceDetailsRequest pageToken. */ + public pageToken: string; - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListPatchJobInstanceDetailsRequest filter. */ + public filter: string; - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** + * Creates a new ListPatchJobInstanceDetailsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobInstanceDetailsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; - /** FieldDescriptorProto name */ - name?: (string|null); + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldDescriptorProto number */ - number?: (number|null); + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** + * Verifies a ListPatchJobInstanceDetailsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** + * Creates a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobInstanceDetailsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** + * Creates a plain object from a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. + * @param message ListPatchJobInstanceDetailsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** + * Converts this ListPatchJobInstanceDetailsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** Properties of a ListPatchJobInstanceDetailsResponse. */ + interface IListPatchJobInstanceDetailsResponse { - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); + /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails */ + patchJobInstanceDetails?: (google.cloud.osconfig.v1.IPatchJobInstanceDetails[]|null); - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } + /** ListPatchJobInstanceDetailsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** Represents a ListPatchJobInstanceDetailsResponse. */ + class ListPatchJobInstanceDetailsResponse implements IListPatchJobInstanceDetailsResponse { - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + /** + * Constructs a new ListPatchJobInstanceDetailsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse); - /** FieldDescriptorProto name. */ - public name: string; + /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. */ + public patchJobInstanceDetails: google.cloud.osconfig.v1.IPatchJobInstanceDetails[]; - /** FieldDescriptorProto number. */ - public number: number; + /** ListPatchJobInstanceDetailsResponse nextPageToken. */ + public nextPageToken: string; - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + /** + * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobInstanceDetailsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + /** + * Encodes the specified ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** + * Encodes the specified ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** + * Verifies a ListPatchJobInstanceDetailsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** + * Creates a ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobInstanceDetailsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** + * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. + * @param message ListPatchJobInstanceDetailsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** + * Converts this ListPatchJobInstanceDetailsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** Properties of a PatchJobInstanceDetails. */ + interface IPatchJobInstanceDetails { - /** - * 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; + /** PatchJobInstanceDetails name */ + name?: (string|null); - /** - * 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; + /** PatchJobInstanceDetails instanceSystemId */ + instanceSystemId?: (string|null); - /** - * 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; + /** PatchJobInstanceDetails state */ + state?: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState|null); - /** - * 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; + /** PatchJobInstanceDetails failureReason */ + failureReason?: (string|null); - /** - * 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; + /** PatchJobInstanceDetails attemptCount */ + attemptCount?: (number|Long|string|null); + } - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a PatchJobInstanceDetails. */ + class PatchJobInstanceDetails implements IPatchJobInstanceDetails { - /** - * 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; + /** + * Constructs a new PatchJobInstanceDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails); - /** - * 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 }; + /** PatchJobInstanceDetails name. */ + public name: string; - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** PatchJobInstanceDetails instanceSystemId. */ + public instanceSystemId: string; - namespace FieldDescriptorProto { + /** PatchJobInstanceDetails state. */ + public state: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState); - /** 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 - } + /** PatchJobInstanceDetails failureReason. */ + public failureReason: string; - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } + /** PatchJobInstanceDetails attemptCount. */ + public attemptCount: (number|Long|string); - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { + /** + * Creates a new PatchJobInstanceDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchJobInstanceDetails instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails): google.cloud.osconfig.v1.PatchJobInstanceDetails; - /** OneofDescriptorProto name */ - name?: (string|null); + /** + * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @param message PatchJobInstanceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } + /** + * Encodes the specified PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @param message PatchJobInstanceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJobInstanceDetails; - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJobInstanceDetails; - /** OneofDescriptorProto name. */ - public name: string; + /** + * Verifies a PatchJobInstanceDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** + * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchJobInstanceDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJobInstanceDetails; - /** - * 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; + /** + * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. + * @param message PatchJobInstanceDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchJobInstanceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this PatchJobInstanceDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a ListPatchJobsRequest. */ + interface IListPatchJobsRequest { - /** - * 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; + /** ListPatchJobsRequest parent */ + parent?: (string|null); - /** - * 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; + /** ListPatchJobsRequest pageSize */ + pageSize?: (number|null); - /** - * 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); + /** ListPatchJobsRequest pageToken */ + pageToken?: (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; + /** ListPatchJobsRequest filter */ + filter?: (string|null); + } - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a ListPatchJobsRequest. */ + class ListPatchJobsRequest implements IListPatchJobsRequest { - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new ListPatchJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest); - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { + /** ListPatchJobsRequest parent. */ + public parent: string; - /** EnumDescriptorProto name */ - name?: (string|null); + /** ListPatchJobsRequest pageSize. */ + public pageSize: number; - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** ListPatchJobsRequest pageToken. */ + public pageToken: string; - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** ListPatchJobsRequest filter. */ + public filter: string; - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + /** + * Creates a new ListPatchJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest): google.cloud.osconfig.v1.ListPatchJobsRequest; - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } + /** + * Encodes the specified ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @param message ListPatchJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** + * Encodes the specified ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @param message ListPatchJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsRequest; - /** EnumDescriptorProto name. */ - public name: string; + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsRequest; - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + /** + * Verifies a ListPatchJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** + * Creates a ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsRequest; - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + /** + * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. + * @param message ListPatchJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** + * Converts this ListPatchJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a ListPatchJobsResponse. */ + interface IListPatchJobsResponse { - /** - * 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; + /** ListPatchJobsResponse patchJobs */ + patchJobs?: (google.cloud.osconfig.v1.IPatchJob[]|null); - /** - * 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; + /** ListPatchJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + /** Represents a ListPatchJobsResponse. */ + class ListPatchJobsResponse implements IListPatchJobsResponse { - /** - * 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; + /** + * Constructs a new ListPatchJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse); - /** - * 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); + /** ListPatchJobsResponse patchJobs. */ + public patchJobs: google.cloud.osconfig.v1.IPatchJob[]; - /** - * 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; + /** ListPatchJobsResponse nextPageToken. */ + public nextPageToken: string; - /** - * 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 }; + /** + * Creates a new ListPatchJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse): google.cloud.osconfig.v1.ListPatchJobsResponse; + + /** + * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @param message ListPatchJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @param message ListPatchJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - namespace EnumDescriptorProto { + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsResponse; - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsResponse; - /** EnumReservedRange start */ - start?: (number|null); + /** + * Verifies a ListPatchJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** EnumReservedRange end */ - end?: (number|null); - } + /** + * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsResponse; - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { + /** + * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. + * @param message ListPatchJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + /** + * Converts this ListPatchJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** EnumReservedRange start. */ - public start: number; + /** Properties of a PatchJob. */ + interface IPatchJob { - /** EnumReservedRange end. */ - public end: number; + /** PatchJob name */ + name?: (string|null); - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** PatchJob displayName */ + displayName?: (string|null); - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** PatchJob description */ + description?: (string|null); - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** PatchJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** PatchJob updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** PatchJob state */ + state?: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State|null); - /** - * 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); + /** PatchJob instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|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; + /** PatchJob patchConfig */ + patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - /** - * 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 }; + /** PatchJob duration */ + duration?: (google.protobuf.IDuration|null); - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** PatchJob instanceDetailsSummary */ + instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { + /** PatchJob dryRun */ + dryRun?: (boolean|null); - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** PatchJob errorMessage */ + errorMessage?: (string|null); - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** PatchJob percentComplete */ + percentComplete?: (number|null); - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } + /** PatchJob patchDeployment */ + patchDeployment?: (string|null); - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** PatchJob rollout */ + rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + } - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + /** Represents a PatchJob. */ + class PatchJob implements IPatchJob { - /** EnumValueDescriptorProto name. */ - public name: string; + /** + * Constructs a new PatchJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchJob); - /** EnumValueDescriptorProto number. */ - public number: number; + /** PatchJob name. */ + public name: string; - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** PatchJob displayName. */ + public displayName: string; - /** - * 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; + /** PatchJob description. */ + public description: string; - /** - * 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; + /** PatchJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** PatchJob updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + /** PatchJob state. */ + public state: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State); - /** - * 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; + /** PatchJob instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - /** - * 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); + /** PatchJob patchConfig. */ + public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|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; + /** PatchJob duration. */ + public duration?: (google.protobuf.IDuration|null); - /** - * 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 }; + /** PatchJob instanceDetailsSummary. */ + public instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** PatchJob dryRun. */ + public dryRun: boolean; - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { + /** PatchJob errorMessage. */ + public errorMessage: string; - /** ServiceDescriptorProto name */ - name?: (string|null); + /** PatchJob percentComplete. */ + public percentComplete: number; - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** PatchJob patchDeployment. */ + public patchDeployment: string; - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } + /** PatchJob rollout. */ + public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** + * Creates a new PatchJob instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchJob instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchJob): google.cloud.osconfig.v1.PatchJob; - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); + /** + * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @param message PatchJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; - /** ServiceDescriptorProto name. */ - public name: string; + /** + * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @param message PatchJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** + * Decodes a PatchJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob; - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** + * Decodes a PatchJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob; - /** - * 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; + /** + * Verifies a PatchJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified 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; + /** + * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob; - /** - * 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; + /** + * Creates a plain object from a PatchJob message. Also converts values to other types if specified. + * @param message PatchJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this PatchJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + namespace PatchJob { - /** - * 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); + /** Properties of an InstanceDetailsSummary. */ + interface IInstanceDetailsSummary { - /** - * 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; + /** InstanceDetailsSummary pendingInstanceCount */ + pendingInstanceCount?: (number|Long|string|null); - /** - * 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 }; + /** InstanceDetailsSummary inactiveInstanceCount */ + inactiveInstanceCount?: (number|Long|string|null); - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** InstanceDetailsSummary notifiedInstanceCount */ + notifiedInstanceCount?: (number|Long|string|null); - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + /** InstanceDetailsSummary startedInstanceCount */ + startedInstanceCount?: (number|Long|string|null); - /** MethodDescriptorProto name */ - name?: (string|null); + /** InstanceDetailsSummary downloadingPatchesInstanceCount */ + downloadingPatchesInstanceCount?: (number|Long|string|null); - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** InstanceDetailsSummary applyingPatchesInstanceCount */ + applyingPatchesInstanceCount?: (number|Long|string|null); - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** InstanceDetailsSummary rebootingInstanceCount */ + rebootingInstanceCount?: (number|Long|string|null); - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** InstanceDetailsSummary succeededInstanceCount */ + succeededInstanceCount?: (number|Long|string|null); - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** InstanceDetailsSummary succeededRebootRequiredInstanceCount */ + succeededRebootRequiredInstanceCount?: (number|Long|string|null); - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } + /** InstanceDetailsSummary failedInstanceCount */ + failedInstanceCount?: (number|Long|string|null); - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** InstanceDetailsSummary ackedInstanceCount */ + ackedInstanceCount?: (number|Long|string|null); - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); + /** InstanceDetailsSummary timedOutInstanceCount */ + timedOutInstanceCount?: (number|Long|string|null); - /** MethodDescriptorProto name. */ - public name: string; + /** InstanceDetailsSummary prePatchStepInstanceCount */ + prePatchStepInstanceCount?: (number|Long|string|null); - /** MethodDescriptorProto inputType. */ - public inputType: string; + /** InstanceDetailsSummary postPatchStepInstanceCount */ + postPatchStepInstanceCount?: (number|Long|string|null); - /** MethodDescriptorProto outputType. */ - public outputType: string; + /** InstanceDetailsSummary noAgentDetectedInstanceCount */ + noAgentDetectedInstanceCount?: (number|Long|string|null); + } - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** Represents an InstanceDetailsSummary. */ + class InstanceDetailsSummary implements IInstanceDetailsSummary { - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** + * Constructs a new InstanceDetailsSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary); - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** InstanceDetailsSummary pendingInstanceCount. */ + public pendingInstanceCount: (number|Long|string); - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + /** InstanceDetailsSummary inactiveInstanceCount. */ + public inactiveInstanceCount: (number|Long|string); - /** - * 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; + /** InstanceDetailsSummary notifiedInstanceCount. */ + public notifiedInstanceCount: (number|Long|string); - /** - * 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; + /** InstanceDetailsSummary startedInstanceCount. */ + public startedInstanceCount: (number|Long|string); - /** - * 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; + /** InstanceDetailsSummary downloadingPatchesInstanceCount. */ + public downloadingPatchesInstanceCount: (number|Long|string); - /** - * 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; + /** InstanceDetailsSummary applyingPatchesInstanceCount. */ + public applyingPatchesInstanceCount: (number|Long|string); - /** - * 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); + /** InstanceDetailsSummary rebootingInstanceCount. */ + public rebootingInstanceCount: (number|Long|string); - /** - * 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; + /** InstanceDetailsSummary succeededInstanceCount. */ + public succeededInstanceCount: (number|Long|string); - /** - * 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 }; + /** InstanceDetailsSummary succeededRebootRequiredInstanceCount. */ + public succeededRebootRequiredInstanceCount: (number|Long|string); - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** InstanceDetailsSummary failedInstanceCount. */ + public failedInstanceCount: (number|Long|string); - /** Properties of a FileOptions. */ - interface IFileOptions { + /** InstanceDetailsSummary ackedInstanceCount. */ + public ackedInstanceCount: (number|Long|string); - /** FileOptions javaPackage */ - javaPackage?: (string|null); + /** InstanceDetailsSummary timedOutInstanceCount. */ + public timedOutInstanceCount: (number|Long|string); - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); + /** InstanceDetailsSummary prePatchStepInstanceCount. */ + public prePatchStepInstanceCount: (number|Long|string); - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); + /** InstanceDetailsSummary postPatchStepInstanceCount. */ + public postPatchStepInstanceCount: (number|Long|string); - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); + /** InstanceDetailsSummary noAgentDetectedInstanceCount. */ + public noAgentDetectedInstanceCount: (number|Long|string); - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); + /** + * Creates a new InstanceDetailsSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceDetailsSummary instance + */ + public static create(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + /** + * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @param message InstanceDetailsSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions goPackage */ - goPackage?: (string|null); + /** + * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @param message InstanceDetailsSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); + /** + * Decodes an InstanceDetailsSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceDetailsSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); + /** + * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceDetailsSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); + /** + * Verifies an InstanceDetailsSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); + /** + * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceDetailsSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; - /** FileOptions deprecated */ - deprecated?: (boolean|null); + /** + * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. + * @param message InstanceDetailsSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); + /** + * Converts this InstanceDetailsSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTED = 1, + INSTANCE_LOOKUP = 2, + PATCHING = 3, + SUCCEEDED = 4, + COMPLETED_WITH_ERRORS = 5, + CANCELED = 6, + TIMED_OUT = 7 + } + } - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); + /** Properties of a PatchConfig. */ + interface IPatchConfig { - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); + /** PatchConfig rebootConfig */ + rebootConfig?: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig|null); - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); + /** PatchConfig apt */ + apt?: (google.cloud.osconfig.v1.IAptSettings|null); - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); + /** PatchConfig yum */ + yum?: (google.cloud.osconfig.v1.IYumSettings|null); - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); + /** PatchConfig goo */ + goo?: (google.cloud.osconfig.v1.IGooSettings|null); - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); + /** PatchConfig zypper */ + zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** PatchConfig windowsUpdate */ + windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } + /** PatchConfig preStep */ + preStep?: (google.cloud.osconfig.v1.IExecStep|null); - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { + /** PatchConfig postStep */ + postStep?: (google.cloud.osconfig.v1.IExecStep|null); + } - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + /** Represents a PatchConfig. */ + class PatchConfig implements IPatchConfig { - /** FileOptions javaPackage. */ - public javaPackage: string; + /** + * Constructs a new PatchConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchConfig); - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + /** PatchConfig rebootConfig. */ + public rebootConfig: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig); - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** PatchConfig apt. */ + public apt?: (google.cloud.osconfig.v1.IAptSettings|null); - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** PatchConfig yum. */ + public yum?: (google.cloud.osconfig.v1.IYumSettings|null); - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** PatchConfig goo. */ + public goo?: (google.cloud.osconfig.v1.IGooSettings|null); - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** PatchConfig zypper. */ + public zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); - /** FileOptions goPackage. */ - public goPackage: string; + /** PatchConfig windowsUpdate. */ + public windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** PatchConfig preStep. */ + public preStep?: (google.cloud.osconfig.v1.IExecStep|null); - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** PatchConfig postStep. */ + public postStep?: (google.cloud.osconfig.v1.IExecStep|null); - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** + * Creates a new PatchConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchConfig instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchConfig): google.cloud.osconfig.v1.PatchConfig; - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; + /** + * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @param message PatchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @param message PatchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * Decodes a PatchConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchConfig; - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * Decodes a PatchConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchConfig; - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** + * Verifies a PatchConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** + * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchConfig; - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** + * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. + * @param message PatchConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** + * Converts this PatchConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + namespace PatchConfig { - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** RebootConfig enum. */ + enum RebootConfig { + REBOOT_CONFIG_UNSPECIFIED = 0, + DEFAULT = 1, + ALWAYS = 2, + NEVER = 3 + } + } - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Properties of an Instance. */ + interface IInstance { + } - /** - * 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; + /** Represents an Instance. */ + class Instance implements IInstance { - /** - * 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; + /** + * Constructs a new Instance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IInstance); - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new Instance instance using the specified properties. + * @param [properties] Properties to set + * @returns Instance instance + */ + public static create(properties?: google.cloud.osconfig.v1.IInstance): google.cloud.osconfig.v1.Instance; - /** - * 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; + /** + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Decodes an Instance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Instance; - /** - * 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; + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Instance; - /** - * 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 }; + /** + * Verifies an Instance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Instance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Instance; - namespace FileOptions { + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @param message Instance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Instance, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } + /** + * Converts this Instance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a MessageOptions. */ - interface IMessageOptions { + namespace Instance { - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** PatchState enum. */ + enum PatchState { + PATCH_STATE_UNSPECIFIED = 0, + PENDING = 1, + INACTIVE = 2, + NOTIFIED = 3, + STARTED = 4, + DOWNLOADING_PATCHES = 5, + APPLYING_PATCHES = 6, + REBOOTING = 7, + SUCCEEDED = 8, + SUCCEEDED_REBOOT_REQUIRED = 9, + FAILED = 10, + ACKED = 11, + TIMED_OUT = 12, + RUNNING_PRE_PATCH_STEP = 13, + RUNNING_POST_PATCH_STEP = 14, + NO_AGENT_DETECTED = 15 + } + } - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** Properties of a CancelPatchJobRequest. */ + interface ICancelPatchJobRequest { - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** CancelPatchJobRequest name */ + name?: (string|null); + } - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** Represents a CancelPatchJobRequest. */ + class CancelPatchJobRequest implements ICancelPatchJobRequest { - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Constructs a new CancelPatchJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest); - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } + /** CancelPatchJobRequest name. */ + public name: string; - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** + * Creates a new CancelPatchJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelPatchJobRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest): google.cloud.osconfig.v1.CancelPatchJobRequest; - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + /** + * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @param message CancelPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** + * Encodes the specified CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @param message CancelPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CancelPatchJobRequest; - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CancelPatchJobRequest; - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** + * Verifies a CancelPatchJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Creates a CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelPatchJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CancelPatchJobRequest; - /** - * 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; + /** + * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. + * @param message CancelPatchJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.CancelPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this CancelPatchJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of an AptSettings. */ + interface IAptSettings { - /** - * 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; + /** AptSettings type */ + type?: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type|null); - /** - * 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; + /** AptSettings excludes */ + excludes?: (string[]|null); - /** - * 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); + /** AptSettings exclusivePackages */ + exclusivePackages?: (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; + /** Represents an AptSettings. */ + class AptSettings implements IAptSettings { - /** - * 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 }; + /** + * Constructs a new AptSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IAptSettings); - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** AptSettings type. */ + public type: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type); - /** Properties of a FieldOptions. */ - interface IFieldOptions { + /** AptSettings excludes. */ + public excludes: string[]; - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + /** AptSettings exclusivePackages. */ + public exclusivePackages: string[]; - /** FieldOptions packed */ - packed?: (boolean|null); + /** + * Creates a new AptSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AptSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IAptSettings): google.cloud.osconfig.v1.AptSettings; - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + /** + * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @param message AptSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** + * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @param message AptSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AptSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.AptSettings; - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** + * Decodes an AptSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.AptSettings; - /** FieldOptions weak */ - weak?: (boolean|null); + /** + * Verifies an AptSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AptSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.AptSettings; - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); + /** + * Creates a plain object from an AptSettings message. Also converts values to other types if specified. + * @param message AptSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.AptSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - } + /** + * Converts this AptSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + namespace AptSettings { - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + DIST = 1, + UPGRADE = 2 + } + } - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + /** Properties of a YumSettings. */ + interface IYumSettings { - /** FieldOptions packed. */ - public packed: boolean; + /** YumSettings security */ + security?: (boolean|null); - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + /** YumSettings minimal */ + minimal?: (boolean|null); - /** FieldOptions lazy. */ - public lazy: boolean; + /** YumSettings excludes */ + excludes?: (string[]|null); - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** YumSettings exclusivePackages */ + exclusivePackages?: (string[]|null); + } - /** FieldOptions weak. */ - public weak: boolean; + /** Represents a YumSettings. */ + class YumSettings implements IYumSettings { - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Constructs a new YumSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IYumSettings); - /** - * 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; + /** YumSettings security. */ + public security: boolean; - /** - * 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; + /** YumSettings minimal. */ + public minimal: boolean; - /** - * 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; + /** YumSettings excludes. */ + public excludes: string[]; - /** - * 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; + /** YumSettings exclusivePackages. */ + public exclusivePackages: string[]; - /** - * 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; + /** + * Creates a new YumSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns YumSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IYumSettings): google.cloud.osconfig.v1.YumSettings; - /** - * 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); + /** + * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @param message YumSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @param message YumSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Decodes a YumSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.YumSettings; - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a YumSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.YumSettings; - namespace FieldOptions { + /** + * Verifies a YumSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } + /** + * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.YumSettings; - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - } + /** + * Creates a plain object from a YumSettings message. Also converts values to other types if specified. + * @param message YumSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.YumSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** + * Converts this YumSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** Properties of a GooSettings. */ + interface IGooSettings { + } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents a GooSettings. */ + class GooSettings implements IGooSettings { - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); + /** + * Constructs a new GooSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGooSettings); - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Creates a new GooSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GooSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGooSettings): google.cloud.osconfig.v1.GooSettings; - /** - * 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 GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @param message GooSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGooSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @param message GooSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGooSettings, 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 a GooSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GooSettings; - /** - * 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 a GooSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GooSettings; - /** - * 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 a GooSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies an 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 a GooSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GooSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GooSettings; - /** - * 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 a GooSettings message. Also converts values to other types if specified. + * @param message GooSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GooSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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 GooSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a ZypperSettings. */ + interface IZypperSettings { - /** Properties of an EnumOptions. */ - interface IEnumOptions { + /** ZypperSettings withOptional */ + withOptional?: (boolean|null); - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** ZypperSettings withUpdate */ + withUpdate?: (boolean|null); - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** ZypperSettings categories */ + categories?: (string[]|null); - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** ZypperSettings severities */ + severities?: (string[]|null); - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** ZypperSettings excludes */ + excludes?: (string[]|null); - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); + /** ZypperSettings exclusivePatches */ + exclusivePatches?: (string[]|null); + } - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + /** Represents a ZypperSettings. */ + class ZypperSettings implements IZypperSettings { - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** + * Constructs a new ZypperSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IZypperSettings); - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ZypperSettings withOptional. */ + public withOptional: boolean; - /** - * 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; + /** ZypperSettings withUpdate. */ + public withUpdate: boolean; - /** - * 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; + /** ZypperSettings categories. */ + public categories: string[]; - /** - * 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; + /** ZypperSettings severities. */ + public severities: string[]; - /** - * 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; + /** ZypperSettings excludes. */ + public excludes: string[]; - /** - * 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; + /** ZypperSettings exclusivePatches. */ + public exclusivePatches: string[]; - /** - * 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 a new ZypperSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IZypperSettings): google.cloud.osconfig.v1.ZypperSettings; - /** - * 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; + /** + * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @param message ZypperSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @param message ZypperSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a ZypperSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ZypperSettings; - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** + * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ZypperSettings; - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** + * Verifies a ZypperSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ZypperSettings; - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** + * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. + * @param message ZypperSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ZypperSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); + /** + * Converts this ZypperSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** Properties of a WindowsUpdateSettings. */ + interface IWindowsUpdateSettings { - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** WindowsUpdateSettings classifications */ + classifications?: (google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]|null); - /** - * 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; + /** WindowsUpdateSettings excludes */ + excludes?: (string[]|null); - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** WindowsUpdateSettings exclusivePatches */ + exclusivePatches?: (string[]|null); + } - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a WindowsUpdateSettings. */ + class WindowsUpdateSettings implements IWindowsUpdateSettings { - /** - * 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; + /** + * Constructs a new WindowsUpdateSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings); - /** - * 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; + /** WindowsUpdateSettings classifications. */ + public classifications: google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]; - /** - * 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); + /** WindowsUpdateSettings excludes. */ + public excludes: string[]; - /** - * 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; + /** WindowsUpdateSettings exclusivePatches. */ + public exclusivePatches: string[]; - /** - * 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 }; + /** + * Creates a new WindowsUpdateSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdateSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings): google.cloud.osconfig.v1.WindowsUpdateSettings; - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @param message WindowsUpdateSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a ServiceOptions. */ - interface IServiceOptions { + /** + * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @param message WindowsUpdateSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** + * Decodes a WindowsUpdateSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WindowsUpdateSettings; - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Decodes a WindowsUpdateSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WindowsUpdateSettings; - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** + * Verifies a WindowsUpdateSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - } + /** + * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdateSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WindowsUpdateSettings; - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** + * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. + * @param message WindowsUpdateSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.WindowsUpdateSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); + /** + * Converts this WindowsUpdateSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ServiceOptions deprecated. */ - public deprecated: boolean; + namespace WindowsUpdateSettings { - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Classification enum. */ + enum Classification { + CLASSIFICATION_UNSPECIFIED = 0, + CRITICAL = 1, + SECURITY = 2, + DEFINITION = 3, + DRIVER = 4, + FEATURE_PACK = 5, + SERVICE_PACK = 6, + TOOL = 7, + UPDATE_ROLLUP = 8, + UPDATE = 9 + } + } + + /** Properties of an ExecStep. */ + interface IExecStep { - /** - * 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; + /** ExecStep linuxExecStepConfig */ + linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); - /** - * 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; + /** ExecStep windowsExecStepConfig */ + windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + } - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents an ExecStep. */ + class ExecStep implements IExecStep { - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + /** + * Constructs a new ExecStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IExecStep); - /** - * 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; + /** ExecStep linuxExecStepConfig. */ + public linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); - /** - * 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); + /** ExecStep windowsExecStepConfig. */ + public windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|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 new ExecStep instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecStep instance + */ + public static create(properties?: google.cloud.osconfig.v1.IExecStep): google.cloud.osconfig.v1.ExecStep; - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @param message ExecStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @param message ExecStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a MethodOptions. */ - interface IMethodOptions { + /** + * Decodes an ExecStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStep; - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** + * Decodes an ExecStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStep; - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** + * Verifies an ExecStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecStep + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStep; - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** + * Creates a plain object from an ExecStep message. Also converts values to other types if specified. + * @param message ExecStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ExecStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } + /** + * Converts this ExecStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** Properties of an ExecStepConfig. */ + interface IExecStepConfig { - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); + /** ExecStepConfig localPath */ + localPath?: (string|null); - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** ExecStepConfig gcsObject */ + gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** ExecStepConfig allowedSuccessCodes */ + allowedSuccessCodes?: (number[]|null); - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ExecStepConfig interpreter */ + interpreter?: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null); + } - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + /** Represents an ExecStepConfig. */ + class ExecStepConfig implements IExecStepConfig { - /** - * 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; + /** + * Constructs a new ExecStepConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IExecStepConfig); - /** - * 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; + /** ExecStepConfig localPath. */ + public localPath: string; - /** - * 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; + /** ExecStepConfig gcsObject. */ + public gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); - /** - * 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; + /** ExecStepConfig allowedSuccessCodes. */ + public allowedSuccessCodes: number[]; - /** - * 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); + /** ExecStepConfig interpreter. */ + public interpreter: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter); - /** - * 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; + /** ExecStepConfig executable. */ + public executable?: ("localPath"|"gcsObject"); - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new ExecStepConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecStepConfig instance + */ + public static create(properties?: google.cloud.osconfig.v1.IExecStepConfig): google.cloud.osconfig.v1.ExecStepConfig; - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @param message ExecStepConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; - namespace MethodOptions { + /** + * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @param message ExecStepConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } + /** + * Decodes an ExecStepConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStepConfig; - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { + /** + * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStepConfig; - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** + * Verifies an ExecStepConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** + * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecStepConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStepConfig; - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); + /** + * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. + * @param message ExecStepConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ExecStepConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); + /** + * Converts this ExecStepConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + namespace ExecStepConfig { - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + /** Interpreter enum. */ + enum Interpreter { + INTERPRETER_UNSPECIFIED = 0, + SHELL = 1, + POWERSHELL = 2 + } + } - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } + /** Properties of a GcsObject. */ + interface IGcsObject { - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** GcsObject bucket */ + bucket?: (string|null); - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); + /** GcsObject object */ + object?: (string|null); - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; + /** GcsObject generationNumber */ + generationNumber?: (number|Long|string|null); + } - /** UninterpretedOption identifierValue. */ - public identifierValue: string; + /** Represents a GcsObject. */ + class GcsObject implements IGcsObject { - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); + /** + * Constructs a new GcsObject. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGcsObject); - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); + /** GcsObject bucket. */ + public bucket: string; - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + /** GcsObject object. */ + public object: string; - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); + /** GcsObject generationNumber. */ + public generationNumber: (number|Long|string); - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** + * Creates a new GcsObject instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsObject instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGcsObject): google.cloud.osconfig.v1.GcsObject; - /** - * 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 GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @param message GcsObject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGcsObject, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @param message GcsObject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGcsObject, 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 a GcsObject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GcsObject; - /** - * 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 a GcsObject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GcsObject; - /** - * 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 a GcsObject message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsObject + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GcsObject; - /** - * 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 a GcsObject message. Also converts values to other types if specified. + * @param message GcsObject + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GcsObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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 GcsObject to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a PatchInstanceFilter. */ + interface IPatchInstanceFilter { - namespace UninterpretedOption { + /** PatchInstanceFilter all */ + all?: (boolean|null); - /** Properties of a NamePart. */ - interface INamePart { + /** PatchInstanceFilter groupLabels */ + groupLabels?: (google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]|null); - /** NamePart namePart */ - namePart: string; + /** PatchInstanceFilter zones */ + zones?: (string[]|null); - /** NamePart isExtension */ - isExtension: boolean; - } + /** PatchInstanceFilter instances */ + instances?: (string[]|null); - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** PatchInstanceFilter instanceNamePrefixes */ + instanceNamePrefixes?: (string[]|null); + } - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + /** Represents a PatchInstanceFilter. */ + class PatchInstanceFilter implements IPatchInstanceFilter { - /** NamePart namePart. */ - public namePart: string; + /** + * Constructs a new PatchInstanceFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter); - /** NamePart isExtension. */ - public isExtension: boolean; + /** PatchInstanceFilter all. */ + public all: 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; + /** PatchInstanceFilter groupLabels. */ + public groupLabels: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]; - /** - * 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; + /** PatchInstanceFilter zones. */ + public zones: string[]; - /** - * 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; + /** PatchInstanceFilter instances. */ + public instances: string[]; - /** - * 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; + /** PatchInstanceFilter instanceNamePrefixes. */ + public instanceNamePrefixes: string[]; - /** - * 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; + /** + * Creates a new PatchInstanceFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchInstanceFilter instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter): google.cloud.osconfig.v1.PatchInstanceFilter; - /** - * 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); + /** + * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @param message PatchInstanceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @param message PatchInstanceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Decodes a PatchInstanceFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchInstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchInstanceFilter; - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchInstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchInstanceFilter; - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** + * Verifies a PatchInstanceFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } + /** + * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchInstanceFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter; - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** + * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. + * @param message PatchInstanceFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchInstanceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + /** + * Converts this PatchInstanceFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + namespace PatchInstanceFilter { - /** - * 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; + /** Properties of a GroupLabel. */ + interface IGroupLabel { - /** - * 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; + /** GroupLabel labels */ + labels?: ({ [k: string]: string }|null); + } - /** - * 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; + /** Represents a GroupLabel. */ + class GroupLabel implements IGroupLabel { - /** - * 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; + /** + * Constructs a new GroupLabel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel); - /** - * 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; + /** GroupLabel labels. */ + public labels: { [k: string]: string }; - /** - * 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 new GroupLabel instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupLabel instance + */ + public static create(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; - /** - * 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; + /** + * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @param message GroupLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @param message GroupLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a GroupLabel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; - namespace SourceCodeInfo { + /** + * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; - /** Properties of a Location. */ - interface ILocation { + /** + * Verifies a GroupLabel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Location path */ - path?: (number[]|null); + /** + * Creates a GroupLabel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupLabel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; - /** Location span */ - span?: (number[]|null); + /** + * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. + * @param message GroupLabel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Location leadingComments */ - leadingComments?: (string|null); + /** + * Converts this GroupLabel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Location trailingComments */ - trailingComments?: (string|null); + /** Properties of a PatchRollout. */ + interface IPatchRollout { - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } + /** PatchRollout mode */ + mode?: (google.cloud.osconfig.v1.PatchRollout.Mode|keyof typeof google.cloud.osconfig.v1.PatchRollout.Mode|null); - /** Represents a Location. */ - class Location implements ILocation { + /** PatchRollout disruptionBudget */ + disruptionBudget?: (google.cloud.osconfig.v1.IFixedOrPercent|null); + } - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + /** Represents a PatchRollout. */ + class PatchRollout implements IPatchRollout { - /** Location path. */ - public path: number[]; + /** + * Constructs a new PatchRollout. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchRollout); - /** Location span. */ - public span: number[]; + /** PatchRollout mode. */ + public mode: (google.cloud.osconfig.v1.PatchRollout.Mode|keyof typeof google.cloud.osconfig.v1.PatchRollout.Mode); - /** Location leadingComments. */ - public leadingComments: string; + /** PatchRollout disruptionBudget. */ + public disruptionBudget?: (google.cloud.osconfig.v1.IFixedOrPercent|null); - /** Location trailingComments. */ - public trailingComments: string; + /** + * Creates a new PatchRollout instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchRollout instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchRollout): google.cloud.osconfig.v1.PatchRollout; - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** + * Encodes the specified PatchRollout message. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. + * @param message PatchRollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchRollout, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 PatchRollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. + * @param message PatchRollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchRollout, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a PatchRollout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchRollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchRollout; - /** - * 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 PatchRollout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchRollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchRollout; - /** - * 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; + /** + * Verifies a PatchRollout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a 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; + /** + * Creates a PatchRollout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchRollout + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchRollout; - /** - * 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 plain object from a PatchRollout message. Also converts values to other types if specified. + * @param message PatchRollout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchRollout, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this PatchRollout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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 }; + namespace PatchRollout { - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + ZONE_BY_ZONE = 1, + CONCURRENT_ZONES = 2 + } + } } } + } - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** Namespace api. */ + namespace api { - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** Represents a Http. */ + class Http implements IHttp { /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new Http. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + constructor(properties?: google.api.IHttp); - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new Http instance using the specified properties. * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance + * @returns Http instance */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + public static create(properties?: google.api.IHttp): google.api.Http; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * Encodes the specified 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.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * Encodes the specified 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.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * 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 GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; /** - * Verifies a GeneratedCodeInfo message. + * 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.api.Http; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * Creates a plain object from a 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.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this Http to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace GeneratedCodeInfo { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** Properties of an Annotation. */ - interface IAnnotation { + /** HttpRule selector */ + selector?: (string|null); - /** Annotation path */ - path?: (number[]|null); + /** HttpRule get */ + get?: (string|null); - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** HttpRule put */ + put?: (string|null); - /** Annotation begin */ - begin?: (number|null); + /** HttpRule post */ + post?: (string|null); - /** Annotation end */ - end?: (number|null); - } + /** HttpRule delete */ + "delete"?: (string|null); - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** HttpRule patch */ + patch?: (string|null); - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** Annotation path. */ - public path: number[]; + /** HttpRule body */ + body?: (string|null); - /** Annotation sourceFile. */ - public sourceFile: string; + /** HttpRule responseBody */ + responseBody?: (string|null); - /** Annotation begin. */ - public begin: number; + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } - /** Annotation end. */ - public end: number; + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { - /** - * 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; + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); - /** - * 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; + /** HttpRule selector. */ + public selector: string; - /** - * 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; + /** HttpRule get. */ + public get: string; - /** - * 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; + /** HttpRule put. */ + public put: string; - /** - * 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; + /** HttpRule post. */ + public post: string; - /** - * 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); + /** HttpRule delete. */ + public delete: string; - /** - * 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; + /** HttpRule patch. */ + public patch: string; - /** - * 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 }; + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a Duration. */ - interface IDuration { + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** Duration nanos */ - nanos?: (number|null); + /** CustomHttpPattern path */ + path?: (string|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Constructs a new Duration. + * Constructs a new CustomHttpPattern. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(properties?: google.api.ICustomHttpPattern); - /** Duration seconds. */ - public seconds: (number|Long|string); + /** CustomHttpPattern kind. */ + public kind: string; - /** Duration nanos. */ - public nanos: number; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a new Duration instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns CustomHttpPattern instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified 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.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified 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.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * 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 Duration + * @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.protobuf.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @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.protobuf.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a Duration message. + * 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 Duration message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * 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.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Timestamp. */ - interface ITimestamp { + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** ResourceDescriptor type */ + type?: (string|null); - /** Timestamp nanos */ - nanos?: (number|null); + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new Timestamp. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(properties?: google.api.IResourceDescriptor); - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** ResourceDescriptor type. */ + public type: string; - /** Timestamp nanos. */ - public nanos: number; + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, 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 + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Timestamp + * @returns ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @returns ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a Timestamp message. + * Verifies a ResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Empty. */ - interface IEmpty { + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** 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 Empty. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new Empty instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns ResourceReference instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Empty + * @returns ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @returns ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies an Empty message. + * Verifies a ResourceReference message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } } /** Namespace type. */ diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 68631b67432..76a2bb9772b 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -39,8356 +39,9348 @@ */ var google = {}; - google.cloud = (function() { + google.protobuf = (function() { /** - * Namespace cloud. + * Namespace protobuf. * @memberof google * @namespace */ - var cloud = {}; + var protobuf = {}; - cloud.osconfig = (function() { + protobuf.Timestamp = (function() { /** - * Namespace osconfig. - * @memberof google.cloud - * @namespace + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ - var osconfig = {}; - osconfig.v1 = (function() { + /** + * 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]]; + } - /** - * Namespace v1. - * @memberof google.cloud.osconfig - * @namespace - */ - var v1 = {}; + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - v1.OsConfigService = (function() { + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; - /** - * Constructs a new OsConfigService service. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an OsConfigService - * @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 OsConfigService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * 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); + }; - (OsConfigService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsConfigService; + /** + * 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; + }; - /** - * Creates new OsConfigService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.osconfig.v1.OsConfigService - * @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 {OsConfigService} RPC service. Useful where requests and/or responses are streamed. - */ - OsConfigService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * 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(); + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef ExecutePatchJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob - */ + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls ExecutePatchJob. - * @function executePatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.executePatchJob = function executePatchJob(request, callback) { - return this.rpcCall(executePatchJob, $root.google.cloud.osconfig.v1.ExecutePatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); - }, "name", { value: "ExecutePatchJob" }); + /** + * 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()); + }; - /** - * Calls ExecutePatchJob. - * @function executePatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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; + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef GetPatchJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob - */ + /** + * 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; + }; - /** - * Calls GetPatchJob. - * @function getPatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.getPatchJob = function getPatchJob(request, callback) { - return this.rpcCall(getPatchJob, $root.google.cloud.osconfig.v1.GetPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); - }, "name", { value: "GetPatchJob" }); - - /** - * Calls GetPatchJob. - * @function getPatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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; + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef CancelPatchJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob - */ + /** + * 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); + }; - /** - * Calls CancelPatchJob. - * @function cancelPatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.cancelPatchJob = function cancelPatchJob(request, callback) { - return this.rpcCall(cancelPatchJob, $root.google.cloud.osconfig.v1.CancelPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); - }, "name", { value: "CancelPatchJob" }); + return Timestamp; + })(); - /** - * Calls CancelPatchJob. - * @function cancelPatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + protobuf.FileDescriptorSet = (function() { - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef ListPatchJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} [response] ListPatchJobsResponse - */ + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ - /** - * Calls ListPatchJobs. - * @function listPatchJobs - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback} callback Node-style callback called with the error, if any, and ListPatchJobsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.listPatchJobs = function listPatchJobs(request, callback) { - return this.rpcCall(listPatchJobs, $root.google.cloud.osconfig.v1.ListPatchJobsRequest, $root.google.cloud.osconfig.v1.ListPatchJobsResponse, request, callback); - }, "name", { value: "ListPatchJobs" }); + /** + * 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]]; + } - /** - * Calls ListPatchJobs. - * @function listPatchJobs - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef ListPatchJobInstanceDetailsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} [response] ListPatchJobInstanceDetailsResponse - */ + /** + * 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); + }; - /** - * Calls ListPatchJobInstanceDetails. - * @function listPatchJobInstanceDetails - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback} callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.listPatchJobInstanceDetails = function listPatchJobInstanceDetails(request, callback) { - return this.rpcCall(listPatchJobInstanceDetails, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, request, callback); - }, "name", { value: "ListPatchJobInstanceDetails" }); + /** + * 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; + }; - /** - * Calls ListPatchJobInstanceDetails. - * @function listPatchJobInstanceDetails - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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(); + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef CreatePatchDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment - */ + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls CreatePatchDeployment. - * @function createPatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.createPatchDeployment = function createPatchDeployment(request, callback) { - return this.rpcCall(createPatchDeployment, $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); - }, "name", { value: "CreatePatchDeployment" }); - - /** - * Calls CreatePatchDeployment. - * @function createPatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef GetPatchDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment - */ + /** + * 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()); + }; - /** - * Calls GetPatchDeployment. - * @function getPatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.getPatchDeployment = function getPatchDeployment(request, callback) { - return this.rpcCall(getPatchDeployment, $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); - }, "name", { value: "GetPatchDeployment" }); + /** + * 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; + }; - /** - * Calls GetPatchDeployment. - * @function getPatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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; + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef ListPatchDeploymentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} [response] ListPatchDeploymentsResponse - */ + /** + * 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; + }; - /** - * Calls ListPatchDeployments. - * @function listPatchDeployments - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback} callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.listPatchDeployments = function listPatchDeployments(request, callback) { - return this.rpcCall(listPatchDeployments, $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest, $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse, request, callback); - }, "name", { value: "ListPatchDeployments" }); + /** + * 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); + }; - /** - * Calls ListPatchDeployments. - * @function listPatchDeployments - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return FileDescriptorSet; + })(); - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef DeletePatchDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + protobuf.FileDescriptorProto = (function() { - /** - * Calls DeletePatchDeployment. - * @function deletePatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.deletePatchDeployment = function deletePatchDeployment(request, callback) { - return this.rpcCall(deletePatchDeployment, $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePatchDeployment" }); + /** + * 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 + */ - /** - * Calls DeletePatchDeployment. - * @function deletePatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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]]; + } - return OsConfigService; - })(); + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; - v1.PatchDeployment = (function() { + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; - /** - * Properties of a PatchDeployment. - * @memberof google.cloud.osconfig.v1 - * @interface IPatchDeployment - * @property {string|null} [name] PatchDeployment name - * @property {string|null} [description] PatchDeployment description - * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchDeployment instanceFilter - * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchDeployment patchConfig - * @property {google.protobuf.IDuration|null} [duration] PatchDeployment duration - * @property {google.cloud.osconfig.v1.IOneTimeSchedule|null} [oneTimeSchedule] PatchDeployment oneTimeSchedule - * @property {google.cloud.osconfig.v1.IRecurringSchedule|null} [recurringSchedule] PatchDeployment recurringSchedule - * @property {google.protobuf.ITimestamp|null} [createTime] PatchDeployment createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PatchDeployment updateTime - * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] PatchDeployment lastExecuteTime - */ + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; - /** - * Constructs a new PatchDeployment. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchDeployment. - * @implements IPatchDeployment - * @constructor - * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set - */ - function PatchDeployment(properties) { - if (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 publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - /** - * PatchDeployment name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.name = ""; + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - /** - * PatchDeployment description. - * @member {string} description - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.description = ""; + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; - /** - * PatchDeployment instanceFilter. - * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.instanceFilter = null; + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; - /** - * PatchDeployment patchConfig. - * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.patchConfig = null; + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; - /** - * PatchDeployment duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.duration = null; + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; - /** - * PatchDeployment oneTimeSchedule. - * @member {google.cloud.osconfig.v1.IOneTimeSchedule|null|undefined} oneTimeSchedule - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.oneTimeSchedule = null; + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; - /** - * PatchDeployment recurringSchedule. - * @member {google.cloud.osconfig.v1.IRecurringSchedule|null|undefined} recurringSchedule - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.recurringSchedule = null; + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; - /** - * PatchDeployment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.createTime = null; + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; - /** - * PatchDeployment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.updateTime = null; + /** + * 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); + }; - /** - * PatchDeployment lastExecuteTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.lastExecuteTime = null; + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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(); + }; - /** - * PatchDeployment schedule. - * @member {"oneTimeSchedule"|"recurringSchedule"|undefined} schedule - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - Object.defineProperty(PatchDeployment.prototype, "schedule", { - get: $util.oneOfGetter($oneOfFields = ["oneTimeSchedule", "recurringSchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PatchDeployment instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @static - * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment instance - */ - PatchDeployment.create = function create(properties) { - return new PatchDeployment(properties); - }; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @static - * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchDeployment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) - $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) - $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.oneTimeSchedule != null && Object.hasOwnProperty.call(message, "oneTimeSchedule")) - $root.google.cloud.osconfig.v1.OneTimeSchedule.encode(message.oneTimeSchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.recurringSchedule != null && Object.hasOwnProperty.call(message, "recurringSchedule")) - $root.google.cloud.osconfig.v1.RecurringSchedule.encode(message.recurringSchedule, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) - $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; + /** + * 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()); + }; - /** - * Encodes the specified PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @static - * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchDeployment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; - /** - * Decodes a PatchDeployment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchDeployment.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchDeployment(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); - break; - case 4: - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); - break; - case 5: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.decode(reader, reader.uint32()); - break; - case 7: - message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.decode(reader, reader.uint32()); - break; - case 8: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; - /** - * Decodes a PatchDeployment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchDeployment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; - /** - * Verifies a PatchDeployment message. - * @function verify - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PatchDeployment.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { - var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); - if (error) - return "instanceFilter." + error; - } - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { - var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); - if (error) - return "patchConfig." + error; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { - properties.schedule = 1; - { - var error = $root.google.cloud.osconfig.v1.OneTimeSchedule.verify(message.oneTimeSchedule); - if (error) - return "oneTimeSchedule." + error; - } - } - if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { - if (properties.schedule === 1) - return "schedule: multiple values"; - properties.schedule = 1; - { - var error = $root.google.cloud.osconfig.v1.RecurringSchedule.verify(message.recurringSchedule); - if (error) - return "recurringSchedule." + error; - } - } - 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.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); - if (error) - return "lastExecuteTime." + error; - } - return null; - }; + /** + * 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); + }; - /** - * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment - */ - PatchDeployment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchDeployment) - return object; - var message = new $root.google.cloud.osconfig.v1.PatchDeployment(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.instanceFilter != null) { - if (typeof object.instanceFilter !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.instanceFilter: object expected"); - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); - } - if (object.patchConfig != null) { - if (typeof object.patchConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.patchConfig: object expected"); - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.oneTimeSchedule != null) { - if (typeof object.oneTimeSchedule !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.oneTimeSchedule: object expected"); - message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.fromObject(object.oneTimeSchedule); - } - if (object.recurringSchedule != null) { - if (typeof object.recurringSchedule !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.recurringSchedule: object expected"); - message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.fromObject(object.recurringSchedule); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.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.osconfig.v1.PatchDeployment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastExecuteTime != null) { - if (typeof object.lastExecuteTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.lastExecuteTime: object expected"); - message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); - } - return message; - }; + return FileDescriptorProto; + })(); - /** - * Creates a plain object from a PatchDeployment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @static - * @param {google.cloud.osconfig.v1.PatchDeployment} message PatchDeployment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PatchDeployment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.instanceFilter = null; - object.patchConfig = null; - object.duration = null; - object.createTime = null; - object.updateTime = null; - object.lastExecuteTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) - object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) - object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { - object.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.toObject(message.oneTimeSchedule, options); - if (options.oneofs) - object.schedule = "oneTimeSchedule"; - } - if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { - object.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.toObject(message.recurringSchedule, options); - if (options.oneofs) - object.schedule = "recurringSchedule"; - } - 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.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) - object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); - return object; - }; + protobuf.DescriptorProto = (function() { - /** - * Converts this PatchDeployment to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - * @returns {Object.} JSON object - */ - PatchDeployment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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 + */ - return PatchDeployment; - })(); + /** + * 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]]; + } - v1.OneTimeSchedule = (function() { + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; - /** - * Properties of an OneTimeSchedule. - * @memberof google.cloud.osconfig.v1 - * @interface IOneTimeSchedule - * @property {google.protobuf.ITimestamp|null} [executeTime] OneTimeSchedule executeTime - */ + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; - /** - * Constructs a new OneTimeSchedule. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an OneTimeSchedule. - * @implements IOneTimeSchedule - * @constructor - * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set - */ - function OneTimeSchedule(properties) { - if (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 extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; - /** - * OneTimeSchedule executeTime. - * @member {google.protobuf.ITimestamp|null|undefined} executeTime - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @instance - */ - OneTimeSchedule.prototype.executeTime = null; - - /** - * Creates a new OneTimeSchedule instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @static - * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule instance - */ - OneTimeSchedule.create = function create(properties) { - return new OneTimeSchedule(properties); - }; + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; - /** - * Encodes the specified OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @static - * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneTimeSchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.executeTime != null && Object.hasOwnProperty.call(message, "executeTime")) - $root.google.protobuf.Timestamp.encode(message.executeTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; - /** - * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @static - * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneTimeSchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; - /** - * Decodes an OneTimeSchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneTimeSchedule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.executeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; - /** - * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneTimeSchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; - /** - * Verifies an OneTimeSchedule message. - * @function verify - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneTimeSchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.executeTime != null && message.hasOwnProperty("executeTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.executeTime); - if (error) - return "executeTime." + error; - } - return null; - }; + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * Creates an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule - */ - OneTimeSchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.OneTimeSchedule) - return object; - var message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); - if (object.executeTime != null) { - if (typeof object.executeTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.OneTimeSchedule.executeTime: object expected"); - message.executeTime = $root.google.protobuf.Timestamp.fromObject(object.executeTime); - } - return message; - }; + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @static - * @param {google.cloud.osconfig.v1.OneTimeSchedule} message OneTimeSchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneTimeSchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.executeTime = null; - if (message.executeTime != null && message.hasOwnProperty("executeTime")) - object.executeTime = $root.google.protobuf.Timestamp.toObject(message.executeTime, options); - return object; - }; + /** + * 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); + }; - /** - * Converts this OneTimeSchedule to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.OneTimeSchedule - * @instance - * @returns {Object.} JSON object - */ - OneTimeSchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return OneTimeSchedule; - })(); - - v1.RecurringSchedule = (function() { - - /** - * Properties of a RecurringSchedule. - * @memberof google.cloud.osconfig.v1 - * @interface IRecurringSchedule - * @property {google.type.ITimeZone|null} [timeZone] RecurringSchedule timeZone - * @property {google.protobuf.ITimestamp|null} [startTime] RecurringSchedule startTime - * @property {google.protobuf.ITimestamp|null} [endTime] RecurringSchedule endTime - * @property {google.type.ITimeOfDay|null} [timeOfDay] RecurringSchedule timeOfDay - * @property {google.cloud.osconfig.v1.RecurringSchedule.Frequency|null} [frequency] RecurringSchedule frequency - * @property {google.cloud.osconfig.v1.IWeeklySchedule|null} [weekly] RecurringSchedule weekly - * @property {google.cloud.osconfig.v1.IMonthlySchedule|null} [monthly] RecurringSchedule monthly - * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] RecurringSchedule lastExecuteTime - * @property {google.protobuf.ITimestamp|null} [nextExecuteTime] RecurringSchedule nextExecuteTime - */ + /** + * 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(); + }; - /** - * Constructs a new RecurringSchedule. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a RecurringSchedule. - * @implements IRecurringSchedule - * @constructor - * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set - */ - function RecurringSchedule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * RecurringSchedule timeZone. - * @member {google.type.ITimeZone|null|undefined} timeZone - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.timeZone = null; - - /** - * RecurringSchedule startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.startTime = null; - - /** - * RecurringSchedule endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.endTime = null; + /** + * 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()); + }; - /** - * RecurringSchedule timeOfDay. - * @member {google.type.ITimeOfDay|null|undefined} timeOfDay - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.timeOfDay = null; + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; - /** - * RecurringSchedule frequency. - * @member {google.cloud.osconfig.v1.RecurringSchedule.Frequency} frequency - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.frequency = 0; + /** + * 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; + }; - /** - * RecurringSchedule weekly. - * @member {google.cloud.osconfig.v1.IWeeklySchedule|null|undefined} weekly - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.weekly = null; + /** + * 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; + }; - /** - * RecurringSchedule monthly. - * @member {google.cloud.osconfig.v1.IMonthlySchedule|null|undefined} monthly - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.monthly = null; + /** + * 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); + }; - /** - * RecurringSchedule lastExecuteTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.lastExecuteTime = null; + DescriptorProto.ExtensionRange = (function() { - /** - * RecurringSchedule nextExecuteTime. - * @member {google.protobuf.ITimestamp|null|undefined} nextExecuteTime - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.nextExecuteTime = null; + /** + * 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 + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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]]; + } - /** - * RecurringSchedule scheduleConfig. - * @member {"weekly"|"monthly"|undefined} scheduleConfig - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - Object.defineProperty(RecurringSchedule.prototype, "scheduleConfig", { - get: $util.oneOfGetter($oneOfFields = ["weekly", "monthly"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; - /** - * Creates a new RecurringSchedule instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @static - * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule instance - */ - RecurringSchedule.create = function create(properties) { - return new RecurringSchedule(properties); - }; + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; - /** - * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @static - * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecurringSchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.timeOfDay != null && Object.hasOwnProperty.call(message, "timeOfDay")) - $root.google.type.TimeOfDay.encode(message.timeOfDay, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frequency); - if (message.weekly != null && Object.hasOwnProperty.call(message, "weekly")) - $root.google.cloud.osconfig.v1.WeeklySchedule.encode(message.weekly, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.monthly != null && Object.hasOwnProperty.call(message, "monthly")) - $root.google.cloud.osconfig.v1.MonthlySchedule.encode(message.monthly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) - $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.nextExecuteTime != null && Object.hasOwnProperty.call(message, "nextExecuteTime")) - $root.google.protobuf.Timestamp.encode(message.nextExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; - /** - * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @static - * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecurringSchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes a RecurringSchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecurringSchedule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.timeOfDay = $root.google.type.TimeOfDay.decode(reader, reader.uint32()); - break; - case 5: - message.frequency = reader.int32(); - break; - case 6: - message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.decode(reader, reader.uint32()); - break; - case 7: - message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.decode(reader, reader.uint32()); - break; - case 9: - message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.nextExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecurringSchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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(); + }; - /** - * Verifies a RecurringSchedule message. - * @function verify - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecurringSchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - var error = $root.google.type.TimeZone.verify(message.timeZone); - if (error) - return "timeZone." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) { - var error = $root.google.type.TimeOfDay.verify(message.timeOfDay); - if (error) - return "timeOfDay." + error; - } - if (message.frequency != null && message.hasOwnProperty("frequency")) - switch (message.frequency) { - default: - return "frequency: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.weekly != null && message.hasOwnProperty("weekly")) { - properties.scheduleConfig = 1; - { - var error = $root.google.cloud.osconfig.v1.WeeklySchedule.verify(message.weekly); - if (error) - return "weekly." + error; - } + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.monthly != null && message.hasOwnProperty("monthly")) { - if (properties.scheduleConfig === 1) - return "scheduleConfig: multiple values"; - properties.scheduleConfig = 1; - { - var error = $root.google.cloud.osconfig.v1.MonthlySchedule.verify(message.monthly); - if (error) - return "monthly." + error; - } - } - if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); - if (error) - return "lastExecuteTime." + error; - } - if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.nextExecuteTime); - if (error) - return "nextExecuteTime." + error; - } - return null; - }; - - /** - * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule - */ - RecurringSchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.RecurringSchedule) - return object; - var message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); - if (object.timeZone != null) { - if (typeof object.timeZone !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeZone: object expected"); - message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.timeOfDay != null) { - if (typeof object.timeOfDay !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeOfDay: object expected"); - message.timeOfDay = $root.google.type.TimeOfDay.fromObject(object.timeOfDay); - } - switch (object.frequency) { - case "FREQUENCY_UNSPECIFIED": - case 0: - message.frequency = 0; - break; - case "WEEKLY": - case 1: - message.frequency = 1; - break; - case "MONTHLY": - case 2: - message.frequency = 2; - break; - } - if (object.weekly != null) { - if (typeof object.weekly !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.weekly: object expected"); - message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.fromObject(object.weekly); - } - if (object.monthly != null) { - if (typeof object.monthly !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.monthly: object expected"); - message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.fromObject(object.monthly); - } - if (object.lastExecuteTime != null) { - if (typeof object.lastExecuteTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.lastExecuteTime: object expected"); - message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); - } - if (object.nextExecuteTime != null) { - if (typeof object.nextExecuteTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.nextExecuteTime: object expected"); - message.nextExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.nextExecuteTime); - } - return message; - }; - - /** - * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @static - * @param {google.cloud.osconfig.v1.RecurringSchedule} message RecurringSchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecurringSchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.timeZone = null; - object.startTime = null; - object.endTime = null; - object.timeOfDay = null; - object.frequency = options.enums === String ? "FREQUENCY_UNSPECIFIED" : 0; - object.lastExecuteTime = null; - object.nextExecuteTime = null; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) - object.timeOfDay = $root.google.type.TimeOfDay.toObject(message.timeOfDay, options); - if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = options.enums === String ? $root.google.cloud.osconfig.v1.RecurringSchedule.Frequency[message.frequency] : message.frequency; - if (message.weekly != null && message.hasOwnProperty("weekly")) { - object.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.toObject(message.weekly, options); - if (options.oneofs) - object.scheduleConfig = "weekly"; - } - if (message.monthly != null && message.hasOwnProperty("monthly")) { - object.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.toObject(message.monthly, options); - if (options.oneofs) - object.scheduleConfig = "monthly"; - } - if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) - object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); - if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) - object.nextExecuteTime = $root.google.protobuf.Timestamp.toObject(message.nextExecuteTime, options); - return object; - }; - - /** - * Converts this RecurringSchedule to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - * @returns {Object.} JSON object - */ - RecurringSchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Frequency enum. - * @name google.cloud.osconfig.v1.RecurringSchedule.Frequency - * @enum {number} - * @property {number} FREQUENCY_UNSPECIFIED=0 FREQUENCY_UNSPECIFIED value - * @property {number} WEEKLY=1 WEEKLY value - * @property {number} MONTHLY=2 MONTHLY value - */ - RecurringSchedule.Frequency = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FREQUENCY_UNSPECIFIED"] = 0; - values[valuesById[1] = "WEEKLY"] = 1; - values[valuesById[2] = "MONTHLY"] = 2; - return values; - })(); - - return RecurringSchedule; - })(); + } + return message; + }; - v1.WeeklySchedule = (function() { + /** + * 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()); + }; - /** - * Properties of a WeeklySchedule. - * @memberof google.cloud.osconfig.v1 - * @interface IWeeklySchedule - * @property {google.type.DayOfWeek|null} [dayOfWeek] WeeklySchedule dayOfWeek - */ + /** + * 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; + }; - /** - * Constructs a new WeeklySchedule. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a WeeklySchedule. - * @implements IWeeklySchedule - * @constructor - * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set - */ - function WeeklySchedule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates an 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; + }; - /** - * WeeklySchedule dayOfWeek. - * @member {google.type.DayOfWeek} dayOfWeek - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @instance - */ - WeeklySchedule.prototype.dayOfWeek = 0; - - /** - * Creates a new WeeklySchedule instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @static - * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule instance - */ - WeeklySchedule.create = function create(properties) { - return new WeeklySchedule(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @static - * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeeklySchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dayOfWeek); - return writer; - }; + /** + * 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); + }; - /** - * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @static - * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeeklySchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return ExtensionRange; + })(); - /** - * Decodes a WeeklySchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeeklySchedule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dayOfWeek = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + DescriptorProto.ReservedRange = (function() { - /** - * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeeklySchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ - /** - * Verifies a WeeklySchedule message. - * @function verify - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeeklySchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { - default: - return "dayOfWeek: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - return null; - }; + /** + * 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]]; + } - /** - * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule - */ - WeeklySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.WeeklySchedule) - return object; - var message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); - switch (object.dayOfWeek) { - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.dayOfWeek = 0; - break; - case "MONDAY": - case 1: - message.dayOfWeek = 1; - break; - case "TUESDAY": - case 2: - message.dayOfWeek = 2; - break; - case "WEDNESDAY": - case 3: - message.dayOfWeek = 3; - break; - case "THURSDAY": - case 4: - message.dayOfWeek = 4; - break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; - break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; - break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; - break; - } - return message; - }; + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; - /** - * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @static - * @param {google.cloud.osconfig.v1.WeeklySchedule} message WeeklySchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeeklySchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; - return object; - }; + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; - /** - * Converts this WeeklySchedule to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @instance - * @returns {Object.} JSON object - */ - WeeklySchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WeeklySchedule; - })(); + /** + * 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); + }; - v1.MonthlySchedule = (function() { + /** + * 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; + }; - /** - * Properties of a MonthlySchedule. - * @memberof google.cloud.osconfig.v1 - * @interface IMonthlySchedule - * @property {google.cloud.osconfig.v1.IWeekDayOfMonth|null} [weekDayOfMonth] MonthlySchedule weekDayOfMonth - * @property {number|null} [monthDay] MonthlySchedule monthDay - */ + /** + * 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(); + }; - /** - * Constructs a new MonthlySchedule. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a MonthlySchedule. - * @implements IMonthlySchedule - * @constructor - * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set - */ - function MonthlySchedule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * MonthlySchedule weekDayOfMonth. - * @member {google.cloud.osconfig.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @instance - */ - MonthlySchedule.prototype.weekDayOfMonth = null; + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MonthlySchedule monthDay. - * @member {number} monthDay - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @instance - */ - MonthlySchedule.prototype.monthDay = 0; + /** + * 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; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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; + }; - /** - * MonthlySchedule dayOfMonth. - * @member {"weekDayOfMonth"|"monthDay"|undefined} dayOfMonth - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @instance - */ - Object.defineProperty(MonthlySchedule.prototype, "dayOfMonth", { - get: $util.oneOfGetter($oneOfFields = ["weekDayOfMonth", "monthDay"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * 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; + }; - /** - * Creates a new MonthlySchedule instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @static - * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule instance - */ - MonthlySchedule.create = function create(properties) { - return new MonthlySchedule(properties); - }; + /** + * 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); + }; - /** - * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @static - * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonthlySchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) - $root.google.cloud.osconfig.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.monthDay != null && Object.hasOwnProperty.call(message, "monthDay")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.monthDay); - return writer; - }; + return ReservedRange; + })(); - /** - * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @static - * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonthlySchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MonthlySchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonthlySchedule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.decode(reader, reader.uint32()); - break; - case 2: - message.monthDay = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonthlySchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return DescriptorProto; + })(); - /** - * Verifies a MonthlySchedule message. - * @function verify - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonthlySchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { - properties.dayOfMonth = 1; - { - var error = $root.google.cloud.osconfig.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); - if (error) - return "weekDayOfMonth." + error; - } - } - if (message.monthDay != null && message.hasOwnProperty("monthDay")) { - if (properties.dayOfMonth === 1) - return "dayOfMonth: multiple values"; - properties.dayOfMonth = 1; - if (!$util.isInteger(message.monthDay)) - return "monthDay: integer expected"; - } - return null; - }; + protobuf.ExtensionRangeOptions = (function() { - /** - * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule - */ - MonthlySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.MonthlySchedule) - return object; - var message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); - if (object.weekDayOfMonth != null) { - if (typeof object.weekDayOfMonth !== "object") - throw TypeError(".google.cloud.osconfig.v1.MonthlySchedule.weekDayOfMonth: object expected"); - message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); - } - if (object.monthDay != null) - message.monthDay = object.monthDay | 0; - return message; - }; + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ - /** - * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @static - * @param {google.cloud.osconfig.v1.MonthlySchedule} message MonthlySchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonthlySchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { - object.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); - if (options.oneofs) - object.dayOfMonth = "weekDayOfMonth"; - } - if (message.monthDay != null && message.hasOwnProperty("monthDay")) { - object.monthDay = message.monthDay; - if (options.oneofs) - object.dayOfMonth = "monthDay"; - } - return object; - }; + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Converts this MonthlySchedule to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.MonthlySchedule - * @instance - * @returns {Object.} JSON object - */ - MonthlySchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - return MonthlySchedule; - })(); + /** + * 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); + }; - v1.WeekDayOfMonth = (function() { + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; - /** - * Properties of a WeekDayOfMonth. - * @memberof google.cloud.osconfig.v1 - * @interface IWeekDayOfMonth - * @property {number|null} [weekOrdinal] WeekDayOfMonth weekOrdinal - * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek - */ + /** + * 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(); + }; - /** - * Constructs a new WeekDayOfMonth. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a WeekDayOfMonth. - * @implements IWeekDayOfMonth - * @constructor - * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set - */ - function WeekDayOfMonth(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * WeekDayOfMonth weekOrdinal. - * @member {number} weekOrdinal - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @instance - */ - WeekDayOfMonth.prototype.weekOrdinal = 0; + /** + * 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()); + }; - /** - * WeekDayOfMonth dayOfWeek. - * @member {google.type.DayOfWeek} dayOfWeek - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @instance - */ - WeekDayOfMonth.prototype.dayOfWeek = 0; + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; - /** - * Creates a new WeekDayOfMonth instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @static - * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth instance - */ - WeekDayOfMonth.create = function create(properties) { - return new WeekDayOfMonth(properties); - }; + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @static - * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeekDayOfMonth.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weekOrdinal != null && Object.hasOwnProperty.call(message, "weekOrdinal")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOrdinal); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); - return writer; - }; + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @static - * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeekDayOfMonth.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.weekOrdinal = reader.int32(); - break; - case 2: - message.dayOfWeek = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return ExtensionRangeOptions; + })(); - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + protobuf.FieldDescriptorProto = (function() { - /** - * Verifies a WeekDayOfMonth message. - * @function verify - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeekDayOfMonth.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) - if (!$util.isInteger(message.weekOrdinal)) - return "weekOrdinal: integer expected"; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { - default: - return "dayOfWeek: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - return null; - }; + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ - /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth - */ - WeekDayOfMonth.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.WeekDayOfMonth) - return object; - var message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); - if (object.weekOrdinal != null) - message.weekOrdinal = object.weekOrdinal | 0; - switch (object.dayOfWeek) { - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.dayOfWeek = 0; - break; - case "MONDAY": - case 1: - message.dayOfWeek = 1; - break; - case "TUESDAY": - case 2: - message.dayOfWeek = 2; - break; - case "WEDNESDAY": - case 3: - message.dayOfWeek = 3; - break; - case "THURSDAY": - case 4: - message.dayOfWeek = 4; - break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; - break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; - break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; - break; - } - return message; - }; - - /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @static - * @param {google.cloud.osconfig.v1.WeekDayOfMonth} message WeekDayOfMonth - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeekDayOfMonth.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.weekOrdinal = 0; - object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; - } - if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) - object.weekOrdinal = message.weekOrdinal; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; - return object; - }; + /** + * 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]]; + } - /** - * Converts this WeekDayOfMonth to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth - * @instance - * @returns {Object.} JSON object - */ - WeekDayOfMonth.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; - return WeekDayOfMonth; - })(); + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; - v1.CreatePatchDeploymentRequest = (function() { + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; - /** - * Properties of a CreatePatchDeploymentRequest. - * @memberof google.cloud.osconfig.v1 - * @interface ICreatePatchDeploymentRequest - * @property {string|null} [parent] CreatePatchDeploymentRequest parent - * @property {string|null} [patchDeploymentId] CreatePatchDeploymentRequest patchDeploymentId - * @property {google.cloud.osconfig.v1.IPatchDeployment|null} [patchDeployment] CreatePatchDeploymentRequest patchDeployment - */ + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; - /** - * Constructs a new CreatePatchDeploymentRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a CreatePatchDeploymentRequest. - * @implements ICreatePatchDeploymentRequest - * @constructor - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set - */ - function CreatePatchDeploymentRequest(properties) { - if (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 typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; - /** - * CreatePatchDeploymentRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @instance - */ - CreatePatchDeploymentRequest.prototype.parent = ""; + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; - /** - * CreatePatchDeploymentRequest patchDeploymentId. - * @member {string} patchDeploymentId - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @instance - */ - CreatePatchDeploymentRequest.prototype.patchDeploymentId = ""; + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; - /** - * CreatePatchDeploymentRequest patchDeployment. - * @member {google.cloud.osconfig.v1.IPatchDeployment|null|undefined} patchDeployment - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @instance - */ - CreatePatchDeploymentRequest.prototype.patchDeployment = null; + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; - /** - * Creates a new CreatePatchDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest instance - */ - CreatePatchDeploymentRequest.create = function create(properties) { - return new CreatePatchDeploymentRequest(properties); - }; + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; - /** - * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePatchDeploymentRequest.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.patchDeploymentId != null && Object.hasOwnProperty.call(message, "patchDeploymentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.patchDeploymentId); - if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) - $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; - /** - * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; - /** - * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePatchDeploymentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.patchDeploymentId = reader.string(); - break; - case 3: - message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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); + }; - /** - * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies a CreatePatchDeploymentRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreatePatchDeploymentRequest.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.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) - if (!$util.isString(message.patchDeploymentId)) - return "patchDeploymentId: string expected"; - if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) { - var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployment); - if (error) - return "patchDeployment." + error; - } - return null; - }; + /** + * 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(); + }; - /** - * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest - */ - CreatePatchDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.patchDeploymentId != null) - message.patchDeploymentId = String(object.patchDeploymentId); - if (object.patchDeployment != null) { - if (typeof object.patchDeployment !== "object") - throw TypeError(".google.cloud.osconfig.v1.CreatePatchDeploymentRequest.patchDeployment: object expected"); - message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployment); - } - return message; - }; + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} message CreatePatchDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreatePatchDeploymentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.patchDeploymentId = ""; - object.patchDeployment = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) - object.patchDeploymentId = message.patchDeploymentId; - if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) - object.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployment, options); - return object; - }; + /** + * 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()); + }; - /** - * Converts this CreatePatchDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - CreatePatchDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreatePatchDeploymentRequest; - })(); - - v1.GetPatchDeploymentRequest = (function() { - - /** - * Properties of a GetPatchDeploymentRequest. - * @memberof google.cloud.osconfig.v1 - * @interface IGetPatchDeploymentRequest - * @property {string|null} [name] GetPatchDeploymentRequest name - */ - - /** - * Constructs a new GetPatchDeploymentRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a GetPatchDeploymentRequest. - * @implements IGetPatchDeploymentRequest - * @constructor - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set - */ - function GetPatchDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; - /** - * GetPatchDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @instance - */ - GetPatchDeploymentRequest.prototype.name = ""; - - /** - * Creates a new GetPatchDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest instance - */ - GetPatchDeploymentRequest.create = function create(properties) { - return new GetPatchDeploymentRequest(properties); - }; + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; - /** - * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPatchDeploymentRequest.encode = function encode(message, writer) { - 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 GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPatchDeploymentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; - /** - * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies a GetPatchDeploymentRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPatchDeploymentRequest.verify = function verify(message) { - if (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; - }; + /** + * 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; + })(); - /** - * Creates a GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest - */ - GetPatchDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); - /** - * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.GetPatchDeploymentRequest} message GetPatchDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPatchDeploymentRequest.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; - }; + return FieldDescriptorProto; + })(); - /** - * Converts this GetPatchDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - GetPatchDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + protobuf.OneofDescriptorProto = (function() { - return GetPatchDeploymentRequest; - })(); + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ - v1.ListPatchDeploymentsRequest = (function() { + /** + * 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]]; + } - /** - * Properties of a ListPatchDeploymentsRequest. - * @memberof google.cloud.osconfig.v1 - * @interface IListPatchDeploymentsRequest - * @property {string|null} [parent] ListPatchDeploymentsRequest parent - * @property {number|null} [pageSize] ListPatchDeploymentsRequest pageSize - * @property {string|null} [pageToken] ListPatchDeploymentsRequest pageToken - */ + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; - /** - * Constructs a new ListPatchDeploymentsRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchDeploymentsRequest. - * @implements IListPatchDeploymentsRequest - * @constructor - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set - */ - function ListPatchDeploymentsRequest(properties) { - if (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 options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; - /** - * ListPatchDeploymentsRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @instance - */ - ListPatchDeploymentsRequest.prototype.parent = ""; + /** + * 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); + }; - /** - * ListPatchDeploymentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @instance - */ - ListPatchDeploymentsRequest.prototype.pageSize = 0; + /** + * 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; + }; - /** - * ListPatchDeploymentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @instance - */ - ListPatchDeploymentsRequest.prototype.pageToken = ""; + /** + * 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(); + }; - /** - * Creates a new ListPatchDeploymentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest instance - */ - ListPatchDeploymentsRequest.create = function create(properties) { - return new ListPatchDeploymentsRequest(properties); - }; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchDeploymentsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + /** + * Decodes 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()); + }; - /** - * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchDeploymentsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies a ListPatchDeploymentsRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPatchDeploymentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest - */ - ListPatchDeploymentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + return OneofDescriptorProto; + })(); - /** - * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @static - * @param {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} message ListPatchDeploymentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPatchDeploymentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + protobuf.EnumDescriptorProto = (function() { - /** - * Converts this ListPatchDeploymentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPatchDeploymentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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 + */ - return ListPatchDeploymentsRequest; - })(); + /** + * 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]]; + } - v1.ListPatchDeploymentsResponse = (function() { + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; - /** - * Properties of a ListPatchDeploymentsResponse. - * @memberof google.cloud.osconfig.v1 - * @interface IListPatchDeploymentsResponse - * @property {Array.|null} [patchDeployments] ListPatchDeploymentsResponse patchDeployments - * @property {string|null} [nextPageToken] ListPatchDeploymentsResponse nextPageToken - */ + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; - /** - * Constructs a new ListPatchDeploymentsResponse. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchDeploymentsResponse. - * @implements IListPatchDeploymentsResponse - * @constructor - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set - */ - function ListPatchDeploymentsResponse(properties) { - this.patchDeployments = []; - if (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 options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; - /** - * ListPatchDeploymentsResponse patchDeployments. - * @member {Array.} patchDeployments - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @instance - */ - ListPatchDeploymentsResponse.prototype.patchDeployments = $util.emptyArray; + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * ListPatchDeploymentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @instance - */ - ListPatchDeploymentsResponse.prototype.nextPageToken = ""; + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Creates a new ListPatchDeploymentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse instance - */ - ListPatchDeploymentsResponse.create = function create(properties) { - return new ListPatchDeploymentsResponse(properties); - }; - - /** - * Encodes the specified ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchDeploymentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.patchDeployments != null && message.patchDeployments.length) - for (var i = 0; i < message.patchDeployments.length; ++i) - $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployments[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 ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchDeploymentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.patchDeployments && message.patchDeployments.length)) - message.patchDeployments = []; - message.patchDeployments.push($root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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(); + }; - /** - * Verifies a ListPatchDeploymentsResponse message. - * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPatchDeploymentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.patchDeployments != null && message.hasOwnProperty("patchDeployments")) { - if (!Array.isArray(message.patchDeployments)) - return "patchDeployments: array expected"; - for (var i = 0; i < message.patchDeployments.length; ++i) { - var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployments[i]); - if (error) - return "patchDeployments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse - */ - ListPatchDeploymentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse) - return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); - if (object.patchDeployments) { - if (!Array.isArray(object.patchDeployments)) - throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: array expected"); - message.patchDeployments = []; - for (var i = 0; i < object.patchDeployments.length; ++i) { - if (typeof object.patchDeployments[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: object expected"); - message.patchDeployments[i] = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - 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()); + }; - /** - * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} message ListPatchDeploymentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPatchDeploymentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.patchDeployments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.patchDeployments && message.patchDeployments.length) { - object.patchDeployments = []; - for (var j = 0; j < message.patchDeployments.length; ++j) - object.patchDeployments[j] = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * 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; + }; - /** - * Converts this ListPatchDeploymentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPatchDeploymentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return ListPatchDeploymentsResponse; - })(); + /** + * 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; + }; - v1.DeletePatchDeploymentRequest = (function() { + /** + * 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); + }; - /** - * Properties of a DeletePatchDeploymentRequest. - * @memberof google.cloud.osconfig.v1 - * @interface IDeletePatchDeploymentRequest - * @property {string|null} [name] DeletePatchDeploymentRequest name - */ + EnumDescriptorProto.EnumReservedRange = (function() { - /** - * Constructs a new DeletePatchDeploymentRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a DeletePatchDeploymentRequest. - * @implements IDeletePatchDeploymentRequest - * @constructor - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set - */ - function DeletePatchDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ - /** - * DeletePatchDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @instance - */ - DeletePatchDeploymentRequest.prototype.name = ""; + /** + * 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]]; + } - /** - * Creates a new DeletePatchDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest instance - */ - DeletePatchDeploymentRequest.create = function create(properties) { - return new DeletePatchDeploymentRequest(properties); - }; + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; - /** - * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePatchDeploymentRequest.encode = function encode(message, writer) { - 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 DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; - /** - * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePatchDeploymentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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); + }; - /** - * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies a DeletePatchDeploymentRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePatchDeploymentRequest.verify = function verify(message) { - if (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; - }; + /** + * 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(); + }; - /** - * Creates a DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest - */ - DeletePatchDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @static - * @param {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} message DeletePatchDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePatchDeploymentRequest.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; - }; + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this DeletePatchDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePatchDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; - return DeletePatchDeploymentRequest; - })(); + /** + * 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; + }; - v1.ExecutePatchJobRequest = (function() { + /** + * 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; + }; - /** - * Properties of an ExecutePatchJobRequest. - * @memberof google.cloud.osconfig.v1 - * @interface IExecutePatchJobRequest - * @property {string|null} [parent] ExecutePatchJobRequest parent - * @property {string|null} [description] ExecutePatchJobRequest description - * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] ExecutePatchJobRequest instanceFilter - * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] ExecutePatchJobRequest patchConfig - * @property {google.protobuf.IDuration|null} [duration] ExecutePatchJobRequest duration - * @property {boolean|null} [dryRun] ExecutePatchJobRequest dryRun - * @property {string|null} [displayName] ExecutePatchJobRequest displayName - */ + /** + * 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); + }; - /** - * Constructs a new ExecutePatchJobRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an ExecutePatchJobRequest. - * @implements IExecutePatchJobRequest - * @constructor - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set - */ - function ExecutePatchJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return EnumReservedRange; + })(); - /** - * ExecutePatchJobRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance - */ - ExecutePatchJobRequest.prototype.parent = ""; + return EnumDescriptorProto; + })(); - /** - * ExecutePatchJobRequest description. - * @member {string} description - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance - */ - ExecutePatchJobRequest.prototype.description = ""; + protobuf.EnumValueDescriptorProto = (function() { - /** - * ExecutePatchJobRequest instanceFilter. - * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance - */ - ExecutePatchJobRequest.prototype.instanceFilter = null; + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ - /** - * ExecutePatchJobRequest patchConfig. - * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance - */ - ExecutePatchJobRequest.prototype.patchConfig = null; + /** + * 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]]; + } - /** - * ExecutePatchJobRequest duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance - */ - ExecutePatchJobRequest.prototype.duration = null; + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; - /** - * ExecutePatchJobRequest dryRun. - * @member {boolean} dryRun - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance - */ - ExecutePatchJobRequest.prototype.dryRun = false; + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; - /** - * ExecutePatchJobRequest displayName. - * @member {string} displayName - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance - */ - ExecutePatchJobRequest.prototype.displayName = ""; + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; - /** - * Creates a new ExecutePatchJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest instance - */ - ExecutePatchJobRequest.create = function create(properties) { - return new ExecutePatchJobRequest(properties); - }; + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; - /** - * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutePatchJobRequest.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) - $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); - if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) - $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); - return writer; - }; + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutePatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutePatchJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 7: - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); - break; - case 4: - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); - break; - case 5: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.dryRun = reader.bool(); - break; - case 8: - message.displayName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutePatchJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ExecutePatchJobRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecutePatchJobRequest.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { - var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); - if (error) - return "instanceFilter." + error; - } - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { - var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); - if (error) - return "patchConfig." + error; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - if (typeof message.dryRun !== "boolean") - return "dryRun: boolean expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest - */ - ExecutePatchJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ExecutePatchJobRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.description != null) - message.description = String(object.description); - if (object.instanceFilter != null) { - if (typeof object.instanceFilter !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.instanceFilter: object expected"); - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); - } - if (object.patchConfig != null) { - if (typeof object.patchConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.patchConfig: object expected"); - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.dryRun != null) - message.dryRun = Boolean(object.dryRun); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; + /** + * 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 ExecutePatchJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.ExecutePatchJobRequest} message ExecutePatchJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecutePatchJobRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.description = ""; - object.patchConfig = null; - object.duration = null; - object.dryRun = false; - object.instanceFilter = null; - object.displayName = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) - object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - object.dryRun = message.dryRun; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) - object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this ExecutePatchJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance - * @returns {Object.} JSON object - */ - ExecutePatchJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return ExecutePatchJobRequest; - })(); + /** + * 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); + }; - v1.GetPatchJobRequest = (function() { + return EnumValueDescriptorProto; + })(); - /** - * Properties of a GetPatchJobRequest. - * @memberof google.cloud.osconfig.v1 - * @interface IGetPatchJobRequest - * @property {string|null} [name] GetPatchJobRequest name - */ + protobuf.ServiceDescriptorProto = (function() { - /** - * Constructs a new GetPatchJobRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a GetPatchJobRequest. - * @implements IGetPatchJobRequest - * @constructor - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set - */ - function GetPatchJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a 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 + */ - /** - * GetPatchJobRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @instance - */ - GetPatchJobRequest.prototype.name = ""; + /** + * 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]]; + } - /** - * Creates a new GetPatchJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest instance - */ - GetPatchJobRequest.create = function create(properties) { - return new GetPatchJobRequest(properties); - }; + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; - /** - * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPatchJobRequest.encode = function encode(message, writer) { - 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; - }; + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; - /** - * Encodes the specified GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; - /** - * Decodes a GetPatchJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPatchJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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); + }; - /** - * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies a GetPatchJobRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPatchJobRequest.verify = function verify(message) { - if (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; - }; + /** + * 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(); + }; - /** - * Creates a GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest - */ - GetPatchJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.GetPatchJobRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.GetPatchJobRequest} message GetPatchJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPatchJobRequest.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; - }; + /** + * 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()); + }; - /** - * Converts this GetPatchJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest - * @instance - * @returns {Object.} JSON object - */ - GetPatchJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return GetPatchJobRequest; - })(); + /** + * 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; + }; - v1.ListPatchJobInstanceDetailsRequest = (function() { + /** + * 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; + }; - /** - * Properties of a ListPatchJobInstanceDetailsRequest. - * @memberof google.cloud.osconfig.v1 - * @interface IListPatchJobInstanceDetailsRequest - * @property {string|null} [parent] ListPatchJobInstanceDetailsRequest parent - * @property {number|null} [pageSize] ListPatchJobInstanceDetailsRequest pageSize - * @property {string|null} [pageToken] ListPatchJobInstanceDetailsRequest pageToken - * @property {string|null} [filter] ListPatchJobInstanceDetailsRequest filter - */ + /** + * 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); + }; - /** - * Constructs a new ListPatchJobInstanceDetailsRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchJobInstanceDetailsRequest. - * @implements IListPatchJobInstanceDetailsRequest - * @constructor - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set - */ - function ListPatchJobInstanceDetailsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return ServiceDescriptorProto; + })(); - /** - * ListPatchJobInstanceDetailsRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - */ - ListPatchJobInstanceDetailsRequest.prototype.parent = ""; + protobuf.MethodDescriptorProto = (function() { - /** - * ListPatchJobInstanceDetailsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - */ - ListPatchJobInstanceDetailsRequest.prototype.pageSize = 0; - - /** - * ListPatchJobInstanceDetailsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - */ - ListPatchJobInstanceDetailsRequest.prototype.pageToken = ""; + /** + * 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 + */ - /** - * ListPatchJobInstanceDetailsRequest filter. - * @member {string} filter - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - */ - ListPatchJobInstanceDetailsRequest.prototype.filter = ""; + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new ListPatchJobInstanceDetailsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest instance - */ - ListPatchJobInstanceDetailsRequest.create = function create(properties) { - return new ListPatchJobInstanceDetailsRequest(properties); - }; + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; - /** - * Encodes the specified ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobInstanceDetailsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - return writer; - }; + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; - /** - * Encodes the specified ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobInstanceDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; - /** - * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobInstanceDetailsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; - /** - * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobInstanceDetailsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; - /** - * Verifies a ListPatchJobInstanceDetailsRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPatchJobInstanceDetailsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; - /** - * Creates a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest - */ - ListPatchJobInstanceDetailsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; + /** + * Creates a 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); + }; - /** - * Creates a plain object from a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPatchJobInstanceDetailsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListPatchJobInstanceDetailsRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPatchJobInstanceDetailsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListPatchJobInstanceDetailsRequest; - })(); - - v1.ListPatchJobInstanceDetailsResponse = (function() { + /** + * 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; + }; - /** - * Properties of a ListPatchJobInstanceDetailsResponse. - * @memberof google.cloud.osconfig.v1 - * @interface IListPatchJobInstanceDetailsResponse - * @property {Array.|null} [patchJobInstanceDetails] ListPatchJobInstanceDetailsResponse patchJobInstanceDetails - * @property {string|null} [nextPageToken] ListPatchJobInstanceDetailsResponse nextPageToken - */ + /** + * 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(); + }; - /** - * Constructs a new ListPatchJobInstanceDetailsResponse. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchJobInstanceDetailsResponse. - * @implements IListPatchJobInstanceDetailsResponse - * @constructor - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set - */ - function ListPatchJobInstanceDetailsResponse(properties) { - this.patchJobInstanceDetails = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. - * @member {Array.} patchJobInstanceDetails - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @instance - */ - ListPatchJobInstanceDetailsResponse.prototype.patchJobInstanceDetails = $util.emptyArray; - - /** - * ListPatchJobInstanceDetailsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @instance - */ - ListPatchJobInstanceDetailsResponse.prototype.nextPageToken = ""; + /** + * 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()); + }; - /** - * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse instance - */ - ListPatchJobInstanceDetailsResponse.create = function create(properties) { - return new ListPatchJobInstanceDetailsResponse(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobInstanceDetailsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.patchJobInstanceDetails != null && message.patchJobInstanceDetails.length) - for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) - $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.encode(message.patchJobInstanceDetails[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + /** + * Creates 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; + }; - /** - * Encodes the specified ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobInstanceDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobInstanceDetailsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.patchJobInstanceDetails && message.patchJobInstanceDetails.length)) - message.patchJobInstanceDetails = []; - message.patchJobInstanceDetails.push($root.google.cloud.osconfig.v1.PatchJobInstanceDetails.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - 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; + }; - /** - * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobInstanceDetailsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies a ListPatchJobInstanceDetailsResponse message. - * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPatchJobInstanceDetailsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.patchJobInstanceDetails != null && message.hasOwnProperty("patchJobInstanceDetails")) { - if (!Array.isArray(message.patchJobInstanceDetails)) - return "patchJobInstanceDetails: array expected"; - for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) { - var error = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.verify(message.patchJobInstanceDetails[i]); - if (error) - return "patchJobInstanceDetails." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + return MethodDescriptorProto; + })(); - /** - * Creates a ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse - */ - ListPatchJobInstanceDetailsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) - return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); - if (object.patchJobInstanceDetails) { - if (!Array.isArray(object.patchJobInstanceDetails)) - throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: array expected"); - message.patchJobInstanceDetails = []; - for (var i = 0; i < object.patchJobInstanceDetails.length; ++i) { - if (typeof object.patchJobInstanceDetails[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: object expected"); - message.patchJobInstanceDetails[i] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.fromObject(object.patchJobInstanceDetails[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + protobuf.FileOptions = (function() { - /** - * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @static - * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPatchJobInstanceDetailsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.patchJobInstanceDetails = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.patchJobInstanceDetails && message.patchJobInstanceDetails.length) { - object.patchJobInstanceDetails = []; - for (var j = 0; j < message.patchJobInstanceDetails.length; ++j) - object.patchJobInstanceDetails[j] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.toObject(message.patchJobInstanceDetails[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ - /** - * Converts this ListPatchJobInstanceDetailsResponse to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPatchJobInstanceDetailsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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]]; + } - return ListPatchJobInstanceDetailsResponse; - })(); + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; - v1.PatchJobInstanceDetails = (function() { + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; - /** - * Properties of a PatchJobInstanceDetails. - * @memberof google.cloud.osconfig.v1 - * @interface IPatchJobInstanceDetails - * @property {string|null} [name] PatchJobInstanceDetails name - * @property {string|null} [instanceSystemId] PatchJobInstanceDetails instanceSystemId - * @property {google.cloud.osconfig.v1.Instance.PatchState|null} [state] PatchJobInstanceDetails state - * @property {string|null} [failureReason] PatchJobInstanceDetails failureReason - * @property {number|Long|null} [attemptCount] PatchJobInstanceDetails attemptCount - */ + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; - /** - * Constructs a new PatchJobInstanceDetails. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchJobInstanceDetails. - * @implements IPatchJobInstanceDetails - * @constructor - * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set - */ - function PatchJobInstanceDetails(properties) { - if (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 javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; - /** - * PatchJobInstanceDetails name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @instance - */ - PatchJobInstanceDetails.prototype.name = ""; + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; - /** - * PatchJobInstanceDetails instanceSystemId. - * @member {string} instanceSystemId - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @instance - */ - PatchJobInstanceDetails.prototype.instanceSystemId = ""; + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; - /** - * PatchJobInstanceDetails state. - * @member {google.cloud.osconfig.v1.Instance.PatchState} state - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @instance - */ - PatchJobInstanceDetails.prototype.state = 0; + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; - /** - * PatchJobInstanceDetails failureReason. - * @member {string} failureReason - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @instance - */ - PatchJobInstanceDetails.prototype.failureReason = ""; + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; - /** - * PatchJobInstanceDetails attemptCount. - * @member {number|Long} attemptCount - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @instance - */ - PatchJobInstanceDetails.prototype.attemptCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; - /** - * Creates a new PatchJobInstanceDetails instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @static - * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails instance - */ - PatchJobInstanceDetails.create = function create(properties) { - return new PatchJobInstanceDetails(properties); - }; + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; - /** - * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @static - * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchJobInstanceDetails.encode = function encode(message, writer) { - 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.instanceSystemId != null && Object.hasOwnProperty.call(message, "instanceSystemId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceSystemId); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.failureReason); - if (message.attemptCount != null && Object.hasOwnProperty.call(message, "attemptCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.attemptCount); - return writer; - }; + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; - /** - * Encodes the specified PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @static - * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchJobInstanceDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; - /** - * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchJobInstanceDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.instanceSystemId = reader.string(); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.failureReason = reader.string(); - break; - case 5: - message.attemptCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; - /** - * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchJobInstanceDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; - /** - * Verifies a PatchJobInstanceDetails message. - * @function verify - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PatchJobInstanceDetails.verify = function verify(message) { - if (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.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) - if (!$util.isString(message.instanceSystemId)) - return "instanceSystemId: 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: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - break; - } - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - if (!$util.isString(message.failureReason)) - return "failureReason: string expected"; - if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) - if (!$util.isInteger(message.attemptCount) && !(message.attemptCount && $util.isInteger(message.attemptCount.low) && $util.isInteger(message.attemptCount.high))) - return "attemptCount: integer|Long expected"; - return null; - }; - - /** - * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails - */ - PatchJobInstanceDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchJobInstanceDetails) - return object; - var message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); - if (object.name != null) - message.name = String(object.name); - if (object.instanceSystemId != null) - message.instanceSystemId = String(object.instanceSystemId); - switch (object.state) { - case "PATCH_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; - case "NOTIFIED": - case 3: - message.state = 3; - break; - case "STARTED": - case 4: - message.state = 4; - break; - case "DOWNLOADING_PATCHES": - case 5: - message.state = 5; - break; - case "APPLYING_PATCHES": - case 6: - message.state = 6; - break; - case "REBOOTING": - case 7: - message.state = 7; - break; - case "SUCCEEDED": - case 8: - message.state = 8; - break; - case "SUCCEEDED_REBOOT_REQUIRED": - case 9: - message.state = 9; - break; - case "FAILED": - case 10: - message.state = 10; - break; - case "ACKED": - case 11: - message.state = 11; - break; - case "TIMED_OUT": - case 12: - message.state = 12; - break; - case "RUNNING_PRE_PATCH_STEP": - case 13: - message.state = 13; - break; - case "RUNNING_POST_PATCH_STEP": - case 14: - message.state = 14; - break; - case "NO_AGENT_DETECTED": - case 15: - message.state = 15; - break; - } - if (object.failureReason != null) - message.failureReason = String(object.failureReason); - if (object.attemptCount != null) - if ($util.Long) - (message.attemptCount = $util.Long.fromValue(object.attemptCount)).unsigned = false; - else if (typeof object.attemptCount === "string") - message.attemptCount = parseInt(object.attemptCount, 10); - else if (typeof object.attemptCount === "number") - message.attemptCount = object.attemptCount; - else if (typeof object.attemptCount === "object") - message.attemptCount = new $util.LongBits(object.attemptCount.low >>> 0, object.attemptCount.high >>> 0).toNumber(); - return message; - }; + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; - /** - * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @static - * @param {google.cloud.osconfig.v1.PatchJobInstanceDetails} message PatchJobInstanceDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PatchJobInstanceDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.instanceSystemId = ""; - object.state = options.enums === String ? "PATCH_STATE_UNSPECIFIED" : 0; - object.failureReason = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.attemptCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.attemptCount = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) - object.instanceSystemId = message.instanceSystemId; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1.Instance.PatchState[message.state] : message.state; - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - object.failureReason = message.failureReason; - if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) - if (typeof message.attemptCount === "number") - object.attemptCount = options.longs === String ? String(message.attemptCount) : message.attemptCount; - else - object.attemptCount = options.longs === String ? $util.Long.prototype.toString.call(message.attemptCount) : options.longs === Number ? new $util.LongBits(message.attemptCount.low >>> 0, message.attemptCount.high >>> 0).toNumber() : message.attemptCount; - return object; - }; + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; - /** - * Converts this PatchJobInstanceDetails to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @instance - * @returns {Object.} JSON object - */ - PatchJobInstanceDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; - return PatchJobInstanceDetails; - })(); + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; - v1.ListPatchJobsRequest = (function() { + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; - /** - * Properties of a ListPatchJobsRequest. - * @memberof google.cloud.osconfig.v1 - * @interface IListPatchJobsRequest - * @property {string|null} [parent] ListPatchJobsRequest parent - * @property {number|null} [pageSize] ListPatchJobsRequest pageSize - * @property {string|null} [pageToken] ListPatchJobsRequest pageToken - * @property {string|null} [filter] ListPatchJobsRequest filter - */ + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; - /** - * Constructs a new ListPatchJobsRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchJobsRequest. - * @implements IListPatchJobsRequest - * @constructor - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set - */ - function ListPatchJobsRequest(properties) { - if (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 uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * ListPatchJobsRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @instance - */ - ListPatchJobsRequest.prototype.parent = ""; - - /** - * ListPatchJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @instance - */ - ListPatchJobsRequest.prototype.pageSize = 0; + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - /** - * ListPatchJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @instance - */ - ListPatchJobsRequest.prototype.pageToken = ""; + /** + * 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); + }; - /** - * ListPatchJobsRequest filter. - * @member {string} filter - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @instance - */ - ListPatchJobsRequest.prototype.filter = ""; + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; - /** - * Creates a new ListPatchJobsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest instance - */ - ListPatchJobsRequest.create = function create(properties) { - return new ListPatchJobsRequest(properties); - }; + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - return writer; - }; + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ListPatchJobsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; - /** - * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; - /** - * Verifies a ListPatchJobsRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPatchJobsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest - */ - ListPatchJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; - /** - * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {google.cloud.osconfig.v1.ListPatchJobsRequest} message ListPatchJobsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPatchJobsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; + /** + * Converts this 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); + }; - /** - * Converts this ListPatchJobsRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPatchJobsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); - return ListPatchJobsRequest; - })(); + return FileOptions; + })(); - v1.ListPatchJobsResponse = (function() { + protobuf.MessageOptions = (function() { - /** - * Properties of a ListPatchJobsResponse. - * @memberof google.cloud.osconfig.v1 - * @interface IListPatchJobsResponse - * @property {Array.|null} [patchJobs] ListPatchJobsResponse patchJobs - * @property {string|null} [nextPageToken] ListPatchJobsResponse nextPageToken - */ + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ - /** - * Constructs a new ListPatchJobsResponse. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchJobsResponse. - * @implements IListPatchJobsResponse - * @constructor - * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set - */ - function ListPatchJobsResponse(properties) { - this.patchJobs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new 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]]; + } - /** - * ListPatchJobsResponse patchJobs. - * @member {Array.} patchJobs - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @instance - */ - ListPatchJobsResponse.prototype.patchJobs = $util.emptyArray; + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; - /** - * ListPatchJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @instance - */ - ListPatchJobsResponse.prototype.nextPageToken = ""; + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; - /** - * Creates a new ListPatchJobsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse instance - */ - ListPatchJobsResponse.create = function create(properties) { - return new ListPatchJobsResponse(properties); - }; + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; - /** - * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.patchJobs != null && message.patchJobs.length) - for (var i = 0; i < message.patchJobs.length; ++i) - $root.google.cloud.osconfig.v1.PatchJob.encode(message.patchJobs[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; - }; + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; - /** - * Encodes the specified ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Decodes a ListPatchJobsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.patchJobs && message.patchJobs.length)) - message.patchJobs = []; - message.patchJobs.push($root.google.cloud.osconfig.v1.PatchJob.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; - /** - * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies a ListPatchJobsResponse message. - * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPatchJobsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.patchJobs != null && message.hasOwnProperty("patchJobs")) { - if (!Array.isArray(message.patchJobs)) - return "patchJobs: array expected"; - for (var i = 0; i < message.patchJobs.length; ++i) { - var error = $root.google.cloud.osconfig.v1.PatchJob.verify(message.patchJobs[i]); - if (error) - return "patchJobs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; - /** - * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse - */ - ListPatchJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsResponse) - return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); - if (object.patchJobs) { - if (!Array.isArray(object.patchJobs)) - throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: array expected"); - message.patchJobs = []; - for (var i = 0; i < object.patchJobs.length; ++i) { - if (typeof object.patchJobs[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: object expected"); - message.patchJobs[i] = $root.google.cloud.osconfig.v1.PatchJob.fromObject(object.patchJobs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * 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(); + }; - /** - * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} message ListPatchJobsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPatchJobsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.patchJobs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.patchJobs && message.patchJobs.length) { - object.patchJobs = []; - for (var j = 0; j < message.patchJobs.length; ++j) - object.patchJobs[j] = $root.google.cloud.osconfig.v1.PatchJob.toObject(message.patchJobs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this ListPatchJobsResponse to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPatchJobsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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()); + }; - return ListPatchJobsResponse; - })(); + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; - v1.PatchJob = (function() { + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; - /** - * Properties of a PatchJob. - * @memberof google.cloud.osconfig.v1 - * @interface IPatchJob - * @property {string|null} [name] PatchJob name - * @property {string|null} [displayName] PatchJob displayName - * @property {string|null} [description] PatchJob description - * @property {google.protobuf.ITimestamp|null} [createTime] PatchJob createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PatchJob updateTime - * @property {google.cloud.osconfig.v1.PatchJob.State|null} [state] PatchJob state - * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchJob instanceFilter - * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchJob patchConfig - * @property {google.protobuf.IDuration|null} [duration] PatchJob duration - * @property {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null} [instanceDetailsSummary] PatchJob instanceDetailsSummary - * @property {boolean|null} [dryRun] PatchJob dryRun - * @property {string|null} [errorMessage] PatchJob errorMessage - * @property {number|null} [percentComplete] PatchJob percentComplete - * @property {string|null} [patchDeployment] PatchJob patchDeployment - */ + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; - /** - * Constructs a new PatchJob. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchJob. - * @implements IPatchJob - * @constructor - * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set - */ - function PatchJob(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this 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); + }; - /** - * PatchJob name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.name = ""; + return MessageOptions; + })(); - /** - * PatchJob displayName. - * @member {string} displayName - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.displayName = ""; + protobuf.FieldOptions = (function() { - /** - * PatchJob description. - * @member {string} description - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.description = ""; + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ - /** - * PatchJob createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.createTime = null; + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * PatchJob updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.updateTime = null; + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; - /** - * PatchJob state. - * @member {google.cloud.osconfig.v1.PatchJob.State} state - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.state = 0; + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; - /** - * PatchJob instanceFilter. - * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.instanceFilter = null; + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; - /** - * PatchJob patchConfig. - * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.patchConfig = null; + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; - /** - * PatchJob duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.duration = null; + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; - /** - * PatchJob instanceDetailsSummary. - * @member {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null|undefined} instanceDetailsSummary - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.instanceDetailsSummary = null; + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; - /** - * PatchJob dryRun. - * @member {boolean} dryRun - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.dryRun = false; + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * PatchJob errorMessage. - * @member {string} errorMessage - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.errorMessage = ""; + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; - /** - * PatchJob percentComplete. - * @member {number} percentComplete - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.percentComplete = 0; + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - /** - * PatchJob patchDeployment. - * @member {string} patchDeployment - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.patchDeployment = ""; + /** + * 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); + }; - /** - * Creates a new PatchJob instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.PatchJob - * @static - * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob instance - */ - PatchJob.create = function create(properties) { - return new PatchJob(properties); - }; + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.PatchJob - * @static - * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchJob.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) - $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.instanceDetailsSummary != null && Object.hasOwnProperty.call(message, "instanceDetailsSummary")) - $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.encode(message.instanceDetailsSummary, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.dryRun); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.errorMessage); - if (message.percentComplete != null && Object.hasOwnProperty.call(message, "percentComplete")) - writer.uint32(/* id 12, wireType 1 =*/97).double(message.percentComplete); - if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) - $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.displayName); - if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.patchDeployment); - return writer; - }; - - /** - * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJob - * @static - * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchJob.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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 PatchJob message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.PatchJob - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchJob.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 14: - message.displayName = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.state = reader.int32(); - break; - case 13: - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); - break; - case 7: - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); - break; - case 8: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 9: - message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.decode(reader, reader.uint32()); - break; - case 10: - message.dryRun = reader.bool(); - break; - case 11: - message.errorMessage = reader.string(); - break; - case 12: - message.percentComplete = reader.double(); - break; - case 15: - message.patchDeployment = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a PatchJob message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJob - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchJob.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a FieldOptions message from the specified reader or buffer, 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 PatchJob message. - * @function verify - * @memberof google.cloud.osconfig.v1.PatchJob - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PatchJob.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - 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.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { - var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); - if (error) - return "instanceFilter." + error; - } - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { - var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); - if (error) - return "patchConfig." + error; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) { - var error = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify(message.instanceDetailsSummary); - if (error) - return "instanceDetailsSummary." + error; + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.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; + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; } - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - if (typeof message.dryRun !== "boolean") - return "dryRun: boolean expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) - if (typeof message.percentComplete !== "number") - return "percentComplete: number expected"; - if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) - if (!$util.isString(message.patchDeployment)) - return "patchDeployment: string expected"; - return null; - }; + } + return null; + }; - /** - * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchJob - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob - */ - PatchJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchJob) - return object; - var message = new $root.google.cloud.osconfig.v1.PatchJob(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.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.osconfig.v1.PatchJob.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.state) { - case "STATE_UNSPECIFIED": + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.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"]); + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: - message.state = 0; + message[".google.api.fieldBehavior"][i] = 0; break; - case "STARTED": + case "OPTIONAL": case 1: - message.state = 1; + message[".google.api.fieldBehavior"][i] = 1; break; - case "INSTANCE_LOOKUP": + case "REQUIRED": case 2: - message.state = 2; + message[".google.api.fieldBehavior"][i] = 2; break; - case "PATCHING": + case "OUTPUT_ONLY": case 3: - message.state = 3; + message[".google.api.fieldBehavior"][i] = 3; break; - case "SUCCEEDED": + case "INPUT_ONLY": case 4: - message.state = 4; + message[".google.api.fieldBehavior"][i] = 4; break; - case "COMPLETED_WITH_ERRORS": + case "IMMUTABLE": case 5: - message.state = 5; - break; - case "CANCELED": - case 6: - message.state = 6; - break; - case "TIMED_OUT": - case 7: - message.state = 7; + message[".google.api.fieldBehavior"][i] = 5; break; } - if (object.instanceFilter != null) { - if (typeof object.instanceFilter !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceFilter: object expected"); - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); - } - if (object.patchConfig != null) { - if (typeof object.patchConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.patchConfig: object expected"); - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.instanceDetailsSummary != null) { - if (typeof object.instanceDetailsSummary !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceDetailsSummary: object expected"); - message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.fromObject(object.instanceDetailsSummary); - } - if (object.dryRun != null) - message.dryRun = Boolean(object.dryRun); - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.percentComplete != null) - message.percentComplete = Number(object.percentComplete); - if (object.patchDeployment != null) - message.patchDeployment = String(object.patchDeployment); - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a PatchJob message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.PatchJob - * @static - * @param {google.cloud.osconfig.v1.PatchJob} message PatchJob - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PatchJob.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.patchConfig = null; - object.duration = null; - object.instanceDetailsSummary = null; - object.dryRun = false; - object.errorMessage = ""; - object.percentComplete = 0; - object.instanceFilter = null; - object.displayName = ""; - object.patchDeployment = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchJob.State[message.state] : message.state; - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) - object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) - object.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.toObject(message.instanceDetailsSummary, options); - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - object.dryRun = message.dryRun; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) - object.percentComplete = options.json && !isFinite(message.percentComplete) ? String(message.percentComplete) : message.percentComplete; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) - object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) - object.patchDeployment = message.patchDeployment; - return object; - }; + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; - /** - * Converts this PatchJob to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - * @returns {Object.} JSON object - */ - PatchJob.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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); + }; - PatchJob.InstanceDetailsSummary = (function() { + /** + * 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; + })(); - /** - * Properties of an InstanceDetailsSummary. - * @memberof google.cloud.osconfig.v1.PatchJob - * @interface IInstanceDetailsSummary - * @property {number|Long|null} [pendingInstanceCount] InstanceDetailsSummary pendingInstanceCount - * @property {number|Long|null} [inactiveInstanceCount] InstanceDetailsSummary inactiveInstanceCount - * @property {number|Long|null} [notifiedInstanceCount] InstanceDetailsSummary notifiedInstanceCount - * @property {number|Long|null} [startedInstanceCount] InstanceDetailsSummary startedInstanceCount - * @property {number|Long|null} [downloadingPatchesInstanceCount] InstanceDetailsSummary downloadingPatchesInstanceCount - * @property {number|Long|null} [applyingPatchesInstanceCount] InstanceDetailsSummary applyingPatchesInstanceCount - * @property {number|Long|null} [rebootingInstanceCount] InstanceDetailsSummary rebootingInstanceCount - * @property {number|Long|null} [succeededInstanceCount] InstanceDetailsSummary succeededInstanceCount - * @property {number|Long|null} [succeededRebootRequiredInstanceCount] InstanceDetailsSummary succeededRebootRequiredInstanceCount - * @property {number|Long|null} [failedInstanceCount] InstanceDetailsSummary failedInstanceCount - * @property {number|Long|null} [ackedInstanceCount] InstanceDetailsSummary ackedInstanceCount - * @property {number|Long|null} [timedOutInstanceCount] InstanceDetailsSummary timedOutInstanceCount - * @property {number|Long|null} [prePatchStepInstanceCount] InstanceDetailsSummary prePatchStepInstanceCount - * @property {number|Long|null} [postPatchStepInstanceCount] InstanceDetailsSummary postPatchStepInstanceCount - * @property {number|Long|null} [noAgentDetectedInstanceCount] InstanceDetailsSummary noAgentDetectedInstanceCount - */ + /** + * 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; + })(); - /** - * Constructs a new InstanceDetailsSummary. - * @memberof google.cloud.osconfig.v1.PatchJob - * @classdesc Represents an InstanceDetailsSummary. - * @implements IInstanceDetailsSummary - * @constructor - * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set - */ - function InstanceDetailsSummary(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return FieldOptions; + })(); - /** - * InstanceDetailsSummary pendingInstanceCount. - * @member {number|Long} pendingInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.pendingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + protobuf.OneofOptions = (function() { - /** - * InstanceDetailsSummary inactiveInstanceCount. - * @member {number|Long} inactiveInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.inactiveInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ - /** - * InstanceDetailsSummary notifiedInstanceCount. - * @member {number|Long} notifiedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.notifiedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * 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]]; + } - /** - * InstanceDetailsSummary startedInstanceCount. - * @member {number|Long} startedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.startedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * InstanceDetailsSummary downloadingPatchesInstanceCount. - * @member {number|Long} downloadingPatchesInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.downloadingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * 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); + }; - /** - * InstanceDetailsSummary applyingPatchesInstanceCount. - * @member {number|Long} applyingPatchesInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.applyingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; - /** - * InstanceDetailsSummary rebootingInstanceCount. - * @member {number|Long} rebootingInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.rebootingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * 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(); + }; - /** - * InstanceDetailsSummary succeededInstanceCount. - * @member {number|Long} succeededInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.succeededInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * InstanceDetailsSummary succeededRebootRequiredInstanceCount. - * @member {number|Long} succeededRebootRequiredInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.succeededRebootRequiredInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * 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()); + }; - /** - * InstanceDetailsSummary failedInstanceCount. - * @member {number|Long} failedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.failedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; - /** - * InstanceDetailsSummary ackedInstanceCount. - * @member {number|Long} ackedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.ackedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * InstanceDetailsSummary timedOutInstanceCount. - * @member {number|Long} timedOutInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.timedOutInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * InstanceDetailsSummary prePatchStepInstanceCount. - * @member {number|Long} prePatchStepInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.prePatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * 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); + }; - /** - * InstanceDetailsSummary postPatchStepInstanceCount. - * @member {number|Long} postPatchStepInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.postPatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + return OneofOptions; + })(); - /** - * InstanceDetailsSummary noAgentDetectedInstanceCount. - * @member {number|Long} noAgentDetectedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.noAgentDetectedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + protobuf.EnumOptions = (function() { - /** - * Creates a new InstanceDetailsSummary instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary instance - */ - InstanceDetailsSummary.create = function create(properties) { - return new InstanceDetailsSummary(properties); - }; - - /** - * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceDetailsSummary.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pendingInstanceCount != null && Object.hasOwnProperty.call(message, "pendingInstanceCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pendingInstanceCount); - if (message.inactiveInstanceCount != null && Object.hasOwnProperty.call(message, "inactiveInstanceCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.inactiveInstanceCount); - if (message.notifiedInstanceCount != null && Object.hasOwnProperty.call(message, "notifiedInstanceCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.notifiedInstanceCount); - if (message.startedInstanceCount != null && Object.hasOwnProperty.call(message, "startedInstanceCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.startedInstanceCount); - if (message.downloadingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "downloadingPatchesInstanceCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.downloadingPatchesInstanceCount); - if (message.applyingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "applyingPatchesInstanceCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.applyingPatchesInstanceCount); - if (message.rebootingInstanceCount != null && Object.hasOwnProperty.call(message, "rebootingInstanceCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.rebootingInstanceCount); - if (message.succeededInstanceCount != null && Object.hasOwnProperty.call(message, "succeededInstanceCount")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.succeededInstanceCount); - if (message.succeededRebootRequiredInstanceCount != null && Object.hasOwnProperty.call(message, "succeededRebootRequiredInstanceCount")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.succeededRebootRequiredInstanceCount); - if (message.failedInstanceCount != null && Object.hasOwnProperty.call(message, "failedInstanceCount")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.failedInstanceCount); - if (message.ackedInstanceCount != null && Object.hasOwnProperty.call(message, "ackedInstanceCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.ackedInstanceCount); - if (message.timedOutInstanceCount != null && Object.hasOwnProperty.call(message, "timedOutInstanceCount")) - writer.uint32(/* id 12, wireType 0 =*/96).int64(message.timedOutInstanceCount); - if (message.prePatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "prePatchStepInstanceCount")) - writer.uint32(/* id 13, wireType 0 =*/104).int64(message.prePatchStepInstanceCount); - if (message.postPatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "postPatchStepInstanceCount")) - writer.uint32(/* id 14, wireType 0 =*/112).int64(message.postPatchStepInstanceCount); - if (message.noAgentDetectedInstanceCount != null && Object.hasOwnProperty.call(message, "noAgentDetectedInstanceCount")) - writer.uint32(/* id 15, wireType 0 =*/120).int64(message.noAgentDetectedInstanceCount); - return writer; - }; + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ - /** - * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceDetailsSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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]]; + } - /** - * Decodes an InstanceDetailsSummary message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceDetailsSummary.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pendingInstanceCount = reader.int64(); - break; - case 2: - message.inactiveInstanceCount = reader.int64(); - break; - case 3: - message.notifiedInstanceCount = reader.int64(); - break; - case 4: - message.startedInstanceCount = reader.int64(); - break; - case 5: - message.downloadingPatchesInstanceCount = reader.int64(); - break; - case 6: - message.applyingPatchesInstanceCount = reader.int64(); - break; - case 7: - message.rebootingInstanceCount = reader.int64(); - break; - case 8: - message.succeededInstanceCount = reader.int64(); - break; - case 9: - message.succeededRebootRequiredInstanceCount = reader.int64(); - break; - case 10: - message.failedInstanceCount = reader.int64(); - break; - case 11: - message.ackedInstanceCount = reader.int64(); - break; - case 12: - message.timedOutInstanceCount = reader.int64(); - break; - case 13: - message.prePatchStepInstanceCount = reader.int64(); - break; - case 14: - message.postPatchStepInstanceCount = reader.int64(); - break; - case 15: - message.noAgentDetectedInstanceCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; - /** - * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceDetailsSummary.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; - /** - * Verifies an InstanceDetailsSummary message. - * @function verify - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceDetailsSummary.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) - if (!$util.isInteger(message.pendingInstanceCount) && !(message.pendingInstanceCount && $util.isInteger(message.pendingInstanceCount.low) && $util.isInteger(message.pendingInstanceCount.high))) - return "pendingInstanceCount: integer|Long expected"; - if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) - if (!$util.isInteger(message.inactiveInstanceCount) && !(message.inactiveInstanceCount && $util.isInteger(message.inactiveInstanceCount.low) && $util.isInteger(message.inactiveInstanceCount.high))) - return "inactiveInstanceCount: integer|Long expected"; - if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) - if (!$util.isInteger(message.notifiedInstanceCount) && !(message.notifiedInstanceCount && $util.isInteger(message.notifiedInstanceCount.low) && $util.isInteger(message.notifiedInstanceCount.high))) - return "notifiedInstanceCount: integer|Long expected"; - if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) - if (!$util.isInteger(message.startedInstanceCount) && !(message.startedInstanceCount && $util.isInteger(message.startedInstanceCount.low) && $util.isInteger(message.startedInstanceCount.high))) - return "startedInstanceCount: integer|Long expected"; - if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) - if (!$util.isInteger(message.downloadingPatchesInstanceCount) && !(message.downloadingPatchesInstanceCount && $util.isInteger(message.downloadingPatchesInstanceCount.low) && $util.isInteger(message.downloadingPatchesInstanceCount.high))) - return "downloadingPatchesInstanceCount: integer|Long expected"; - if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) - if (!$util.isInteger(message.applyingPatchesInstanceCount) && !(message.applyingPatchesInstanceCount && $util.isInteger(message.applyingPatchesInstanceCount.low) && $util.isInteger(message.applyingPatchesInstanceCount.high))) - return "applyingPatchesInstanceCount: integer|Long expected"; - if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) - if (!$util.isInteger(message.rebootingInstanceCount) && !(message.rebootingInstanceCount && $util.isInteger(message.rebootingInstanceCount.low) && $util.isInteger(message.rebootingInstanceCount.high))) - return "rebootingInstanceCount: integer|Long expected"; - if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) - if (!$util.isInteger(message.succeededInstanceCount) && !(message.succeededInstanceCount && $util.isInteger(message.succeededInstanceCount.low) && $util.isInteger(message.succeededInstanceCount.high))) - return "succeededInstanceCount: integer|Long expected"; - if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) - if (!$util.isInteger(message.succeededRebootRequiredInstanceCount) && !(message.succeededRebootRequiredInstanceCount && $util.isInteger(message.succeededRebootRequiredInstanceCount.low) && $util.isInteger(message.succeededRebootRequiredInstanceCount.high))) - return "succeededRebootRequiredInstanceCount: integer|Long expected"; - if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) - if (!$util.isInteger(message.failedInstanceCount) && !(message.failedInstanceCount && $util.isInteger(message.failedInstanceCount.low) && $util.isInteger(message.failedInstanceCount.high))) - return "failedInstanceCount: integer|Long expected"; - if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) - if (!$util.isInteger(message.ackedInstanceCount) && !(message.ackedInstanceCount && $util.isInteger(message.ackedInstanceCount.low) && $util.isInteger(message.ackedInstanceCount.high))) - return "ackedInstanceCount: integer|Long expected"; - if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) - if (!$util.isInteger(message.timedOutInstanceCount) && !(message.timedOutInstanceCount && $util.isInteger(message.timedOutInstanceCount.low) && $util.isInteger(message.timedOutInstanceCount.high))) - return "timedOutInstanceCount: integer|Long expected"; - if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) - if (!$util.isInteger(message.prePatchStepInstanceCount) && !(message.prePatchStepInstanceCount && $util.isInteger(message.prePatchStepInstanceCount.low) && $util.isInteger(message.prePatchStepInstanceCount.high))) - return "prePatchStepInstanceCount: integer|Long expected"; - if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) - if (!$util.isInteger(message.postPatchStepInstanceCount) && !(message.postPatchStepInstanceCount && $util.isInteger(message.postPatchStepInstanceCount.low) && $util.isInteger(message.postPatchStepInstanceCount.high))) - return "postPatchStepInstanceCount: integer|Long expected"; - if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) - if (!$util.isInteger(message.noAgentDetectedInstanceCount) && !(message.noAgentDetectedInstanceCount && $util.isInteger(message.noAgentDetectedInstanceCount.low) && $util.isInteger(message.noAgentDetectedInstanceCount.high))) - return "noAgentDetectedInstanceCount: integer|Long expected"; - return null; - }; + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary - */ - InstanceDetailsSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary) - return object; - var message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); - if (object.pendingInstanceCount != null) - if ($util.Long) - (message.pendingInstanceCount = $util.Long.fromValue(object.pendingInstanceCount)).unsigned = false; - else if (typeof object.pendingInstanceCount === "string") - message.pendingInstanceCount = parseInt(object.pendingInstanceCount, 10); - else if (typeof object.pendingInstanceCount === "number") - message.pendingInstanceCount = object.pendingInstanceCount; - else if (typeof object.pendingInstanceCount === "object") - message.pendingInstanceCount = new $util.LongBits(object.pendingInstanceCount.low >>> 0, object.pendingInstanceCount.high >>> 0).toNumber(); - if (object.inactiveInstanceCount != null) - if ($util.Long) - (message.inactiveInstanceCount = $util.Long.fromValue(object.inactiveInstanceCount)).unsigned = false; - else if (typeof object.inactiveInstanceCount === "string") - message.inactiveInstanceCount = parseInt(object.inactiveInstanceCount, 10); - else if (typeof object.inactiveInstanceCount === "number") - message.inactiveInstanceCount = object.inactiveInstanceCount; - else if (typeof object.inactiveInstanceCount === "object") - message.inactiveInstanceCount = new $util.LongBits(object.inactiveInstanceCount.low >>> 0, object.inactiveInstanceCount.high >>> 0).toNumber(); - if (object.notifiedInstanceCount != null) - if ($util.Long) - (message.notifiedInstanceCount = $util.Long.fromValue(object.notifiedInstanceCount)).unsigned = false; - else if (typeof object.notifiedInstanceCount === "string") - message.notifiedInstanceCount = parseInt(object.notifiedInstanceCount, 10); - else if (typeof object.notifiedInstanceCount === "number") - message.notifiedInstanceCount = object.notifiedInstanceCount; - else if (typeof object.notifiedInstanceCount === "object") - message.notifiedInstanceCount = new $util.LongBits(object.notifiedInstanceCount.low >>> 0, object.notifiedInstanceCount.high >>> 0).toNumber(); - if (object.startedInstanceCount != null) - if ($util.Long) - (message.startedInstanceCount = $util.Long.fromValue(object.startedInstanceCount)).unsigned = false; - else if (typeof object.startedInstanceCount === "string") - message.startedInstanceCount = parseInt(object.startedInstanceCount, 10); - else if (typeof object.startedInstanceCount === "number") - message.startedInstanceCount = object.startedInstanceCount; - else if (typeof object.startedInstanceCount === "object") - message.startedInstanceCount = new $util.LongBits(object.startedInstanceCount.low >>> 0, object.startedInstanceCount.high >>> 0).toNumber(); - if (object.downloadingPatchesInstanceCount != null) - if ($util.Long) - (message.downloadingPatchesInstanceCount = $util.Long.fromValue(object.downloadingPatchesInstanceCount)).unsigned = false; - else if (typeof object.downloadingPatchesInstanceCount === "string") - message.downloadingPatchesInstanceCount = parseInt(object.downloadingPatchesInstanceCount, 10); - else if (typeof object.downloadingPatchesInstanceCount === "number") - message.downloadingPatchesInstanceCount = object.downloadingPatchesInstanceCount; - else if (typeof object.downloadingPatchesInstanceCount === "object") - message.downloadingPatchesInstanceCount = new $util.LongBits(object.downloadingPatchesInstanceCount.low >>> 0, object.downloadingPatchesInstanceCount.high >>> 0).toNumber(); - if (object.applyingPatchesInstanceCount != null) - if ($util.Long) - (message.applyingPatchesInstanceCount = $util.Long.fromValue(object.applyingPatchesInstanceCount)).unsigned = false; - else if (typeof object.applyingPatchesInstanceCount === "string") - message.applyingPatchesInstanceCount = parseInt(object.applyingPatchesInstanceCount, 10); - else if (typeof object.applyingPatchesInstanceCount === "number") - message.applyingPatchesInstanceCount = object.applyingPatchesInstanceCount; - else if (typeof object.applyingPatchesInstanceCount === "object") - message.applyingPatchesInstanceCount = new $util.LongBits(object.applyingPatchesInstanceCount.low >>> 0, object.applyingPatchesInstanceCount.high >>> 0).toNumber(); - if (object.rebootingInstanceCount != null) - if ($util.Long) - (message.rebootingInstanceCount = $util.Long.fromValue(object.rebootingInstanceCount)).unsigned = false; - else if (typeof object.rebootingInstanceCount === "string") - message.rebootingInstanceCount = parseInt(object.rebootingInstanceCount, 10); - else if (typeof object.rebootingInstanceCount === "number") - message.rebootingInstanceCount = object.rebootingInstanceCount; - else if (typeof object.rebootingInstanceCount === "object") - message.rebootingInstanceCount = new $util.LongBits(object.rebootingInstanceCount.low >>> 0, object.rebootingInstanceCount.high >>> 0).toNumber(); - if (object.succeededInstanceCount != null) - if ($util.Long) - (message.succeededInstanceCount = $util.Long.fromValue(object.succeededInstanceCount)).unsigned = false; - else if (typeof object.succeededInstanceCount === "string") - message.succeededInstanceCount = parseInt(object.succeededInstanceCount, 10); - else if (typeof object.succeededInstanceCount === "number") - message.succeededInstanceCount = object.succeededInstanceCount; - else if (typeof object.succeededInstanceCount === "object") - message.succeededInstanceCount = new $util.LongBits(object.succeededInstanceCount.low >>> 0, object.succeededInstanceCount.high >>> 0).toNumber(); - if (object.succeededRebootRequiredInstanceCount != null) - if ($util.Long) - (message.succeededRebootRequiredInstanceCount = $util.Long.fromValue(object.succeededRebootRequiredInstanceCount)).unsigned = false; - else if (typeof object.succeededRebootRequiredInstanceCount === "string") - message.succeededRebootRequiredInstanceCount = parseInt(object.succeededRebootRequiredInstanceCount, 10); - else if (typeof object.succeededRebootRequiredInstanceCount === "number") - message.succeededRebootRequiredInstanceCount = object.succeededRebootRequiredInstanceCount; - else if (typeof object.succeededRebootRequiredInstanceCount === "object") - message.succeededRebootRequiredInstanceCount = new $util.LongBits(object.succeededRebootRequiredInstanceCount.low >>> 0, object.succeededRebootRequiredInstanceCount.high >>> 0).toNumber(); - if (object.failedInstanceCount != null) - if ($util.Long) - (message.failedInstanceCount = $util.Long.fromValue(object.failedInstanceCount)).unsigned = false; - else if (typeof object.failedInstanceCount === "string") - message.failedInstanceCount = parseInt(object.failedInstanceCount, 10); - else if (typeof object.failedInstanceCount === "number") - message.failedInstanceCount = object.failedInstanceCount; - else if (typeof object.failedInstanceCount === "object") - message.failedInstanceCount = new $util.LongBits(object.failedInstanceCount.low >>> 0, object.failedInstanceCount.high >>> 0).toNumber(); - if (object.ackedInstanceCount != null) - if ($util.Long) - (message.ackedInstanceCount = $util.Long.fromValue(object.ackedInstanceCount)).unsigned = false; - else if (typeof object.ackedInstanceCount === "string") - message.ackedInstanceCount = parseInt(object.ackedInstanceCount, 10); - else if (typeof object.ackedInstanceCount === "number") - message.ackedInstanceCount = object.ackedInstanceCount; - else if (typeof object.ackedInstanceCount === "object") - message.ackedInstanceCount = new $util.LongBits(object.ackedInstanceCount.low >>> 0, object.ackedInstanceCount.high >>> 0).toNumber(); - if (object.timedOutInstanceCount != null) - if ($util.Long) - (message.timedOutInstanceCount = $util.Long.fromValue(object.timedOutInstanceCount)).unsigned = false; - else if (typeof object.timedOutInstanceCount === "string") - message.timedOutInstanceCount = parseInt(object.timedOutInstanceCount, 10); - else if (typeof object.timedOutInstanceCount === "number") - message.timedOutInstanceCount = object.timedOutInstanceCount; - else if (typeof object.timedOutInstanceCount === "object") - message.timedOutInstanceCount = new $util.LongBits(object.timedOutInstanceCount.low >>> 0, object.timedOutInstanceCount.high >>> 0).toNumber(); - if (object.prePatchStepInstanceCount != null) - if ($util.Long) - (message.prePatchStepInstanceCount = $util.Long.fromValue(object.prePatchStepInstanceCount)).unsigned = false; - else if (typeof object.prePatchStepInstanceCount === "string") - message.prePatchStepInstanceCount = parseInt(object.prePatchStepInstanceCount, 10); - else if (typeof object.prePatchStepInstanceCount === "number") - message.prePatchStepInstanceCount = object.prePatchStepInstanceCount; - else if (typeof object.prePatchStepInstanceCount === "object") - message.prePatchStepInstanceCount = new $util.LongBits(object.prePatchStepInstanceCount.low >>> 0, object.prePatchStepInstanceCount.high >>> 0).toNumber(); - if (object.postPatchStepInstanceCount != null) - if ($util.Long) - (message.postPatchStepInstanceCount = $util.Long.fromValue(object.postPatchStepInstanceCount)).unsigned = false; - else if (typeof object.postPatchStepInstanceCount === "string") - message.postPatchStepInstanceCount = parseInt(object.postPatchStepInstanceCount, 10); - else if (typeof object.postPatchStepInstanceCount === "number") - message.postPatchStepInstanceCount = object.postPatchStepInstanceCount; - else if (typeof object.postPatchStepInstanceCount === "object") - message.postPatchStepInstanceCount = new $util.LongBits(object.postPatchStepInstanceCount.low >>> 0, object.postPatchStepInstanceCount.high >>> 0).toNumber(); - if (object.noAgentDetectedInstanceCount != null) - if ($util.Long) - (message.noAgentDetectedInstanceCount = $util.Long.fromValue(object.noAgentDetectedInstanceCount)).unsigned = false; - else if (typeof object.noAgentDetectedInstanceCount === "string") - message.noAgentDetectedInstanceCount = parseInt(object.noAgentDetectedInstanceCount, 10); - else if (typeof object.noAgentDetectedInstanceCount === "number") - message.noAgentDetectedInstanceCount = object.noAgentDetectedInstanceCount; - else if (typeof object.noAgentDetectedInstanceCount === "object") - message.noAgentDetectedInstanceCount = new $util.LongBits(object.noAgentDetectedInstanceCount.low >>> 0, object.noAgentDetectedInstanceCount.high >>> 0).toNumber(); - return message; - }; + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; - /** - * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} message InstanceDetailsSummary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceDetailsSummary.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.pendingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.pendingInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.inactiveInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.inactiveInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.notifiedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.notifiedInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startedInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.downloadingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.downloadingPatchesInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.applyingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.applyingPatchesInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rebootingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rebootingInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.succeededInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.succeededInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.succeededRebootRequiredInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.succeededRebootRequiredInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failedInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.ackedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ackedInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timedOutInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timedOutInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.prePatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.prePatchStepInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.postPatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.postPatchStepInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.noAgentDetectedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.noAgentDetectedInstanceCount = options.longs === String ? "0" : 0; - } - if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) - if (typeof message.pendingInstanceCount === "number") - object.pendingInstanceCount = options.longs === String ? String(message.pendingInstanceCount) : message.pendingInstanceCount; - else - object.pendingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.pendingInstanceCount) : options.longs === Number ? new $util.LongBits(message.pendingInstanceCount.low >>> 0, message.pendingInstanceCount.high >>> 0).toNumber() : message.pendingInstanceCount; - if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) - if (typeof message.inactiveInstanceCount === "number") - object.inactiveInstanceCount = options.longs === String ? String(message.inactiveInstanceCount) : message.inactiveInstanceCount; - else - object.inactiveInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.inactiveInstanceCount) : options.longs === Number ? new $util.LongBits(message.inactiveInstanceCount.low >>> 0, message.inactiveInstanceCount.high >>> 0).toNumber() : message.inactiveInstanceCount; - if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) - if (typeof message.notifiedInstanceCount === "number") - object.notifiedInstanceCount = options.longs === String ? String(message.notifiedInstanceCount) : message.notifiedInstanceCount; - else - object.notifiedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.notifiedInstanceCount) : options.longs === Number ? new $util.LongBits(message.notifiedInstanceCount.low >>> 0, message.notifiedInstanceCount.high >>> 0).toNumber() : message.notifiedInstanceCount; - if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) - if (typeof message.startedInstanceCount === "number") - object.startedInstanceCount = options.longs === String ? String(message.startedInstanceCount) : message.startedInstanceCount; - else - object.startedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.startedInstanceCount) : options.longs === Number ? new $util.LongBits(message.startedInstanceCount.low >>> 0, message.startedInstanceCount.high >>> 0).toNumber() : message.startedInstanceCount; - if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) - if (typeof message.downloadingPatchesInstanceCount === "number") - object.downloadingPatchesInstanceCount = options.longs === String ? String(message.downloadingPatchesInstanceCount) : message.downloadingPatchesInstanceCount; - else - object.downloadingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.downloadingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.downloadingPatchesInstanceCount.low >>> 0, message.downloadingPatchesInstanceCount.high >>> 0).toNumber() : message.downloadingPatchesInstanceCount; - if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) - if (typeof message.applyingPatchesInstanceCount === "number") - object.applyingPatchesInstanceCount = options.longs === String ? String(message.applyingPatchesInstanceCount) : message.applyingPatchesInstanceCount; - else - object.applyingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.applyingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.applyingPatchesInstanceCount.low >>> 0, message.applyingPatchesInstanceCount.high >>> 0).toNumber() : message.applyingPatchesInstanceCount; - if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) - if (typeof message.rebootingInstanceCount === "number") - object.rebootingInstanceCount = options.longs === String ? String(message.rebootingInstanceCount) : message.rebootingInstanceCount; - else - object.rebootingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.rebootingInstanceCount) : options.longs === Number ? new $util.LongBits(message.rebootingInstanceCount.low >>> 0, message.rebootingInstanceCount.high >>> 0).toNumber() : message.rebootingInstanceCount; - if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) - if (typeof message.succeededInstanceCount === "number") - object.succeededInstanceCount = options.longs === String ? String(message.succeededInstanceCount) : message.succeededInstanceCount; - else - object.succeededInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededInstanceCount.low >>> 0, message.succeededInstanceCount.high >>> 0).toNumber() : message.succeededInstanceCount; - if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) - if (typeof message.succeededRebootRequiredInstanceCount === "number") - object.succeededRebootRequiredInstanceCount = options.longs === String ? String(message.succeededRebootRequiredInstanceCount) : message.succeededRebootRequiredInstanceCount; - else - object.succeededRebootRequiredInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededRebootRequiredInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededRebootRequiredInstanceCount.low >>> 0, message.succeededRebootRequiredInstanceCount.high >>> 0).toNumber() : message.succeededRebootRequiredInstanceCount; - if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) - if (typeof message.failedInstanceCount === "number") - object.failedInstanceCount = options.longs === String ? String(message.failedInstanceCount) : message.failedInstanceCount; - else - object.failedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedInstanceCount) : options.longs === Number ? new $util.LongBits(message.failedInstanceCount.low >>> 0, message.failedInstanceCount.high >>> 0).toNumber() : message.failedInstanceCount; - if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) - if (typeof message.ackedInstanceCount === "number") - object.ackedInstanceCount = options.longs === String ? String(message.ackedInstanceCount) : message.ackedInstanceCount; - else - object.ackedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.ackedInstanceCount) : options.longs === Number ? new $util.LongBits(message.ackedInstanceCount.low >>> 0, message.ackedInstanceCount.high >>> 0).toNumber() : message.ackedInstanceCount; - if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) - if (typeof message.timedOutInstanceCount === "number") - object.timedOutInstanceCount = options.longs === String ? String(message.timedOutInstanceCount) : message.timedOutInstanceCount; - else - object.timedOutInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.timedOutInstanceCount) : options.longs === Number ? new $util.LongBits(message.timedOutInstanceCount.low >>> 0, message.timedOutInstanceCount.high >>> 0).toNumber() : message.timedOutInstanceCount; - if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) - if (typeof message.prePatchStepInstanceCount === "number") - object.prePatchStepInstanceCount = options.longs === String ? String(message.prePatchStepInstanceCount) : message.prePatchStepInstanceCount; - else - object.prePatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.prePatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.prePatchStepInstanceCount.low >>> 0, message.prePatchStepInstanceCount.high >>> 0).toNumber() : message.prePatchStepInstanceCount; - if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) - if (typeof message.postPatchStepInstanceCount === "number") - object.postPatchStepInstanceCount = options.longs === String ? String(message.postPatchStepInstanceCount) : message.postPatchStepInstanceCount; - else - object.postPatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.postPatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.postPatchStepInstanceCount.low >>> 0, message.postPatchStepInstanceCount.high >>> 0).toNumber() : message.postPatchStepInstanceCount; - if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) - if (typeof message.noAgentDetectedInstanceCount === "number") - object.noAgentDetectedInstanceCount = options.longs === String ? String(message.noAgentDetectedInstanceCount) : message.noAgentDetectedInstanceCount; - else - object.noAgentDetectedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.noAgentDetectedInstanceCount) : options.longs === Number ? new $util.LongBits(message.noAgentDetectedInstanceCount.low >>> 0, message.noAgentDetectedInstanceCount.high >>> 0).toNumber() : message.noAgentDetectedInstanceCount; - return object; - }; + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; - /** - * Converts this InstanceDetailsSummary to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - * @returns {Object.} JSON object - */ - InstanceDetailsSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; - return InstanceDetailsSummary; - })(); + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; - /** - * State enum. - * @name google.cloud.osconfig.v1.PatchJob.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} STARTED=1 STARTED value - * @property {number} INSTANCE_LOOKUP=2 INSTANCE_LOOKUP value - * @property {number} PATCHING=3 PATCHING value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} COMPLETED_WITH_ERRORS=5 COMPLETED_WITH_ERRORS value - * @property {number} CANCELED=6 CANCELED value - * @property {number} TIMED_OUT=7 TIMED_OUT value - */ - PatchJob.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STARTED"] = 1; - values[valuesById[2] = "INSTANCE_LOOKUP"] = 2; - values[valuesById[3] = "PATCHING"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "COMPLETED_WITH_ERRORS"] = 5; - values[valuesById[6] = "CANCELED"] = 6; - values[valuesById[7] = "TIMED_OUT"] = 7; - return values; - })(); + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return PatchJob; - })(); + return ServiceOptions; + })(); - v1.PatchConfig = (function() { + protobuf.MethodOptions = (function() { - /** - * Properties of a PatchConfig. - * @memberof google.cloud.osconfig.v1 - * @interface IPatchConfig - * @property {google.cloud.osconfig.v1.PatchConfig.RebootConfig|null} [rebootConfig] PatchConfig rebootConfig - * @property {google.cloud.osconfig.v1.IAptSettings|null} [apt] PatchConfig apt - * @property {google.cloud.osconfig.v1.IYumSettings|null} [yum] PatchConfig yum - * @property {google.cloud.osconfig.v1.IGooSettings|null} [goo] PatchConfig goo - * @property {google.cloud.osconfig.v1.IZypperSettings|null} [zypper] PatchConfig zypper - * @property {google.cloud.osconfig.v1.IWindowsUpdateSettings|null} [windowsUpdate] PatchConfig windowsUpdate - * @property {google.cloud.osconfig.v1.IExecStep|null} [preStep] PatchConfig preStep - * @property {google.cloud.osconfig.v1.IExecStep|null} [postStep] PatchConfig postStep - */ + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ - /** - * Constructs a new PatchConfig. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchConfig. - * @implements IPatchConfig - * @constructor - * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set - */ - function PatchConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; - /** - * PatchConfig rebootConfig. - * @member {google.cloud.osconfig.v1.PatchConfig.RebootConfig} rebootConfig - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.rebootConfig = 0; + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * PatchConfig apt. - * @member {google.cloud.osconfig.v1.IAptSettings|null|undefined} apt - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.apt = null; + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * PatchConfig yum. - * @member {google.cloud.osconfig.v1.IYumSettings|null|undefined} yum - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.yum = null; + /** + * 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()); + }; - /** - * PatchConfig goo. - * @member {google.cloud.osconfig.v1.IGooSettings|null|undefined} goo - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.goo = null; + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; - /** - * PatchConfig zypper. - * @member {google.cloud.osconfig.v1.IZypperSettings|null|undefined} zypper - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.zypper = null; + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; - /** - * PatchConfig windowsUpdate. - * @member {google.cloud.osconfig.v1.IWindowsUpdateSettings|null|undefined} windowsUpdate - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.windowsUpdate = null; + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; - /** - * PatchConfig preStep. - * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} preStep - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.preStep = null; + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * PatchConfig postStep. - * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} postStep - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.postStep = null; + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); - /** - * Creates a new PatchConfig instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.PatchConfig - * @static - * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig instance - */ - PatchConfig.create = function create(properties) { - return new PatchConfig(properties); - }; + return MethodOptions; + })(); - /** - * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.PatchConfig - * @static - * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rebootConfig != null && Object.hasOwnProperty.call(message, "rebootConfig")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rebootConfig); - if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) - $root.google.cloud.osconfig.v1.AptSettings.encode(message.apt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) - $root.google.cloud.osconfig.v1.YumSettings.encode(message.yum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.goo != null && Object.hasOwnProperty.call(message, "goo")) - $root.google.cloud.osconfig.v1.GooSettings.encode(message.goo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) - $root.google.cloud.osconfig.v1.ZypperSettings.encode(message.zypper, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.windowsUpdate != null && Object.hasOwnProperty.call(message, "windowsUpdate")) - $root.google.cloud.osconfig.v1.WindowsUpdateSettings.encode(message.windowsUpdate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.preStep != null && Object.hasOwnProperty.call(message, "preStep")) - $root.google.cloud.osconfig.v1.ExecStep.encode(message.preStep, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.postStep != null && Object.hasOwnProperty.call(message, "postStep")) - $root.google.cloud.osconfig.v1.ExecStep.encode(message.postStep, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; + protobuf.UninterpretedOption = (function() { - /** - * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchConfig - * @static - * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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 + */ - /** - * Decodes a PatchConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.PatchConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rebootConfig = reader.int32(); - break; - case 3: - message.apt = $root.google.cloud.osconfig.v1.AptSettings.decode(reader, reader.uint32()); - break; - case 4: - message.yum = $root.google.cloud.osconfig.v1.YumSettings.decode(reader, reader.uint32()); - break; - case 5: - message.goo = $root.google.cloud.osconfig.v1.GooSettings.decode(reader, reader.uint32()); - break; - case 6: - message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.decode(reader, reader.uint32()); - break; - case 7: - message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.decode(reader, reader.uint32()); - break; - case 8: - message.preStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); - break; - case 9: - message.postStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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]]; + } - /** - * Decodes a PatchConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; - /** - * Verifies a PatchConfig message. - * @function verify - * @memberof google.cloud.osconfig.v1.PatchConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PatchConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) - switch (message.rebootConfig) { - default: - return "rebootConfig: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.apt != null && message.hasOwnProperty("apt")) { - var error = $root.google.cloud.osconfig.v1.AptSettings.verify(message.apt); - if (error) - return "apt." + error; - } - if (message.yum != null && message.hasOwnProperty("yum")) { - var error = $root.google.cloud.osconfig.v1.YumSettings.verify(message.yum); - if (error) - return "yum." + error; - } - if (message.goo != null && message.hasOwnProperty("goo")) { - var error = $root.google.cloud.osconfig.v1.GooSettings.verify(message.goo); - if (error) - return "goo." + error; - } - if (message.zypper != null && message.hasOwnProperty("zypper")) { - var error = $root.google.cloud.osconfig.v1.ZypperSettings.verify(message.zypper); - if (error) - return "zypper." + error; - } - if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { - var error = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.verify(message.windowsUpdate); - if (error) - return "windowsUpdate." + error; - } - if (message.preStep != null && message.hasOwnProperty("preStep")) { - var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.preStep); - if (error) - return "preStep." + error; - } - if (message.postStep != null && message.hasOwnProperty("postStep")) { - var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.postStep); - if (error) - return "postStep." + error; - } - return null; - }; + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; - /** - * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig - */ - PatchConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchConfig) - return object; - var message = new $root.google.cloud.osconfig.v1.PatchConfig(); - switch (object.rebootConfig) { - case "REBOOT_CONFIG_UNSPECIFIED": - case 0: - message.rebootConfig = 0; - break; - case "DEFAULT": - case 1: - message.rebootConfig = 1; - break; - case "ALWAYS": - case 2: - message.rebootConfig = 2; - break; - case "NEVER": - case 3: - message.rebootConfig = 3; - break; - } - if (object.apt != null) { - if (typeof object.apt !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.apt: object expected"); - message.apt = $root.google.cloud.osconfig.v1.AptSettings.fromObject(object.apt); - } - if (object.yum != null) { - if (typeof object.yum !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.yum: object expected"); - message.yum = $root.google.cloud.osconfig.v1.YumSettings.fromObject(object.yum); - } - if (object.goo != null) { - if (typeof object.goo !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.goo: object expected"); - message.goo = $root.google.cloud.osconfig.v1.GooSettings.fromObject(object.goo); - } - if (object.zypper != null) { - if (typeof object.zypper !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.zypper: object expected"); - message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.fromObject(object.zypper); - } - if (object.windowsUpdate != null) { - if (typeof object.windowsUpdate !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.windowsUpdate: object expected"); - message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.fromObject(object.windowsUpdate); - } - if (object.preStep != null) { - if (typeof object.preStep !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.preStep: object expected"); - message.preStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.preStep); - } - if (object.postStep != null) { - if (typeof object.postStep !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.postStep: object expected"); - message.postStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.postStep); - } - return message; - }; + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.PatchConfig - * @static - * @param {google.cloud.osconfig.v1.PatchConfig} message PatchConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PatchConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rebootConfig = options.enums === String ? "REBOOT_CONFIG_UNSPECIFIED" : 0; - object.apt = null; - object.yum = null; - object.goo = null; - object.zypper = null; - object.windowsUpdate = null; - object.preStep = null; - object.postStep = null; - } - if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) - object.rebootConfig = options.enums === String ? $root.google.cloud.osconfig.v1.PatchConfig.RebootConfig[message.rebootConfig] : message.rebootConfig; - if (message.apt != null && message.hasOwnProperty("apt")) - object.apt = $root.google.cloud.osconfig.v1.AptSettings.toObject(message.apt, options); - if (message.yum != null && message.hasOwnProperty("yum")) - object.yum = $root.google.cloud.osconfig.v1.YumSettings.toObject(message.yum, options); - if (message.goo != null && message.hasOwnProperty("goo")) - object.goo = $root.google.cloud.osconfig.v1.GooSettings.toObject(message.goo, options); - if (message.zypper != null && message.hasOwnProperty("zypper")) - object.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.toObject(message.zypper, options); - if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) - object.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.toObject(message.windowsUpdate, options); - if (message.preStep != null && message.hasOwnProperty("preStep")) - object.preStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.preStep, options); - if (message.postStep != null && message.hasOwnProperty("postStep")) - object.postStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.postStep, options); - return object; - }; + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Converts this PatchConfig to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - * @returns {Object.} JSON object - */ - PatchConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; - /** - * RebootConfig enum. - * @name google.cloud.osconfig.v1.PatchConfig.RebootConfig - * @enum {number} - * @property {number} REBOOT_CONFIG_UNSPECIFIED=0 REBOOT_CONFIG_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} ALWAYS=2 ALWAYS value - * @property {number} NEVER=3 NEVER value - */ - PatchConfig.RebootConfig = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REBOOT_CONFIG_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "ALWAYS"] = 2; - values[valuesById[3] = "NEVER"] = 3; - return values; - })(); + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - return PatchConfig; - })(); + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; - v1.Instance = (function() { + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of an Instance. - * @memberof google.cloud.osconfig.v1 - * @interface IInstance - */ + /** + * 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()); + }; - /** - * Constructs a new Instance. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an Instance. - * @implements IInstance - * @constructor - * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set - */ - function Instance(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * 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 a new Instance instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Instance} Instance instance - */ - Instance.create = function create(properties) { - return new Instance(properties); - }; + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; - /** - * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Instance.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * 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; + }; - /** - * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Instance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes an Instance message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Instance} Instance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Instance.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Instance(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + UninterpretedOption.NamePart = (function() { - /** - * Decodes an Instance message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Instance} Instance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Instance.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ - /** - * Verifies an Instance message. - * @function verify - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Instance.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * 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]]; + } - /** - * Creates an Instance message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Instance} Instance - */ - Instance.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Instance) - return object; - return new $root.google.cloud.osconfig.v1.Instance(); - }; + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; - /** - * Creates a plain object from an Instance message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {google.cloud.osconfig.v1.Instance} message Instance - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Instance.toObject = function toObject() { - return {}; - }; + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; - /** - * Converts this Instance to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Instance - * @instance - * @returns {Object.} JSON object - */ - Instance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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); + }; - /** - * PatchState enum. - * @name google.cloud.osconfig.v1.Instance.PatchState - * @enum {number} - * @property {number} PATCH_STATE_UNSPECIFIED=0 PATCH_STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} INACTIVE=2 INACTIVE value - * @property {number} NOTIFIED=3 NOTIFIED value - * @property {number} STARTED=4 STARTED value - * @property {number} DOWNLOADING_PATCHES=5 DOWNLOADING_PATCHES value - * @property {number} APPLYING_PATCHES=6 APPLYING_PATCHES value - * @property {number} REBOOTING=7 REBOOTING value - * @property {number} SUCCEEDED=8 SUCCEEDED value - * @property {number} SUCCEEDED_REBOOT_REQUIRED=9 SUCCEEDED_REBOOT_REQUIRED value - * @property {number} FAILED=10 FAILED value - * @property {number} ACKED=11 ACKED value - * @property {number} TIMED_OUT=12 TIMED_OUT value - * @property {number} RUNNING_PRE_PATCH_STEP=13 RUNNING_PRE_PATCH_STEP value - * @property {number} RUNNING_POST_PATCH_STEP=14 RUNNING_POST_PATCH_STEP value - * @property {number} NO_AGENT_DETECTED=15 NO_AGENT_DETECTED value - */ - Instance.PatchState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PATCH_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - values[valuesById[3] = "NOTIFIED"] = 3; - values[valuesById[4] = "STARTED"] = 4; - values[valuesById[5] = "DOWNLOADING_PATCHES"] = 5; - values[valuesById[6] = "APPLYING_PATCHES"] = 6; - values[valuesById[7] = "REBOOTING"] = 7; - values[valuesById[8] = "SUCCEEDED"] = 8; - values[valuesById[9] = "SUCCEEDED_REBOOT_REQUIRED"] = 9; - values[valuesById[10] = "FAILED"] = 10; - values[valuesById[11] = "ACKED"] = 11; - values[valuesById[12] = "TIMED_OUT"] = 12; - values[valuesById[13] = "RUNNING_PRE_PATCH_STEP"] = 13; - values[valuesById[14] = "RUNNING_POST_PATCH_STEP"] = 14; - values[valuesById[15] = "NO_AGENT_DETECTED"] = 15; - return values; - })(); + /** + * 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; + }; - return Instance; - })(); + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - v1.CancelPatchJobRequest = (function() { + /** + * 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; + }; - /** - * Properties of a CancelPatchJobRequest. - * @memberof google.cloud.osconfig.v1 - * @interface ICancelPatchJobRequest - * @property {string|null} [name] CancelPatchJobRequest name - */ + /** + * 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; + }; - /** - * Constructs a new CancelPatchJobRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a CancelPatchJobRequest. - * @implements ICancelPatchJobRequest - * @constructor - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set - */ - function CancelPatchJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a 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; + }; - /** - * CancelPatchJobRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @instance - */ - CancelPatchJobRequest.prototype.name = ""; + /** + * 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); + }; - /** - * Creates a new CancelPatchJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest instance - */ - CancelPatchJobRequest.create = function create(properties) { - return new CancelPatchJobRequest(properties); - }; + return NamePart; + })(); - /** - * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelPatchJobRequest.encode = function encode(message, writer) { - 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; - }; + return UninterpretedOption; + })(); - /** - * Encodes the specified CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + protobuf.SourceCodeInfo = (function() { - /** - * Decodes a CancelPatchJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelPatchJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ - /** - * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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(); + }; - /** - * Verifies a CancelPatchJobRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelPatchJobRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest - */ - CancelPatchJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.CancelPatchJobRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); - if (object.name != null) - message.name = String(object.name); - 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()); + }; - /** - * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.CancelPatchJobRequest} message CancelPatchJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelPatchJobRequest.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; - }; + /** + * 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; + }; - /** - * Converts this CancelPatchJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest - * @instance - * @returns {Object.} JSON object - */ - CancelPatchJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return CancelPatchJobRequest; - })(); + /** + * 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; + }; - v1.AptSettings = (function() { + /** + * 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); + }; - /** - * Properties of an AptSettings. - * @memberof google.cloud.osconfig.v1 - * @interface IAptSettings - * @property {google.cloud.osconfig.v1.AptSettings.Type|null} [type] AptSettings type - * @property {Array.|null} [excludes] AptSettings excludes - * @property {Array.|null} [exclusivePackages] AptSettings exclusivePackages - */ + SourceCodeInfo.Location = (function() { - /** - * Constructs a new AptSettings. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an AptSettings. - * @implements IAptSettings - * @constructor - * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set - */ - function AptSettings(properties) { - this.excludes = []; - this.exclusivePackages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a 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 + */ - /** - * AptSettings type. - * @member {google.cloud.osconfig.v1.AptSettings.Type} type - * @memberof google.cloud.osconfig.v1.AptSettings - * @instance - */ - AptSettings.prototype.type = 0; + /** + * 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]]; + } - /** - * AptSettings excludes. - * @member {Array.} excludes - * @memberof google.cloud.osconfig.v1.AptSettings - * @instance - */ - AptSettings.prototype.excludes = $util.emptyArray; + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; - /** - * AptSettings exclusivePackages. - * @member {Array.} exclusivePackages - * @memberof google.cloud.osconfig.v1.AptSettings - * @instance - */ - AptSettings.prototype.exclusivePackages = $util.emptyArray; + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; - /** - * Creates a new AptSettings instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.AptSettings - * @static - * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings instance - */ - AptSettings.create = function create(properties) { - return new AptSettings(properties); - }; + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; - /** - * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.AptSettings - * @static - * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AptSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.excludes != null && message.excludes.length) - for (var i = 0; i < message.excludes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); - if (message.exclusivePackages != null && message.exclusivePackages.length) - for (var i = 0; i < message.exclusivePackages.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePackages[i]); - return writer; - }; + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; - /** - * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.AptSettings - * @static - * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AptSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; - /** - * Decodes an AptSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.AptSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AptSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.AptSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 3: - if (!(message.exclusivePackages && message.exclusivePackages.length)) - message.exclusivePackages = []; - message.exclusivePackages.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; - /** - * Decodes an AptSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.AptSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AptSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies an AptSettings message. - * @function verify - * @memberof google.cloud.osconfig.v1.AptSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AptSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.excludes != null && message.hasOwnProperty("excludes")) { - if (!Array.isArray(message.excludes)) - return "excludes: array expected"; - for (var i = 0; i < message.excludes.length; ++i) - if (!$util.isString(message.excludes[i])) - return "excludes: string[] expected"; - } - if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { - if (!Array.isArray(message.exclusivePackages)) - return "exclusivePackages: array expected"; - for (var i = 0; i < message.exclusivePackages.length; ++i) - if (!$util.isString(message.exclusivePackages[i])) - return "exclusivePackages: string[] expected"; - } - return null; - }; + /** + * 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(); + }; - /** - * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.AptSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings - */ - AptSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.AptSettings) - return object; - var message = new $root.google.cloud.osconfig.v1.AptSettings(); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DIST": + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.type = 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 "UPGRADE": case 2: - message.type = 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; } - if (object.excludes) { - if (!Array.isArray(object.excludes)) - throw TypeError(".google.cloud.osconfig.v1.AptSettings.excludes: array expected"); - message.excludes = []; - for (var i = 0; i < object.excludes.length; ++i) - message.excludes[i] = String(object.excludes[i]); - } - if (object.exclusivePackages) { - if (!Array.isArray(object.exclusivePackages)) - throw TypeError(".google.cloud.osconfig.v1.AptSettings.exclusivePackages: array expected"); - message.exclusivePackages = []; - for (var i = 0; i < object.exclusivePackages.length; ++i) - message.exclusivePackages[i] = String(object.exclusivePackages[i]); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an AptSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.AptSettings - * @static - * @param {google.cloud.osconfig.v1.AptSettings} message AptSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AptSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.excludes = []; - object.exclusivePackages = []; - } - if (options.defaults) - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1.AptSettings.Type[message.type] : message.type; - if (message.excludes && message.excludes.length) { - object.excludes = []; - for (var j = 0; j < message.excludes.length; ++j) - object.excludes[j] = message.excludes[j]; - } - if (message.exclusivePackages && message.exclusivePackages.length) { - object.exclusivePackages = []; - for (var j = 0; j < message.exclusivePackages.length; ++j) - object.exclusivePackages[j] = message.exclusivePackages[j]; - } + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; - }; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ - /** - * Converts this AptSettings to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.AptSettings - * @instance - * @returns {Object.} JSON object - */ - AptSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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]]; + } - /** - * Type enum. - * @name google.cloud.osconfig.v1.AptSettings.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} DIST=1 DIST value - * @property {number} UPGRADE=2 UPGRADE value - */ - AptSettings.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIST"] = 1; - values[valuesById[2] = "UPGRADE"] = 2; - return values; - })(); + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - return AptSettings; - })(); + /** + * 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); + }; - v1.YumSettings = (function() { + /** + * 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; + }; - /** - * Properties of a YumSettings. - * @memberof google.cloud.osconfig.v1 - * @interface IYumSettings - * @property {boolean|null} [security] YumSettings security - * @property {boolean|null} [minimal] YumSettings minimal - * @property {Array.|null} [excludes] YumSettings excludes - * @property {Array.|null} [exclusivePackages] YumSettings exclusivePackages - */ + /** + * 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(); + }; - /** - * Constructs a new YumSettings. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a YumSettings. - * @implements IYumSettings - * @constructor - * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set - */ - function YumSettings(properties) { - this.excludes = []; - this.exclusivePackages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * YumSettings security. - * @member {boolean} security - * @memberof google.cloud.osconfig.v1.YumSettings - * @instance - */ - YumSettings.prototype.security = false; + /** + * 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()); + }; - /** - * YumSettings minimal. - * @member {boolean} minimal - * @memberof google.cloud.osconfig.v1.YumSettings - * @instance - */ - YumSettings.prototype.minimal = false; + /** + * 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); + }; - /** - * YumSettings excludes. - * @member {Array.} excludes - * @memberof google.cloud.osconfig.v1.YumSettings - * @instance - */ - YumSettings.prototype.excludes = $util.emptyArray; + GeneratedCodeInfo.Annotation = (function() { - /** - * YumSettings exclusivePackages. - * @member {Array.} exclusivePackages - * @memberof google.cloud.osconfig.v1.YumSettings - * @instance - */ - YumSettings.prototype.exclusivePackages = $util.emptyArray; + /** + * 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 + */ - /** - * Creates a new YumSettings instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.YumSettings - * @static - * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings instance - */ - YumSettings.create = function create(properties) { - return new YumSettings(properties); - }; + /** + * 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]]; + } - /** - * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.YumSettings - * @static - * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YumSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.security != null && Object.hasOwnProperty.call(message, "security")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.security); - if (message.minimal != null && Object.hasOwnProperty.call(message, "minimal")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.minimal); - if (message.excludes != null && message.excludes.length) - for (var i = 0; i < message.excludes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludes[i]); - if (message.exclusivePackages != null && message.exclusivePackages.length) - for (var i = 0; i < message.exclusivePackages.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.exclusivePackages[i]); - return writer; - }; + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; - /** - * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.YumSettings - * @static - * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YumSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; - /** - * Decodes a YumSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.YumSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YumSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.YumSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.security = reader.bool(); - break; - case 2: - message.minimal = reader.bool(); - break; - case 3: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 4: - if (!(message.exclusivePackages && message.exclusivePackages.length)) - message.exclusivePackages = []; - message.exclusivePackages.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; - /** - * Decodes a YumSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.YumSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YumSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; - /** - * Verifies a YumSettings message. - * @function verify - * @memberof google.cloud.osconfig.v1.YumSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - YumSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.security != null && message.hasOwnProperty("security")) - if (typeof message.security !== "boolean") - return "security: boolean expected"; - if (message.minimal != null && message.hasOwnProperty("minimal")) - if (typeof message.minimal !== "boolean") - return "minimal: boolean expected"; - if (message.excludes != null && message.hasOwnProperty("excludes")) { - if (!Array.isArray(message.excludes)) - return "excludes: array expected"; - for (var i = 0; i < message.excludes.length; ++i) - if (!$util.isString(message.excludes[i])) - return "excludes: string[] expected"; - } - if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { - if (!Array.isArray(message.exclusivePackages)) - return "exclusivePackages: array expected"; - for (var i = 0; i < message.exclusivePackages.length; ++i) - if (!$util.isString(message.exclusivePackages[i])) - return "exclusivePackages: string[] expected"; - } - return null; - }; + /** + * 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); + }; - /** - * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.YumSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings - */ - YumSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.YumSettings) - return object; - var message = new $root.google.cloud.osconfig.v1.YumSettings(); - if (object.security != null) - message.security = Boolean(object.security); - if (object.minimal != null) - message.minimal = Boolean(object.minimal); - if (object.excludes) { - if (!Array.isArray(object.excludes)) - throw TypeError(".google.cloud.osconfig.v1.YumSettings.excludes: array expected"); - message.excludes = []; - for (var i = 0; i < object.excludes.length; ++i) - message.excludes[i] = String(object.excludes[i]); - } - if (object.exclusivePackages) { - if (!Array.isArray(object.exclusivePackages)) - throw TypeError(".google.cloud.osconfig.v1.YumSettings.exclusivePackages: array expected"); - message.exclusivePackages = []; - for (var i = 0; i < object.exclusivePackages.length; ++i) - message.exclusivePackages[i] = String(object.exclusivePackages[i]); - } - return message; - }; + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; - /** - * Creates a plain object from a YumSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.YumSettings - * @static - * @param {google.cloud.osconfig.v1.YumSettings} message YumSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - YumSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.excludes = []; - object.exclusivePackages = []; - } - if (options.defaults) { - object.security = false; - object.minimal = false; - } - if (message.security != null && message.hasOwnProperty("security")) - object.security = message.security; - if (message.minimal != null && message.hasOwnProperty("minimal")) - object.minimal = message.minimal; - if (message.excludes && message.excludes.length) { - object.excludes = []; - for (var j = 0; j < message.excludes.length; ++j) - object.excludes[j] = message.excludes[j]; - } - if (message.exclusivePackages && message.exclusivePackages.length) { - object.exclusivePackages = []; - for (var j = 0; j < message.exclusivePackages.length; ++j) - object.exclusivePackages[j] = message.exclusivePackages[j]; - } - return object; - }; + /** + * 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(); + }; - /** - * Converts this YumSettings to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.YumSettings - * @instance - * @returns {Object.} JSON object - */ - YumSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return YumSettings; - })(); + /** + * 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()); + }; - v1.GooSettings = (function() { + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; - /** - * Properties of a GooSettings. - * @memberof google.cloud.osconfig.v1 - * @interface IGooSettings - */ + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; - /** - * Constructs a new GooSettings. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a GooSettings. - * @implements IGooSettings - * @constructor - * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set - */ - function GooSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); - /** - * Creates a new GooSettings instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.GooSettings - * @static - * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings instance - */ - GooSettings.create = function create(properties) { - return new GooSettings(properties); - }; + return GeneratedCodeInfo; + })(); - /** - * Encodes the specified GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.GooSettings - * @static - * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GooSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + protobuf.Duration = (function() { - /** - * Encodes the specified GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.GooSettings - * @static - * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GooSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ - /** - * Decodes a GooSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.GooSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GooSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GooSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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]]; + } - /** - * Decodes a GooSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.GooSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GooSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Verifies a GooSettings message. - * @function verify - * @memberof google.cloud.osconfig.v1.GooSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GooSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; - /** - * Creates a GooSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.GooSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings - */ - GooSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.GooSettings) - return object; - return new $root.google.cloud.osconfig.v1.GooSettings(); - }; + /** + * 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); + }; - /** - * Creates a plain object from a GooSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.GooSettings - * @static - * @param {google.cloud.osconfig.v1.GooSettings} message GooSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GooSettings.toObject = function toObject() { - return {}; - }; + /** + * 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; + }; - /** - * Converts this GooSettings to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.GooSettings - * @instance - * @returns {Object.} JSON object - */ - GooSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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(); + }; - return GooSettings; - })(); + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; - v1.ZypperSettings = (function() { + /** + * 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; + }; - /** - * Properties of a ZypperSettings. - * @memberof google.cloud.osconfig.v1 - * @interface IZypperSettings - * @property {boolean|null} [withOptional] ZypperSettings withOptional - * @property {boolean|null} [withUpdate] ZypperSettings withUpdate - * @property {Array.|null} [categories] ZypperSettings categories - * @property {Array.|null} [severities] ZypperSettings severities - * @property {Array.|null} [excludes] ZypperSettings excludes - * @property {Array.|null} [exclusivePatches] ZypperSettings exclusivePatches - */ + /** + * 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; + }; - /** - * Constructs a new ZypperSettings. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ZypperSettings. - * @implements IZypperSettings - * @constructor - * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set - */ - function ZypperSettings(properties) { - this.categories = []; - this.severities = []; - this.excludes = []; - this.exclusivePatches = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this 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); + }; - /** - * ZypperSettings withOptional. - * @member {boolean} withOptional - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @instance - */ - ZypperSettings.prototype.withOptional = false; + return Duration; + })(); - /** - * ZypperSettings withUpdate. - * @member {boolean} withUpdate - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @instance - */ - ZypperSettings.prototype.withUpdate = false; + protobuf.Empty = (function() { - /** - * ZypperSettings categories. - * @member {Array.} categories - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @instance - */ - ZypperSettings.prototype.categories = $util.emptyArray; + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ - /** - * ZypperSettings severities. - * @member {Array.} severities - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @instance - */ - ZypperSettings.prototype.severities = $util.emptyArray; + /** + * 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]]; + } - /** - * ZypperSettings excludes. - * @member {Array.} excludes - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @instance - */ - ZypperSettings.prototype.excludes = $util.emptyArray; + /** + * 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); + }; - /** - * ZypperSettings exclusivePatches. - * @member {Array.} exclusivePatches - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @instance - */ - ZypperSettings.prototype.exclusivePatches = $util.emptyArray; + /** + * 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; + }; - /** - * Creates a new ZypperSettings instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @static - * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings instance - */ - ZypperSettings.create = function create(properties) { - return new ZypperSettings(properties); - }; + /** + * 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(); + }; - /** - * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @static - * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ZypperSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.withOptional != null && Object.hasOwnProperty.call(message, "withOptional")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.withOptional); - if (message.withUpdate != null && Object.hasOwnProperty.call(message, "withUpdate")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.withUpdate); - if (message.categories != null && message.categories.length) - for (var i = 0; i < message.categories.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.categories[i]); - if (message.severities != null && message.severities.length) - for (var i = 0; i < message.severities.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.severities[i]); - if (message.excludes != null && message.excludes.length) - for (var i = 0; i < message.excludes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.excludes[i]); - if (message.exclusivePatches != null && message.exclusivePatches.length) - for (var i = 0; i < message.exclusivePatches.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.exclusivePatches[i]); - return writer; - }; + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @static - * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ZypperSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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()); + }; - /** - * Decodes a ZypperSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ZypperSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ZypperSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.withOptional = reader.bool(); - break; - case 2: - message.withUpdate = reader.bool(); - break; - case 3: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push(reader.string()); - break; - case 4: - if (!(message.severities && message.severities.length)) - message.severities = []; - message.severities.push(reader.string()); - break; - case 5: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 6: - if (!(message.exclusivePatches && message.exclusivePatches.length)) - message.exclusivePatches = []; - message.exclusivePatches.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ZypperSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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(); + }; - /** - * Verifies a ZypperSettings message. - * @function verify - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ZypperSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.withOptional != null && message.hasOwnProperty("withOptional")) - if (typeof message.withOptional !== "boolean") - return "withOptional: boolean expected"; - if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) - if (typeof message.withUpdate !== "boolean") - return "withUpdate: boolean expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) - return "categories: array expected"; - for (var i = 0; i < message.categories.length; ++i) - if (!$util.isString(message.categories[i])) - return "categories: string[] expected"; - } - if (message.severities != null && message.hasOwnProperty("severities")) { - if (!Array.isArray(message.severities)) - return "severities: array expected"; - for (var i = 0; i < message.severities.length; ++i) - if (!$util.isString(message.severities[i])) - return "severities: string[] expected"; - } - if (message.excludes != null && message.hasOwnProperty("excludes")) { - if (!Array.isArray(message.excludes)) - return "excludes: array expected"; - for (var i = 0; i < message.excludes.length; ++i) - if (!$util.isString(message.excludes[i])) - return "excludes: string[] expected"; - } - if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { - if (!Array.isArray(message.exclusivePatches)) - return "exclusivePatches: array expected"; - for (var i = 0; i < message.exclusivePatches.length; ++i) - if (!$util.isString(message.exclusivePatches[i])) - return "exclusivePatches: string[] expected"; - } - return null; - }; + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; - /** - * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings - */ - ZypperSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ZypperSettings) - return object; - var message = new $root.google.cloud.osconfig.v1.ZypperSettings(); - if (object.withOptional != null) - message.withOptional = Boolean(object.withOptional); - if (object.withUpdate != null) - message.withUpdate = Boolean(object.withUpdate); - if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.categories: array expected"); - message.categories = []; - for (var i = 0; i < object.categories.length; ++i) - message.categories[i] = String(object.categories[i]); - } - if (object.severities) { - if (!Array.isArray(object.severities)) - throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.severities: array expected"); - message.severities = []; - for (var i = 0; i < object.severities.length; ++i) - message.severities[i] = String(object.severities[i]); - } - if (object.excludes) { - if (!Array.isArray(object.excludes)) - throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.excludes: array expected"); - message.excludes = []; - for (var i = 0; i < object.excludes.length; ++i) - message.excludes[i] = String(object.excludes[i]); - } - if (object.exclusivePatches) { - if (!Array.isArray(object.exclusivePatches)) - throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.exclusivePatches: array expected"); - message.exclusivePatches = []; - for (var i = 0; i < object.exclusivePatches.length; ++i) - message.exclusivePatches[i] = String(object.exclusivePatches[i]); - } - return message; - }; + /** + * 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); + }; - /** - * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @static - * @param {google.cloud.osconfig.v1.ZypperSettings} message ZypperSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ZypperSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.categories = []; - object.severities = []; - object.excludes = []; - object.exclusivePatches = []; - } - if (options.defaults) { - object.withOptional = false; - object.withUpdate = false; - } - if (message.withOptional != null && message.hasOwnProperty("withOptional")) - object.withOptional = message.withOptional; - if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) - object.withUpdate = message.withUpdate; - if (message.categories && message.categories.length) { - object.categories = []; - for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = message.categories[j]; - } - if (message.severities && message.severities.length) { - object.severities = []; - for (var j = 0; j < message.severities.length; ++j) - object.severities[j] = message.severities[j]; - } - if (message.excludes && message.excludes.length) { - object.excludes = []; - for (var j = 0; j < message.excludes.length; ++j) - object.excludes[j] = message.excludes[j]; - } - if (message.exclusivePatches && message.exclusivePatches.length) { - object.exclusivePatches = []; - for (var j = 0; j < message.exclusivePatches.length; ++j) - object.exclusivePatches[j] = message.exclusivePatches[j]; - } - return object; - }; + return Empty; + })(); - /** - * Converts this ZypperSettings to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @instance - * @returns {Object.} JSON object - */ - ZypperSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return protobuf; + })(); - return ZypperSettings; - })(); + google.cloud = (function() { - v1.WindowsUpdateSettings = (function() { + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.osconfig = (function() { + + /** + * Namespace osconfig. + * @memberof google.cloud + * @namespace + */ + var osconfig = {}; + + osconfig.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.osconfig + * @namespace + */ + var v1 = {}; + + v1.Inventory = (function() { /** - * Properties of a WindowsUpdateSettings. + * Properties of an Inventory. * @memberof google.cloud.osconfig.v1 - * @interface IWindowsUpdateSettings - * @property {Array.|null} [classifications] WindowsUpdateSettings classifications - * @property {Array.|null} [excludes] WindowsUpdateSettings excludes - * @property {Array.|null} [exclusivePatches] WindowsUpdateSettings exclusivePatches + * @interface IInventory + * @property {google.cloud.osconfig.v1.Inventory.IOsInfo|null} [osInfo] Inventory osInfo + * @property {Object.|null} [items] Inventory items */ /** - * Constructs a new WindowsUpdateSettings. + * Constructs a new Inventory. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a WindowsUpdateSettings. - * @implements IWindowsUpdateSettings + * @classdesc Represents an Inventory. + * @implements IInventory * @constructor - * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set */ - function WindowsUpdateSettings(properties) { - this.classifications = []; - this.excludes = []; - this.exclusivePatches = []; + function Inventory(properties) { + this.items = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8396,118 +9388,110 @@ } /** - * WindowsUpdateSettings classifications. - * @member {Array.} classifications - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @instance - */ - WindowsUpdateSettings.prototype.classifications = $util.emptyArray; - - /** - * WindowsUpdateSettings excludes. - * @member {Array.} excludes - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * Inventory osInfo. + * @member {google.cloud.osconfig.v1.Inventory.IOsInfo|null|undefined} osInfo + * @memberof google.cloud.osconfig.v1.Inventory * @instance */ - WindowsUpdateSettings.prototype.excludes = $util.emptyArray; + Inventory.prototype.osInfo = null; /** - * WindowsUpdateSettings exclusivePatches. - * @member {Array.} exclusivePatches - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * Inventory items. + * @member {Object.} items + * @memberof google.cloud.osconfig.v1.Inventory * @instance */ - WindowsUpdateSettings.prototype.exclusivePatches = $util.emptyArray; + Inventory.prototype.items = $util.emptyObject; /** - * Creates a new WindowsUpdateSettings instance using the specified properties. + * Creates a new Inventory instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @memberof google.cloud.osconfig.v1.Inventory * @static - * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings instance + * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory} Inventory instance */ - WindowsUpdateSettings.create = function create(properties) { - return new WindowsUpdateSettings(properties); + Inventory.create = function create(properties) { + return new Inventory(properties); }; /** - * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @memberof google.cloud.osconfig.v1.Inventory * @static - * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode + * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WindowsUpdateSettings.encode = function encode(message, writer) { + Inventory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.classifications != null && message.classifications.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.classifications.length; ++i) - writer.int32(message.classifications[i]); - writer.ldelim(); - } - if (message.excludes != null && message.excludes.length) - for (var i = 0; i < message.excludes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); - if (message.exclusivePatches != null && message.exclusivePatches.length) - for (var i = 0; i < message.exclusivePatches.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePatches[i]); + if (message.osInfo != null && Object.hasOwnProperty.call(message, "osInfo")) + $root.google.cloud.osconfig.v1.Inventory.OsInfo.encode(message.osInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.items != null && Object.hasOwnProperty.call(message, "items")) + for (var keys = Object.keys(message.items), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.osconfig.v1.Inventory.Item.encode(message.items[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @memberof google.cloud.osconfig.v1.Inventory * @static - * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode + * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WindowsUpdateSettings.encodeDelimited = function encodeDelimited(message, writer) { + Inventory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WindowsUpdateSettings message from the specified reader or buffer. + * Decodes an Inventory message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @memberof google.cloud.osconfig.v1.Inventory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings + * @returns {google.cloud.osconfig.v1.Inventory} Inventory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WindowsUpdateSettings.decode = function decode(reader, length) { + Inventory.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.classifications && message.classifications.length)) - message.classifications = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.classifications.push(reader.int32()); - } else - message.classifications.push(reader.int32()); + message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.decode(reader, reader.uint32()); break; case 2: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 3: - if (!(message.exclusivePatches && message.exclusivePatches.length)) - message.exclusivePatches = []; - message.exclusivePatches.push(reader.string()); + if (message.items === $util.emptyObject) + message.items = {}; + 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.osconfig.v1.Inventory.Item.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.items[key] = value; break; default: reader.skipType(tag & 7); @@ -8518,1398 +9502,2479 @@ }; /** - * Decodes a WindowsUpdateSettings message from the specified reader or buffer, length delimited. + * Decodes an Inventory message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @memberof google.cloud.osconfig.v1.Inventory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings + * @returns {google.cloud.osconfig.v1.Inventory} Inventory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WindowsUpdateSettings.decodeDelimited = function decodeDelimited(reader) { + Inventory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WindowsUpdateSettings message. + * Verifies an Inventory message. * @function verify - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @memberof google.cloud.osconfig.v1.Inventory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WindowsUpdateSettings.verify = function verify(message) { + Inventory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.classifications != null && message.hasOwnProperty("classifications")) { - if (!Array.isArray(message.classifications)) - return "classifications: array expected"; - for (var i = 0; i < message.classifications.length; ++i) - switch (message.classifications[i]) { - default: - return "classifications: 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.osInfo != null && message.hasOwnProperty("osInfo")) { + var error = $root.google.cloud.osconfig.v1.Inventory.OsInfo.verify(message.osInfo); + if (error) + return "osInfo." + error; } - if (message.excludes != null && message.hasOwnProperty("excludes")) { - if (!Array.isArray(message.excludes)) - return "excludes: array expected"; - for (var i = 0; i < message.excludes.length; ++i) - if (!$util.isString(message.excludes[i])) - return "excludes: string[] expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!$util.isObject(message.items)) + return "items: object expected"; + var key = Object.keys(message.items); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.osconfig.v1.Inventory.Item.verify(message.items[key[i]]); + if (error) + return "items." + error; + } } - if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { - if (!Array.isArray(message.exclusivePatches)) - return "exclusivePatches: array expected"; - for (var i = 0; i < message.exclusivePatches.length; ++i) - if (!$util.isString(message.exclusivePatches[i])) - return "exclusivePatches: string[] expected"; + return null; + }; + + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory} Inventory + */ + Inventory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory(); + if (object.osInfo != null) { + if (typeof object.osInfo !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.osInfo: object expected"); + message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.fromObject(object.osInfo); + } + if (object.items) { + if (typeof object.items !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.items: object expected"); + message.items = {}; + for (var keys = Object.keys(object.items), i = 0; i < keys.length; ++i) { + if (typeof object.items[keys[i]] !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.items: object expected"); + message.items[keys[i]] = $root.google.cloud.osconfig.v1.Inventory.Item.fromObject(object.items[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {google.cloud.osconfig.v1.Inventory} message Inventory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Inventory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.items = {}; + if (options.defaults) + object.osInfo = null; + if (message.osInfo != null && message.hasOwnProperty("osInfo")) + object.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.toObject(message.osInfo, options); + var keys2; + if (message.items && (keys2 = Object.keys(message.items)).length) { + object.items = {}; + for (var j = 0; j < keys2.length; ++j) + object.items[keys2[j]] = $root.google.cloud.osconfig.v1.Inventory.Item.toObject(message.items[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Inventory to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory + * @instance + * @returns {Object.} JSON object + */ + Inventory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Inventory.OsInfo = (function() { + + /** + * Properties of an OsInfo. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IOsInfo + * @property {string|null} [hostname] OsInfo hostname + * @property {string|null} [longName] OsInfo longName + * @property {string|null} [shortName] OsInfo shortName + * @property {string|null} [version] OsInfo version + * @property {string|null} [architecture] OsInfo architecture + * @property {string|null} [kernelVersion] OsInfo kernelVersion + * @property {string|null} [kernelRelease] OsInfo kernelRelease + * @property {string|null} [osconfigAgentVersion] OsInfo osconfigAgentVersion + */ + + /** + * Constructs a new OsInfo. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents an OsInfo. + * @implements IOsInfo + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IOsInfo=} [properties] Properties to set + */ + function OsInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return null; - }; - /** - * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings - */ - WindowsUpdateSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.WindowsUpdateSettings) - return object; - var message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); - if (object.classifications) { - if (!Array.isArray(object.classifications)) - throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.classifications: array expected"); - message.classifications = []; - for (var i = 0; i < object.classifications.length; ++i) - switch (object.classifications[i]) { - default: - case "CLASSIFICATION_UNSPECIFIED": - case 0: - message.classifications[i] = 0; - break; - case "CRITICAL": - case 1: - message.classifications[i] = 1; + /** + * OsInfo hostname. + * @member {string} hostname + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.hostname = ""; + + /** + * OsInfo longName. + * @member {string} longName + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.longName = ""; + + /** + * OsInfo shortName. + * @member {string} shortName + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.shortName = ""; + + /** + * OsInfo version. + * @member {string} version + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.version = ""; + + /** + * OsInfo architecture. + * @member {string} architecture + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.architecture = ""; + + /** + * OsInfo kernelVersion. + * @member {string} kernelVersion + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.kernelVersion = ""; + + /** + * OsInfo kernelRelease. + * @member {string} kernelRelease + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.kernelRelease = ""; + + /** + * OsInfo osconfigAgentVersion. + * @member {string} osconfigAgentVersion + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.osconfigAgentVersion = ""; + + /** + * Creates a new OsInfo instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1.Inventory.IOsInfo=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo instance + */ + OsInfo.create = function create(properties) { + return new OsInfo(properties); + }; + + /** + * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.longName != null && Object.hasOwnProperty.call(message, "longName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.longName); + if (message.shortName != null && Object.hasOwnProperty.call(message, "shortName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shortName); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.architecture); + if (message.kernelVersion != null && Object.hasOwnProperty.call(message, "kernelVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.kernelVersion); + if (message.kernelRelease != null && Object.hasOwnProperty.call(message, "kernelRelease")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.kernelRelease); + if (message.osconfigAgentVersion != null && Object.hasOwnProperty.call(message, "osconfigAgentVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.osconfigAgentVersion); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.hostname); + return writer; + }; + + /** + * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OsInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.OsInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 9: + message.hostname = reader.string(); break; - case "SECURITY": case 2: - message.classifications[i] = 2; + message.longName = reader.string(); break; - case "DEFINITION": case 3: - message.classifications[i] = 3; + message.shortName = reader.string(); break; - case "DRIVER": case 4: - message.classifications[i] = 4; + message.version = reader.string(); break; - case "FEATURE_PACK": case 5: - message.classifications[i] = 5; + message.architecture = reader.string(); break; - case "SERVICE_PACK": case 6: - message.classifications[i] = 6; + message.kernelVersion = reader.string(); break; - case "TOOL": case 7: - message.classifications[i] = 7; + message.kernelRelease = reader.string(); break; - case "UPDATE_ROLLUP": case 8: - message.classifications[i] = 8; + message.osconfigAgentVersion = reader.string(); break; - case "UPDATE": - case 9: - message.classifications[i] = 9; + default: + reader.skipType(tag & 7); break; } - } - if (object.excludes) { - if (!Array.isArray(object.excludes)) - throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.excludes: array expected"); - message.excludes = []; - for (var i = 0; i < object.excludes.length; ++i) - message.excludes[i] = String(object.excludes[i]); - } - if (object.exclusivePatches) { - if (!Array.isArray(object.exclusivePatches)) - throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.exclusivePatches: array expected"); - message.exclusivePatches = []; - for (var i = 0; i < object.exclusivePatches.length; ++i) - message.exclusivePatches[i] = String(object.exclusivePatches[i]); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {google.cloud.osconfig.v1.WindowsUpdateSettings} message WindowsUpdateSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsUpdateSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.classifications = []; - object.excludes = []; - object.exclusivePatches = []; - } - if (message.classifications && message.classifications.length) { - object.classifications = []; - for (var j = 0; j < message.classifications.length; ++j) - object.classifications[j] = options.enums === String ? $root.google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[message.classifications[j]] : message.classifications[j]; - } - if (message.excludes && message.excludes.length) { - object.excludes = []; - for (var j = 0; j < message.excludes.length; ++j) - object.excludes[j] = message.excludes[j]; - } - if (message.exclusivePatches && message.exclusivePatches.length) { - object.exclusivePatches = []; - for (var j = 0; j < message.exclusivePatches.length; ++j) - object.exclusivePatches[j] = message.exclusivePatches[j]; + /** + * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OsInfo message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OsInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.longName != null && message.hasOwnProperty("longName")) + if (!$util.isString(message.longName)) + return "longName: string expected"; + if (message.shortName != null && message.hasOwnProperty("shortName")) + if (!$util.isString(message.shortName)) + return "shortName: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) + if (!$util.isString(message.kernelVersion)) + return "kernelVersion: string expected"; + if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) + if (!$util.isString(message.kernelRelease)) + return "kernelRelease: string expected"; + if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) + if (!$util.isString(message.osconfigAgentVersion)) + return "osconfigAgentVersion: string expected"; + return null; + }; + + /** + * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo + */ + OsInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.OsInfo) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.OsInfo(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.longName != null) + message.longName = String(object.longName); + if (object.shortName != null) + message.shortName = String(object.shortName); + if (object.version != null) + message.version = String(object.version); + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.kernelVersion != null) + message.kernelVersion = String(object.kernelVersion); + if (object.kernelRelease != null) + message.kernelRelease = String(object.kernelRelease); + if (object.osconfigAgentVersion != null) + message.osconfigAgentVersion = String(object.osconfigAgentVersion); + return message; + }; + + /** + * Creates a plain object from an OsInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1.Inventory.OsInfo} message OsInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OsInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.longName = ""; + object.shortName = ""; + object.version = ""; + object.architecture = ""; + object.kernelVersion = ""; + object.kernelRelease = ""; + object.osconfigAgentVersion = ""; + object.hostname = ""; + } + if (message.longName != null && message.hasOwnProperty("longName")) + object.longName = message.longName; + if (message.shortName != null && message.hasOwnProperty("shortName")) + object.shortName = message.shortName; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) + object.kernelVersion = message.kernelVersion; + if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) + object.kernelRelease = message.kernelRelease; + if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) + object.osconfigAgentVersion = message.osconfigAgentVersion; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + return object; + }; + + /** + * Converts this OsInfo to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + * @returns {Object.} JSON object + */ + OsInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OsInfo; + })(); + + Inventory.Item = (function() { + + /** + * Properties of an Item. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IItem + * @property {string|null} [id] Item id + * @property {google.cloud.osconfig.v1.Inventory.Item.OriginType|null} [originType] Item originType + * @property {google.protobuf.ITimestamp|null} [createTime] Item createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Item updateTime + * @property {google.cloud.osconfig.v1.Inventory.Item.Type|null} [type] Item type + * @property {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null} [installedPackage] Item installedPackage + * @property {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null} [availablePackage] Item availablePackage + */ + + /** + * Constructs a new Item. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents an Item. + * @implements IItem + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IItem=} [properties] Properties to set + */ + function Item(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return object; - }; - /** - * Converts this WindowsUpdateSettings to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @instance - * @returns {Object.} JSON object - */ - WindowsUpdateSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Item id. + * @member {string} id + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.id = ""; + + /** + * Item originType. + * @member {google.cloud.osconfig.v1.Inventory.Item.OriginType} originType + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.originType = 0; + + /** + * Item createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.createTime = null; + + /** + * Item updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.updateTime = null; - /** - * Classification enum. - * @name google.cloud.osconfig.v1.WindowsUpdateSettings.Classification - * @enum {number} - * @property {number} CLASSIFICATION_UNSPECIFIED=0 CLASSIFICATION_UNSPECIFIED value - * @property {number} CRITICAL=1 CRITICAL value - * @property {number} SECURITY=2 SECURITY value - * @property {number} DEFINITION=3 DEFINITION value - * @property {number} DRIVER=4 DRIVER value - * @property {number} FEATURE_PACK=5 FEATURE_PACK value - * @property {number} SERVICE_PACK=6 SERVICE_PACK value - * @property {number} TOOL=7 TOOL value - * @property {number} UPDATE_ROLLUP=8 UPDATE_ROLLUP value - * @property {number} UPDATE=9 UPDATE value - */ - WindowsUpdateSettings.Classification = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLASSIFICATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CRITICAL"] = 1; - values[valuesById[2] = "SECURITY"] = 2; - values[valuesById[3] = "DEFINITION"] = 3; - values[valuesById[4] = "DRIVER"] = 4; - values[valuesById[5] = "FEATURE_PACK"] = 5; - values[valuesById[6] = "SERVICE_PACK"] = 6; - values[valuesById[7] = "TOOL"] = 7; - values[valuesById[8] = "UPDATE_ROLLUP"] = 8; - values[valuesById[9] = "UPDATE"] = 9; - return values; - })(); + /** + * Item type. + * @member {google.cloud.osconfig.v1.Inventory.Item.Type} type + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.type = 0; - return WindowsUpdateSettings; - })(); + /** + * Item installedPackage. + * @member {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null|undefined} installedPackage + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.installedPackage = null; - v1.ExecStep = (function() { + /** + * Item availablePackage. + * @member {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null|undefined} availablePackage + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.availablePackage = null; - /** - * Properties of an ExecStep. - * @memberof google.cloud.osconfig.v1 - * @interface IExecStep - * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [linuxExecStepConfig] ExecStep linuxExecStepConfig - * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [windowsExecStepConfig] ExecStep windowsExecStepConfig - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Constructs a new ExecStep. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an ExecStep. - * @implements IExecStep - * @constructor - * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set - */ - function ExecStep(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Item details. + * @member {"installedPackage"|"availablePackage"|undefined} details + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Object.defineProperty(Item.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["installedPackage", "availablePackage"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ExecStep linuxExecStepConfig. - * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} linuxExecStepConfig - * @memberof google.cloud.osconfig.v1.ExecStep - * @instance - */ - ExecStep.prototype.linuxExecStepConfig = null; + /** + * Creates a new Item instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1.Inventory.IItem=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.Item} Item instance + */ + Item.create = function create(properties) { + return new Item(properties); + }; - /** - * ExecStep windowsExecStepConfig. - * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} windowsExecStepConfig - * @memberof google.cloud.osconfig.v1.ExecStep - * @instance - */ - ExecStep.prototype.windowsExecStepConfig = null; + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1.Inventory.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.originType != null && Object.hasOwnProperty.call(message, "originType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.originType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.installedPackage != null && Object.hasOwnProperty.call(message, "installedPackage")) + $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.encode(message.installedPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.availablePackage != null && Object.hasOwnProperty.call(message, "availablePackage")) + $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.encode(message.availablePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; - /** - * Creates a new ExecStep instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep instance - */ - ExecStep.create = function create(properties) { - return new ExecStep(properties); - }; + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1.Inventory.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecStep.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.linuxExecStepConfig != null && Object.hasOwnProperty.call(message, "linuxExecStepConfig")) - $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.linuxExecStepConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.windowsExecStepConfig != null && Object.hasOwnProperty.call(message, "windowsExecStepConfig")) - $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.windowsExecStepConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Decodes an Item message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.Item(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.originType = reader.int32(); + break; + case 8: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + case 7: + message.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecStep.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an ExecStep message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecStep.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStep(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Verifies an Item message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Item.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.originType != null && message.hasOwnProperty("originType")) + switch (message.originType) { + default: + return "originType: enum value expected"; + case 0: + case 1: + break; + } + 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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify(message.installedPackage); + if (error) + return "installedPackage." + error; + } + } + if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify(message.availablePackage); + if (error) + return "availablePackage." + error; + } + } + return null; + }; + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.Item} Item + */ + Item.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.Item) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.Item(); + if (object.id != null) + message.id = String(object.id); + switch (object.originType) { + case "ORIGIN_TYPE_UNSPECIFIED": + case 0: + message.originType = 0; + break; + case "INVENTORY_REPORT": case 1: - message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); + message.originType = 1; break; - case 2: - message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.Item.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.osconfig.v1.Inventory.Item.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; break; - default: - reader.skipType(tag & 7); + case "INSTALLED_PACKAGE": + case 1: + message.type = 1; + break; + case "AVAILABLE_PACKAGE": + case 2: + message.type = 2; break; } - } - return message; - }; - - /** - * Decodes an ExecStep message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecStep.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecStep message. - * @function verify - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecStep.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) { - var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.linuxExecStepConfig); - if (error) - return "linuxExecStepConfig." + error; - } - if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) { - var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.windowsExecStepConfig); - if (error) - return "windowsExecStepConfig." + error; - } - return null; - }; + if (object.installedPackage != null) { + if (typeof object.installedPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.Item.installedPackage: object expected"); + message.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.fromObject(object.installedPackage); + } + if (object.availablePackage != null) { + if (typeof object.availablePackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.Item.availablePackage: object expected"); + message.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.fromObject(object.availablePackage); + } + return message; + }; - /** - * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep - */ - ExecStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ExecStep) + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1.Inventory.Item} message Item + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Item.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.originType = options.enums === String ? "ORIGIN_TYPE_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.originType != null && message.hasOwnProperty("originType")) + object.originType = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.OriginType[message.originType] : message.originType; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.Type[message.type] : message.type; + if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { + object.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.toObject(message.installedPackage, options); + if (options.oneofs) + object.details = "installedPackage"; + } + if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { + object.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.toObject(message.availablePackage, options); + if (options.oneofs) + object.details = "availablePackage"; + } + 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); return object; - var message = new $root.google.cloud.osconfig.v1.ExecStep(); - if (object.linuxExecStepConfig != null) { - if (typeof object.linuxExecStepConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecStep.linuxExecStepConfig: object expected"); - message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.linuxExecStepConfig); - } - if (object.windowsExecStepConfig != null) { - if (typeof object.windowsExecStepConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecStep.windowsExecStepConfig: object expected"); - message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.windowsExecStepConfig); - } - return message; - }; + }; - /** - * Creates a plain object from an ExecStep message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {google.cloud.osconfig.v1.ExecStep} message ExecStep - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecStep.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.linuxExecStepConfig = null; - object.windowsExecStepConfig = null; - } - if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) - object.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.linuxExecStepConfig, options); - if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) - object.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.windowsExecStepConfig, options); - return object; - }; + /** + * Converts this Item to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + * @returns {Object.} JSON object + */ + Item.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ExecStep to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ExecStep - * @instance - * @returns {Object.} JSON object - */ - ExecStep.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * OriginType enum. + * @name google.cloud.osconfig.v1.Inventory.Item.OriginType + * @enum {number} + * @property {number} ORIGIN_TYPE_UNSPECIFIED=0 ORIGIN_TYPE_UNSPECIFIED value + * @property {number} INVENTORY_REPORT=1 INVENTORY_REPORT value + */ + Item.OriginType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORIGIN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INVENTORY_REPORT"] = 1; + return values; + })(); - return ExecStep; - })(); + /** + * Type enum. + * @name google.cloud.osconfig.v1.Inventory.Item.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INSTALLED_PACKAGE=1 INSTALLED_PACKAGE value + * @property {number} AVAILABLE_PACKAGE=2 AVAILABLE_PACKAGE value + */ + Item.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLED_PACKAGE"] = 1; + values[valuesById[2] = "AVAILABLE_PACKAGE"] = 2; + return values; + })(); + + return Item; + })(); - v1.ExecStepConfig = (function() { + Inventory.SoftwarePackage = (function() { - /** - * Properties of an ExecStepConfig. - * @memberof google.cloud.osconfig.v1 - * @interface IExecStepConfig - * @property {string|null} [localPath] ExecStepConfig localPath - * @property {google.cloud.osconfig.v1.IGcsObject|null} [gcsObject] ExecStepConfig gcsObject - * @property {Array.|null} [allowedSuccessCodes] ExecStepConfig allowedSuccessCodes - * @property {google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null} [interpreter] ExecStepConfig interpreter - */ + /** + * Properties of a SoftwarePackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface ISoftwarePackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [yumPackage] SoftwarePackage yumPackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [aptPackage] SoftwarePackage aptPackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [zypperPackage] SoftwarePackage zypperPackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [googetPackage] SoftwarePackage googetPackage + * @property {google.cloud.osconfig.v1.Inventory.IZypperPatch|null} [zypperPatch] SoftwarePackage zypperPatch + * @property {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null} [wuaPackage] SoftwarePackage wuaPackage + * @property {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null} [qfePackage] SoftwarePackage qfePackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [cosPackage] SoftwarePackage cosPackage + */ - /** - * Constructs a new ExecStepConfig. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an ExecStepConfig. - * @implements IExecStepConfig - * @constructor - * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set - */ - function ExecStepConfig(properties) { - this.allowedSuccessCodes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new SoftwarePackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a SoftwarePackage. + * @implements ISoftwarePackage + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage=} [properties] Properties to set + */ + function SoftwarePackage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ExecStepConfig localPath. - * @member {string} localPath - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - ExecStepConfig.prototype.localPath = ""; + /** + * SoftwarePackage yumPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} yumPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.yumPackage = null; - /** - * ExecStepConfig gcsObject. - * @member {google.cloud.osconfig.v1.IGcsObject|null|undefined} gcsObject - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - ExecStepConfig.prototype.gcsObject = null; + /** + * SoftwarePackage aptPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} aptPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.aptPackage = null; - /** - * ExecStepConfig allowedSuccessCodes. - * @member {Array.} allowedSuccessCodes - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - ExecStepConfig.prototype.allowedSuccessCodes = $util.emptyArray; + /** + * SoftwarePackage zypperPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} zypperPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.zypperPackage = null; - /** - * ExecStepConfig interpreter. - * @member {google.cloud.osconfig.v1.ExecStepConfig.Interpreter} interpreter - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - ExecStepConfig.prototype.interpreter = 0; + /** + * SoftwarePackage googetPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} googetPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.googetPackage = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * SoftwarePackage zypperPatch. + * @member {google.cloud.osconfig.v1.Inventory.IZypperPatch|null|undefined} zypperPatch + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.zypperPatch = null; - /** - * ExecStepConfig executable. - * @member {"localPath"|"gcsObject"|undefined} executable - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - Object.defineProperty(ExecStepConfig.prototype, "executable", { - get: $util.oneOfGetter($oneOfFields = ["localPath", "gcsObject"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * SoftwarePackage wuaPackage. + * @member {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null|undefined} wuaPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.wuaPackage = null; - /** - * Creates a new ExecStepConfig instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig instance - */ - ExecStepConfig.create = function create(properties) { - return new ExecStepConfig(properties); - }; + /** + * SoftwarePackage qfePackage. + * @member {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null|undefined} qfePackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.qfePackage = null; + + /** + * SoftwarePackage cosPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} cosPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.cosPackage = null; - /** - * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecStepConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath); - if (message.gcsObject != null && Object.hasOwnProperty.call(message, "gcsObject")) - $root.google.cloud.osconfig.v1.GcsObject.encode(message.gcsObject, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.allowedSuccessCodes != null && message.allowedSuccessCodes.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.allowedSuccessCodes.length; ++i) - writer.int32(message.allowedSuccessCodes[i]); - writer.ldelim(); - } - if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); - return writer; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecStepConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * SoftwarePackage details. + * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|undefined} details + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + Object.defineProperty(SoftwarePackage.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes an ExecStepConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecStepConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.localPath = reader.string(); - break; - case 2: - message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.allowedSuccessCodes && message.allowedSuccessCodes.length)) - message.allowedSuccessCodes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.allowedSuccessCodes.push(reader.int32()); - } else - message.allowedSuccessCodes.push(reader.int32()); - break; - case 4: - message.interpreter = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a new SoftwarePackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage instance + */ + SoftwarePackage.create = function create(properties) { + return new SoftwarePackage(properties); + }; + + /** + * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwarePackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yumPackage != null && Object.hasOwnProperty.call(message, "yumPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.yumPackage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.aptPackage != null && Object.hasOwnProperty.call(message, "aptPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.aptPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zypperPackage != null && Object.hasOwnProperty.call(message, "zypperPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.zypperPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.googetPackage != null && Object.hasOwnProperty.call(message, "googetPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.googetPackage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.zypperPatch != null && Object.hasOwnProperty.call(message, "zypperPatch")) + $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.encode(message.zypperPatch, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.wuaPackage != null && Object.hasOwnProperty.call(message, "wuaPackage")) + $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.encode(message.wuaPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.qfePackage != null && Object.hasOwnProperty.call(message, "qfePackage")) + $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.encode(message.qfePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.cosPackage != null && Object.hasOwnProperty.call(message, "cosPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.cosPackage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwarePackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoftwarePackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwarePackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 2: + message.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 3: + message.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 4: + message.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 5: + message.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.decode(reader, reader.uint32()); + break; + case 6: + message.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); + break; + case 7: + message.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); + break; + case 8: + message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecStepConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwarePackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ExecStepConfig message. - * @function verify - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecStepConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.localPath != null && message.hasOwnProperty("localPath")) { - properties.executable = 1; - if (!$util.isString(message.localPath)) - return "localPath: string expected"; - } - if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { - if (properties.executable === 1) - return "executable: multiple values"; - properties.executable = 1; - { - var error = $root.google.cloud.osconfig.v1.GcsObject.verify(message.gcsObject); - if (error) - return "gcsObject." + error; + /** + * Verifies a SoftwarePackage message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwarePackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.yumPackage); + if (error) + return "yumPackage." + error; + } } - } - if (message.allowedSuccessCodes != null && message.hasOwnProperty("allowedSuccessCodes")) { - if (!Array.isArray(message.allowedSuccessCodes)) - return "allowedSuccessCodes: array expected"; - for (var i = 0; i < message.allowedSuccessCodes.length; ++i) - if (!$util.isInteger(message.allowedSuccessCodes[i])) - return "allowedSuccessCodes: integer[] expected"; - } - if (message.interpreter != null && message.hasOwnProperty("interpreter")) - switch (message.interpreter) { - default: - return "interpreter: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.aptPackage); + if (error) + return "aptPackage." + error; + } } - return null; - }; + if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.zypperPackage); + if (error) + return "zypperPackage." + error; + } + } + if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.googetPackage); + if (error) + return "googetPackage." + error; + } + } + if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.verify(message.zypperPatch); + if (error) + return "zypperPatch." + error; + } + } + if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify(message.wuaPackage); + if (error) + return "wuaPackage." + error; + } + } + if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify(message.qfePackage); + if (error) + return "qfePackage." + error; + } + } + if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.cosPackage); + if (error) + return "cosPackage." + error; + } + } + return null; + }; + + /** + * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage + */ + SoftwarePackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage(); + if (object.yumPackage != null) { + if (typeof object.yumPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.yumPackage: object expected"); + message.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.yumPackage); + } + if (object.aptPackage != null) { + if (typeof object.aptPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.aptPackage: object expected"); + message.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.aptPackage); + } + if (object.zypperPackage != null) { + if (typeof object.zypperPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.zypperPackage: object expected"); + message.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.zypperPackage); + } + if (object.googetPackage != null) { + if (typeof object.googetPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.googetPackage: object expected"); + message.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.googetPackage); + } + if (object.zypperPatch != null) { + if (typeof object.zypperPatch !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.zypperPatch: object expected"); + message.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.fromObject(object.zypperPatch); + } + if (object.wuaPackage != null) { + if (typeof object.wuaPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.wuaPackage: object expected"); + message.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.fromObject(object.wuaPackage); + } + if (object.qfePackage != null) { + if (typeof object.qfePackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.qfePackage: object expected"); + message.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.fromObject(object.qfePackage); + } + if (object.cosPackage != null) { + if (typeof object.cosPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.cosPackage: object expected"); + message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.cosPackage); + } + return message; + }; - /** - * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig - */ - ExecStepConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ExecStepConfig) + /** + * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.SoftwarePackage} message SoftwarePackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwarePackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { + object.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.yumPackage, options); + if (options.oneofs) + object.details = "yumPackage"; + } + if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { + object.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.aptPackage, options); + if (options.oneofs) + object.details = "aptPackage"; + } + if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { + object.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.zypperPackage, options); + if (options.oneofs) + object.details = "zypperPackage"; + } + if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { + object.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.googetPackage, options); + if (options.oneofs) + object.details = "googetPackage"; + } + if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { + object.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.toObject(message.zypperPatch, options); + if (options.oneofs) + object.details = "zypperPatch"; + } + if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { + object.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.toObject(message.wuaPackage, options); + if (options.oneofs) + object.details = "wuaPackage"; + } + if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { + object.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.toObject(message.qfePackage, options); + if (options.oneofs) + object.details = "qfePackage"; + } + if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { + object.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.cosPackage, options); + if (options.oneofs) + object.details = "cosPackage"; + } return object; - var message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); - if (object.localPath != null) - message.localPath = String(object.localPath); - if (object.gcsObject != null) { - if (typeof object.gcsObject !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.gcsObject: object expected"); - message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.fromObject(object.gcsObject); - } - if (object.allowedSuccessCodes) { - if (!Array.isArray(object.allowedSuccessCodes)) - throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.allowedSuccessCodes: array expected"); - message.allowedSuccessCodes = []; - for (var i = 0; i < object.allowedSuccessCodes.length; ++i) - message.allowedSuccessCodes[i] = object.allowedSuccessCodes[i] | 0; - } - switch (object.interpreter) { - case "INTERPRETER_UNSPECIFIED": - case 0: - message.interpreter = 0; - break; - case "SHELL": - case 1: - message.interpreter = 1; - break; - case "POWERSHELL": - case 2: - message.interpreter = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {google.cloud.osconfig.v1.ExecStepConfig} message ExecStepConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecStepConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.allowedSuccessCodes = []; - if (options.defaults) - object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; - if (message.localPath != null && message.hasOwnProperty("localPath")) { - object.localPath = message.localPath; - if (options.oneofs) - object.executable = "localPath"; - } - if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { - object.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.toObject(message.gcsObject, options); - if (options.oneofs) - object.executable = "gcsObject"; - } - if (message.allowedSuccessCodes && message.allowedSuccessCodes.length) { - object.allowedSuccessCodes = []; - for (var j = 0; j < message.allowedSuccessCodes.length; ++j) - object.allowedSuccessCodes[j] = message.allowedSuccessCodes[j]; - } - if (message.interpreter != null && message.hasOwnProperty("interpreter")) - object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.ExecStepConfig.Interpreter[message.interpreter] : message.interpreter; - return object; - }; + }; - /** - * Converts this ExecStepConfig to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - * @returns {Object.} JSON object - */ - ExecStepConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this SoftwarePackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + * @returns {Object.} JSON object + */ + SoftwarePackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Interpreter enum. - * @name google.cloud.osconfig.v1.ExecStepConfig.Interpreter - * @enum {number} - * @property {number} INTERPRETER_UNSPECIFIED=0 INTERPRETER_UNSPECIFIED value - * @property {number} SHELL=1 SHELL value - * @property {number} POWERSHELL=2 POWERSHELL value - */ - ExecStepConfig.Interpreter = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTERPRETER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SHELL"] = 1; - values[valuesById[2] = "POWERSHELL"] = 2; - return values; + return SoftwarePackage; })(); - return ExecStepConfig; - })(); + Inventory.VersionedPackage = (function() { - v1.GcsObject = (function() { + /** + * Properties of a VersionedPackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IVersionedPackage + * @property {string|null} [packageName] VersionedPackage packageName + * @property {string|null} [architecture] VersionedPackage architecture + * @property {string|null} [version] VersionedPackage version + */ - /** - * Properties of a GcsObject. - * @memberof google.cloud.osconfig.v1 - * @interface IGcsObject - * @property {string|null} [bucket] GcsObject bucket - * @property {string|null} [object] GcsObject object - * @property {number|Long|null} [generationNumber] GcsObject generationNumber - */ + /** + * Constructs a new VersionedPackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a VersionedPackage. + * @implements IVersionedPackage + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage=} [properties] Properties to set + */ + function VersionedPackage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new GcsObject. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a GcsObject. - * @implements IGcsObject - * @constructor - * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set - */ - function GcsObject(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * VersionedPackage packageName. + * @member {string} packageName + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.packageName = ""; - /** - * GcsObject bucket. - * @member {string} bucket - * @memberof google.cloud.osconfig.v1.GcsObject - * @instance - */ - GcsObject.prototype.bucket = ""; + /** + * VersionedPackage architecture. + * @member {string} architecture + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.architecture = ""; - /** - * GcsObject object. - * @member {string} object - * @memberof google.cloud.osconfig.v1.GcsObject - * @instance - */ - GcsObject.prototype.object = ""; + /** + * VersionedPackage version. + * @member {string} version + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.version = ""; - /** - * GcsObject generationNumber. - * @member {number|Long} generationNumber - * @memberof google.cloud.osconfig.v1.GcsObject - * @instance - */ - GcsObject.prototype.generationNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Creates a new VersionedPackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage instance + */ + VersionedPackage.create = function create(properties) { + return new VersionedPackage(properties); + }; - /** - * Creates a new GcsObject instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject instance - */ - GcsObject.create = function create(properties) { - return new GcsObject(properties); - }; + /** + * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionedPackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.architecture); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageName); + return writer; + }; + + /** + * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionedPackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionedPackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionedPackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.VersionedPackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.packageName = reader.string(); + break; + case 2: + message.architecture = reader.string(); + break; + case 3: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionedPackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsObject.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - if (message.object != null && Object.hasOwnProperty.call(message, "object")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); - if (message.generationNumber != null && Object.hasOwnProperty.call(message, "generationNumber")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generationNumber); - return writer; - }; + /** + * Verifies a VersionedPackage message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionedPackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; - /** - * Encodes the specified GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsObject.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage + */ + VersionedPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.VersionedPackage) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.VersionedPackage(); + if (object.packageName != null) + message.packageName = String(object.packageName); + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.version != null) + message.version = String(object.version); + return message; + }; - /** - * Decodes a GcsObject message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsObject.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GcsObject(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bucket = reader.string(); - break; - case 2: - message.object = reader.string(); - break; - case 3: - message.generationNumber = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.VersionedPackage} message VersionedPackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionedPackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.architecture = ""; + object.version = ""; + object.packageName = ""; } - } - return message; - }; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + return object; + }; - /** - * Decodes a GcsObject message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsObject.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this VersionedPackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @instance + * @returns {Object.} JSON object + */ + VersionedPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a GcsObject message. - * @function verify - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsObject.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - if (message.object != null && message.hasOwnProperty("object")) - if (!$util.isString(message.object)) - return "object: string expected"; - if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) - if (!$util.isInteger(message.generationNumber) && !(message.generationNumber && $util.isInteger(message.generationNumber.low) && $util.isInteger(message.generationNumber.high))) - return "generationNumber: integer|Long expected"; - return null; - }; + return VersionedPackage; + })(); - /** - * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject - */ - GcsObject.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.GcsObject) - return object; - var message = new $root.google.cloud.osconfig.v1.GcsObject(); - if (object.bucket != null) - message.bucket = String(object.bucket); - if (object.object != null) - message.object = String(object.object); - if (object.generationNumber != null) - if ($util.Long) - (message.generationNumber = $util.Long.fromValue(object.generationNumber)).unsigned = false; - else if (typeof object.generationNumber === "string") - message.generationNumber = parseInt(object.generationNumber, 10); - else if (typeof object.generationNumber === "number") - message.generationNumber = object.generationNumber; - else if (typeof object.generationNumber === "object") - message.generationNumber = new $util.LongBits(object.generationNumber.low >>> 0, object.generationNumber.high >>> 0).toNumber(); - return message; - }; + Inventory.WindowsUpdatePackage = (function() { - /** - * Creates a plain object from a GcsObject message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {google.cloud.osconfig.v1.GcsObject} message GcsObject - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsObject.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bucket = ""; - object.object = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.generationNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.generationNumber = options.longs === String ? "0" : 0; + /** + * Properties of a WindowsUpdatePackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IWindowsUpdatePackage + * @property {string|null} [title] WindowsUpdatePackage title + * @property {string|null} [description] WindowsUpdatePackage description + * @property {Array.|null} [categories] WindowsUpdatePackage categories + * @property {Array.|null} [kbArticleIds] WindowsUpdatePackage kbArticleIds + * @property {string|null} [supportUrl] WindowsUpdatePackage supportUrl + * @property {Array.|null} [moreInfoUrls] WindowsUpdatePackage moreInfoUrls + * @property {string|null} [updateId] WindowsUpdatePackage updateId + * @property {number|null} [revisionNumber] WindowsUpdatePackage revisionNumber + * @property {google.protobuf.ITimestamp|null} [lastDeploymentChangeTime] WindowsUpdatePackage lastDeploymentChangeTime + */ + + /** + * Constructs a new WindowsUpdatePackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a WindowsUpdatePackage. + * @implements IWindowsUpdatePackage + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage=} [properties] Properties to set + */ + function WindowsUpdatePackage(properties) { + this.categories = []; + this.kbArticleIds = []; + this.moreInfoUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - if (message.object != null && message.hasOwnProperty("object")) - object.object = message.object; - if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) - if (typeof message.generationNumber === "number") - object.generationNumber = options.longs === String ? String(message.generationNumber) : message.generationNumber; - else - object.generationNumber = options.longs === String ? $util.Long.prototype.toString.call(message.generationNumber) : options.longs === Number ? new $util.LongBits(message.generationNumber.low >>> 0, message.generationNumber.high >>> 0).toNumber() : message.generationNumber; - return object; - }; - /** - * Converts this GcsObject to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.GcsObject - * @instance - * @returns {Object.} JSON object - */ - GcsObject.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * WindowsUpdatePackage title. + * @member {string} title + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.title = ""; - return GcsObject; - })(); + /** + * WindowsUpdatePackage description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.description = ""; - v1.PatchInstanceFilter = (function() { + /** + * WindowsUpdatePackage categories. + * @member {Array.} categories + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.categories = $util.emptyArray; - /** - * Properties of a PatchInstanceFilter. - * @memberof google.cloud.osconfig.v1 - * @interface IPatchInstanceFilter - * @property {boolean|null} [all] PatchInstanceFilter all - * @property {Array.|null} [groupLabels] PatchInstanceFilter groupLabels - * @property {Array.|null} [zones] PatchInstanceFilter zones - * @property {Array.|null} [instances] PatchInstanceFilter instances - * @property {Array.|null} [instanceNamePrefixes] PatchInstanceFilter instanceNamePrefixes - */ + /** + * WindowsUpdatePackage kbArticleIds. + * @member {Array.} kbArticleIds + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.kbArticleIds = $util.emptyArray; + + /** + * WindowsUpdatePackage supportUrl. + * @member {string} supportUrl + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.supportUrl = ""; - /** - * Constructs a new PatchInstanceFilter. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchInstanceFilter. - * @implements IPatchInstanceFilter - * @constructor - * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set - */ - function PatchInstanceFilter(properties) { - this.groupLabels = []; - this.zones = []; - this.instances = []; - this.instanceNamePrefixes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * WindowsUpdatePackage moreInfoUrls. + * @member {Array.} moreInfoUrls + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.moreInfoUrls = $util.emptyArray; - /** - * PatchInstanceFilter all. - * @member {boolean} all - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.all = false; + /** + * WindowsUpdatePackage updateId. + * @member {string} updateId + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.updateId = ""; - /** - * PatchInstanceFilter groupLabels. - * @member {Array.} groupLabels - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.groupLabels = $util.emptyArray; + /** + * WindowsUpdatePackage revisionNumber. + * @member {number} revisionNumber + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.revisionNumber = 0; - /** - * PatchInstanceFilter zones. - * @member {Array.} zones - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.zones = $util.emptyArray; + /** + * WindowsUpdatePackage lastDeploymentChangeTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastDeploymentChangeTime + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.lastDeploymentChangeTime = null; - /** - * PatchInstanceFilter instances. - * @member {Array.} instances - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.instances = $util.emptyArray; + /** + * Creates a new WindowsUpdatePackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage instance + */ + WindowsUpdatePackage.create = function create(properties) { + return new WindowsUpdatePackage(properties); + }; - /** - * PatchInstanceFilter instanceNamePrefixes. - * @member {Array.} instanceNamePrefixes - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.instanceNamePrefixes = $util.emptyArray; + /** + * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdatePackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.encode(message.categories[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.kbArticleIds != null && message.kbArticleIds.length) + for (var i = 0; i < message.kbArticleIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kbArticleIds[i]); + if (message.moreInfoUrls != null && message.moreInfoUrls.length) + for (var i = 0; i < message.moreInfoUrls.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.moreInfoUrls[i]); + if (message.updateId != null && Object.hasOwnProperty.call(message, "updateId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.updateId); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.revisionNumber); + if (message.lastDeploymentChangeTime != null && Object.hasOwnProperty.call(message, "lastDeploymentChangeTime")) + $root.google.protobuf.Timestamp.encode(message.lastDeploymentChangeTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.supportUrl != null && Object.hasOwnProperty.call(message, "supportUrl")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.supportUrl); + return writer; + }; - /** - * Creates a new PatchInstanceFilter instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter instance - */ - PatchInstanceFilter.create = function create(properties) { - return new PatchInstanceFilter(properties); - }; + /** + * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdatePackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchInstanceFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.all != null && Object.hasOwnProperty.call(message, "all")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all); - if (message.groupLabels != null && message.groupLabels.length) - for (var i = 0; i < message.groupLabels.length; ++i) - $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.encode(message.groupLabels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.zones != null && message.zones.length) - for (var i = 0; i < message.zones.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.zones[i]); - if (message.instances != null && message.instances.length) - for (var i = 0; i < message.instances.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.instances[i]); - if (message.instanceNamePrefixes != null && message.instanceNamePrefixes.length) - for (var i = 0; i < message.instanceNamePrefixes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.instanceNamePrefixes[i]); - return writer; - }; + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdatePackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.kbArticleIds && message.kbArticleIds.length)) + message.kbArticleIds = []; + message.kbArticleIds.push(reader.string()); + break; + case 11: + message.supportUrl = reader.string(); + break; + case 5: + if (!(message.moreInfoUrls && message.moreInfoUrls.length)) + message.moreInfoUrls = []; + message.moreInfoUrls.push(reader.string()); + break; + case 6: + message.updateId = reader.string(); + break; + case 7: + message.revisionNumber = reader.int32(); + break; + case 10: + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchInstanceFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdatePackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a PatchInstanceFilter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchInstanceFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.all = reader.bool(); - break; - case 2: - if (!(message.groupLabels && message.groupLabels.length)) - message.groupLabels = []; - message.groupLabels.push($root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.zones && message.zones.length)) - message.zones = []; - message.zones.push(reader.string()); - break; - case 4: - if (!(message.instances && message.instances.length)) - message.instances = []; - message.instances.push(reader.string()); - break; - case 5: - if (!(message.instanceNamePrefixes && message.instanceNamePrefixes.length)) - message.instanceNamePrefixes = []; - message.instanceNamePrefixes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Verifies a WindowsUpdatePackage message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdatePackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } + if (message.kbArticleIds != null && message.hasOwnProperty("kbArticleIds")) { + if (!Array.isArray(message.kbArticleIds)) + return "kbArticleIds: array expected"; + for (var i = 0; i < message.kbArticleIds.length; ++i) + if (!$util.isString(message.kbArticleIds[i])) + return "kbArticleIds: string[] expected"; + } + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + if (!$util.isString(message.supportUrl)) + return "supportUrl: string expected"; + if (message.moreInfoUrls != null && message.hasOwnProperty("moreInfoUrls")) { + if (!Array.isArray(message.moreInfoUrls)) + return "moreInfoUrls: array expected"; + for (var i = 0; i < message.moreInfoUrls.length; ++i) + if (!$util.isString(message.moreInfoUrls[i])) + return "moreInfoUrls: string[] expected"; + } + if (message.updateId != null && message.hasOwnProperty("updateId")) + if (!$util.isString(message.updateId)) + return "updateId: string expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber)) + return "revisionNumber: integer expected"; + if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastDeploymentChangeTime); + if (error) + return "lastDeploymentChangeTime." + error; + } + return null; + }; + + /** + * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + */ + WindowsUpdatePackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.categories: object expected"); + message.categories[i] = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.fromObject(object.categories[i]); + } } - } - return message; - }; + if (object.kbArticleIds) { + if (!Array.isArray(object.kbArticleIds)) + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.kbArticleIds: array expected"); + message.kbArticleIds = []; + for (var i = 0; i < object.kbArticleIds.length; ++i) + message.kbArticleIds[i] = String(object.kbArticleIds[i]); + } + if (object.supportUrl != null) + message.supportUrl = String(object.supportUrl); + if (object.moreInfoUrls) { + if (!Array.isArray(object.moreInfoUrls)) + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.moreInfoUrls: array expected"); + message.moreInfoUrls = []; + for (var i = 0; i < object.moreInfoUrls.length; ++i) + message.moreInfoUrls[i] = String(object.moreInfoUrls[i]); + } + if (object.updateId != null) + message.updateId = String(object.updateId); + if (object.revisionNumber != null) + message.revisionNumber = object.revisionNumber | 0; + if (object.lastDeploymentChangeTime != null) { + if (typeof object.lastDeploymentChangeTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.lastDeploymentChangeTime: object expected"); + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.fromObject(object.lastDeploymentChangeTime); + } + return message; + }; - /** - * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchInstanceFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} message WindowsUpdatePackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdatePackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.categories = []; + object.kbArticleIds = []; + object.moreInfoUrls = []; + } + if (options.defaults) { + object.title = ""; + object.description = ""; + object.updateId = ""; + object.revisionNumber = 0; + object.lastDeploymentChangeTime = null; + object.supportUrl = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.toObject(message.categories[j], options); + } + if (message.kbArticleIds && message.kbArticleIds.length) { + object.kbArticleIds = []; + for (var j = 0; j < message.kbArticleIds.length; ++j) + object.kbArticleIds[j] = message.kbArticleIds[j]; + } + if (message.moreInfoUrls && message.moreInfoUrls.length) { + object.moreInfoUrls = []; + for (var j = 0; j < message.moreInfoUrls.length; ++j) + object.moreInfoUrls[j] = message.moreInfoUrls[j]; + } + if (message.updateId != null && message.hasOwnProperty("updateId")) + object.updateId = message.updateId; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + object.revisionNumber = message.revisionNumber; + if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) + object.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.toObject(message.lastDeploymentChangeTime, options); + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + object.supportUrl = message.supportUrl; + return object; + }; - /** - * Verifies a PatchInstanceFilter message. - * @function verify - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PatchInstanceFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.all != null && message.hasOwnProperty("all")) - if (typeof message.all !== "boolean") - return "all: boolean expected"; - if (message.groupLabels != null && message.hasOwnProperty("groupLabels")) { - if (!Array.isArray(message.groupLabels)) - return "groupLabels: array expected"; - for (var i = 0; i < message.groupLabels.length; ++i) { - var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify(message.groupLabels[i]); - if (error) - return "groupLabels." + error; + /** + * Converts this WindowsUpdatePackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdatePackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + WindowsUpdatePackage.WindowsUpdateCategory = (function() { + + /** + * Properties of a WindowsUpdateCategory. + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @interface IWindowsUpdateCategory + * @property {string|null} [id] WindowsUpdateCategory id + * @property {string|null} [name] WindowsUpdateCategory name + */ + + /** + * Constructs a new WindowsUpdateCategory. + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @classdesc Represents a WindowsUpdateCategory. + * @implements IWindowsUpdateCategory + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set + */ + function WindowsUpdateCategory(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } + + /** + * WindowsUpdateCategory id. + * @member {string} id + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + */ + WindowsUpdateCategory.prototype.id = ""; + + /** + * WindowsUpdateCategory name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + */ + WindowsUpdateCategory.prototype.name = ""; + + /** + * Creates a new WindowsUpdateCategory instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory instance + */ + WindowsUpdateCategory.create = function create(properties) { + return new WindowsUpdateCategory(properties); + }; + + /** + * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateCategory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateCategory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateCategory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateCategory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsUpdateCategory message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdateCategory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + */ + WindowsUpdateCategory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} message WindowsUpdateCategory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdateCategory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this WindowsUpdateCategory to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdateCategory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WindowsUpdateCategory; + })(); + + return WindowsUpdatePackage; + })(); + + Inventory.ZypperPatch = (function() { + + /** + * Properties of a ZypperPatch. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IZypperPatch + * @property {string|null} [patchName] ZypperPatch patchName + * @property {string|null} [category] ZypperPatch category + * @property {string|null} [severity] ZypperPatch severity + * @property {string|null} [summary] ZypperPatch summary + */ + + /** + * Constructs a new ZypperPatch. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a ZypperPatch. + * @implements IZypperPatch + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch=} [properties] Properties to set + */ + function ZypperPatch(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.zones != null && message.hasOwnProperty("zones")) { - if (!Array.isArray(message.zones)) - return "zones: array expected"; - for (var i = 0; i < message.zones.length; ++i) - if (!$util.isString(message.zones[i])) - return "zones: string[] expected"; - } - if (message.instances != null && message.hasOwnProperty("instances")) { - if (!Array.isArray(message.instances)) - return "instances: array expected"; - for (var i = 0; i < message.instances.length; ++i) - if (!$util.isString(message.instances[i])) - return "instances: string[] expected"; - } - if (message.instanceNamePrefixes != null && message.hasOwnProperty("instanceNamePrefixes")) { - if (!Array.isArray(message.instanceNamePrefixes)) - return "instanceNamePrefixes: array expected"; - for (var i = 0; i < message.instanceNamePrefixes.length; ++i) - if (!$util.isString(message.instanceNamePrefixes[i])) - return "instanceNamePrefixes: string[] expected"; - } - return null; - }; - /** - * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter - */ - PatchInstanceFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter) - return object; - var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); - if (object.all != null) - message.all = Boolean(object.all); - if (object.groupLabels) { - if (!Array.isArray(object.groupLabels)) - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: array expected"); - message.groupLabels = []; - for (var i = 0; i < object.groupLabels.length; ++i) { - if (typeof object.groupLabels[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: object expected"); - message.groupLabels[i] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.fromObject(object.groupLabels[i]); + /** + * ZypperPatch patchName. + * @member {string} patchName + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.patchName = ""; + + /** + * ZypperPatch category. + * @member {string} category + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.category = ""; + + /** + * ZypperPatch severity. + * @member {string} severity + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.severity = ""; + + /** + * ZypperPatch summary. + * @member {string} summary + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.summary = ""; + + /** + * Creates a new ZypperPatch instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch instance + */ + ZypperPatch.create = function create(properties) { + return new ZypperPatch(properties); + }; + + /** + * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperPatch.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.category); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.severity); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.summary); + if (message.patchName != null && Object.hasOwnProperty.call(message, "patchName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.patchName); + return writer; + }; + + /** + * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperPatch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ZypperPatch message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperPatch.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.ZypperPatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.patchName = reader.string(); + break; + case 2: + message.category = reader.string(); + break; + case 3: + message.severity = reader.string(); + break; + case 4: + message.summary = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - if (object.zones) { - if (!Array.isArray(object.zones)) - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.zones: array expected"); - message.zones = []; - for (var i = 0; i < object.zones.length; ++i) - message.zones[i] = String(object.zones[i]); - } - if (object.instances) { - if (!Array.isArray(object.instances)) - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instances: array expected"); - message.instances = []; - for (var i = 0; i < object.instances.length; ++i) - message.instances[i] = String(object.instances[i]); - } - if (object.instanceNamePrefixes) { - if (!Array.isArray(object.instanceNamePrefixes)) - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instanceNamePrefixes: array expected"); - message.instanceNamePrefixes = []; - for (var i = 0; i < object.instanceNamePrefixes.length; ++i) - message.instanceNamePrefixes[i] = String(object.instanceNamePrefixes[i]); - } - return message; - }; + return message; + }; + + /** + * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperPatch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ZypperPatch message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ZypperPatch.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchName != null && message.hasOwnProperty("patchName")) + if (!$util.isString(message.patchName)) + return "patchName: string expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + return null; + }; + + /** + * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch + */ + ZypperPatch.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.ZypperPatch) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.ZypperPatch(); + if (object.patchName != null) + message.patchName = String(object.patchName); + if (object.category != null) + message.category = String(object.category); + if (object.severity != null) + message.severity = String(object.severity); + if (object.summary != null) + message.summary = String(object.summary); + return message; + }; - /** - * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter} message PatchInstanceFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PatchInstanceFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.groupLabels = []; - object.zones = []; - object.instances = []; - object.instanceNamePrefixes = []; - } - if (options.defaults) - object.all = false; - if (message.all != null && message.hasOwnProperty("all")) - object.all = message.all; - if (message.groupLabels && message.groupLabels.length) { - object.groupLabels = []; - for (var j = 0; j < message.groupLabels.length; ++j) - object.groupLabels[j] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.toObject(message.groupLabels[j], options); - } - if (message.zones && message.zones.length) { - object.zones = []; - for (var j = 0; j < message.zones.length; ++j) - object.zones[j] = message.zones[j]; - } - if (message.instances && message.instances.length) { - object.instances = []; - for (var j = 0; j < message.instances.length; ++j) - object.instances[j] = message.instances[j]; - } - if (message.instanceNamePrefixes && message.instanceNamePrefixes.length) { - object.instanceNamePrefixes = []; - for (var j = 0; j < message.instanceNamePrefixes.length; ++j) - object.instanceNamePrefixes[j] = message.instanceNamePrefixes[j]; - } - return object; - }; + /** + * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1.Inventory.ZypperPatch} message ZypperPatch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ZypperPatch.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.category = ""; + object.severity = ""; + object.summary = ""; + object.patchName = ""; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + if (message.patchName != null && message.hasOwnProperty("patchName")) + object.patchName = message.patchName; + return object; + }; - /** - * Converts this PatchInstanceFilter to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - * @returns {Object.} JSON object - */ - PatchInstanceFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ZypperPatch to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + * @returns {Object.} JSON object + */ + ZypperPatch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - PatchInstanceFilter.GroupLabel = (function() { + return ZypperPatch; + })(); + + Inventory.WindowsQuickFixEngineeringPackage = (function() { /** - * Properties of a GroupLabel. - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @interface IGroupLabel - * @property {Object.|null} [labels] GroupLabel labels + * Properties of a WindowsQuickFixEngineeringPackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IWindowsQuickFixEngineeringPackage + * @property {string|null} [caption] WindowsQuickFixEngineeringPackage caption + * @property {string|null} [description] WindowsQuickFixEngineeringPackage description + * @property {string|null} [hotFixId] WindowsQuickFixEngineeringPackage hotFixId + * @property {google.protobuf.ITimestamp|null} [installTime] WindowsQuickFixEngineeringPackage installTime */ /** - * Constructs a new GroupLabel. - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @classdesc Represents a GroupLabel. - * @implements IGroupLabel + * Constructs a new WindowsQuickFixEngineeringPackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a WindowsQuickFixEngineeringPackage. + * @implements IWindowsQuickFixEngineeringPackage * @constructor - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set */ - function GroupLabel(properties) { - this.labels = {}; + function WindowsQuickFixEngineeringPackage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9917,95 +11982,114 @@ } /** - * GroupLabel labels. - * @member {Object.} labels - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * WindowsQuickFixEngineeringPackage caption. + * @member {string} caption + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @instance */ - GroupLabel.prototype.labels = $util.emptyObject; + WindowsQuickFixEngineeringPackage.prototype.caption = ""; /** - * Creates a new GroupLabel instance using the specified properties. + * WindowsQuickFixEngineeringPackage description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.description = ""; + + /** + * WindowsQuickFixEngineeringPackage hotFixId. + * @member {string} hotFixId + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.hotFixId = ""; + + /** + * WindowsQuickFixEngineeringPackage installTime. + * @member {google.protobuf.ITimestamp|null|undefined} installTime + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.installTime = null; + + /** + * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel instance + * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage instance */ - GroupLabel.create = function create(properties) { - return new GroupLabel(properties); + WindowsQuickFixEngineeringPackage.create = function create(properties) { + return new WindowsQuickFixEngineeringPackage(properties); }; /** - * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupLabel.encode = function encode(message, writer) { + WindowsQuickFixEngineeringPackage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caption); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.hotFixId != null && Object.hasOwnProperty.call(message, "hotFixId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.hotFixId); + if (message.installTime != null && Object.hasOwnProperty.call(message, "installTime")) + $root.google.protobuf.Timestamp.encode(message.installTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupLabel.encodeDelimited = function encodeDelimited(message, writer) { + WindowsQuickFixEngineeringPackage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupLabel message from the specified reader or buffer. + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupLabel.decode = function decode(reader, length) { + WindowsQuickFixEngineeringPackage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; + message.caption = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.hotFixId = reader.string(); + break; + case 5: + message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10016,9828 +12100,10773 @@ }; /** - * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupLabel.decodeDelimited = function decodeDelimited(reader) { + WindowsQuickFixEngineeringPackage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupLabel message. + * Verifies a WindowsQuickFixEngineeringPackage message. * @function verify - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupLabel.verify = function verify(message) { + WindowsQuickFixEngineeringPackage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) + if (!$util.isString(message.hotFixId)) + return "hotFixId: string expected"; + if (message.installTime != null && message.hasOwnProperty("installTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.installTime); + if (error) + return "installTime." + error; } return null; }; /** - * Creates a GroupLabel message from a plain object. Also converts values to their respective internal types. + * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage */ - GroupLabel.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel) + WindowsQuickFixEngineeringPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage) return object; - var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage(); + if (object.caption != null) + message.caption = String(object.caption); + if (object.description != null) + message.description = String(object.description); + if (object.hotFixId != null) + message.hotFixId = String(object.hotFixId); + if (object.installTime != null) { + if (typeof object.installTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.installTime: object expected"); + message.installTime = $root.google.protobuf.Timestamp.fromObject(object.installTime); } return message; }; /** - * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. + * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} message GroupLabel + * @param {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupLabel.toObject = function toObject(message, options) { + WindowsQuickFixEngineeringPackage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (options.defaults) { + object.caption = ""; + object.description = ""; + object.hotFixId = ""; + object.installTime = null; } + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) + object.hotFixId = message.hotFixId; + if (message.installTime != null && message.hasOwnProperty("installTime")) + object.installTime = $root.google.protobuf.Timestamp.toObject(message.installTime, options); return object; }; /** - * Converts this GroupLabel to JSON. + * Converts this WindowsQuickFixEngineeringPackage to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage * @instance * @returns {Object.} JSON object */ - GroupLabel.prototype.toJSON = function toJSON() { + WindowsQuickFixEngineeringPackage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GroupLabel; + return WindowsQuickFixEngineeringPackage; })(); - return PatchInstanceFilter; + return Inventory; })(); - return v1; - })(); - - return osconfig; - })(); - - return cloud; - })(); - - google.api = (function() { + v1.FixedOrPercent = (function() { - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * Properties of a FixedOrPercent. + * @memberof google.cloud.osconfig.v1 + * @interface IFixedOrPercent + * @property {number|null} [fixed] FixedOrPercent fixed + * @property {number|null} [percent] FixedOrPercent percent + */ - api.Http = (function() { + /** + * Constructs a new FixedOrPercent. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a FixedOrPercent. + * @implements IFixedOrPercent + * @constructor + * @param {google.cloud.osconfig.v1.IFixedOrPercent=} [properties] Properties to set + */ + function FixedOrPercent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ + /** + * FixedOrPercent fixed. + * @member {number} fixed + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @instance + */ + FixedOrPercent.prototype.fixed = 0; - /** - * 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]]; - } + /** + * FixedOrPercent percent. + * @member {number} percent + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @instance + */ + FixedOrPercent.prototype.percent = 0; - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; + /** + * FixedOrPercent mode. + * @member {"fixed"|"percent"|undefined} mode + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @instance + */ + Object.defineProperty(FixedOrPercent.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["fixed", "percent"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * 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); - }; + /** + * Creates a new FixedOrPercent instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1.IFixedOrPercent=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent instance + */ + FixedOrPercent.create = function create(properties) { + return new FixedOrPercent(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 FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedOrPercent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fixed != null && Object.hasOwnProperty.call(message, "fixed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fixed); + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.percent); + 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(); - }; + /** + * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedOrPercent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a FixedOrPercent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedOrPercent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.FixedOrPercent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fixed = reader.int32(); + break; + case 2: + message.percent = reader.int32(); + 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()); - }; + /** + * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedOrPercent.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; - }; + /** + * Verifies a FixedOrPercent message. + * @function verify + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FixedOrPercent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + properties.mode = 1; + if (!$util.isInteger(message.fixed)) + return "fixed: integer expected"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + if (!$util.isInteger(message.percent)) + return "percent: integer 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 FixedOrPercent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent + */ + FixedOrPercent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.FixedOrPercent) + return object; + var message = new $root.google.cloud.osconfig.v1.FixedOrPercent(); + if (object.fixed != null) + message.fixed = object.fixed | 0; + if (object.percent != null) + message.percent = object.percent | 0; + return message; + }; + + /** + * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1.FixedOrPercent} message FixedOrPercent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FixedOrPercent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + object.fixed = message.fixed; + if (options.oneofs) + object.mode = "fixed"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + object.percent = message.percent; + if (options.oneofs) + object.mode = "percent"; + } + return object; + }; - /** - * 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 FixedOrPercent to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @instance + * @returns {Object.} JSON object + */ + FixedOrPercent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return FixedOrPercent; + })(); - return Http; - })(); + v1.OsConfigService = (function() { - api.HttpRule = (function() { + /** + * Constructs a new OsConfigService service. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an OsConfigService + * @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 OsConfigService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * 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 - */ + (OsConfigService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsConfigService; - /** - * 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]]; - } + /** + * Creates new OsConfigService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.osconfig.v1.OsConfigService + * @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 {OsConfigService} RPC service. Useful where requests and/or responses are streamed. + */ + OsConfigService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ExecutePatchJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + */ - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; + /** + * Calls ExecutePatchJob. + * @function executePatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.executePatchJob = function executePatchJob(request, callback) { + return this.rpcCall(executePatchJob, $root.google.cloud.osconfig.v1.ExecutePatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); + }, "name", { value: "ExecutePatchJob" }); - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; + /** + * Calls ExecutePatchJob. + * @function executePatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef GetPatchJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + */ - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = ""; + /** + * Calls GetPatchJob. + * @function getPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.getPatchJob = function getPatchJob(request, callback) { + return this.rpcCall(getPatchJob, $root.google.cloud.osconfig.v1.GetPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); + }, "name", { value: "GetPatchJob" }); - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = ""; + /** + * Calls GetPatchJob. + * @function getPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef CancelPatchJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + */ + + /** + * Calls CancelPatchJob. + * @function cancelPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.cancelPatchJob = function cancelPatchJob(request, callback) { + return this.rpcCall(cancelPatchJob, $root.google.cloud.osconfig.v1.CancelPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); + }, "name", { value: "CancelPatchJob" }); + + /** + * Calls CancelPatchJob. + * @function cancelPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ListPatchJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} [response] ListPatchJobsResponse + */ - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + /** + * Calls ListPatchJobs. + * @function listPatchJobs + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback} callback Node-style callback called with the error, if any, and ListPatchJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.listPatchJobs = function listPatchJobs(request, callback) { + return this.rpcCall(listPatchJobs, $root.google.cloud.osconfig.v1.ListPatchJobsRequest, $root.google.cloud.osconfig.v1.ListPatchJobsResponse, request, callback); + }, "name", { value: "ListPatchJobs" }); - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; + /** + * Calls ListPatchJobs. + * @function listPatchJobs + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ListPatchJobInstanceDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} [response] ListPatchJobInstanceDetailsResponse + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Calls ListPatchJobInstanceDetails. + * @function listPatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback} callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.listPatchJobInstanceDetails = function listPatchJobInstanceDetails(request, callback) { + return this.rpcCall(listPatchJobInstanceDetails, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, request, callback); + }, "name", { value: "ListPatchJobInstanceDetails" }); - /** - * 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) - }); + /** + * Calls ListPatchJobInstanceDetails. + * @function listPatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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); - }; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef CreatePatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + */ - /** - * 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; - }; + /** + * Calls CreatePatchDeployment. + * @function createPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.createPatchDeployment = function createPatchDeployment(request, callback) { + return this.rpcCall(createPatchDeployment, $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); + }, "name", { value: "CreatePatchDeployment" }); - /** - * 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(); - }; + /** + * Calls CreatePatchDeployment. + * @function createPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef GetPatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + */ - /** - * 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()); - }; + /** + * Calls GetPatchDeployment. + * @function getPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.getPatchDeployment = function getPatchDeployment(request, callback) { + return this.rpcCall(getPatchDeployment, $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); + }, "name", { value: "GetPatchDeployment" }); - /** - * 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; - }; + /** + * Calls GetPatchDeployment. + * @function getPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ListPatchDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} [response] ListPatchDeploymentsResponse + */ - /** - * 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; - }; + /** + * Calls ListPatchDeployments. + * @function listPatchDeployments + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback} callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.listPatchDeployments = function listPatchDeployments(request, callback) { + return this.rpcCall(listPatchDeployments, $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest, $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse, request, callback); + }, "name", { value: "ListPatchDeployments" }); - /** - * 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); - }; + /** + * Calls ListPatchDeployments. + * @function listPatchDeployments + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return HttpRule; - })(); + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef DeletePatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeletePatchDeployment. + * @function deletePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.deletePatchDeployment = function deletePatchDeployment(request, callback) { + return this.rpcCall(deletePatchDeployment, $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePatchDeployment" }); - api.CustomHttpPattern = (function() { + /** + * Calls DeletePatchDeployment. + * @function deletePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ + return OsConfigService; + })(); - /** - * 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]]; - } + v1.PatchDeployment = (function() { - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; + /** + * Properties of a PatchDeployment. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchDeployment + * @property {string|null} [name] PatchDeployment name + * @property {string|null} [description] PatchDeployment description + * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchDeployment instanceFilter + * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchDeployment patchConfig + * @property {google.protobuf.IDuration|null} [duration] PatchDeployment duration + * @property {google.cloud.osconfig.v1.IOneTimeSchedule|null} [oneTimeSchedule] PatchDeployment oneTimeSchedule + * @property {google.cloud.osconfig.v1.IRecurringSchedule|null} [recurringSchedule] PatchDeployment recurringSchedule + * @property {google.protobuf.ITimestamp|null} [createTime] PatchDeployment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PatchDeployment updateTime + * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] PatchDeployment lastExecuteTime + * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] PatchDeployment rollout + */ - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; + /** + * Constructs a new PatchDeployment. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchDeployment. + * @implements IPatchDeployment + * @constructor + * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set + */ + function PatchDeployment(properties) { + if (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 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); - }; + /** + * PatchDeployment name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.name = ""; - /** - * 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; - }; + /** + * PatchDeployment description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.description = ""; - /** - * 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(); - }; + /** + * PatchDeployment instanceFilter. + * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.instanceFilter = null; - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * PatchDeployment patchConfig. + * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.patchConfig = null; - /** - * 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()); - }; + /** + * PatchDeployment duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.duration = null; - /** - * 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; - }; + /** + * PatchDeployment oneTimeSchedule. + * @member {google.cloud.osconfig.v1.IOneTimeSchedule|null|undefined} oneTimeSchedule + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.oneTimeSchedule = 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; - }; + /** + * PatchDeployment recurringSchedule. + * @member {google.cloud.osconfig.v1.IRecurringSchedule|null|undefined} recurringSchedule + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.recurringSchedule = null; - /** - * 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; - }; + /** + * PatchDeployment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.createTime = null; - /** - * 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); - }; + /** + * PatchDeployment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.updateTime = null; - return CustomHttpPattern; - })(); + /** + * PatchDeployment lastExecuteTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.lastExecuteTime = null; - api.ResourceDescriptor = (function() { + /** + * PatchDeployment rollout. + * @member {google.cloud.osconfig.v1.IPatchRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.rollout = null; - /** - * 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 - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * PatchDeployment schedule. + * @member {"oneTimeSchedule"|"recurringSchedule"|undefined} schedule + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + Object.defineProperty(PatchDeployment.prototype, "schedule", { + get: $util.oneOfGetter($oneOfFields = ["oneTimeSchedule", "recurringSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; + /** + * Creates a new PatchDeployment instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment instance + */ + PatchDeployment.create = function create(properties) { + return new PatchDeployment(properties); + }; - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + /** + * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchDeployment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) + $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.oneTimeSchedule != null && Object.hasOwnProperty.call(message, "oneTimeSchedule")) + $root.google.cloud.osconfig.v1.OneTimeSchedule.encode(message.oneTimeSchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.recurringSchedule != null && Object.hasOwnProperty.call(message, "recurringSchedule")) + $root.google.cloud.osconfig.v1.RecurringSchedule.encode(message.recurringSchedule, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) + $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; + /** + * Encodes the specified PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchDeployment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; + /** + * Decodes a PatchDeployment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchDeployment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchDeployment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + case 4: + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + case 5: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.decode(reader, reader.uint32()); + break; + case 7: + message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.decode(reader, reader.uint32()); + break; + case 8: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; + /** + * Decodes a PatchDeployment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchDeployment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; + /** + * Verifies a PatchDeployment message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchDeployment.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { + var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); + if (error) + return "patchConfig." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { + properties.schedule = 1; + { + var error = $root.google.cloud.osconfig.v1.OneTimeSchedule.verify(message.oneTimeSchedule); + if (error) + return "oneTimeSchedule." + error; + } + } + if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { + if (properties.schedule === 1) + return "schedule: multiple values"; + properties.schedule = 1; + { + var error = $root.google.cloud.osconfig.v1.RecurringSchedule.verify(message.recurringSchedule); + if (error) + return "recurringSchedule." + error; + } + } + 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.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); + if (error) + return "lastExecuteTime." + error; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1.PatchRollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + return null; + }; - /** - * 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); - }; + /** + * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + */ + PatchDeployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchDeployment) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchDeployment(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); + } + if (object.patchConfig != null) { + if (typeof object.patchConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.patchConfig: object expected"); + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.oneTimeSchedule != null) { + if (typeof object.oneTimeSchedule !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.oneTimeSchedule: object expected"); + message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.fromObject(object.oneTimeSchedule); + } + if (object.recurringSchedule != null) { + if (typeof object.recurringSchedule !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.recurringSchedule: object expected"); + message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.fromObject(object.recurringSchedule); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.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.osconfig.v1.PatchDeployment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastExecuteTime != null) { + if (typeof object.lastExecuteTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.lastExecuteTime: object expected"); + message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); + } + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); + } + return message; + }; - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - return writer; - }; + /** + * Creates a plain object from a PatchDeployment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.PatchDeployment} message PatchDeployment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchDeployment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.instanceFilter = null; + object.patchConfig = null; + object.duration = null; + object.createTime = null; + object.updateTime = null; + object.lastExecuteTime = null; + object.rollout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) + object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { + object.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.toObject(message.oneTimeSchedule, options); + if (options.oneofs) + object.schedule = "oneTimeSchedule"; + } + if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { + object.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.toObject(message.recurringSchedule, options); + if (options.oneofs) + object.schedule = "recurringSchedule"; + } + 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.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) + object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); + return object; + }; - /** - * 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(); - }; + /** + * Converts this PatchDeployment to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + * @returns {Object.} JSON object + */ + PatchDeployment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return PatchDeployment; + })(); - /** - * 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()); - }; + v1.OneTimeSchedule = (function() { - /** - * 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; + /** + * Properties of an OneTimeSchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IOneTimeSchedule + * @property {google.protobuf.ITimestamp|null} [executeTime] OneTimeSchedule executeTime + */ + + /** + * Constructs a new OneTimeSchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an OneTimeSchedule. + * @implements IOneTimeSchedule + * @constructor + * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set + */ + function OneTimeSchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - return null; - }; - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - return message; - }; + /** + * OneTimeSchedule executeTime. + * @member {google.protobuf.ITimestamp|null|undefined} executeTime + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @instance + */ + OneTimeSchedule.prototype.executeTime = null; + + /** + * Creates a new OneTimeSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule instance + */ + OneTimeSchedule.create = function create(properties) { + return new OneTimeSchedule(properties); + }; + + /** + * Encodes the specified OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneTimeSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executeTime != null && Object.hasOwnProperty.call(message, "executeTime")) + $root.google.protobuf.Timestamp.encode(message.executeTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneTimeSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneTimeSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.executeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneTimeSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pattern = []; - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - return object; - }; + /** + * Verifies an OneTimeSchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneTimeSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executeTime != null && message.hasOwnProperty("executeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.executeTime); + if (error) + return "executeTime." + error; + } + return null; + }; - /** - * 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); - }; + /** + * Creates an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + */ + OneTimeSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OneTimeSchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); + if (object.executeTime != null) { + if (typeof object.executeTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.OneTimeSchedule.executeTime: object expected"); + message.executeTime = $root.google.protobuf.Timestamp.fromObject(object.executeTime); + } + return message; + }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); + /** + * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.OneTimeSchedule} message OneTimeSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneTimeSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.executeTime = null; + if (message.executeTime != null && message.hasOwnProperty("executeTime")) + object.executeTime = $root.google.protobuf.Timestamp.toObject(message.executeTime, options); + return object; + }; - return ResourceDescriptor; - })(); + /** + * Converts this OneTimeSchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @instance + * @returns {Object.} JSON object + */ + OneTimeSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - api.ResourceReference = (function() { + return OneTimeSchedule; + })(); - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ + v1.RecurringSchedule = (function() { - /** - * 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]]; - } + /** + * Properties of a RecurringSchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IRecurringSchedule + * @property {google.type.ITimeZone|null} [timeZone] RecurringSchedule timeZone + * @property {google.protobuf.ITimestamp|null} [startTime] RecurringSchedule startTime + * @property {google.protobuf.ITimestamp|null} [endTime] RecurringSchedule endTime + * @property {google.type.ITimeOfDay|null} [timeOfDay] RecurringSchedule timeOfDay + * @property {google.cloud.osconfig.v1.RecurringSchedule.Frequency|null} [frequency] RecurringSchedule frequency + * @property {google.cloud.osconfig.v1.IWeeklySchedule|null} [weekly] RecurringSchedule weekly + * @property {google.cloud.osconfig.v1.IMonthlySchedule|null} [monthly] RecurringSchedule monthly + * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] RecurringSchedule lastExecuteTime + * @property {google.protobuf.ITimestamp|null} [nextExecuteTime] RecurringSchedule nextExecuteTime + */ - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; + /** + * Constructs a new RecurringSchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a RecurringSchedule. + * @implements IRecurringSchedule + * @constructor + * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set + */ + function RecurringSchedule(properties) { + if (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 childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; + /** + * RecurringSchedule timeZone. + * @member {google.type.ITimeZone|null|undefined} timeZone + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.timeZone = null; - /** - * 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); - }; + /** + * RecurringSchedule startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.startTime = null; - /** - * 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; - }; + /** + * RecurringSchedule endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.endTime = null; - /** - * 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(); - }; + /** + * RecurringSchedule timeOfDay. + * @member {google.type.ITimeOfDay|null|undefined} timeOfDay + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.timeOfDay = null; - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * RecurringSchedule frequency. + * @member {google.cloud.osconfig.v1.RecurringSchedule.Frequency} frequency + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.frequency = 0; - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * RecurringSchedule weekly. + * @member {google.cloud.osconfig.v1.IWeeklySchedule|null|undefined} weekly + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.weekly = null; - /** - * 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; - }; + /** + * RecurringSchedule monthly. + * @member {google.cloud.osconfig.v1.IMonthlySchedule|null|undefined} monthly + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.monthly = 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; - }; + /** + * RecurringSchedule lastExecuteTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.lastExecuteTime = null; - /** - * 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; - }; + /** + * RecurringSchedule nextExecuteTime. + * @member {google.protobuf.ITimestamp|null|undefined} nextExecuteTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.nextExecuteTime = null; - /** - * 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); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - return ResourceReference; - })(); + /** + * RecurringSchedule scheduleConfig. + * @member {"weekly"|"monthly"|undefined} scheduleConfig + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + Object.defineProperty(RecurringSchedule.prototype, "scheduleConfig", { + get: $util.oneOfGetter($oneOfFields = ["weekly", "monthly"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - return values; - })(); + /** + * Creates a new RecurringSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule instance + */ + RecurringSchedule.create = function create(properties) { + return new RecurringSchedule(properties); + }; - return api; - })(); + /** + * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timeOfDay != null && Object.hasOwnProperty.call(message, "timeOfDay")) + $root.google.type.TimeOfDay.encode(message.timeOfDay, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frequency); + if (message.weekly != null && Object.hasOwnProperty.call(message, "weekly")) + $root.google.cloud.osconfig.v1.WeeklySchedule.encode(message.weekly, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.monthly != null && Object.hasOwnProperty.call(message, "monthly")) + $root.google.cloud.osconfig.v1.MonthlySchedule.encode(message.monthly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) + $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.nextExecuteTime != null && Object.hasOwnProperty.call(message, "nextExecuteTime")) + $root.google.protobuf.Timestamp.encode(message.nextExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; - google.protobuf = (function() { + /** + * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; + /** + * Decodes a RecurringSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + break; + case 2: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.timeOfDay = $root.google.type.TimeOfDay.decode(reader, reader.uint32()); + break; + case 5: + message.frequency = reader.int32(); + break; + case 6: + message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.decode(reader, reader.uint32()); + break; + case 7: + message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.decode(reader, reader.uint32()); + break; + case 9: + message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.nextExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - protobuf.FileDescriptorSet = (function() { + /** + * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ + /** + * Verifies a RecurringSchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecurringSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + var error = $root.google.type.TimeZone.verify(message.timeZone); + if (error) + return "timeZone." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) { + var error = $root.google.type.TimeOfDay.verify(message.timeOfDay); + if (error) + return "timeOfDay." + error; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.weekly != null && message.hasOwnProperty("weekly")) { + properties.scheduleConfig = 1; + { + var error = $root.google.cloud.osconfig.v1.WeeklySchedule.verify(message.weekly); + if (error) + return "weekly." + error; + } + } + if (message.monthly != null && message.hasOwnProperty("monthly")) { + if (properties.scheduleConfig === 1) + return "scheduleConfig: multiple values"; + properties.scheduleConfig = 1; + { + var error = $root.google.cloud.osconfig.v1.MonthlySchedule.verify(message.monthly); + if (error) + return "monthly." + error; + } + } + if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); + if (error) + return "lastExecuteTime." + error; + } + if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.nextExecuteTime); + if (error) + return "nextExecuteTime." + error; + } + return null; + }; - /** - * 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]]; - } + /** + * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + */ + RecurringSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.RecurringSchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); + if (object.timeZone != null) { + if (typeof object.timeZone !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeZone: object expected"); + message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.timeOfDay != null) { + if (typeof object.timeOfDay !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeOfDay: object expected"); + message.timeOfDay = $root.google.type.TimeOfDay.fromObject(object.timeOfDay); + } + switch (object.frequency) { + case "FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "WEEKLY": + case 1: + message.frequency = 1; + break; + case "MONTHLY": + case 2: + message.frequency = 2; + break; + } + if (object.weekly != null) { + if (typeof object.weekly !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.weekly: object expected"); + message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.fromObject(object.weekly); + } + if (object.monthly != null) { + if (typeof object.monthly !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.monthly: object expected"); + message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.fromObject(object.monthly); + } + if (object.lastExecuteTime != null) { + if (typeof object.lastExecuteTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.lastExecuteTime: object expected"); + message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); + } + if (object.nextExecuteTime != null) { + if (typeof object.nextExecuteTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.nextExecuteTime: object expected"); + message.nextExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.nextExecuteTime); + } + return message; + }; - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; + /** + * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.RecurringSchedule} message RecurringSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecurringSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeZone = null; + object.startTime = null; + object.endTime = null; + object.timeOfDay = null; + object.frequency = options.enums === String ? "FREQUENCY_UNSPECIFIED" : 0; + object.lastExecuteTime = null; + object.nextExecuteTime = null; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) + object.timeOfDay = $root.google.type.TimeOfDay.toObject(message.timeOfDay, options); + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.cloud.osconfig.v1.RecurringSchedule.Frequency[message.frequency] : message.frequency; + if (message.weekly != null && message.hasOwnProperty("weekly")) { + object.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.toObject(message.weekly, options); + if (options.oneofs) + object.scheduleConfig = "weekly"; + } + if (message.monthly != null && message.hasOwnProperty("monthly")) { + object.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.toObject(message.monthly, options); + if (options.oneofs) + object.scheduleConfig = "monthly"; + } + if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) + object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); + if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) + object.nextExecuteTime = $root.google.protobuf.Timestamp.toObject(message.nextExecuteTime, options); + return object; + }; - /** - * 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); - }; + /** + * Converts this RecurringSchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + * @returns {Object.} JSON object + */ + RecurringSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + /** + * Frequency enum. + * @name google.cloud.osconfig.v1.RecurringSchedule.Frequency + * @enum {number} + * @property {number} FREQUENCY_UNSPECIFIED=0 FREQUENCY_UNSPECIFIED value + * @property {number} WEEKLY=1 WEEKLY value + * @property {number} MONTHLY=2 MONTHLY value + */ + RecurringSchedule.Frequency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FREQUENCY_UNSPECIFIED"] = 0; + values[valuesById[1] = "WEEKLY"] = 1; + values[valuesById[2] = "MONTHLY"] = 2; + return values; + })(); - /** - * 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(); - }; + return RecurringSchedule; + })(); - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.WeeklySchedule = (function() { - /** - * 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()); - }; + /** + * Properties of a WeeklySchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IWeeklySchedule + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeeklySchedule dayOfWeek + */ - /** - * 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; + /** + * Constructs a new WeeklySchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a WeeklySchedule. + * @implements IWeeklySchedule + * @constructor + * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set + */ + function WeeklySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return 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; - }; + /** + * WeeklySchedule dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.dayOfWeek = 0; - /** - * 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; - }; + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule instance + */ + WeeklySchedule.create = function create(properties) { + return new WeeklySchedule(properties); + }; - /** - * 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); - }; + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dayOfWeek); + return writer; + }; - return FileDescriptorSet; - })(); + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.FileDescriptorProto = (function() { + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dayOfWeek = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 - */ + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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]]; - } + /** + * Verifies a WeeklySchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeeklySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; + /** + * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + */ + WeeklySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.WeeklySchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); + switch (object.dayOfWeek) { + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.WeeklySchedule} message WeeklySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeeklySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + /** + * Converts this WeeklySchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @instance + * @returns {Object.} JSON object + */ + WeeklySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + return WeeklySchedule; + })(); - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + v1.MonthlySchedule = (function() { - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + /** + * Properties of a MonthlySchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IMonthlySchedule + * @property {google.cloud.osconfig.v1.IWeekDayOfMonth|null} [weekDayOfMonth] MonthlySchedule weekDayOfMonth + * @property {number|null} [monthDay] MonthlySchedule monthDay + */ - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + /** + * Constructs a new MonthlySchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a MonthlySchedule. + * @implements IMonthlySchedule + * @constructor + * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set + */ + function MonthlySchedule(properties) { + if (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 service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; + /** + * MonthlySchedule weekDayOfMonth. + * @member {google.cloud.osconfig.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.weekDayOfMonth = null; - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + /** + * MonthlySchedule monthDay. + * @member {number} monthDay + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.monthDay = 0; - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + /** + * MonthlySchedule dayOfMonth. + * @member {"weekDayOfMonth"|"monthDay"|undefined} dayOfMonth + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + */ + Object.defineProperty(MonthlySchedule.prototype, "dayOfMonth", { + get: $util.oneOfGetter($oneOfFields = ["weekDayOfMonth", "monthDay"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule instance + */ + MonthlySchedule.create = function create(properties) { + return new MonthlySchedule(properties); + }; - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) + $root.google.cloud.osconfig.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.monthDay != null && Object.hasOwnProperty.call(message, "monthDay")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.monthDay); + return writer; + }; - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - return writer; - }; + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.decode(reader, reader.uint32()); + break; + case 2: + message.monthDay = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a MonthlySchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonthlySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + properties.dayOfMonth = 1; + { + var error = $root.google.cloud.osconfig.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); + if (error) + return "weekDayOfMonth." + error; + } + } + if (message.monthDay != null && message.hasOwnProperty("monthDay")) { + if (properties.dayOfMonth === 1) + return "dayOfMonth: multiple values"; + properties.dayOfMonth = 1; + if (!$util.isInteger(message.monthDay)) + return "monthDay: integer expected"; + } + return null; + }; - /** - * 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()); - }; + /** + * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + */ + MonthlySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.MonthlySchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); + if (object.weekDayOfMonth != null) { + if (typeof object.weekDayOfMonth !== "object") + throw TypeError(".google.cloud.osconfig.v1.MonthlySchedule.weekDayOfMonth: object expected"); + message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); + } + if (object.monthDay != null) + message.monthDay = object.monthDay | 0; + return message; + }; - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - return null; - }; + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.MonthlySchedule} message MonthlySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonthlySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + object.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); + if (options.oneofs) + object.dayOfMonth = "weekDayOfMonth"; + } + if (message.monthDay != null && message.hasOwnProperty("monthDay")) { + object.monthDay = message.monthDay; + if (options.oneofs) + object.dayOfMonth = "monthDay"; + } + return object; + }; - /** - * 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]); + /** + * Converts this MonthlySchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + * @returns {Object.} JSON object + */ + MonthlySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonthlySchedule; + })(); + + v1.WeekDayOfMonth = (function() { + + /** + * Properties of a WeekDayOfMonth. + * @memberof google.cloud.osconfig.v1 + * @interface IWeekDayOfMonth + * @property {number|null} [weekOrdinal] WeekDayOfMonth weekOrdinal + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek + */ + + /** + * Constructs a new WeekDayOfMonth. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a WeekDayOfMonth. + * @implements IWeekDayOfMonth + * @constructor + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set + */ + function WeekDayOfMonth(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - return message; - }; - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - return object; - }; + /** + * WeekDayOfMonth weekOrdinal. + * @member {number} weekOrdinal + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.weekOrdinal = 0; + + /** + * WeekDayOfMonth dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.dayOfWeek = 0; + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth instance + */ + WeekDayOfMonth.create = function create(properties) { + return new WeekDayOfMonth(properties); + }; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekOrdinal != null && Object.hasOwnProperty.call(message, "weekOrdinal")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOrdinal); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + return writer; + }; - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return FileDescriptorProto; - })(); + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weekOrdinal = reader.int32(); + break; + case 2: + message.dayOfWeek = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - protobuf.DescriptorProto = (function() { + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ + /** + * Verifies a WeekDayOfMonth message. + * @function verify + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeekDayOfMonth.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) + if (!$util.isInteger(message.weekOrdinal)) + return "weekOrdinal: integer expected"; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + */ + WeekDayOfMonth.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.WeekDayOfMonth) + return object; + var message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); + if (object.weekOrdinal != null) + message.weekOrdinal = object.weekOrdinal | 0; + switch (object.dayOfWeek) { + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.WeekDayOfMonth} message WeekDayOfMonth + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeekDayOfMonth.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.weekOrdinal = 0; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + } + if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) + object.weekOrdinal = message.weekOrdinal; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; + /** + * Converts this WeekDayOfMonth to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + * @returns {Object.} JSON object + */ + WeekDayOfMonth.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WeekDayOfMonth; + })(); + + v1.CreatePatchDeploymentRequest = (function() { + + /** + * Properties of a CreatePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface ICreatePatchDeploymentRequest + * @property {string|null} [parent] CreatePatchDeploymentRequest parent + * @property {string|null} [patchDeploymentId] CreatePatchDeploymentRequest patchDeploymentId + * @property {google.cloud.osconfig.v1.IPatchDeployment|null} [patchDeployment] CreatePatchDeploymentRequest patchDeployment + */ - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; + /** + * Constructs a new CreatePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a CreatePatchDeploymentRequest. + * @implements ICreatePatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set + */ + function CreatePatchDeploymentRequest(properties) { + if (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 nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; + /** + * CreatePatchDeploymentRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + */ + CreatePatchDeploymentRequest.prototype.parent = ""; - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; + /** + * CreatePatchDeploymentRequest patchDeploymentId. + * @member {string} patchDeploymentId + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + */ + CreatePatchDeploymentRequest.prototype.patchDeploymentId = ""; - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; + /** + * CreatePatchDeploymentRequest patchDeployment. + * @member {google.cloud.osconfig.v1.IPatchDeployment|null|undefined} patchDeployment + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + */ + CreatePatchDeploymentRequest.prototype.patchDeployment = null; - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; + /** + * Creates a new CreatePatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest instance + */ + CreatePatchDeploymentRequest.create = function create(properties) { + return new CreatePatchDeploymentRequest(properties); + }; - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; + /** + * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePatchDeploymentRequest.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.patchDeploymentId != null && Object.hasOwnProperty.call(message, "patchDeploymentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.patchDeploymentId); + if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) + $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.patchDeploymentId = reader.string(); + break; + case 3: + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a CreatePatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePatchDeploymentRequest.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.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) + if (!$util.isString(message.patchDeploymentId)) + return "patchDeploymentId: string expected"; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) { + var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployment); + if (error) + return "patchDeployment." + error; + } + return null; + }; - /** - * 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(); - }; + /** + * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + */ + CreatePatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.patchDeploymentId != null) + message.patchDeploymentId = String(object.patchDeploymentId); + if (object.patchDeployment != null) { + if (typeof object.patchDeployment !== "object") + throw TypeError(".google.cloud.osconfig.v1.CreatePatchDeploymentRequest.patchDeployment: object expected"); + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployment); + } + return message; + }; - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} message CreatePatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePatchDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.patchDeploymentId = ""; + object.patchDeployment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) + object.patchDeploymentId = message.patchDeploymentId; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + object.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployment, options); + return object; + }; - /** - * 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()); - }; + /** + * Converts this CreatePatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + return CreatePatchDeploymentRequest; + })(); + + v1.GetPatchDeploymentRequest = (function() { - /** - * 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]); + /** + * Properties of a GetPatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IGetPatchDeploymentRequest + * @property {string|null} [name] GetPatchDeploymentRequest name + */ + + /** + * Constructs a new GetPatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GetPatchDeploymentRequest. + * @implements IGetPatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set + */ + function GetPatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (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; - }; + /** + * GetPatchDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @instance + */ + GetPatchDeploymentRequest.prototype.name = ""; + + /** + * Creates a new GetPatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest instance + */ + GetPatchDeploymentRequest.create = function create(properties) { + return new GetPatchDeploymentRequest(properties); + }; + + /** + * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchDeploymentRequest.encode = function encode(message, writer) { + 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 GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - DescriptorProto.ExtensionRange = (function() { + /** + * Verifies a GetPatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPatchDeploymentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Properties of an 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 - */ + /** + * Creates a GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + */ + GetPatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * 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]]; - } + /** + * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.GetPatchDeploymentRequest} message GetPatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPatchDeploymentRequest.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; + }; - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; + /** + * Converts this GetPatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + GetPatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; + return GetPatchDeploymentRequest; + })(); - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; + v1.ListPatchDeploymentsRequest = (function() { - /** - * 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); - }; + /** + * Properties of a ListPatchDeploymentsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchDeploymentsRequest + * @property {string|null} [parent] ListPatchDeploymentsRequest parent + * @property {number|null} [pageSize] ListPatchDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListPatchDeploymentsRequest pageToken + */ - /** - * 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; - }; + /** + * Constructs a new ListPatchDeploymentsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchDeploymentsRequest. + * @implements IListPatchDeploymentsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set + */ + function ListPatchDeploymentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified 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(); - }; + /** + * ListPatchDeploymentsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + */ + ListPatchDeploymentsRequest.prototype.parent = ""; + + /** + * ListPatchDeploymentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + */ + ListPatchDeploymentsRequest.prototype.pageSize = 0; + + /** + * ListPatchDeploymentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + */ + ListPatchDeploymentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPatchDeploymentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest instance + */ + ListPatchDeploymentsRequest.create = function create(properties) { + return new ListPatchDeploymentsRequest(properties); + }; + + /** + * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + 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()); - }; + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsRequest.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; - }; + /** + * Verifies a ListPatchDeploymentsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchDeploymentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; - /** - * Creates 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 ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + */ + ListPatchDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Creates a plain object from an 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; - }; + /** + * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} message ListPatchDeploymentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchDeploymentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * Converts this 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); - }; + /** + * Converts this ListPatchDeploymentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPatchDeploymentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ExtensionRange; - })(); + return ListPatchDeploymentsRequest; + })(); - DescriptorProto.ReservedRange = (function() { + v1.ListPatchDeploymentsResponse = (function() { - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ + /** + * Properties of a ListPatchDeploymentsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchDeploymentsResponse + * @property {Array.|null} [patchDeployments] ListPatchDeploymentsResponse patchDeployments + * @property {string|null} [nextPageToken] ListPatchDeploymentsResponse nextPageToken + */ - /** - * 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]]; - } + /** + * Constructs a new ListPatchDeploymentsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchDeploymentsResponse. + * @implements IListPatchDeploymentsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set + */ + function ListPatchDeploymentsResponse(properties) { + this.patchDeployments = []; + if (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; + /** + * ListPatchDeploymentsResponse patchDeployments. + * @member {Array.} patchDeployments + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @instance + */ + ListPatchDeploymentsResponse.prototype.patchDeployments = $util.emptyArray; - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; + /** + * ListPatchDeploymentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @instance + */ + ListPatchDeploymentsResponse.prototype.nextPageToken = ""; - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; + /** + * Creates a new ListPatchDeploymentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse instance + */ + ListPatchDeploymentsResponse.create = function create(properties) { + return new ListPatchDeploymentsResponse(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 ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchDeployments != null && message.patchDeployments.length) + for (var i = 0; i < message.patchDeployments.length; ++i) + $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployments[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 ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.patchDeployments && message.patchDeployments.length)) + message.patchDeployments = []; + message.patchDeployments.push($root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; + + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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 ListPatchDeploymentsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchDeploymentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchDeployments != null && message.hasOwnProperty("patchDeployments")) { + if (!Array.isArray(message.patchDeployments)) + return "patchDeployments: array expected"; + for (var i = 0; i < message.patchDeployments.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployments[i]); + if (error) + return "patchDeployments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; + /** + * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse + */ + ListPatchDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); + if (object.patchDeployments) { + if (!Array.isArray(object.patchDeployments)) + throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: array expected"); + message.patchDeployments = []; + for (var i = 0; i < object.patchDeployments.length; ++i) { + if (typeof object.patchDeployments[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: object expected"); + message.patchDeployments[i] = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * 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) + /** + * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} message ListPatchDeploymentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchDeploymentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patchDeployments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.patchDeployments && message.patchDeployments.length) { + object.patchDeployments = []; + for (var j = 0; j < message.patchDeployments.length; ++j) + object.patchDeployments[j] = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; 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 ListPatchDeploymentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPatchDeploymentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ListPatchDeploymentsResponse; + })(); - return ReservedRange; - })(); + v1.DeletePatchDeploymentRequest = (function() { - return DescriptorProto; - })(); + /** + * Properties of a DeletePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IDeletePatchDeploymentRequest + * @property {string|null} [name] DeletePatchDeploymentRequest name + */ - protobuf.ExtensionRangeOptions = (function() { + /** + * Constructs a new DeletePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a DeletePatchDeploymentRequest. + * @implements IDeletePatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set + */ + function DeletePatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - */ + /** + * DeletePatchDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @instance + */ + DeletePatchDeploymentRequest.prototype.name = ""; - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new DeletePatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest instance + */ + DeletePatchDeploymentRequest.create = function create(properties) { + return new DeletePatchDeploymentRequest(properties); + }; - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePatchDeploymentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Creates a new 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 DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified 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 a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a DeletePatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePatchDeploymentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Decodes an 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()); - }; + /** + * Creates a DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + */ + DeletePatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} message DeletePatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePatchDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * Converts this DeletePatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + return DeletePatchDeploymentRequest; + })(); - /** - * 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); - }; + v1.ExecutePatchJobRequest = (function() { - return ExtensionRangeOptions; - })(); + /** + * Properties of an ExecutePatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IExecutePatchJobRequest + * @property {string|null} [parent] ExecutePatchJobRequest parent + * @property {string|null} [description] ExecutePatchJobRequest description + * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] ExecutePatchJobRequest instanceFilter + * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] ExecutePatchJobRequest patchConfig + * @property {google.protobuf.IDuration|null} [duration] ExecutePatchJobRequest duration + * @property {boolean|null} [dryRun] ExecutePatchJobRequest dryRun + * @property {string|null} [displayName] ExecutePatchJobRequest displayName + * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] ExecutePatchJobRequest rollout + */ - protobuf.FieldDescriptorProto = (function() { + /** + * Constructs a new ExecutePatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an ExecutePatchJobRequest. + * @implements IExecutePatchJobRequest + * @constructor + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set + */ + function ExecutePatchJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ + /** + * ExecutePatchJobRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.parent = ""; - /** - * 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]]; - } + /** + * ExecutePatchJobRequest description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.description = ""; - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; + /** + * ExecutePatchJobRequest instanceFilter. + * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.instanceFilter = null; - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; + /** + * ExecutePatchJobRequest patchConfig. + * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.patchConfig = null; - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; + /** + * ExecutePatchJobRequest duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.duration = null; - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; + /** + * ExecutePatchJobRequest dryRun. + * @member {boolean} dryRun + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.dryRun = false; - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; + /** + * ExecutePatchJobRequest displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.displayName = ""; - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; + /** + * ExecutePatchJobRequest rollout. + * @member {google.cloud.osconfig.v1.IPatchRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.rollout = null; - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; + /** + * Creates a new ExecutePatchJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest instance + */ + ExecutePatchJobRequest.create = function create(properties) { + return new ExecutePatchJobRequest(properties); + }; - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; + /** + * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutePatchJobRequest.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) + $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutePatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; + /** + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutePatchJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 7: + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + case 4: + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + case 5: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.dryRun = reader.bool(); + break; + case 8: + message.displayName = reader.string(); + break; + case 9: + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; + /** + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutePatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; + /** + * Verifies an ExecutePatchJobRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutePatchJobRequest.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { + var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); + if (error) + return "patchConfig." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1.PatchRollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + return null; + }; - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; + /** + * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest + */ + ExecutePatchJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ExecutePatchJobRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.description != null) + message.description = String(object.description); + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); + } + if (object.patchConfig != null) { + if (typeof object.patchConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.patchConfig: object expected"); + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); + } + return message; + }; - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; + /** + * Creates a plain object from an ExecutePatchJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ExecutePatchJobRequest} message ExecutePatchJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutePatchJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.description = ""; + object.patchConfig = null; + object.duration = null; + object.dryRun = false; + object.instanceFilter = null; + object.displayName = ""; + object.rollout = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) + object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); + return object; + }; + + /** + * Converts this ExecutePatchJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + * @returns {Object.} JSON object + */ + ExecutePatchJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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(); - }; + return ExecutePatchJobRequest; + })(); - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.GetPatchJobRequest = (function() { - /** - * 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()); - }; + /** + * Properties of a GetPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IGetPatchJobRequest + * @property {string|null} [name] GetPatchJobRequest name + */ - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; + /** + * Constructs a new GetPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GetPatchJobRequest. + * @implements IGetPatchJobRequest + * @constructor + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set + */ + function GetPatchJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; + /** + * GetPatchJobRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @instance + */ + GetPatchJobRequest.prototype.name = ""; + + /** + * Creates a new GetPatchJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest instance + */ + GetPatchJobRequest.create = function create(properties) { + return new GetPatchJobRequest(properties); + }; + + /** + * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchJobRequest.encode = function encode(message, writer) { + 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 GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; + /** + * Verifies a GetPatchJobRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPatchJobRequest.verify = function verify(message) { + if (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 GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + */ + GetPatchJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetPatchJobRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.GetPatchJobRequest} message GetPatchJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPatchJobRequest.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 GetPatchJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetPatchJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - }; + return GetPatchJobRequest; + })(); - /** - * 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; - })(); + v1.ListPatchJobInstanceDetailsRequest = (function() { - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - return values; - })(); + /** + * Properties of a ListPatchJobInstanceDetailsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobInstanceDetailsRequest + * @property {string|null} [parent] ListPatchJobInstanceDetailsRequest parent + * @property {number|null} [pageSize] ListPatchJobInstanceDetailsRequest pageSize + * @property {string|null} [pageToken] ListPatchJobInstanceDetailsRequest pageToken + * @property {string|null} [filter] ListPatchJobInstanceDetailsRequest filter + */ - return FieldDescriptorProto; - })(); + /** + * Constructs a new ListPatchJobInstanceDetailsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobInstanceDetailsRequest. + * @implements IListPatchJobInstanceDetailsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set + */ + function ListPatchJobInstanceDetailsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - protobuf.OneofDescriptorProto = (function() { + /** + * ListPatchJobInstanceDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.parent = ""; - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ + /** + * ListPatchJobInstanceDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.pageSize = 0; - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ListPatchJobInstanceDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.pageToken = ""; - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; + /** + * ListPatchJobInstanceDetailsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.filter = ""; - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; + /** + * Creates a new ListPatchJobInstanceDetailsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest instance + */ + ListPatchJobInstanceDetailsRequest.create = function create(properties) { + return new ListPatchJobInstanceDetailsRequest(properties); + }; - /** - * 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 ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; - /** - * Encodes the specified 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 ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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 a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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 a ListPatchJobInstanceDetailsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobInstanceDetailsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * 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 a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest + */ + ListPatchJobInstanceDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; - /** - * Creates 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 a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobInstanceDetailsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; - /** - * 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 ListPatchJobInstanceDetailsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobInstanceDetailsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ListPatchJobInstanceDetailsRequest; + })(); - return OneofDescriptorProto; - })(); + v1.ListPatchJobInstanceDetailsResponse = (function() { - protobuf.EnumDescriptorProto = (function() { + /** + * Properties of a ListPatchJobInstanceDetailsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobInstanceDetailsResponse + * @property {Array.|null} [patchJobInstanceDetails] ListPatchJobInstanceDetailsResponse patchJobInstanceDetails + * @property {string|null} [nextPageToken] ListPatchJobInstanceDetailsResponse nextPageToken + */ - /** - * 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 ListPatchJobInstanceDetailsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobInstanceDetailsResponse. + * @implements IListPatchJobInstanceDetailsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set + */ + function ListPatchJobInstanceDetailsResponse(properties) { + this.patchJobInstanceDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new 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]]; - } + /** + * ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. + * @member {Array.} patchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @instance + */ + ListPatchJobInstanceDetailsResponse.prototype.patchJobInstanceDetails = $util.emptyArray; - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; + /** + * ListPatchJobInstanceDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @instance + */ + ListPatchJobInstanceDetailsResponse.prototype.nextPageToken = ""; - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + /** + * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse instance + */ + ListPatchJobInstanceDetailsResponse.create = function create(properties) { + return new ListPatchJobInstanceDetailsResponse(properties); + }; - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; + /** + * Encodes the specified ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchJobInstanceDetails != null && message.patchJobInstanceDetails.length) + for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) + $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.encode(message.patchJobInstanceDetails[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; + }; - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * Encodes the specified ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.patchJobInstanceDetails && message.patchJobInstanceDetails.length)) + message.patchJobInstanceDetails = []; + message.patchJobInstanceDetails.push($root.google.cloud.osconfig.v1.PatchJobInstanceDetails.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPatchJobInstanceDetailsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobInstanceDetailsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchJobInstanceDetails != null && message.hasOwnProperty("patchJobInstanceDetails")) { + if (!Array.isArray(message.patchJobInstanceDetails)) + return "patchJobInstanceDetails: array expected"; + for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.verify(message.patchJobInstanceDetails[i]); + if (error) + return "patchJobInstanceDetails." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + */ + ListPatchJobInstanceDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); + if (object.patchJobInstanceDetails) { + if (!Array.isArray(object.patchJobInstanceDetails)) + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: array expected"); + message.patchJobInstanceDetails = []; + for (var i = 0; i < object.patchJobInstanceDetails.length; ++i) { + if (typeof object.patchJobInstanceDetails[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: object expected"); + message.patchJobInstanceDetails[i] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.fromObject(object.patchJobInstanceDetails[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * 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; - }; + /** + * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobInstanceDetailsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patchJobInstanceDetails = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.patchJobInstanceDetails && message.patchJobInstanceDetails.length) { + object.patchJobInstanceDetails = []; + for (var j = 0; j < message.patchJobInstanceDetails.length; ++j) + object.patchJobInstanceDetails[j] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.toObject(message.patchJobInstanceDetails[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * 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(); - }; + /** + * Converts this ListPatchJobInstanceDetailsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobInstanceDetailsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return ListPatchJobInstanceDetailsResponse; + })(); - /** - * 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()); - }; + v1.PatchJobInstanceDetails = (function() { - /** - * 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; - }; + /** + * Properties of a PatchJobInstanceDetails. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchJobInstanceDetails + * @property {string|null} [name] PatchJobInstanceDetails name + * @property {string|null} [instanceSystemId] PatchJobInstanceDetails instanceSystemId + * @property {google.cloud.osconfig.v1.Instance.PatchState|null} [state] PatchJobInstanceDetails state + * @property {string|null} [failureReason] PatchJobInstanceDetails failureReason + * @property {number|Long|null} [attemptCount] PatchJobInstanceDetails attemptCount + */ - /** - * 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]); + /** + * Constructs a new PatchJobInstanceDetails. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchJobInstanceDetails. + * @implements IPatchJobInstanceDetails + * @constructor + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set + */ + function PatchJobInstanceDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (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; - }; + /** + * PatchJobInstanceDetails name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.name = ""; - /** - * 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); - }; + /** + * PatchJobInstanceDetails instanceSystemId. + * @member {string} instanceSystemId + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.instanceSystemId = ""; - EnumDescriptorProto.EnumReservedRange = (function() { + /** + * PatchJobInstanceDetails state. + * @member {google.cloud.osconfig.v1.Instance.PatchState} state + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.state = 0; - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ + /** + * PatchJobInstanceDetails failureReason. + * @member {string} failureReason + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.failureReason = ""; - /** - * 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]]; - } + /** + * PatchJobInstanceDetails attemptCount. + * @member {number|Long} attemptCount + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.attemptCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; + /** + * Creates a new PatchJobInstanceDetails instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails instance + */ + PatchJobInstanceDetails.create = function create(properties) { + return new PatchJobInstanceDetails(properties); + }; - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; + /** + * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJobInstanceDetails.encode = function encode(message, writer) { + 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.instanceSystemId != null && Object.hasOwnProperty.call(message, "instanceSystemId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceSystemId); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.failureReason); + if (message.attemptCount != null && Object.hasOwnProperty.call(message, "attemptCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.attemptCount); + return writer; + }; - /** - * 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 PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJobInstanceDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJobInstanceDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.instanceSystemId = reader.string(); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.failureReason = reader.string(); + break; + case 5: + message.attemptCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJobInstanceDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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(); - }; + /** + * Verifies a PatchJobInstanceDetails message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchJobInstanceDetails.verify = function verify(message) { + if (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.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) + if (!$util.isString(message.instanceSystemId)) + return "instanceSystemId: 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: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) + if (!$util.isInteger(message.attemptCount) && !(message.attemptCount && $util.isInteger(message.attemptCount.low) && $util.isInteger(message.attemptCount.high))) + return "attemptCount: integer|Long expected"; + return null; + }; - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + */ + PatchJobInstanceDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchJobInstanceDetails) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); + if (object.name != null) + message.name = String(object.name); + if (object.instanceSystemId != null) + message.instanceSystemId = String(object.instanceSystemId); + switch (object.state) { + case "PATCH_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": case 1: - message.start = reader.int32(); + message.state = 1; break; + case "INACTIVE": case 2: - message.end = reader.int32(); + message.state = 2; break; - default: - reader.skipType(tag & 7); + case "NOTIFIED": + case 3: + message.state = 3; + break; + case "STARTED": + case 4: + message.state = 4; + break; + case "DOWNLOADING_PATCHES": + case 5: + message.state = 5; + break; + case "APPLYING_PATCHES": + case 6: + message.state = 6; + break; + case "REBOOTING": + case 7: + message.state = 7; + break; + case "SUCCEEDED": + case 8: + message.state = 8; + break; + case "SUCCEEDED_REBOOT_REQUIRED": + case 9: + message.state = 9; + break; + case "FAILED": + case 10: + message.state = 10; + break; + case "ACKED": + case 11: + message.state = 11; + break; + case "TIMED_OUT": + case 12: + message.state = 12; + break; + case "RUNNING_PRE_PATCH_STEP": + case 13: + message.state = 13; + break; + case "RUNNING_POST_PATCH_STEP": + case 14: + message.state = 14; + break; + case "NO_AGENT_DETECTED": + case 15: + message.state = 15; 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; - }; + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.attemptCount != null) + if ($util.Long) + (message.attemptCount = $util.Long.fromValue(object.attemptCount)).unsigned = false; + else if (typeof object.attemptCount === "string") + message.attemptCount = parseInt(object.attemptCount, 10); + else if (typeof object.attemptCount === "number") + message.attemptCount = object.attemptCount; + else if (typeof object.attemptCount === "object") + message.attemptCount = new $util.LongBits(object.attemptCount.low >>> 0, object.attemptCount.high >>> 0).toNumber(); + return message; + }; - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + /** + * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.PatchJobInstanceDetails} message PatchJobInstanceDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchJobInstanceDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.instanceSystemId = ""; + object.state = options.enums === String ? "PATCH_STATE_UNSPECIFIED" : 0; + object.failureReason = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.attemptCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.attemptCount = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) + object.instanceSystemId = message.instanceSystemId; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.Instance.PatchState[message.state] : message.state; + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) + if (typeof message.attemptCount === "number") + object.attemptCount = options.longs === String ? String(message.attemptCount) : message.attemptCount; + else + object.attemptCount = options.longs === String ? $util.Long.prototype.toString.call(message.attemptCount) : options.longs === Number ? new $util.LongBits(message.attemptCount.low >>> 0, message.attemptCount.high >>> 0).toNumber() : message.attemptCount; 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; + /** + * Converts this PatchJobInstanceDetails to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + * @returns {Object.} JSON object + */ + PatchJobInstanceDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PatchJobInstanceDetails; + })(); + + v1.ListPatchJobsRequest = (function() { + + /** + * Properties of a ListPatchJobsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobsRequest + * @property {string|null} [parent] ListPatchJobsRequest parent + * @property {number|null} [pageSize] ListPatchJobsRequest pageSize + * @property {string|null} [pageToken] ListPatchJobsRequest pageToken + * @property {string|null} [filter] ListPatchJobsRequest filter + */ + + /** + * Constructs a new ListPatchJobsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobsRequest. + * @implements IListPatchJobsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set + */ + function ListPatchJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.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); - }; + /** + * ListPatchJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.parent = ""; - return EnumReservedRange; - })(); + /** + * ListPatchJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.pageSize = 0; - return EnumDescriptorProto; - })(); + /** + * ListPatchJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.pageToken = ""; - protobuf.EnumValueDescriptorProto = (function() { + /** + * ListPatchJobsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.filter = ""; - /** - * 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 - */ + /** + * Creates a new ListPatchJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest instance + */ + ListPatchJobsRequest.create = function create(properties) { + return new ListPatchJobsRequest(properties); + }; - /** - * 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]]; - } + /** + * Encodes the specified ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPatchJobsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; + /** + * Creates a ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + */ + ListPatchJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; + /** + * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobsRequest} message ListPatchJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; + /** + * Converts this ListPatchJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - }; + return ListPatchJobsRequest; + })(); - /** - * 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; - }; + v1.ListPatchJobsResponse = (function() { - /** - * 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(); - }; + /** + * Properties of a ListPatchJobsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobsResponse + * @property {Array.|null} [patchJobs] ListPatchJobsResponse patchJobs + * @property {string|null} [nextPageToken] ListPatchJobsResponse nextPageToken + */ - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new ListPatchJobsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobsResponse. + * @implements IListPatchJobsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set + */ + function ListPatchJobsResponse(properties) { + this.patchJobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - - /** - * Decodes an 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; - }; + /** + * ListPatchJobsResponse patchJobs. + * @member {Array.} patchJobs + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @instance + */ + ListPatchJobsResponse.prototype.patchJobs = $util.emptyArray; - /** - * 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; - }; + /** + * ListPatchJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @instance + */ + ListPatchJobsResponse.prototype.nextPageToken = ""; - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new ListPatchJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse instance + */ + ListPatchJobsResponse.create = function create(properties) { + return new ListPatchJobsResponse(properties); + }; - return EnumValueDescriptorProto; - })(); + /** + * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchJobs != null && message.patchJobs.length) + for (var i = 0; i < message.patchJobs.length; ++i) + $root.google.cloud.osconfig.v1.PatchJob.encode(message.patchJobs[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; + }; - protobuf.ServiceDescriptorProto = (function() { + /** + * Encodes the specified ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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 - */ + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.patchJobs && message.patchJobs.length)) + message.patchJobs = []; + message.patchJobs.push($root.google.cloud.osconfig.v1.PatchJob.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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]]; - } + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; + /** + * Verifies a ListPatchJobsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchJobs != null && message.hasOwnProperty("patchJobs")) { + if (!Array.isArray(message.patchJobs)) + return "patchJobs: array expected"; + for (var i = 0; i < message.patchJobs.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchJob.verify(message.patchJobs[i]); + if (error) + return "patchJobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + */ + ListPatchJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); + if (object.patchJobs) { + if (!Array.isArray(object.patchJobs)) + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: array expected"); + message.patchJobs = []; + for (var i = 0; i < object.patchJobs.length; ++i) { + if (typeof object.patchJobs[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: object expected"); + message.patchJobs[i] = $root.google.cloud.osconfig.v1.PatchJob.fromObject(object.patchJobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} message ListPatchJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patchJobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.patchJobs && message.patchJobs.length) { + object.patchJobs = []; + for (var j = 0; j < message.patchJobs.length; ++j) + object.patchJobs[j] = $root.google.cloud.osconfig.v1.PatchJob.toObject(message.patchJobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPatchJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + return ListPatchJobsResponse; + })(); - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; + v1.PatchJob = (function() { - /** - * 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); - }; + /** + * Properties of a PatchJob. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchJob + * @property {string|null} [name] PatchJob name + * @property {string|null} [displayName] PatchJob displayName + * @property {string|null} [description] PatchJob description + * @property {google.protobuf.ITimestamp|null} [createTime] PatchJob createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PatchJob updateTime + * @property {google.cloud.osconfig.v1.PatchJob.State|null} [state] PatchJob state + * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchJob instanceFilter + * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchJob patchConfig + * @property {google.protobuf.IDuration|null} [duration] PatchJob duration + * @property {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null} [instanceDetailsSummary] PatchJob instanceDetailsSummary + * @property {boolean|null} [dryRun] PatchJob dryRun + * @property {string|null} [errorMessage] PatchJob errorMessage + * @property {number|null} [percentComplete] PatchJob percentComplete + * @property {string|null} [patchDeployment] PatchJob patchDeployment + * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] PatchJob rollout + */ - /** - * 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; - }; + /** + * Constructs a new PatchJob. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchJob. + * @implements IPatchJob + * @constructor + * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set + */ + function PatchJob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified 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(); - }; + /** + * PatchJob name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.name = ""; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * PatchJob displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.displayName = ""; - /** - * 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()); - }; + /** + * PatchJob description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.description = ""; - /** - * 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; - }; + /** + * PatchJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.createTime = 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; - }; + /** + * PatchJob updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.updateTime = null; + + /** + * PatchJob state. + * @member {google.cloud.osconfig.v1.PatchJob.State} state + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.state = 0; + + /** + * PatchJob instanceFilter. + * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.instanceFilter = null; - /** - * 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; - }; + /** + * PatchJob patchConfig. + * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.patchConfig = null; - /** - * 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); - }; + /** + * PatchJob duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.duration = null; - return ServiceDescriptorProto; - })(); + /** + * PatchJob instanceDetailsSummary. + * @member {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null|undefined} instanceDetailsSummary + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.instanceDetailsSummary = null; - protobuf.MethodDescriptorProto = (function() { + /** + * PatchJob dryRun. + * @member {boolean} dryRun + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.dryRun = false; - /** - * 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 - */ + /** + * PatchJob errorMessage. + * @member {string} errorMessage + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.errorMessage = ""; - /** - * 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]]; - } + /** + * PatchJob percentComplete. + * @member {number} percentComplete + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.percentComplete = 0; - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; + /** + * PatchJob patchDeployment. + * @member {string} patchDeployment + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.patchDeployment = ""; - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; + /** + * PatchJob rollout. + * @member {google.cloud.osconfig.v1.IPatchRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.rollout = null; - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; + /** + * Creates a new PatchJob instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob instance + */ + PatchJob.create = function create(properties) { + return new PatchJob(properties); + }; - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; + /** + * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) + $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.instanceDetailsSummary != null && Object.hasOwnProperty.call(message, "instanceDetailsSummary")) + $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.encode(message.instanceDetailsSummary, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.dryRun); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.errorMessage); + if (message.percentComplete != null && Object.hasOwnProperty.call(message, "percentComplete")) + writer.uint32(/* id 12, wireType 1 =*/97).double(message.percentComplete); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.displayName); + if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.patchDeployment); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; + /** + * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PatchJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 14: + message.displayName = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.state = reader.int32(); + break; + case 13: + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + case 7: + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + case 8: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 9: + message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.decode(reader, reader.uint32()); + break; + case 10: + message.dryRun = reader.bool(); + break; + case 11: + message.errorMessage = reader.string(); + break; + case 12: + message.percentComplete = reader.double(); + break; + case 15: + message.patchDeployment = reader.string(); + break; + case 16: + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; + /** + * Decodes a PatchJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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); - }; + /** + * Verifies a PatchJob message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + 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.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { + var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); + if (error) + return "patchConfig." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) { + var error = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify(message.instanceDetailsSummary); + if (error) + return "instanceDetailsSummary." + error; + } + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) + if (typeof message.percentComplete !== "number") + return "percentComplete: number expected"; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + if (!$util.isString(message.patchDeployment)) + return "patchDeployment: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1.PatchRollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + return null; + }; - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; + /** + * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + */ + PatchJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchJob) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchJob(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.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.osconfig.v1.PatchJob.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STARTED": + case 1: + message.state = 1; + break; + case "INSTANCE_LOOKUP": + case 2: + message.state = 2; + break; + case "PATCHING": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "COMPLETED_WITH_ERRORS": + case 5: + message.state = 5; + break; + case "CANCELED": + case 6: + message.state = 6; + break; + case "TIMED_OUT": + case 7: + message.state = 7; + break; + } + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); + } + if (object.patchConfig != null) { + if (typeof object.patchConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.patchConfig: object expected"); + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.instanceDetailsSummary != null) { + if (typeof object.instanceDetailsSummary !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceDetailsSummary: object expected"); + message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.fromObject(object.instanceDetailsSummary); + } + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.percentComplete != null) + message.percentComplete = Number(object.percentComplete); + if (object.patchDeployment != null) + message.patchDeployment = String(object.patchDeployment); + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); + } + return message; + }; - /** - * 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(); - }; + /** + * Creates a plain object from a PatchJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.PatchJob} message PatchJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.patchConfig = null; + object.duration = null; + object.instanceDetailsSummary = null; + object.dryRun = false; + object.errorMessage = ""; + object.percentComplete = 0; + object.instanceFilter = null; + object.displayName = ""; + object.patchDeployment = ""; + object.rollout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchJob.State[message.state] : message.state; + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) + object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) + object.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.toObject(message.instanceDetailsSummary, options); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) + object.percentComplete = options.json && !isFinite(message.percentComplete) ? String(message.percentComplete) : message.percentComplete; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + object.patchDeployment = message.patchDeployment; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); + return object; + }; - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this PatchJob to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + * @returns {Object.} JSON object + */ + PatchJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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()); - }; + PatchJob.InstanceDetailsSummary = (function() { - /** - * 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; - }; + /** + * Properties of an InstanceDetailsSummary. + * @memberof google.cloud.osconfig.v1.PatchJob + * @interface IInstanceDetailsSummary + * @property {number|Long|null} [pendingInstanceCount] InstanceDetailsSummary pendingInstanceCount + * @property {number|Long|null} [inactiveInstanceCount] InstanceDetailsSummary inactiveInstanceCount + * @property {number|Long|null} [notifiedInstanceCount] InstanceDetailsSummary notifiedInstanceCount + * @property {number|Long|null} [startedInstanceCount] InstanceDetailsSummary startedInstanceCount + * @property {number|Long|null} [downloadingPatchesInstanceCount] InstanceDetailsSummary downloadingPatchesInstanceCount + * @property {number|Long|null} [applyingPatchesInstanceCount] InstanceDetailsSummary applyingPatchesInstanceCount + * @property {number|Long|null} [rebootingInstanceCount] InstanceDetailsSummary rebootingInstanceCount + * @property {number|Long|null} [succeededInstanceCount] InstanceDetailsSummary succeededInstanceCount + * @property {number|Long|null} [succeededRebootRequiredInstanceCount] InstanceDetailsSummary succeededRebootRequiredInstanceCount + * @property {number|Long|null} [failedInstanceCount] InstanceDetailsSummary failedInstanceCount + * @property {number|Long|null} [ackedInstanceCount] InstanceDetailsSummary ackedInstanceCount + * @property {number|Long|null} [timedOutInstanceCount] InstanceDetailsSummary timedOutInstanceCount + * @property {number|Long|null} [prePatchStepInstanceCount] InstanceDetailsSummary prePatchStepInstanceCount + * @property {number|Long|null} [postPatchStepInstanceCount] InstanceDetailsSummary postPatchStepInstanceCount + * @property {number|Long|null} [noAgentDetectedInstanceCount] InstanceDetailsSummary noAgentDetectedInstanceCount + */ - /** - * 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; - }; + /** + * Constructs a new InstanceDetailsSummary. + * @memberof google.cloud.osconfig.v1.PatchJob + * @classdesc Represents an InstanceDetailsSummary. + * @implements IInstanceDetailsSummary + * @constructor + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set + */ + function InstanceDetailsSummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceDetailsSummary pendingInstanceCount. + * @member {number|Long} pendingInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.pendingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * 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; - }; + /** + * InstanceDetailsSummary inactiveInstanceCount. + * @member {number|Long} inactiveInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.inactiveInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * 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); - }; + /** + * InstanceDetailsSummary notifiedInstanceCount. + * @member {number|Long} notifiedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.notifiedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - return MethodDescriptorProto; - })(); + /** + * InstanceDetailsSummary startedInstanceCount. + * @member {number|Long} startedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.startedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - protobuf.FileOptions = (function() { + /** + * InstanceDetailsSummary downloadingPatchesInstanceCount. + * @member {number|Long} downloadingPatchesInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.downloadingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ + /** + * InstanceDetailsSummary applyingPatchesInstanceCount. + * @member {number|Long} applyingPatchesInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.applyingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * 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]]; - } + /** + * InstanceDetailsSummary rebootingInstanceCount. + * @member {number|Long} rebootingInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.rebootingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; + /** + * InstanceDetailsSummary succeededInstanceCount. + * @member {number|Long} succeededInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.succeededInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; + /** + * InstanceDetailsSummary succeededRebootRequiredInstanceCount. + * @member {number|Long} succeededRebootRequiredInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.succeededRebootRequiredInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; + /** + * InstanceDetailsSummary failedInstanceCount. + * @member {number|Long} failedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.failedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * InstanceDetailsSummary ackedInstanceCount. + * @member {number|Long} ackedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.ackedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * InstanceDetailsSummary timedOutInstanceCount. + * @member {number|Long} timedOutInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.timedOutInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * InstanceDetailsSummary prePatchStepInstanceCount. + * @member {number|Long} prePatchStepInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.prePatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; + /** + * InstanceDetailsSummary postPatchStepInstanceCount. + * @member {number|Long} postPatchStepInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.postPatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; + /** + * InstanceDetailsSummary noAgentDetectedInstanceCount. + * @member {number|Long} noAgentDetectedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + */ + InstanceDetailsSummary.prototype.noAgentDetectedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new InstanceDetailsSummary instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary instance + */ + InstanceDetailsSummary.create = function create(properties) { + return new InstanceDetailsSummary(properties); + }; - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; + /** + * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceDetailsSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pendingInstanceCount != null && Object.hasOwnProperty.call(message, "pendingInstanceCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pendingInstanceCount); + if (message.inactiveInstanceCount != null && Object.hasOwnProperty.call(message, "inactiveInstanceCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.inactiveInstanceCount); + if (message.notifiedInstanceCount != null && Object.hasOwnProperty.call(message, "notifiedInstanceCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.notifiedInstanceCount); + if (message.startedInstanceCount != null && Object.hasOwnProperty.call(message, "startedInstanceCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.startedInstanceCount); + if (message.downloadingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "downloadingPatchesInstanceCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.downloadingPatchesInstanceCount); + if (message.applyingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "applyingPatchesInstanceCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.applyingPatchesInstanceCount); + if (message.rebootingInstanceCount != null && Object.hasOwnProperty.call(message, "rebootingInstanceCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.rebootingInstanceCount); + if (message.succeededInstanceCount != null && Object.hasOwnProperty.call(message, "succeededInstanceCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.succeededInstanceCount); + if (message.succeededRebootRequiredInstanceCount != null && Object.hasOwnProperty.call(message, "succeededRebootRequiredInstanceCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.succeededRebootRequiredInstanceCount); + if (message.failedInstanceCount != null && Object.hasOwnProperty.call(message, "failedInstanceCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.failedInstanceCount); + if (message.ackedInstanceCount != null && Object.hasOwnProperty.call(message, "ackedInstanceCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.ackedInstanceCount); + if (message.timedOutInstanceCount != null && Object.hasOwnProperty.call(message, "timedOutInstanceCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.timedOutInstanceCount); + if (message.prePatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "prePatchStepInstanceCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.prePatchStepInstanceCount); + if (message.postPatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "postPatchStepInstanceCount")) + writer.uint32(/* id 14, wireType 0 =*/112).int64(message.postPatchStepInstanceCount); + if (message.noAgentDetectedInstanceCount != null && Object.hasOwnProperty.call(message, "noAgentDetectedInstanceCount")) + writer.uint32(/* id 15, wireType 0 =*/120).int64(message.noAgentDetectedInstanceCount); + return writer; + }; - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; + /** + * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceDetailsSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FileOptions phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpGenericServices = false; + /** + * Decodes an InstanceDetailsSummary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceDetailsSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pendingInstanceCount = reader.int64(); + break; + case 2: + message.inactiveInstanceCount = reader.int64(); + break; + case 3: + message.notifiedInstanceCount = reader.int64(); + break; + case 4: + message.startedInstanceCount = reader.int64(); + break; + case 5: + message.downloadingPatchesInstanceCount = reader.int64(); + break; + case 6: + message.applyingPatchesInstanceCount = reader.int64(); + break; + case 7: + message.rebootingInstanceCount = reader.int64(); + break; + case 8: + message.succeededInstanceCount = reader.int64(); + break; + case 9: + message.succeededRebootRequiredInstanceCount = reader.int64(); + break; + case 10: + message.failedInstanceCount = reader.int64(); + break; + case 11: + message.ackedInstanceCount = reader.int64(); + break; + case 12: + message.timedOutInstanceCount = reader.int64(); + break; + case 13: + message.prePatchStepInstanceCount = reader.int64(); + break; + case 14: + message.postPatchStepInstanceCount = reader.int64(); + break; + case 15: + message.noAgentDetectedInstanceCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + /** + * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceDetailsSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; + /** + * Verifies an InstanceDetailsSummary message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceDetailsSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) + if (!$util.isInteger(message.pendingInstanceCount) && !(message.pendingInstanceCount && $util.isInteger(message.pendingInstanceCount.low) && $util.isInteger(message.pendingInstanceCount.high))) + return "pendingInstanceCount: integer|Long expected"; + if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) + if (!$util.isInteger(message.inactiveInstanceCount) && !(message.inactiveInstanceCount && $util.isInteger(message.inactiveInstanceCount.low) && $util.isInteger(message.inactiveInstanceCount.high))) + return "inactiveInstanceCount: integer|Long expected"; + if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) + if (!$util.isInteger(message.notifiedInstanceCount) && !(message.notifiedInstanceCount && $util.isInteger(message.notifiedInstanceCount.low) && $util.isInteger(message.notifiedInstanceCount.high))) + return "notifiedInstanceCount: integer|Long expected"; + if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) + if (!$util.isInteger(message.startedInstanceCount) && !(message.startedInstanceCount && $util.isInteger(message.startedInstanceCount.low) && $util.isInteger(message.startedInstanceCount.high))) + return "startedInstanceCount: integer|Long expected"; + if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) + if (!$util.isInteger(message.downloadingPatchesInstanceCount) && !(message.downloadingPatchesInstanceCount && $util.isInteger(message.downloadingPatchesInstanceCount.low) && $util.isInteger(message.downloadingPatchesInstanceCount.high))) + return "downloadingPatchesInstanceCount: integer|Long expected"; + if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) + if (!$util.isInteger(message.applyingPatchesInstanceCount) && !(message.applyingPatchesInstanceCount && $util.isInteger(message.applyingPatchesInstanceCount.low) && $util.isInteger(message.applyingPatchesInstanceCount.high))) + return "applyingPatchesInstanceCount: integer|Long expected"; + if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) + if (!$util.isInteger(message.rebootingInstanceCount) && !(message.rebootingInstanceCount && $util.isInteger(message.rebootingInstanceCount.low) && $util.isInteger(message.rebootingInstanceCount.high))) + return "rebootingInstanceCount: integer|Long expected"; + if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) + if (!$util.isInteger(message.succeededInstanceCount) && !(message.succeededInstanceCount && $util.isInteger(message.succeededInstanceCount.low) && $util.isInteger(message.succeededInstanceCount.high))) + return "succeededInstanceCount: integer|Long expected"; + if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) + if (!$util.isInteger(message.succeededRebootRequiredInstanceCount) && !(message.succeededRebootRequiredInstanceCount && $util.isInteger(message.succeededRebootRequiredInstanceCount.low) && $util.isInteger(message.succeededRebootRequiredInstanceCount.high))) + return "succeededRebootRequiredInstanceCount: integer|Long expected"; + if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) + if (!$util.isInteger(message.failedInstanceCount) && !(message.failedInstanceCount && $util.isInteger(message.failedInstanceCount.low) && $util.isInteger(message.failedInstanceCount.high))) + return "failedInstanceCount: integer|Long expected"; + if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) + if (!$util.isInteger(message.ackedInstanceCount) && !(message.ackedInstanceCount && $util.isInteger(message.ackedInstanceCount.low) && $util.isInteger(message.ackedInstanceCount.high))) + return "ackedInstanceCount: integer|Long expected"; + if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) + if (!$util.isInteger(message.timedOutInstanceCount) && !(message.timedOutInstanceCount && $util.isInteger(message.timedOutInstanceCount.low) && $util.isInteger(message.timedOutInstanceCount.high))) + return "timedOutInstanceCount: integer|Long expected"; + if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) + if (!$util.isInteger(message.prePatchStepInstanceCount) && !(message.prePatchStepInstanceCount && $util.isInteger(message.prePatchStepInstanceCount.low) && $util.isInteger(message.prePatchStepInstanceCount.high))) + return "prePatchStepInstanceCount: integer|Long expected"; + if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) + if (!$util.isInteger(message.postPatchStepInstanceCount) && !(message.postPatchStepInstanceCount && $util.isInteger(message.postPatchStepInstanceCount.low) && $util.isInteger(message.postPatchStepInstanceCount.high))) + return "postPatchStepInstanceCount: integer|Long expected"; + if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) + if (!$util.isInteger(message.noAgentDetectedInstanceCount) && !(message.noAgentDetectedInstanceCount && $util.isInteger(message.noAgentDetectedInstanceCount.low) && $util.isInteger(message.noAgentDetectedInstanceCount.high))) + return "noAgentDetectedInstanceCount: integer|Long expected"; + return null; + }; + + /** + * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary + */ + InstanceDetailsSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); + if (object.pendingInstanceCount != null) + if ($util.Long) + (message.pendingInstanceCount = $util.Long.fromValue(object.pendingInstanceCount)).unsigned = false; + else if (typeof object.pendingInstanceCount === "string") + message.pendingInstanceCount = parseInt(object.pendingInstanceCount, 10); + else if (typeof object.pendingInstanceCount === "number") + message.pendingInstanceCount = object.pendingInstanceCount; + else if (typeof object.pendingInstanceCount === "object") + message.pendingInstanceCount = new $util.LongBits(object.pendingInstanceCount.low >>> 0, object.pendingInstanceCount.high >>> 0).toNumber(); + if (object.inactiveInstanceCount != null) + if ($util.Long) + (message.inactiveInstanceCount = $util.Long.fromValue(object.inactiveInstanceCount)).unsigned = false; + else if (typeof object.inactiveInstanceCount === "string") + message.inactiveInstanceCount = parseInt(object.inactiveInstanceCount, 10); + else if (typeof object.inactiveInstanceCount === "number") + message.inactiveInstanceCount = object.inactiveInstanceCount; + else if (typeof object.inactiveInstanceCount === "object") + message.inactiveInstanceCount = new $util.LongBits(object.inactiveInstanceCount.low >>> 0, object.inactiveInstanceCount.high >>> 0).toNumber(); + if (object.notifiedInstanceCount != null) + if ($util.Long) + (message.notifiedInstanceCount = $util.Long.fromValue(object.notifiedInstanceCount)).unsigned = false; + else if (typeof object.notifiedInstanceCount === "string") + message.notifiedInstanceCount = parseInt(object.notifiedInstanceCount, 10); + else if (typeof object.notifiedInstanceCount === "number") + message.notifiedInstanceCount = object.notifiedInstanceCount; + else if (typeof object.notifiedInstanceCount === "object") + message.notifiedInstanceCount = new $util.LongBits(object.notifiedInstanceCount.low >>> 0, object.notifiedInstanceCount.high >>> 0).toNumber(); + if (object.startedInstanceCount != null) + if ($util.Long) + (message.startedInstanceCount = $util.Long.fromValue(object.startedInstanceCount)).unsigned = false; + else if (typeof object.startedInstanceCount === "string") + message.startedInstanceCount = parseInt(object.startedInstanceCount, 10); + else if (typeof object.startedInstanceCount === "number") + message.startedInstanceCount = object.startedInstanceCount; + else if (typeof object.startedInstanceCount === "object") + message.startedInstanceCount = new $util.LongBits(object.startedInstanceCount.low >>> 0, object.startedInstanceCount.high >>> 0).toNumber(); + if (object.downloadingPatchesInstanceCount != null) + if ($util.Long) + (message.downloadingPatchesInstanceCount = $util.Long.fromValue(object.downloadingPatchesInstanceCount)).unsigned = false; + else if (typeof object.downloadingPatchesInstanceCount === "string") + message.downloadingPatchesInstanceCount = parseInt(object.downloadingPatchesInstanceCount, 10); + else if (typeof object.downloadingPatchesInstanceCount === "number") + message.downloadingPatchesInstanceCount = object.downloadingPatchesInstanceCount; + else if (typeof object.downloadingPatchesInstanceCount === "object") + message.downloadingPatchesInstanceCount = new $util.LongBits(object.downloadingPatchesInstanceCount.low >>> 0, object.downloadingPatchesInstanceCount.high >>> 0).toNumber(); + if (object.applyingPatchesInstanceCount != null) + if ($util.Long) + (message.applyingPatchesInstanceCount = $util.Long.fromValue(object.applyingPatchesInstanceCount)).unsigned = false; + else if (typeof object.applyingPatchesInstanceCount === "string") + message.applyingPatchesInstanceCount = parseInt(object.applyingPatchesInstanceCount, 10); + else if (typeof object.applyingPatchesInstanceCount === "number") + message.applyingPatchesInstanceCount = object.applyingPatchesInstanceCount; + else if (typeof object.applyingPatchesInstanceCount === "object") + message.applyingPatchesInstanceCount = new $util.LongBits(object.applyingPatchesInstanceCount.low >>> 0, object.applyingPatchesInstanceCount.high >>> 0).toNumber(); + if (object.rebootingInstanceCount != null) + if ($util.Long) + (message.rebootingInstanceCount = $util.Long.fromValue(object.rebootingInstanceCount)).unsigned = false; + else if (typeof object.rebootingInstanceCount === "string") + message.rebootingInstanceCount = parseInt(object.rebootingInstanceCount, 10); + else if (typeof object.rebootingInstanceCount === "number") + message.rebootingInstanceCount = object.rebootingInstanceCount; + else if (typeof object.rebootingInstanceCount === "object") + message.rebootingInstanceCount = new $util.LongBits(object.rebootingInstanceCount.low >>> 0, object.rebootingInstanceCount.high >>> 0).toNumber(); + if (object.succeededInstanceCount != null) + if ($util.Long) + (message.succeededInstanceCount = $util.Long.fromValue(object.succeededInstanceCount)).unsigned = false; + else if (typeof object.succeededInstanceCount === "string") + message.succeededInstanceCount = parseInt(object.succeededInstanceCount, 10); + else if (typeof object.succeededInstanceCount === "number") + message.succeededInstanceCount = object.succeededInstanceCount; + else if (typeof object.succeededInstanceCount === "object") + message.succeededInstanceCount = new $util.LongBits(object.succeededInstanceCount.low >>> 0, object.succeededInstanceCount.high >>> 0).toNumber(); + if (object.succeededRebootRequiredInstanceCount != null) + if ($util.Long) + (message.succeededRebootRequiredInstanceCount = $util.Long.fromValue(object.succeededRebootRequiredInstanceCount)).unsigned = false; + else if (typeof object.succeededRebootRequiredInstanceCount === "string") + message.succeededRebootRequiredInstanceCount = parseInt(object.succeededRebootRequiredInstanceCount, 10); + else if (typeof object.succeededRebootRequiredInstanceCount === "number") + message.succeededRebootRequiredInstanceCount = object.succeededRebootRequiredInstanceCount; + else if (typeof object.succeededRebootRequiredInstanceCount === "object") + message.succeededRebootRequiredInstanceCount = new $util.LongBits(object.succeededRebootRequiredInstanceCount.low >>> 0, object.succeededRebootRequiredInstanceCount.high >>> 0).toNumber(); + if (object.failedInstanceCount != null) + if ($util.Long) + (message.failedInstanceCount = $util.Long.fromValue(object.failedInstanceCount)).unsigned = false; + else if (typeof object.failedInstanceCount === "string") + message.failedInstanceCount = parseInt(object.failedInstanceCount, 10); + else if (typeof object.failedInstanceCount === "number") + message.failedInstanceCount = object.failedInstanceCount; + else if (typeof object.failedInstanceCount === "object") + message.failedInstanceCount = new $util.LongBits(object.failedInstanceCount.low >>> 0, object.failedInstanceCount.high >>> 0).toNumber(); + if (object.ackedInstanceCount != null) + if ($util.Long) + (message.ackedInstanceCount = $util.Long.fromValue(object.ackedInstanceCount)).unsigned = false; + else if (typeof object.ackedInstanceCount === "string") + message.ackedInstanceCount = parseInt(object.ackedInstanceCount, 10); + else if (typeof object.ackedInstanceCount === "number") + message.ackedInstanceCount = object.ackedInstanceCount; + else if (typeof object.ackedInstanceCount === "object") + message.ackedInstanceCount = new $util.LongBits(object.ackedInstanceCount.low >>> 0, object.ackedInstanceCount.high >>> 0).toNumber(); + if (object.timedOutInstanceCount != null) + if ($util.Long) + (message.timedOutInstanceCount = $util.Long.fromValue(object.timedOutInstanceCount)).unsigned = false; + else if (typeof object.timedOutInstanceCount === "string") + message.timedOutInstanceCount = parseInt(object.timedOutInstanceCount, 10); + else if (typeof object.timedOutInstanceCount === "number") + message.timedOutInstanceCount = object.timedOutInstanceCount; + else if (typeof object.timedOutInstanceCount === "object") + message.timedOutInstanceCount = new $util.LongBits(object.timedOutInstanceCount.low >>> 0, object.timedOutInstanceCount.high >>> 0).toNumber(); + if (object.prePatchStepInstanceCount != null) + if ($util.Long) + (message.prePatchStepInstanceCount = $util.Long.fromValue(object.prePatchStepInstanceCount)).unsigned = false; + else if (typeof object.prePatchStepInstanceCount === "string") + message.prePatchStepInstanceCount = parseInt(object.prePatchStepInstanceCount, 10); + else if (typeof object.prePatchStepInstanceCount === "number") + message.prePatchStepInstanceCount = object.prePatchStepInstanceCount; + else if (typeof object.prePatchStepInstanceCount === "object") + message.prePatchStepInstanceCount = new $util.LongBits(object.prePatchStepInstanceCount.low >>> 0, object.prePatchStepInstanceCount.high >>> 0).toNumber(); + if (object.postPatchStepInstanceCount != null) + if ($util.Long) + (message.postPatchStepInstanceCount = $util.Long.fromValue(object.postPatchStepInstanceCount)).unsigned = false; + else if (typeof object.postPatchStepInstanceCount === "string") + message.postPatchStepInstanceCount = parseInt(object.postPatchStepInstanceCount, 10); + else if (typeof object.postPatchStepInstanceCount === "number") + message.postPatchStepInstanceCount = object.postPatchStepInstanceCount; + else if (typeof object.postPatchStepInstanceCount === "object") + message.postPatchStepInstanceCount = new $util.LongBits(object.postPatchStepInstanceCount.low >>> 0, object.postPatchStepInstanceCount.high >>> 0).toNumber(); + if (object.noAgentDetectedInstanceCount != null) + if ($util.Long) + (message.noAgentDetectedInstanceCount = $util.Long.fromValue(object.noAgentDetectedInstanceCount)).unsigned = false; + else if (typeof object.noAgentDetectedInstanceCount === "string") + message.noAgentDetectedInstanceCount = parseInt(object.noAgentDetectedInstanceCount, 10); + else if (typeof object.noAgentDetectedInstanceCount === "number") + message.noAgentDetectedInstanceCount = object.noAgentDetectedInstanceCount; + else if (typeof object.noAgentDetectedInstanceCount === "object") + message.noAgentDetectedInstanceCount = new $util.LongBits(object.noAgentDetectedInstanceCount.low >>> 0, object.noAgentDetectedInstanceCount.high >>> 0).toNumber(); + return message; + }; - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + /** + * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} message InstanceDetailsSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceDetailsSummary.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.pendingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pendingInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.inactiveInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.inactiveInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.notifiedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.notifiedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.downloadingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.downloadingPatchesInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applyingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applyingPatchesInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rebootingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rebootingInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.succeededInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.succeededInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.succeededRebootRequiredInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.succeededRebootRequiredInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.ackedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ackedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timedOutInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timedOutInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.prePatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.prePatchStepInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.postPatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.postPatchStepInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.noAgentDetectedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.noAgentDetectedInstanceCount = options.longs === String ? "0" : 0; + } + if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) + if (typeof message.pendingInstanceCount === "number") + object.pendingInstanceCount = options.longs === String ? String(message.pendingInstanceCount) : message.pendingInstanceCount; + else + object.pendingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.pendingInstanceCount) : options.longs === Number ? new $util.LongBits(message.pendingInstanceCount.low >>> 0, message.pendingInstanceCount.high >>> 0).toNumber() : message.pendingInstanceCount; + if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) + if (typeof message.inactiveInstanceCount === "number") + object.inactiveInstanceCount = options.longs === String ? String(message.inactiveInstanceCount) : message.inactiveInstanceCount; + else + object.inactiveInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.inactiveInstanceCount) : options.longs === Number ? new $util.LongBits(message.inactiveInstanceCount.low >>> 0, message.inactiveInstanceCount.high >>> 0).toNumber() : message.inactiveInstanceCount; + if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) + if (typeof message.notifiedInstanceCount === "number") + object.notifiedInstanceCount = options.longs === String ? String(message.notifiedInstanceCount) : message.notifiedInstanceCount; + else + object.notifiedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.notifiedInstanceCount) : options.longs === Number ? new $util.LongBits(message.notifiedInstanceCount.low >>> 0, message.notifiedInstanceCount.high >>> 0).toNumber() : message.notifiedInstanceCount; + if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) + if (typeof message.startedInstanceCount === "number") + object.startedInstanceCount = options.longs === String ? String(message.startedInstanceCount) : message.startedInstanceCount; + else + object.startedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.startedInstanceCount) : options.longs === Number ? new $util.LongBits(message.startedInstanceCount.low >>> 0, message.startedInstanceCount.high >>> 0).toNumber() : message.startedInstanceCount; + if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) + if (typeof message.downloadingPatchesInstanceCount === "number") + object.downloadingPatchesInstanceCount = options.longs === String ? String(message.downloadingPatchesInstanceCount) : message.downloadingPatchesInstanceCount; + else + object.downloadingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.downloadingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.downloadingPatchesInstanceCount.low >>> 0, message.downloadingPatchesInstanceCount.high >>> 0).toNumber() : message.downloadingPatchesInstanceCount; + if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) + if (typeof message.applyingPatchesInstanceCount === "number") + object.applyingPatchesInstanceCount = options.longs === String ? String(message.applyingPatchesInstanceCount) : message.applyingPatchesInstanceCount; + else + object.applyingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.applyingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.applyingPatchesInstanceCount.low >>> 0, message.applyingPatchesInstanceCount.high >>> 0).toNumber() : message.applyingPatchesInstanceCount; + if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) + if (typeof message.rebootingInstanceCount === "number") + object.rebootingInstanceCount = options.longs === String ? String(message.rebootingInstanceCount) : message.rebootingInstanceCount; + else + object.rebootingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.rebootingInstanceCount) : options.longs === Number ? new $util.LongBits(message.rebootingInstanceCount.low >>> 0, message.rebootingInstanceCount.high >>> 0).toNumber() : message.rebootingInstanceCount; + if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) + if (typeof message.succeededInstanceCount === "number") + object.succeededInstanceCount = options.longs === String ? String(message.succeededInstanceCount) : message.succeededInstanceCount; + else + object.succeededInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededInstanceCount.low >>> 0, message.succeededInstanceCount.high >>> 0).toNumber() : message.succeededInstanceCount; + if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) + if (typeof message.succeededRebootRequiredInstanceCount === "number") + object.succeededRebootRequiredInstanceCount = options.longs === String ? String(message.succeededRebootRequiredInstanceCount) : message.succeededRebootRequiredInstanceCount; + else + object.succeededRebootRequiredInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededRebootRequiredInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededRebootRequiredInstanceCount.low >>> 0, message.succeededRebootRequiredInstanceCount.high >>> 0).toNumber() : message.succeededRebootRequiredInstanceCount; + if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) + if (typeof message.failedInstanceCount === "number") + object.failedInstanceCount = options.longs === String ? String(message.failedInstanceCount) : message.failedInstanceCount; + else + object.failedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedInstanceCount) : options.longs === Number ? new $util.LongBits(message.failedInstanceCount.low >>> 0, message.failedInstanceCount.high >>> 0).toNumber() : message.failedInstanceCount; + if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) + if (typeof message.ackedInstanceCount === "number") + object.ackedInstanceCount = options.longs === String ? String(message.ackedInstanceCount) : message.ackedInstanceCount; + else + object.ackedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.ackedInstanceCount) : options.longs === Number ? new $util.LongBits(message.ackedInstanceCount.low >>> 0, message.ackedInstanceCount.high >>> 0).toNumber() : message.ackedInstanceCount; + if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) + if (typeof message.timedOutInstanceCount === "number") + object.timedOutInstanceCount = options.longs === String ? String(message.timedOutInstanceCount) : message.timedOutInstanceCount; + else + object.timedOutInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.timedOutInstanceCount) : options.longs === Number ? new $util.LongBits(message.timedOutInstanceCount.low >>> 0, message.timedOutInstanceCount.high >>> 0).toNumber() : message.timedOutInstanceCount; + if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) + if (typeof message.prePatchStepInstanceCount === "number") + object.prePatchStepInstanceCount = options.longs === String ? String(message.prePatchStepInstanceCount) : message.prePatchStepInstanceCount; + else + object.prePatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.prePatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.prePatchStepInstanceCount.low >>> 0, message.prePatchStepInstanceCount.high >>> 0).toNumber() : message.prePatchStepInstanceCount; + if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) + if (typeof message.postPatchStepInstanceCount === "number") + object.postPatchStepInstanceCount = options.longs === String ? String(message.postPatchStepInstanceCount) : message.postPatchStepInstanceCount; + else + object.postPatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.postPatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.postPatchStepInstanceCount.low >>> 0, message.postPatchStepInstanceCount.high >>> 0).toNumber() : message.postPatchStepInstanceCount; + if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) + if (typeof message.noAgentDetectedInstanceCount === "number") + object.noAgentDetectedInstanceCount = options.longs === String ? String(message.noAgentDetectedInstanceCount) : message.noAgentDetectedInstanceCount; + else + object.noAgentDetectedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.noAgentDetectedInstanceCount) : options.longs === Number ? new $util.LongBits(message.noAgentDetectedInstanceCount.low >>> 0, message.noAgentDetectedInstanceCount.high >>> 0).toNumber() : message.noAgentDetectedInstanceCount; + return object; + }; - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + /** + * Converts this InstanceDetailsSummary to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance + * @returns {Object.} JSON object + */ + InstanceDetailsSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; + return InstanceDetailsSummary; + })(); - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; + /** + * State enum. + * @name google.cloud.osconfig.v1.PatchJob.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTED=1 STARTED value + * @property {number} INSTANCE_LOOKUP=2 INSTANCE_LOOKUP value + * @property {number} PATCHING=3 PATCHING value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} COMPLETED_WITH_ERRORS=5 COMPLETED_WITH_ERRORS value + * @property {number} CANCELED=6 CANCELED value + * @property {number} TIMED_OUT=7 TIMED_OUT value + */ + PatchJob.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STARTED"] = 1; + values[valuesById[2] = "INSTANCE_LOOKUP"] = 2; + values[valuesById[3] = "PATCHING"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "COMPLETED_WITH_ERRORS"] = 5; + values[valuesById[6] = "CANCELED"] = 6; + values[valuesById[7] = "TIMED_OUT"] = 7; + return values; + })(); - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; + return PatchJob; + })(); - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; + v1.PatchConfig = (function() { - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; + /** + * Properties of a PatchConfig. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchConfig + * @property {google.cloud.osconfig.v1.PatchConfig.RebootConfig|null} [rebootConfig] PatchConfig rebootConfig + * @property {google.cloud.osconfig.v1.IAptSettings|null} [apt] PatchConfig apt + * @property {google.cloud.osconfig.v1.IYumSettings|null} [yum] PatchConfig yum + * @property {google.cloud.osconfig.v1.IGooSettings|null} [goo] PatchConfig goo + * @property {google.cloud.osconfig.v1.IZypperSettings|null} [zypper] PatchConfig zypper + * @property {google.cloud.osconfig.v1.IWindowsUpdateSettings|null} [windowsUpdate] PatchConfig windowsUpdate + * @property {google.cloud.osconfig.v1.IExecStep|null} [preStep] PatchConfig preStep + * @property {google.cloud.osconfig.v1.IExecStep|null} [postStep] PatchConfig postStep + */ - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Constructs a new PatchConfig. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchConfig. + * @implements IPatchConfig + * @constructor + * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set + */ + function PatchConfig(properties) { + if (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 .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + /** + * PatchConfig rebootConfig. + * @member {google.cloud.osconfig.v1.PatchConfig.RebootConfig} rebootConfig + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.rebootConfig = 0; - /** - * 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); - }; + /** + * PatchConfig apt. + * @member {google.cloud.osconfig.v1.IAptSettings|null|undefined} apt + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.apt = null; - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; + /** + * PatchConfig yum. + * @member {google.cloud.osconfig.v1.IYumSettings|null|undefined} yum + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.yum = null; - /** - * 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(); - }; + /** + * PatchConfig goo. + * @member {google.cloud.osconfig.v1.IGooSettings|null|undefined} goo + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.goo = null; - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * PatchConfig zypper. + * @member {google.cloud.osconfig.v1.IZypperSettings|null|undefined} zypper + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.zypper = null; - /** - * 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()); - }; + /** + * PatchConfig windowsUpdate. + * @member {google.cloud.osconfig.v1.IWindowsUpdateSettings|null|undefined} windowsUpdate + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.windowsUpdate = null; + + /** + * PatchConfig preStep. + * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} preStep + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.preStep = null; + + /** + * PatchConfig postStep. + * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} postStep + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.postStep = null; + + /** + * Creates a new PatchConfig instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig instance + */ + PatchConfig.create = function create(properties) { + return new PatchConfig(properties); + }; + + /** + * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rebootConfig != null && Object.hasOwnProperty.call(message, "rebootConfig")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rebootConfig); + if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) + $root.google.cloud.osconfig.v1.AptSettings.encode(message.apt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) + $root.google.cloud.osconfig.v1.YumSettings.encode(message.yum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.goo != null && Object.hasOwnProperty.call(message, "goo")) + $root.google.cloud.osconfig.v1.GooSettings.encode(message.goo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) + $root.google.cloud.osconfig.v1.ZypperSettings.encode(message.zypper, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.windowsUpdate != null && Object.hasOwnProperty.call(message, "windowsUpdate")) + $root.google.cloud.osconfig.v1.WindowsUpdateSettings.encode(message.windowsUpdate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.preStep != null && Object.hasOwnProperty.call(message, "preStep")) + $root.google.cloud.osconfig.v1.ExecStep.encode(message.preStep, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.postStep != null && Object.hasOwnProperty.call(message, "postStep")) + $root.google.cloud.osconfig.v1.ExecStep.encode(message.postStep, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PatchConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rebootConfig = reader.int32(); + break; + case 3: + message.apt = $root.google.cloud.osconfig.v1.AptSettings.decode(reader, reader.uint32()); + break; + case 4: + message.yum = $root.google.cloud.osconfig.v1.YumSettings.decode(reader, reader.uint32()); + break; + case 5: + message.goo = $root.google.cloud.osconfig.v1.GooSettings.decode(reader, reader.uint32()); + break; + case 6: + message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.decode(reader, reader.uint32()); + break; + case 7: + message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.decode(reader, reader.uint32()); + break; + case 8: + message.preStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); + break; + case 9: + message.postStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - if (typeof message.phpGenericServices !== "boolean") - return "phpGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; + /** + * Decodes a PatchConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.phpGenericServices != null) - message.phpGenericServices = Boolean(object.phpGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; + /** + * Verifies a PatchConfig message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) + switch (message.rebootConfig) { + default: + return "rebootConfig: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.apt != null && message.hasOwnProperty("apt")) { + var error = $root.google.cloud.osconfig.v1.AptSettings.verify(message.apt); + if (error) + return "apt." + error; + } + if (message.yum != null && message.hasOwnProperty("yum")) { + var error = $root.google.cloud.osconfig.v1.YumSettings.verify(message.yum); + if (error) + return "yum." + error; + } + if (message.goo != null && message.hasOwnProperty("goo")) { + var error = $root.google.cloud.osconfig.v1.GooSettings.verify(message.goo); + if (error) + return "goo." + error; + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + var error = $root.google.cloud.osconfig.v1.ZypperSettings.verify(message.zypper); + if (error) + return "zypper." + error; + } + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { + var error = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.verify(message.windowsUpdate); + if (error) + return "windowsUpdate." + error; + } + if (message.preStep != null && message.hasOwnProperty("preStep")) { + var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.preStep); + if (error) + return "preStep." + error; + } + if (message.postStep != null && message.hasOwnProperty("postStep")) { + var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.postStep); + if (error) + return "postStep." + error; + } + return null; + }; - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpGenericServices = false; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - object.phpGenericServices = message.phpGenericServices; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; + /** + * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig + */ + PatchConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchConfig) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchConfig(); + switch (object.rebootConfig) { + case "REBOOT_CONFIG_UNSPECIFIED": + case 0: + message.rebootConfig = 0; + break; + case "DEFAULT": + case 1: + message.rebootConfig = 1; + break; + case "ALWAYS": + case 2: + message.rebootConfig = 2; + break; + case "NEVER": + case 3: + message.rebootConfig = 3; + break; + } + if (object.apt != null) { + if (typeof object.apt !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.apt: object expected"); + message.apt = $root.google.cloud.osconfig.v1.AptSettings.fromObject(object.apt); + } + if (object.yum != null) { + if (typeof object.yum !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.yum: object expected"); + message.yum = $root.google.cloud.osconfig.v1.YumSettings.fromObject(object.yum); + } + if (object.goo != null) { + if (typeof object.goo !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.goo: object expected"); + message.goo = $root.google.cloud.osconfig.v1.GooSettings.fromObject(object.goo); + } + if (object.zypper != null) { + if (typeof object.zypper !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.zypper: object expected"); + message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.fromObject(object.zypper); + } + if (object.windowsUpdate != null) { + if (typeof object.windowsUpdate !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.windowsUpdate: object expected"); + message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.fromObject(object.windowsUpdate); + } + if (object.preStep != null) { + if (typeof object.preStep !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.preStep: object expected"); + message.preStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.preStep); + } + if (object.postStep != null) { + if (typeof object.postStep !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.postStep: object expected"); + message.postStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.postStep); + } + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {google.cloud.osconfig.v1.PatchConfig} message PatchConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rebootConfig = options.enums === String ? "REBOOT_CONFIG_UNSPECIFIED" : 0; + object.apt = null; + object.yum = null; + object.goo = null; + object.zypper = null; + object.windowsUpdate = null; + object.preStep = null; + object.postStep = null; + } + if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) + object.rebootConfig = options.enums === String ? $root.google.cloud.osconfig.v1.PatchConfig.RebootConfig[message.rebootConfig] : message.rebootConfig; + if (message.apt != null && message.hasOwnProperty("apt")) + object.apt = $root.google.cloud.osconfig.v1.AptSettings.toObject(message.apt, options); + if (message.yum != null && message.hasOwnProperty("yum")) + object.yum = $root.google.cloud.osconfig.v1.YumSettings.toObject(message.yum, options); + if (message.goo != null && message.hasOwnProperty("goo")) + object.goo = $root.google.cloud.osconfig.v1.GooSettings.toObject(message.goo, options); + if (message.zypper != null && message.hasOwnProperty("zypper")) + object.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.toObject(message.zypper, options); + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) + object.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.toObject(message.windowsUpdate, options); + if (message.preStep != null && message.hasOwnProperty("preStep")) + object.preStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.preStep, options); + if (message.postStep != null && message.hasOwnProperty("postStep")) + object.postStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.postStep, options); + return object; + }; - /** - * 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; - })(); + /** + * Converts this PatchConfig to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + * @returns {Object.} JSON object + */ + PatchConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * RebootConfig enum. + * @name google.cloud.osconfig.v1.PatchConfig.RebootConfig + * @enum {number} + * @property {number} REBOOT_CONFIG_UNSPECIFIED=0 REBOOT_CONFIG_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} ALWAYS=2 ALWAYS value + * @property {number} NEVER=3 NEVER value + */ + PatchConfig.RebootConfig = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REBOOT_CONFIG_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "ALWAYS"] = 2; + values[valuesById[3] = "NEVER"] = 3; + return values; + })(); - return FileOptions; - })(); + return PatchConfig; + })(); - protobuf.MessageOptions = (function() { + v1.Instance = (function() { - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ + /** + * Properties of an Instance. + * @memberof google.cloud.osconfig.v1 + * @interface IInstance + */ - /** - * 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]]; - } + /** + * Constructs a new Instance. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an Instance. + * @implements IInstance + * @constructor + * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set + */ + function Instance(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + /** + * Creates a new Instance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Instance} Instance instance + */ + Instance.create = function create(properties) { + return new Instance(properties); + }; - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + /** + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; + /** + * Decodes an Instance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Instance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; + /** + * Verifies an Instance message. + * @function verify + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Instance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Instance} Instance + */ + Instance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Instance) + return object; + return new $root.google.cloud.osconfig.v1.Instance(); + }; - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.Instance} message Instance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Instance.toObject = function toObject() { + return {}; + }; - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this Instance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Instance + * @instance + * @returns {Object.} JSON object + */ + Instance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * PatchState enum. + * @name google.cloud.osconfig.v1.Instance.PatchState + * @enum {number} + * @property {number} PATCH_STATE_UNSPECIFIED=0 PATCH_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} INACTIVE=2 INACTIVE value + * @property {number} NOTIFIED=3 NOTIFIED value + * @property {number} STARTED=4 STARTED value + * @property {number} DOWNLOADING_PATCHES=5 DOWNLOADING_PATCHES value + * @property {number} APPLYING_PATCHES=6 APPLYING_PATCHES value + * @property {number} REBOOTING=7 REBOOTING value + * @property {number} SUCCEEDED=8 SUCCEEDED value + * @property {number} SUCCEEDED_REBOOT_REQUIRED=9 SUCCEEDED_REBOOT_REQUIRED value + * @property {number} FAILED=10 FAILED value + * @property {number} ACKED=11 ACKED value + * @property {number} TIMED_OUT=12 TIMED_OUT value + * @property {number} RUNNING_PRE_PATCH_STEP=13 RUNNING_PRE_PATCH_STEP value + * @property {number} RUNNING_POST_PATCH_STEP=14 RUNNING_POST_PATCH_STEP value + * @property {number} NO_AGENT_DETECTED=15 NO_AGENT_DETECTED value + */ + Instance.PatchState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PATCH_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + values[valuesById[3] = "NOTIFIED"] = 3; + values[valuesById[4] = "STARTED"] = 4; + values[valuesById[5] = "DOWNLOADING_PATCHES"] = 5; + values[valuesById[6] = "APPLYING_PATCHES"] = 6; + values[valuesById[7] = "REBOOTING"] = 7; + values[valuesById[8] = "SUCCEEDED"] = 8; + values[valuesById[9] = "SUCCEEDED_REBOOT_REQUIRED"] = 9; + values[valuesById[10] = "FAILED"] = 10; + values[valuesById[11] = "ACKED"] = 11; + values[valuesById[12] = "TIMED_OUT"] = 12; + values[valuesById[13] = "RUNNING_PRE_PATCH_STEP"] = 13; + values[valuesById[14] = "RUNNING_POST_PATCH_STEP"] = 14; + values[valuesById[15] = "NO_AGENT_DETECTED"] = 15; + return values; + })(); - /** - * 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()); - }; + return Instance; + })(); - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; + v1.CancelPatchJobRequest = (function() { - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; + /** + * Properties of a CancelPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @interface ICancelPatchJobRequest + * @property {string|null} [name] CancelPatchJobRequest name + */ - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; + /** + * Constructs a new CancelPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a CancelPatchJobRequest. + * @implements ICancelPatchJobRequest + * @constructor + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set + */ + function CancelPatchJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Converts this 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); - }; + /** + * CancelPatchJobRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @instance + */ + CancelPatchJobRequest.prototype.name = ""; - return MessageOptions; - })(); + /** + * Creates a new CancelPatchJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest instance + */ + CancelPatchJobRequest.create = function create(properties) { + return new CancelPatchJobRequest(properties); + }; - protobuf.FieldOptions = (function() { + /** + * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelPatchJobRequest.encode = function encode(message, writer) { + 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; + }; - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - */ + /** + * Encodes the specified CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelPatchJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; + /** + * Verifies a CancelPatchJobRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelPatchJobRequest.verify = function verify(message) { + if (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; + }; - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; + /** + * Creates a CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + */ + CancelPatchJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.CancelPatchJobRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; + /** + * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.CancelPatchJobRequest} message CancelPatchJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelPatchJobRequest.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; + }; - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; + /** + * Converts this CancelPatchJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @instance + * @returns {Object.} JSON object + */ + CancelPatchJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; + return CancelPatchJobRequest; + })(); + + v1.AptSettings = (function() { + + /** + * Properties of an AptSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IAptSettings + * @property {google.cloud.osconfig.v1.AptSettings.Type|null} [type] AptSettings type + * @property {Array.|null} [excludes] AptSettings excludes + * @property {Array.|null} [exclusivePackages] AptSettings exclusivePackages + */ + + /** + * Constructs a new AptSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an AptSettings. + * @implements IAptSettings + * @constructor + * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set + */ + function AptSettings(properties) { + this.excludes = []; + this.exclusivePackages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * AptSettings type. + * @member {google.cloud.osconfig.v1.AptSettings.Type} type + * @memberof google.cloud.osconfig.v1.AptSettings + * @instance + */ + AptSettings.prototype.type = 0; - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + /** + * AptSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.AptSettings + * @instance + */ + AptSettings.prototype.excludes = $util.emptyArray; - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + /** + * AptSettings exclusivePackages. + * @member {Array.} exclusivePackages + * @memberof google.cloud.osconfig.v1.AptSettings + * @instance + */ + AptSettings.prototype.exclusivePackages = $util.emptyArray; - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; + /** + * Creates a new AptSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings instance + */ + AptSettings.create = function create(properties) { + return new AptSettings(properties); + }; - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); + if (message.exclusivePackages != null && message.exclusivePackages.length) + for (var i = 0; i < message.exclusivePackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePackages[i]); + 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(); - }; + /** + * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes an AptSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.AptSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 3: + if (!(message.exclusivePackages && message.exclusivePackages.length)) + message.exclusivePackages = []; + message.exclusivePackages.push(reader.string()); + 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()); - }; + /** + * Decodes an AptSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.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; - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; + /** + * Verifies an AptSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AptSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; } - } - return null; - }; + if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { + if (!Array.isArray(message.exclusivePackages)) + return "exclusivePackages: array expected"; + for (var i = 0; i < message.exclusivePackages.length; ++i) + if (!$util.isString(message.exclusivePackages[i])) + return "exclusivePackages: string[] expected"; + } + return null; + }; - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.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"]); - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - case "FIELD_BEHAVIOR_UNSPECIFIED": + /** + * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings + */ + AptSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.AptSettings) + return object; + var message = new $root.google.cloud.osconfig.v1.AptSettings(); + switch (object.type) { + case "TYPE_UNSPECIFIED": case 0: - message[".google.api.fieldBehavior"][i] = 0; + message.type = 0; break; - case "OPTIONAL": + case "DIST": case 1: - message[".google.api.fieldBehavior"][i] = 1; + message.type = 1; break; - case "REQUIRED": + case "UPGRADE": 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; + message.type = 2; break; } - } - return message; - }; + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.AptSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePackages) { + if (!Array.isArray(object.exclusivePackages)) + throw TypeError(".google.cloud.osconfig.v1.AptSettings.exclusivePackages: array expected"); + message.exclusivePackages = []; + for (var i = 0; i < object.exclusivePackages.length; ++i) + message.exclusivePackages[i] = String(object.exclusivePackages[i]); + } + return message; + }; - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; + /** + * Creates a plain object from an AptSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {google.cloud.osconfig.v1.AptSettings} message AptSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AptSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.excludes = []; + object.exclusivePackages = []; + } + if (options.defaults) + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1.AptSettings.Type[message.type] : message.type; + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePackages && message.exclusivePackages.length) { + object.exclusivePackages = []; + for (var j = 0; j < message.exclusivePackages.length; ++j) + object.exclusivePackages[j] = message.exclusivePackages[j]; + } + return object; + }; - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this AptSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.AptSettings + * @instance + * @returns {Object.} JSON object + */ + AptSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); + /** + * Type enum. + * @name google.cloud.osconfig.v1.AptSettings.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} DIST=1 DIST value + * @property {number} UPGRADE=2 UPGRADE value + */ + AptSettings.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIST"] = 1; + values[valuesById[2] = "UPGRADE"] = 2; + return values; + })(); - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); + return AptSettings; + })(); - return FieldOptions; - })(); + v1.YumSettings = (function() { - protobuf.OneofOptions = (function() { + /** + * Properties of a YumSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IYumSettings + * @property {boolean|null} [security] YumSettings security + * @property {boolean|null} [minimal] YumSettings minimal + * @property {Array.|null} [excludes] YumSettings excludes + * @property {Array.|null} [exclusivePackages] YumSettings exclusivePackages + */ - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ + /** + * Constructs a new YumSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a YumSettings. + * @implements IYumSettings + * @constructor + * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set + */ + function YumSettings(properties) { + this.excludes = []; + this.exclusivePackages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new 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]]; - } + /** + * YumSettings security. + * @member {boolean} security + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.security = false; - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * YumSettings minimal. + * @member {boolean} minimal + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.minimal = false; - /** - * 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); - }; + /** + * YumSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.excludes = $util.emptyArray; + + /** + * YumSettings exclusivePackages. + * @member {Array.} exclusivePackages + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.exclusivePackages = $util.emptyArray; - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Creates a new YumSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings instance + */ + YumSettings.create = function create(properties) { + return new YumSettings(properties); + }; - /** - * 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(); - }; + /** + * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.security != null && Object.hasOwnProperty.call(message, "security")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.security); + if (message.minimal != null && Object.hasOwnProperty.call(message, "minimal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.minimal); + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludes[i]); + if (message.exclusivePackages != null && message.exclusivePackages.length) + for (var i = 0; i < message.exclusivePackages.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.exclusivePackages[i]); + return writer; + }; - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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()); - }; + /** + * Decodes a YumSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.YumSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.security = reader.bool(); + break; + case 2: + message.minimal = reader.bool(); + break; + case 3: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 4: + if (!(message.exclusivePackages && message.exclusivePackages.length)) + message.exclusivePackages = []; + message.exclusivePackages.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Decodes a YumSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * Verifies a YumSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YumSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.security != null && message.hasOwnProperty("security")) + if (typeof message.security !== "boolean") + return "security: boolean expected"; + if (message.minimal != null && message.hasOwnProperty("minimal")) + if (typeof message.minimal !== "boolean") + return "minimal: boolean expected"; + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { + if (!Array.isArray(message.exclusivePackages)) + return "exclusivePackages: array expected"; + for (var i = 0; i < message.exclusivePackages.length; ++i) + if (!$util.isString(message.exclusivePackages[i])) + return "exclusivePackages: string[] expected"; + } + return null; + }; - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings + */ + YumSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.YumSettings) + return object; + var message = new $root.google.cloud.osconfig.v1.YumSettings(); + if (object.security != null) + message.security = Boolean(object.security); + if (object.minimal != null) + message.minimal = Boolean(object.minimal); + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.YumSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePackages) { + if (!Array.isArray(object.exclusivePackages)) + throw TypeError(".google.cloud.osconfig.v1.YumSettings.exclusivePackages: array expected"); + message.exclusivePackages = []; + for (var i = 0; i < object.exclusivePackages.length; ++i) + message.exclusivePackages[i] = String(object.exclusivePackages[i]); + } + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from a YumSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {google.cloud.osconfig.v1.YumSettings} message YumSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YumSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.excludes = []; + object.exclusivePackages = []; + } + if (options.defaults) { + object.security = false; + object.minimal = false; + } + if (message.security != null && message.hasOwnProperty("security")) + object.security = message.security; + if (message.minimal != null && message.hasOwnProperty("minimal")) + object.minimal = message.minimal; + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePackages && message.exclusivePackages.length) { + object.exclusivePackages = []; + for (var j = 0; j < message.exclusivePackages.length; ++j) + object.exclusivePackages[j] = message.exclusivePackages[j]; + } + return object; + }; - return OneofOptions; - })(); + /** + * Converts this YumSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + * @returns {Object.} JSON object + */ + YumSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - protobuf.EnumOptions = (function() { + return YumSettings; + })(); - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ + v1.GooSettings = (function() { - /** - * 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]]; - } + /** + * Properties of a GooSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IGooSettings + */ - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; + /** + * Constructs a new GooSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GooSettings. + * @implements IGooSettings + * @constructor + * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set + */ + function GooSettings(properties) { + if (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 deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; + /** + * Creates a new GooSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings instance + */ + GooSettings.create = function create(properties) { + return new GooSettings(properties); + }; - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Encodes the specified GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; + /** + * Encodes the specified GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GooSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GooSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Decodes a GooSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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(); - }; + /** + * Verifies a GooSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GooSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a GooSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings + */ + GooSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GooSettings) + return object; + return new $root.google.cloud.osconfig.v1.GooSettings(); + }; - /** - * 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()); - }; + /** + * Creates a plain object from a GooSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {google.cloud.osconfig.v1.GooSettings} message GooSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GooSettings.toObject = function toObject() { + return {}; + }; - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Converts this GooSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GooSettings + * @instance + * @returns {Object.} JSON object + */ + GooSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + return GooSettings; + })(); - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + v1.ZypperSettings = (function() { - /** - * 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); - }; + /** + * Properties of a ZypperSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IZypperSettings + * @property {boolean|null} [withOptional] ZypperSettings withOptional + * @property {boolean|null} [withUpdate] ZypperSettings withUpdate + * @property {Array.|null} [categories] ZypperSettings categories + * @property {Array.|null} [severities] ZypperSettings severities + * @property {Array.|null} [excludes] ZypperSettings excludes + * @property {Array.|null} [exclusivePatches] ZypperSettings exclusivePatches + */ - return EnumOptions; - })(); + /** + * Constructs a new ZypperSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ZypperSettings. + * @implements IZypperSettings + * @constructor + * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set + */ + function ZypperSettings(properties) { + this.categories = []; + this.severities = []; + this.excludes = []; + this.exclusivePatches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - protobuf.EnumValueOptions = (function() { + /** + * ZypperSettings withOptional. + * @member {boolean} withOptional + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.withOptional = false; - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ + /** + * ZypperSettings withUpdate. + * @member {boolean} withUpdate + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.withUpdate = false; - /** - * 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]]; - } + /** + * ZypperSettings categories. + * @member {Array.} categories + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.categories = $util.emptyArray; - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; + /** + * ZypperSettings severities. + * @member {Array.} severities + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.severities = $util.emptyArray; - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * ZypperSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.excludes = $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); - }; + /** + * ZypperSettings exclusivePatches. + * @member {Array.} exclusivePatches + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.exclusivePatches = $util.emptyArray; - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Creates a new ZypperSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings instance + */ + ZypperSettings.create = function create(properties) { + return new ZypperSettings(properties); + }; - /** - * 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(); - }; + /** + * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.withOptional != null && Object.hasOwnProperty.call(message, "withOptional")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.withOptional); + if (message.withUpdate != null && Object.hasOwnProperty.call(message, "withUpdate")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.withUpdate); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.categories[i]); + if (message.severities != null && message.severities.length) + for (var i = 0; i < message.severities.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.severities[i]); + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.excludes[i]); + if (message.exclusivePatches != null && message.exclusivePatches.length) + for (var i = 0; i < message.exclusivePatches.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.exclusivePatches[i]); + return writer; + }; - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ZypperSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ZypperSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.withOptional = reader.bool(); + break; + case 2: + message.withUpdate = reader.bool(); + break; + case 3: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push(reader.string()); + break; + case 4: + if (!(message.severities && message.severities.length)) + message.severities = []; + message.severities.push(reader.string()); + break; + case 5: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 6: + if (!(message.exclusivePatches && message.exclusivePatches.length)) + message.exclusivePatches = []; + message.exclusivePatches.push(reader.string()); + 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()); - }; + /** + * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Verifies a ZypperSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ZypperSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.withOptional != null && message.hasOwnProperty("withOptional")) + if (typeof message.withOptional !== "boolean") + return "withOptional: boolean expected"; + if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) + if (typeof message.withUpdate !== "boolean") + return "withUpdate: boolean expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) + if (!$util.isString(message.categories[i])) + return "categories: string[] expected"; + } + if (message.severities != null && message.hasOwnProperty("severities")) { + if (!Array.isArray(message.severities)) + return "severities: array expected"; + for (var i = 0; i < message.severities.length; ++i) + if (!$util.isString(message.severities[i])) + return "severities: string[] expected"; + } + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { + if (!Array.isArray(message.exclusivePatches)) + return "exclusivePatches: array expected"; + for (var i = 0; i < message.exclusivePatches.length; ++i) + if (!$util.isString(message.exclusivePatches[i])) + return "exclusivePatches: string[] expected"; + } + return null; + }; - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings + */ + ZypperSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ZypperSettings) + return object; + var message = new $root.google.cloud.osconfig.v1.ZypperSettings(); + if (object.withOptional != null) + message.withOptional = Boolean(object.withOptional); + if (object.withUpdate != null) + message.withUpdate = Boolean(object.withUpdate); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) + message.categories[i] = String(object.categories[i]); + } + if (object.severities) { + if (!Array.isArray(object.severities)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.severities: array expected"); + message.severities = []; + for (var i = 0; i < object.severities.length; ++i) + message.severities[i] = String(object.severities[i]); + } + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePatches) { + if (!Array.isArray(object.exclusivePatches)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.exclusivePatches: array expected"); + message.exclusivePatches = []; + for (var i = 0; i < object.exclusivePatches.length; ++i) + message.exclusivePatches[i] = String(object.exclusivePatches[i]); + } + return message; + }; - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {google.cloud.osconfig.v1.ZypperSettings} message ZypperSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ZypperSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.categories = []; + object.severities = []; + object.excludes = []; + object.exclusivePatches = []; + } + if (options.defaults) { + object.withOptional = false; + object.withUpdate = false; + } + if (message.withOptional != null && message.hasOwnProperty("withOptional")) + object.withOptional = message.withOptional; + if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) + object.withUpdate = message.withUpdate; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = message.categories[j]; + } + if (message.severities && message.severities.length) { + object.severities = []; + for (var j = 0; j < message.severities.length; ++j) + object.severities[j] = message.severities[j]; + } + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePatches && message.exclusivePatches.length) { + object.exclusivePatches = []; + for (var j = 0; j < message.exclusivePatches.length; ++j) + object.exclusivePatches[j] = message.exclusivePatches[j]; + } + 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); - }; + /** + * Converts this ZypperSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + * @returns {Object.} JSON object + */ + ZypperSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return EnumValueOptions; - })(); + return ZypperSettings; + })(); - protobuf.ServiceOptions = (function() { + v1.WindowsUpdateSettings = (function() { - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - */ + /** + * Properties of a WindowsUpdateSettings. + * @memberof google.cloud.osconfig.v1 + * @interface IWindowsUpdateSettings + * @property {Array.|null} [classifications] WindowsUpdateSettings classifications + * @property {Array.|null} [excludes] WindowsUpdateSettings excludes + * @property {Array.|null} [exclusivePatches] WindowsUpdateSettings exclusivePatches + */ - /** - * 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]]; - } + /** + * Constructs a new WindowsUpdateSettings. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a WindowsUpdateSettings. + * @implements IWindowsUpdateSettings + * @constructor + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set + */ + function WindowsUpdateSettings(properties) { + this.classifications = []; + this.excludes = []; + this.exclusivePatches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; + /** + * WindowsUpdateSettings classifications. + * @member {Array.} classifications + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @instance + */ + WindowsUpdateSettings.prototype.classifications = $util.emptyArray; - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * WindowsUpdateSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @instance + */ + WindowsUpdateSettings.prototype.excludes = $util.emptyArray; - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + /** + * WindowsUpdateSettings exclusivePatches. + * @member {Array.} exclusivePatches + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @instance + */ + WindowsUpdateSettings.prototype.exclusivePatches = $util.emptyArray; - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + /** + * Creates a new WindowsUpdateSettings instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings instance + */ + WindowsUpdateSettings.create = function create(properties) { + return new WindowsUpdateSettings(properties); + }; - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; + /** + * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.classifications != null && message.classifications.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.classifications.length; ++i) + writer.int32(message.classifications[i]); + writer.ldelim(); + } + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); + if (message.exclusivePatches != null && message.exclusivePatches.length) + for (var i = 0; i < message.exclusivePatches.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePatches[i]); + return writer; + }; - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - return writer; - }; + /** + * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsUpdateSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.classifications && message.classifications.length)) + message.classifications = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.classifications.push(reader.int32()); + } else + message.classifications.push(reader.int32()); + break; + case 2: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 3: + if (!(message.exclusivePatches && message.exclusivePatches.length)) + message.exclusivePatches = []; + message.exclusivePatches.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 WindowsUpdateSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a WindowsUpdateSettings message. + * @function verify + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdateSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.classifications != null && message.hasOwnProperty("classifications")) { + if (!Array.isArray(message.classifications)) + return "classifications: array expected"; + for (var i = 0; i < message.classifications.length; ++i) + switch (message.classifications[i]) { + default: + return "classifications: 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.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { + if (!Array.isArray(message.exclusivePatches)) + return "exclusivePatches: array expected"; + for (var i = 0; i < message.exclusivePatches.length; ++i) + if (!$util.isString(message.exclusivePatches[i])) + return "exclusivePatches: string[] expected"; + } + return null; + }; - /** - * 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()); - }; + /** + * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings + */ + WindowsUpdateSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.WindowsUpdateSettings) + return object; + var message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); + if (object.classifications) { + if (!Array.isArray(object.classifications)) + throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.classifications: array expected"); + message.classifications = []; + for (var i = 0; i < object.classifications.length; ++i) + switch (object.classifications[i]) { + default: + case "CLASSIFICATION_UNSPECIFIED": + case 0: + message.classifications[i] = 0; + break; + case "CRITICAL": + case 1: + message.classifications[i] = 1; + break; + case "SECURITY": + case 2: + message.classifications[i] = 2; + break; + case "DEFINITION": + case 3: + message.classifications[i] = 3; + break; + case "DRIVER": + case 4: + message.classifications[i] = 4; + break; + case "FEATURE_PACK": + case 5: + message.classifications[i] = 5; + break; + case "SERVICE_PACK": + case 6: + message.classifications[i] = 6; + break; + case "TOOL": + case 7: + message.classifications[i] = 7; + break; + case "UPDATE_ROLLUP": + case 8: + message.classifications[i] = 8; + break; + case "UPDATE": + case 9: + message.classifications[i] = 9; + break; + } + } + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePatches) { + if (!Array.isArray(object.exclusivePatches)) + throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.exclusivePatches: array expected"); + message.exclusivePatches = []; + for (var i = 0; i < object.exclusivePatches.length; ++i) + message.exclusivePatches[i] = String(object.exclusivePatches[i]); + } + return message; + }; + + /** + * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {google.cloud.osconfig.v1.WindowsUpdateSettings} message WindowsUpdateSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdateSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.classifications = []; + object.excludes = []; + object.exclusivePatches = []; + } + if (message.classifications && message.classifications.length) { + object.classifications = []; + for (var j = 0; j < message.classifications.length; ++j) + object.classifications[j] = options.enums === String ? $root.google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[message.classifications[j]] : message.classifications[j]; + } + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePatches && message.exclusivePatches.length) { + object.exclusivePatches = []; + for (var j = 0; j < message.exclusivePatches.length; ++j) + object.exclusivePatches[j] = message.exclusivePatches[j]; + } + return object; + }; - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - return null; - }; + /** + * Converts this WindowsUpdateSettings to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdateSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - return message; - }; + /** + * Classification enum. + * @name google.cloud.osconfig.v1.WindowsUpdateSettings.Classification + * @enum {number} + * @property {number} CLASSIFICATION_UNSPECIFIED=0 CLASSIFICATION_UNSPECIFIED value + * @property {number} CRITICAL=1 CRITICAL value + * @property {number} SECURITY=2 SECURITY value + * @property {number} DEFINITION=3 DEFINITION value + * @property {number} DRIVER=4 DRIVER value + * @property {number} FEATURE_PACK=5 FEATURE_PACK value + * @property {number} SERVICE_PACK=6 SERVICE_PACK value + * @property {number} TOOL=7 TOOL value + * @property {number} UPDATE_ROLLUP=8 UPDATE_ROLLUP value + * @property {number} UPDATE=9 UPDATE value + */ + WindowsUpdateSettings.Classification = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLASSIFICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CRITICAL"] = 1; + values[valuesById[2] = "SECURITY"] = 2; + values[valuesById[3] = "DEFINITION"] = 3; + values[valuesById[4] = "DRIVER"] = 4; + values[valuesById[5] = "FEATURE_PACK"] = 5; + values[valuesById[6] = "SERVICE_PACK"] = 6; + values[valuesById[7] = "TOOL"] = 7; + values[valuesById[8] = "UPDATE_ROLLUP"] = 8; + values[valuesById[9] = "UPDATE"] = 9; + return values; + })(); - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - return object; - }; + return WindowsUpdateSettings; + })(); - /** - * 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); - }; + v1.ExecStep = (function() { - return ServiceOptions; - })(); + /** + * Properties of an ExecStep. + * @memberof google.cloud.osconfig.v1 + * @interface IExecStep + * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [linuxExecStepConfig] ExecStep linuxExecStepConfig + * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [windowsExecStepConfig] ExecStep windowsExecStepConfig + */ - protobuf.MethodOptions = (function() { + /** + * Constructs a new ExecStep. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an ExecStep. + * @implements IExecStep + * @constructor + * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set + */ + function ExecStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ + /** + * ExecStep linuxExecStepConfig. + * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} linuxExecStepConfig + * @memberof google.cloud.osconfig.v1.ExecStep + * @instance + */ + ExecStep.prototype.linuxExecStepConfig = null; - /** - * 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]]; - } + /** + * ExecStep windowsExecStepConfig. + * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} windowsExecStepConfig + * @memberof google.cloud.osconfig.v1.ExecStep + * @instance + */ + ExecStep.prototype.windowsExecStepConfig = null; - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; + /** + * Creates a new ExecStep instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep instance + */ + ExecStep.create = function create(properties) { + return new ExecStep(properties); + }; + + /** + * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linuxExecStepConfig != null && Object.hasOwnProperty.call(message, "linuxExecStepConfig")) + $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.linuxExecStepConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.windowsExecStepConfig != null && Object.hasOwnProperty.call(message, "windowsExecStepConfig")) + $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.windowsExecStepConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; + /** + * Decodes an ExecStep message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); + break; + case 2: + message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Decodes an ExecStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; + /** + * Verifies an ExecStep message. + * @function verify + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) { + var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.linuxExecStepConfig); + if (error) + return "linuxExecStepConfig." + error; + } + if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) { + var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.windowsExecStepConfig); + if (error) + return "windowsExecStepConfig." + error; + } + return null; + }; - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + /** + * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep + */ + ExecStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ExecStep) + return object; + var message = new $root.google.cloud.osconfig.v1.ExecStep(); + if (object.linuxExecStepConfig != null) { + if (typeof object.linuxExecStepConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecStep.linuxExecStepConfig: object expected"); + message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.linuxExecStepConfig); + } + if (object.windowsExecStepConfig != null) { + if (typeof object.windowsExecStepConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecStep.windowsExecStepConfig: object expected"); + message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.windowsExecStepConfig); + } + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from an ExecStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {google.cloud.osconfig.v1.ExecStep} message ExecStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.linuxExecStepConfig = null; + object.windowsExecStepConfig = null; + } + if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) + object.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.linuxExecStepConfig, options); + if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) + object.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.windowsExecStepConfig, options); + return object; + }; - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; + /** + * Converts this ExecStep to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ExecStep + * @instance + * @returns {Object.} JSON object + */ + ExecStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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(); - }; + return ExecStep; + })(); - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.ExecStepConfig = (function() { - /** - * 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()); - }; + /** + * Properties of an ExecStepConfig. + * @memberof google.cloud.osconfig.v1 + * @interface IExecStepConfig + * @property {string|null} [localPath] ExecStepConfig localPath + * @property {google.cloud.osconfig.v1.IGcsObject|null} [gcsObject] ExecStepConfig gcsObject + * @property {Array.|null} [allowedSuccessCodes] ExecStepConfig allowedSuccessCodes + * @property {google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null} [interpreter] ExecStepConfig interpreter + */ - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; + /** + * Constructs a new ExecStepConfig. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an ExecStepConfig. + * @implements IExecStepConfig + * @constructor + * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set + */ + function ExecStepConfig(properties) { + this.allowedSuccessCodes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; + /** + * ExecStepConfig localPath. + * @member {string} localPath + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + ExecStepConfig.prototype.localPath = ""; - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; + /** + * ExecStepConfig gcsObject. + * @member {google.cloud.osconfig.v1.IGcsObject|null|undefined} gcsObject + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + ExecStepConfig.prototype.gcsObject = null; + + /** + * ExecStepConfig allowedSuccessCodes. + * @member {Array.} allowedSuccessCodes + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + ExecStepConfig.prototype.allowedSuccessCodes = $util.emptyArray; + + /** + * ExecStepConfig interpreter. + * @member {google.cloud.osconfig.v1.ExecStepConfig.Interpreter} interpreter + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + ExecStepConfig.prototype.interpreter = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecStepConfig executable. + * @member {"localPath"|"gcsObject"|undefined} executable + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + Object.defineProperty(ExecStepConfig.prototype, "executable", { + get: $util.oneOfGetter($oneOfFields = ["localPath", "gcsObject"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecStepConfig instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig instance + */ + ExecStepConfig.create = function create(properties) { + return new ExecStepConfig(properties); + }; + + /** + * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecStepConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath); + if (message.gcsObject != null && Object.hasOwnProperty.call(message, "gcsObject")) + $root.google.cloud.osconfig.v1.GcsObject.encode(message.gcsObject, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowedSuccessCodes != null && message.allowedSuccessCodes.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.allowedSuccessCodes.length; ++i) + writer.int32(message.allowedSuccessCodes[i]); + writer.ldelim(); + } + if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); + return writer; + }; - /** - * 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); - }; + /** + * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecStepConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - })(); + /** + * Decodes an ExecStepConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecStepConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.localPath = reader.string(); + break; + case 2: + message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.allowedSuccessCodes && message.allowedSuccessCodes.length)) + message.allowedSuccessCodes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowedSuccessCodes.push(reader.int32()); + } else + message.allowedSuccessCodes.push(reader.int32()); + break; + case 4: + message.interpreter = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return MethodOptions; - })(); + /** + * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecStepConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - protobuf.UninterpretedOption = (function() { + /** + * Verifies an ExecStepConfig message. + * @function verify + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecStepConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.localPath != null && message.hasOwnProperty("localPath")) { + properties.executable = 1; + if (!$util.isString(message.localPath)) + return "localPath: string expected"; + } + if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { + if (properties.executable === 1) + return "executable: multiple values"; + properties.executable = 1; + { + var error = $root.google.cloud.osconfig.v1.GcsObject.verify(message.gcsObject); + if (error) + return "gcsObject." + error; + } + } + if (message.allowedSuccessCodes != null && message.hasOwnProperty("allowedSuccessCodes")) { + if (!Array.isArray(message.allowedSuccessCodes)) + return "allowedSuccessCodes: array expected"; + for (var i = 0; i < message.allowedSuccessCodes.length; ++i) + if (!$util.isInteger(message.allowedSuccessCodes[i])) + return "allowedSuccessCodes: integer[] expected"; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + switch (message.interpreter) { + default: + return "interpreter: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * 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 - */ + /** + * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig + */ + ExecStepConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ExecStepConfig) + return object; + var message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); + if (object.localPath != null) + message.localPath = String(object.localPath); + if (object.gcsObject != null) { + if (typeof object.gcsObject !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.gcsObject: object expected"); + message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.fromObject(object.gcsObject); + } + if (object.allowedSuccessCodes) { + if (!Array.isArray(object.allowedSuccessCodes)) + throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.allowedSuccessCodes: array expected"); + message.allowedSuccessCodes = []; + for (var i = 0; i < object.allowedSuccessCodes.length; ++i) + message.allowedSuccessCodes[i] = object.allowedSuccessCodes[i] | 0; + } + switch (object.interpreter) { + case "INTERPRETER_UNSPECIFIED": + case 0: + message.interpreter = 0; + break; + case "SHELL": + case 1: + message.interpreter = 1; + break; + case "POWERSHELL": + case 2: + message.interpreter = 2; + break; + } + return message; + }; - /** - * 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]]; - } + /** + * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {google.cloud.osconfig.v1.ExecStepConfig} message ExecStepConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecStepConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedSuccessCodes = []; + if (options.defaults) + object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; + if (message.localPath != null && message.hasOwnProperty("localPath")) { + object.localPath = message.localPath; + if (options.oneofs) + object.executable = "localPath"; + } + if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { + object.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.toObject(message.gcsObject, options); + if (options.oneofs) + object.executable = "gcsObject"; + } + if (message.allowedSuccessCodes && message.allowedSuccessCodes.length) { + object.allowedSuccessCodes = []; + for (var j = 0; j < message.allowedSuccessCodes.length; ++j) + object.allowedSuccessCodes[j] = message.allowedSuccessCodes[j]; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.ExecStepConfig.Interpreter[message.interpreter] : message.interpreter; + return object; + }; + + /** + * Converts this ExecStepConfig to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + * @returns {Object.} JSON object + */ + ExecStepConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; + /** + * Interpreter enum. + * @name google.cloud.osconfig.v1.ExecStepConfig.Interpreter + * @enum {number} + * @property {number} INTERPRETER_UNSPECIFIED=0 INTERPRETER_UNSPECIFIED value + * @property {number} SHELL=1 SHELL value + * @property {number} POWERSHELL=2 POWERSHELL value + */ + ExecStepConfig.Interpreter = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTERPRETER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SHELL"] = 1; + values[valuesById[2] = "POWERSHELL"] = 2; + return values; + })(); - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; + return ExecStepConfig; + })(); - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + v1.GcsObject = (function() { - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Properties of a GcsObject. + * @memberof google.cloud.osconfig.v1 + * @interface IGcsObject + * @property {string|null} [bucket] GcsObject bucket + * @property {string|null} [object] GcsObject object + * @property {number|Long|null} [generationNumber] GcsObject generationNumber + */ - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; + /** + * Constructs a new GcsObject. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GcsObject. + * @implements IGcsObject + * @constructor + * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set + */ + function GcsObject(properties) { + if (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 stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + /** + * GcsObject bucket. + * @member {string} bucket + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + */ + GcsObject.prototype.bucket = ""; - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; + /** + * GcsObject object. + * @member {string} object + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + */ + GcsObject.prototype.object = ""; - /** - * 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); - }; + /** + * GcsObject generationNumber. + * @member {number|Long} generationNumber + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + */ + GcsObject.prototype.generationNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * 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; - }; + /** + * Creates a new GcsObject instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject instance + */ + GcsObject.create = function create(properties) { + return new GcsObject(properties); + }; - /** - * 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(); - }; + /** + * Encodes the specified GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsObject.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.object != null && Object.hasOwnProperty.call(message, "object")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); + if (message.generationNumber != null && Object.hasOwnProperty.call(message, "generationNumber")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generationNumber); + return writer; + }; - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsObject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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()); - }; + /** + * Decodes a GcsObject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsObject.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GcsObject(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bucket = reader.string(); + break; + case 2: + message.object = reader.string(); + break; + case 3: + message.generationNumber = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a GcsObject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsObject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; + /** + * Verifies a GcsObject message. + * @function verify + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsObject.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.object != null && message.hasOwnProperty("object")) + if (!$util.isString(message.object)) + return "object: string expected"; + if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) + if (!$util.isInteger(message.generationNumber) && !(message.generationNumber && $util.isInteger(message.generationNumber.low) && $util.isInteger(message.generationNumber.high))) + return "generationNumber: integer|Long expected"; + return null; + }; - /** - * 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; - }; + /** + * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject + */ + GcsObject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GcsObject) + return object; + var message = new $root.google.cloud.osconfig.v1.GcsObject(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.object != null) + message.object = String(object.object); + if (object.generationNumber != null) + if ($util.Long) + (message.generationNumber = $util.Long.fromValue(object.generationNumber)).unsigned = false; + else if (typeof object.generationNumber === "string") + message.generationNumber = parseInt(object.generationNumber, 10); + else if (typeof object.generationNumber === "number") + message.generationNumber = object.generationNumber; + else if (typeof object.generationNumber === "object") + message.generationNumber = new $util.LongBits(object.generationNumber.low >>> 0, object.generationNumber.high >>> 0).toNumber(); + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from a GcsObject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {google.cloud.osconfig.v1.GcsObject} message GcsObject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsObject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.object = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.generationNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.generationNumber = options.longs === String ? "0" : 0; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.object != null && message.hasOwnProperty("object")) + object.object = message.object; + if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) + if (typeof message.generationNumber === "number") + object.generationNumber = options.longs === String ? String(message.generationNumber) : message.generationNumber; + else + object.generationNumber = options.longs === String ? $util.Long.prototype.toString.call(message.generationNumber) : options.longs === Number ? new $util.LongBits(message.generationNumber.low >>> 0, message.generationNumber.high >>> 0).toNumber() : message.generationNumber; + return object; + }; - UninterpretedOption.NamePart = (function() { + /** + * Converts this GcsObject to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + * @returns {Object.} JSON object + */ + GcsObject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ + return GcsObject; + })(); - /** - * 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]]; - } + v1.PatchInstanceFilter = (function() { - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; + /** + * Properties of a PatchInstanceFilter. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchInstanceFilter + * @property {boolean|null} [all] PatchInstanceFilter all + * @property {Array.|null} [groupLabels] PatchInstanceFilter groupLabels + * @property {Array.|null} [zones] PatchInstanceFilter zones + * @property {Array.|null} [instances] PatchInstanceFilter instances + * @property {Array.|null} [instanceNamePrefixes] PatchInstanceFilter instanceNamePrefixes + */ - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; + /** + * Constructs a new PatchInstanceFilter. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchInstanceFilter. + * @implements IPatchInstanceFilter + * @constructor + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set + */ + function PatchInstanceFilter(properties) { + this.groupLabels = []; + this.zones = []; + this.instances = []; + this.instanceNamePrefixes = []; + if (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 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); - }; + /** + * PatchInstanceFilter all. + * @member {boolean} all + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.all = false; - /** - * 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; - }; + /** + * PatchInstanceFilter groupLabels. + * @member {Array.} groupLabels + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.groupLabels = $util.emptyArray; - /** - * 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(); - }; + /** + * PatchInstanceFilter zones. + * @member {Array.} zones + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.zones = $util.emptyArray; - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; + /** + * PatchInstanceFilter instances. + * @member {Array.} instances + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.instances = $util.emptyArray; - /** - * 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()); - }; + /** + * PatchInstanceFilter instanceNamePrefixes. + * @member {Array.} instanceNamePrefixes + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.instanceNamePrefixes = $util.emptyArray; - /** - * 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 new PatchInstanceFilter instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter instance + */ + PatchInstanceFilter.create = function create(properties) { + return new PatchInstanceFilter(properties); + }; - /** - * 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; - }; + /** + * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchInstanceFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.all != null && Object.hasOwnProperty.call(message, "all")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all); + if (message.groupLabels != null && message.groupLabels.length) + for (var i = 0; i < message.groupLabels.length; ++i) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.encode(message.groupLabels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zones != null && message.zones.length) + for (var i = 0; i < message.zones.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.zones[i]); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instances[i]); + if (message.instanceNamePrefixes != null && message.instanceNamePrefixes.length) + for (var i = 0; i < message.instanceNamePrefixes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.instanceNamePrefixes[i]); + return writer; + }; - /** - * 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; - }; + /** + * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchInstanceFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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); - }; + /** + * Decodes a PatchInstanceFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchInstanceFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.all = reader.bool(); + break; + case 2: + if (!(message.groupLabels && message.groupLabels.length)) + message.groupLabels = []; + message.groupLabels.push($root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push(reader.string()); + break; + case 4: + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push(reader.string()); + break; + case 5: + if (!(message.instanceNamePrefixes && message.instanceNamePrefixes.length)) + message.instanceNamePrefixes = []; + message.instanceNamePrefixes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return NamePart; - })(); + /** + * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchInstanceFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return UninterpretedOption; - })(); + /** + * Verifies a PatchInstanceFilter message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchInstanceFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.all != null && message.hasOwnProperty("all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; + if (message.groupLabels != null && message.hasOwnProperty("groupLabels")) { + if (!Array.isArray(message.groupLabels)) + return "groupLabels: array expected"; + for (var i = 0; i < message.groupLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify(message.groupLabels[i]); + if (error) + return "groupLabels." + error; + } + } + if (message.zones != null && message.hasOwnProperty("zones")) { + if (!Array.isArray(message.zones)) + return "zones: array expected"; + for (var i = 0; i < message.zones.length; ++i) + if (!$util.isString(message.zones[i])) + return "zones: string[] expected"; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) + if (!$util.isString(message.instances[i])) + return "instances: string[] expected"; + } + if (message.instanceNamePrefixes != null && message.hasOwnProperty("instanceNamePrefixes")) { + if (!Array.isArray(message.instanceNamePrefixes)) + return "instanceNamePrefixes: array expected"; + for (var i = 0; i < message.instanceNamePrefixes.length; ++i) + if (!$util.isString(message.instanceNamePrefixes[i])) + return "instanceNamePrefixes: string[] expected"; + } + return null; + }; + + /** + * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter + */ + PatchInstanceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); + if (object.all != null) + message.all = Boolean(object.all); + if (object.groupLabels) { + if (!Array.isArray(object.groupLabels)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: array expected"); + message.groupLabels = []; + for (var i = 0; i < object.groupLabels.length; ++i) { + if (typeof object.groupLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: object expected"); + message.groupLabels[i] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.fromObject(object.groupLabels[i]); + } + } + if (object.zones) { + if (!Array.isArray(object.zones)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.zones: array expected"); + message.zones = []; + for (var i = 0; i < object.zones.length; ++i) + message.zones[i] = String(object.zones[i]); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) + message.instances[i] = String(object.instances[i]); + } + if (object.instanceNamePrefixes) { + if (!Array.isArray(object.instanceNamePrefixes)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instanceNamePrefixes: array expected"); + message.instanceNamePrefixes = []; + for (var i = 0; i < object.instanceNamePrefixes.length; ++i) + message.instanceNamePrefixes[i] = String(object.instanceNamePrefixes[i]); + } + return message; + }; - protobuf.SourceCodeInfo = (function() { + /** + * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter} message PatchInstanceFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchInstanceFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.groupLabels = []; + object.zones = []; + object.instances = []; + object.instanceNamePrefixes = []; + } + if (options.defaults) + object.all = false; + if (message.all != null && message.hasOwnProperty("all")) + object.all = message.all; + if (message.groupLabels && message.groupLabels.length) { + object.groupLabels = []; + for (var j = 0; j < message.groupLabels.length; ++j) + object.groupLabels[j] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.toObject(message.groupLabels[j], options); + } + if (message.zones && message.zones.length) { + object.zones = []; + for (var j = 0; j < message.zones.length; ++j) + object.zones[j] = message.zones[j]; + } + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = message.instances[j]; + } + if (message.instanceNamePrefixes && message.instanceNamePrefixes.length) { + object.instanceNamePrefixes = []; + for (var j = 0; j < message.instanceNamePrefixes.length; ++j) + object.instanceNamePrefixes[j] = message.instanceNamePrefixes[j]; + } + return object; + }; - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ + /** + * Converts this PatchInstanceFilter to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + * @returns {Object.} JSON object + */ + PatchInstanceFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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]]; - } + PatchInstanceFilter.GroupLabel = (function() { - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; + /** + * Properties of a GroupLabel. + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @interface IGroupLabel + * @property {Object.|null} [labels] GroupLabel labels + */ - /** - * 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); - }; + /** + * Constructs a new GroupLabel. + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @classdesc Represents a GroupLabel. + * @implements IGroupLabel + * @constructor + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set + */ + function GroupLabel(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified 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; - }; + /** + * GroupLabel labels. + * @member {Object.} labels + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @instance + */ + GroupLabel.prototype.labels = $util.emptyObject; - /** - * 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(); - }; + /** + * Creates a new GroupLabel instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel instance + */ + GroupLabel.create = function create(properties) { + return new GroupLabel(properties); + }; - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupLabel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; - /** - * 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()); - }; + /** + * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupLabel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a GroupLabel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupLabel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupLabel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a GroupLabel message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupLabel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; - /** - * 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); - }; + /** + * Creates a GroupLabel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + */ + GroupLabel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; - SourceCodeInfo.Location = (function() { + /** + * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} message GroupLabel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupLabel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; - /** - * 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 - */ + /** + * Converts this GroupLabel to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @instance + * @returns {Object.} JSON object + */ + GroupLabel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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]]; - } + return GroupLabel; + })(); + + return PatchInstanceFilter; + })(); - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; + v1.PatchRollout = (function() { - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; + /** + * Properties of a PatchRollout. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchRollout + * @property {google.cloud.osconfig.v1.PatchRollout.Mode|null} [mode] PatchRollout mode + * @property {google.cloud.osconfig.v1.IFixedOrPercent|null} [disruptionBudget] PatchRollout disruptionBudget + */ - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; + /** + * Constructs a new PatchRollout. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchRollout. + * @implements IPatchRollout + * @constructor + * @param {google.cloud.osconfig.v1.IPatchRollout=} [properties] Properties to set + */ + function PatchRollout(properties) { + if (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 trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; + /** + * PatchRollout mode. + * @member {google.cloud.osconfig.v1.PatchRollout.Mode} mode + * @memberof google.cloud.osconfig.v1.PatchRollout + * @instance + */ + PatchRollout.prototype.mode = 0; - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + /** + * PatchRollout disruptionBudget. + * @member {google.cloud.osconfig.v1.IFixedOrPercent|null|undefined} disruptionBudget + * @memberof google.cloud.osconfig.v1.PatchRollout + * @instance + */ + PatchRollout.prototype.disruptionBudget = null; - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; + /** + * Creates a new PatchRollout instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchRollout + * @static + * @param {google.cloud.osconfig.v1.IPatchRollout=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout instance + */ + PatchRollout.create = function create(properties) { + return new PatchRollout(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 PatchRollout message. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchRollout + * @static + * @param {google.cloud.osconfig.v1.IPatchRollout} message PatchRollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchRollout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.disruptionBudget != null && Object.hasOwnProperty.call(message, "disruptionBudget")) + $root.google.cloud.osconfig.v1.FixedOrPercent.encode(message.disruptionBudget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified PatchRollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchRollout + * @static + * @param {google.cloud.osconfig.v1.IPatchRollout} message PatchRollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchRollout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a PatchRollout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchRollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchRollout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchRollout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + case 2: + message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a PatchRollout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchRollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchRollout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PatchRollout message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchRollout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchRollout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) { + var error = $root.google.cloud.osconfig.v1.FixedOrPercent.verify(message.disruptionBudget); + if (error) + return "disruptionBudget." + error; + } + return null; + }; - /** - * 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 PatchRollout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchRollout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout + */ + PatchRollout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchRollout) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchRollout(); + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "ZONE_BY_ZONE": + case 1: + message.mode = 1; + break; + case "CONCURRENT_ZONES": + case 2: + message.mode = 2; + break; + } + if (object.disruptionBudget != null) { + if (typeof object.disruptionBudget !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchRollout.disruptionBudget: object expected"); + message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.fromObject(object.disruptionBudget); + } + return message; + }; - /** - * 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) + /** + * Creates a plain object from a PatchRollout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchRollout + * @static + * @param {google.cloud.osconfig.v1.PatchRollout} message PatchRollout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchRollout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.disruptionBudget = null; + } + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.osconfig.v1.PatchRollout.Mode[message.mode] : message.mode; + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) + object.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.toObject(message.disruptionBudget, options); 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 PatchRollout to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchRollout + * @instance + * @returns {Object.} JSON object + */ + PatchRollout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - }; + /** + * Mode enum. + * @name google.cloud.osconfig.v1.PatchRollout.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} ZONE_BY_ZONE=1 ZONE_BY_ZONE value + * @property {number} CONCURRENT_ZONES=2 CONCURRENT_ZONES value + */ + PatchRollout.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ZONE_BY_ZONE"] = 1; + values[valuesById[2] = "CONCURRENT_ZONES"] = 2; + return values; + })(); - return Location; + return PatchRollout; + })(); + + return v1; })(); - return SourceCodeInfo; + return osconfig; })(); - protobuf.GeneratedCodeInfo = (function() { + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19845,78 +22874,91 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + Http.prototype.rules = $util.emptyArray; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * 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.protobuf.GeneratedCodeInfo + * @memberof google.api.Http * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Http * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.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 GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Http * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + 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); @@ -19927,404 +22969,597 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a Http message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (message.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 "annotation." + error; + return "rules." + error; } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.api.Http} Http */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + var message = new $root.google.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 GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - 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; + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object + * 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 */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + 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; }; - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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 an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + 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()); - }; + /** + * 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 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"; + /** + * 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.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + } + return null; + }; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + /** + * 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; + }; - /** - * 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); - }; + /** + * 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; + }; - return Annotation; - })(); + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GeneratedCodeInfo; + return HttpRule; })(); - protobuf.Duration = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function Duration(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20332,88 +23567,88 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CustomHttpPattern.prototype.kind = ""; /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - Duration.prototype.nanos = 0; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new Duration instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - Duration.create = function create(properties) { - return new Duration(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.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 Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @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.protobuf.Duration} Duration + * @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 */ - Duration.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); + message.kind = reader.string(); break; case 2: - message.nanos = reader.int32(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -20424,131 +23659,122 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @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 */ - Duration.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.protobuf.Duration + * @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 */ - Duration.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.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 Duration message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.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 Duration message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + object.kind = ""; + object.path = ""; } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this Duration to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; + return CustomHttpPattern; })(); - protobuf.Timestamp = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular */ /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function Timestamp(properties) { + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20556,88 +23782,143 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ResourceDescriptor.prototype.type = ""; /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - Timestamp.prototype.nanos = 0; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new Timestamp instance using the specified properties. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @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.protobuf.Timestamp} Timestamp + * @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 */ - Timestamp.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); + message.type = reader.string(); break; case 2: - message.nanos = reader.int32(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); break; default: reader.skipType(tag & 7); @@ -20648,129 +23929,196 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @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 */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.protobuf.Timestamp + * @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 */ - Timestamp.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) 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; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.pattern = []; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; return object; }; /** - * Converts this Timestamp to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Timestamp; + /** + * 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; + })(); + + return ResourceDescriptor; })(); - protobuf.Empty = (function() { + api.ResourceReference = (function() { /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function Empty(properties) { + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20778,63 +24126,89 @@ } /** - * Creates a new Empty instance using the specified properties. + * 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.protobuf.Empty + * @memberof google.api.ResourceReference * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - Empty.create = function create(properties) { - return new Empty(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.api.ResourceReference * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, 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 Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.api.ResourceReference * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @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.protobuf.Empty} Empty + * @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 */ - Empty.decode = function decode(reader, length) { + ResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -20844,77 +24218,121 @@ }; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @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 */ - Empty.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.protobuf.Empty + * @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 */ - Empty.verify = function verify(message) { + 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 an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.api.ResourceReference} ResourceReference */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - return new $root.google.protobuf.Empty(); + 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 an Empty message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.api.ResourceReference * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + 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 Empty to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Empty; + return ResourceReference; })(); - return protobuf; + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + return api; })(); google.type = (function() { diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 8549feeca0d..01476bae876 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -2,1547 +2,323 @@ "nested": { "google": { "nested": { - "cloud": { + "protobuf": { + "options": { + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, "nested": { - "osconfig": { - "nested": { - "v1": { + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, "options": { - "csharp_namespace": "Google.Cloud.OsConfig.V1", - "go_package": "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig", - "java_outer_classname": "PatchJobs", - "java_package": "com.google.cloud.osconfig.v1", - "php_namespace": "Google\\Cloud\\OsConfig\\V1", - "ruby_package": "Google::Cloud::OsConfig::V1", - "(google.api.resource_definition).type": "compute.googleapis.com/Instance", - "(google.api.resource_definition).pattern": "projects/{project}/zones/{zone}/instances/{instance}" - }, - "nested": { - "OsConfigService": { - "options": { - "(google.api.default_host)": "osconfig.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ExecutePatchJob": { - "requestType": "ExecutePatchJobRequest", - "responseType": "PatchJob", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*}/patchJobs:execute", - "(google.api.http).body": "*" - } - }, - "GetPatchJob": { - "requestType": "GetPatchJobRequest", - "responseType": "PatchJob", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/patchJobs/*}", - "(google.api.method_signature)": "name" - } - }, - "CancelPatchJob": { - "requestType": "CancelPatchJobRequest", - "responseType": "PatchJob", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/patchJobs/*}:cancel", - "(google.api.http).body": "*" - } - }, - "ListPatchJobs": { - "requestType": "ListPatchJobsRequest", - "responseType": "ListPatchJobsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*}/patchJobs", - "(google.api.method_signature)": "parent" - } - }, - "ListPatchJobInstanceDetails": { - "requestType": "ListPatchJobInstanceDetailsRequest", - "responseType": "ListPatchJobInstanceDetailsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/patchJobs/*}/instanceDetails", - "(google.api.method_signature)": "parent" - } - }, - "CreatePatchDeployment": { - "requestType": "CreatePatchDeploymentRequest", - "responseType": "PatchDeployment", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*}/patchDeployments", - "(google.api.http).body": "patch_deployment", - "(google.api.method_signature)": "parent,patch_deployment,patch_deployment_id" - } - }, - "GetPatchDeployment": { - "requestType": "GetPatchDeploymentRequest", - "responseType": "PatchDeployment", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/patchDeployments/*}", - "(google.api.method_signature)": "name" - } - }, - "ListPatchDeployments": { - "requestType": "ListPatchDeploymentsRequest", - "responseType": "ListPatchDeploymentsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*}/patchDeployments", - "(google.api.method_signature)": "parent" - } - }, - "DeletePatchDeployment": { - "requestType": "DeletePatchDeploymentRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/patchDeployments/*}", - "(google.api.method_signature)": "name" - } - } - } + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "PatchDeployment": { - "options": { - "(google.api.resource).type": "osconfig.googleapis.com/PatchDeployment", - "(google.api.resource).pattern": "projects/{project}/patchDeployments/{patch_deployment}" - }, - "oneofs": { - "schedule": { - "oneof": [ - "oneTimeSchedule", - "recurringSchedule" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "instanceFilter": { - "type": "PatchInstanceFilter", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "patchConfig": { - "type": "PatchConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "duration": { - "type": "google.protobuf.Duration", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "oneTimeSchedule": { - "type": "OneTimeSchedule", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "recurringSchedule": { - "type": "RecurringSchedule", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastExecuteTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "OneTimeSchedule": { - "fields": { - "executeTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "RecurringSchedule": { - "oneofs": { - "scheduleConfig": { - "oneof": [ - "weekly", - "monthly" - ] - } - }, - "fields": { - "timeZone": { - "type": "google.type.TimeZone", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "timeOfDay": { - "type": "google.type.TimeOfDay", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "frequency": { - "type": "Frequency", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "weekly": { - "type": "WeeklySchedule", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "monthly": { - "type": "MonthlySchedule", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "lastExecuteTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "nextExecuteTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Frequency": { - "values": { - "FREQUENCY_UNSPECIFIED": 0, - "WEEKLY": 1, - "MONTHLY": 2 - } - } - } - }, - "WeeklySchedule": { - "fields": { - "dayOfWeek": { - "type": "google.type.DayOfWeek", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "MonthlySchedule": { - "oneofs": { - "dayOfMonth": { - "oneof": [ - "weekDayOfMonth", - "monthDay" - ] - } - }, - "fields": { - "weekDayOfMonth": { - "type": "WeekDayOfMonth", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "monthDay": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } + "end": { + "type": "int32", + "id": 2 }, - "WeekDayOfMonth": { - "fields": { - "weekOrdinal": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dayOfWeek": { - "type": "google.type.DayOfWeek", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "CreatePatchDeploymentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "patchDeploymentId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "patchDeployment": { - "type": "PatchDeployment", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetPatchDeploymentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" - } - } - } - }, - "ListPatchDeploymentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListPatchDeploymentsResponse": { - "fields": { - "patchDeployments": { - "rule": "repeated", - "type": "PatchDeployment", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "DeletePatchDeploymentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" - } - } - } - }, - "ExecutePatchJobRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "description": { - "type": "string", - "id": 2 - }, - "instanceFilter": { - "type": "PatchInstanceFilter", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "patchConfig": { - "type": "PatchConfig", - "id": 4 - }, - "duration": { - "type": "google.protobuf.Duration", - "id": 5 - }, - "dryRun": { - "type": "bool", - "id": 6 - }, - "displayName": { - "type": "string", - "id": 8 - } - } - }, - "GetPatchJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" - } - } - } - }, - "ListPatchJobInstanceDetailsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - } - } - }, - "ListPatchJobInstanceDetailsResponse": { - "fields": { - "patchJobInstanceDetails": { - "rule": "repeated", - "type": "PatchJobInstanceDetails", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "PatchJobInstanceDetails": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "compute.googleapis.com/Instance" - } - }, - "instanceSystemId": { - "type": "string", - "id": 2 - }, - "state": { - "type": "Instance.PatchState", - "id": 3 - }, - "failureReason": { - "type": "string", - "id": 4 - }, - "attemptCount": { - "type": "int64", - "id": 5 - } - } - }, - "ListPatchJobsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - } - } - }, - "ListPatchJobsResponse": { - "fields": { - "patchJobs": { - "rule": "repeated", - "type": "PatchJob", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "PatchJob": { - "options": { - "(google.api.resource).type": "osconfig.googleapis.com/PatchJob", - "(google.api.resource).pattern": "projects/{project}/patchJobs/{patch_job}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 14 - }, - "description": { - "type": "string", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "state": { - "type": "State", - "id": 5 - }, - "instanceFilter": { - "type": "PatchInstanceFilter", - "id": 13 - }, - "patchConfig": { - "type": "PatchConfig", - "id": 7 - }, - "duration": { - "type": "google.protobuf.Duration", - "id": 8 - }, - "instanceDetailsSummary": { - "type": "InstanceDetailsSummary", - "id": 9 - }, - "dryRun": { - "type": "bool", - "id": 10 - }, - "errorMessage": { - "type": "string", - "id": 11 - }, - "percentComplete": { - "type": "double", - "id": 12 - }, - "patchDeployment": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" - } - } - }, - "nested": { - "InstanceDetailsSummary": { - "fields": { - "pendingInstanceCount": { - "type": "int64", - "id": 1 - }, - "inactiveInstanceCount": { - "type": "int64", - "id": 2 - }, - "notifiedInstanceCount": { - "type": "int64", - "id": 3 - }, - "startedInstanceCount": { - "type": "int64", - "id": 4 - }, - "downloadingPatchesInstanceCount": { - "type": "int64", - "id": 5 - }, - "applyingPatchesInstanceCount": { - "type": "int64", - "id": 6 - }, - "rebootingInstanceCount": { - "type": "int64", - "id": 7 - }, - "succeededInstanceCount": { - "type": "int64", - "id": 8 - }, - "succeededRebootRequiredInstanceCount": { - "type": "int64", - "id": 9 - }, - "failedInstanceCount": { - "type": "int64", - "id": 10 - }, - "ackedInstanceCount": { - "type": "int64", - "id": 11 - }, - "timedOutInstanceCount": { - "type": "int64", - "id": 12 - }, - "prePatchStepInstanceCount": { - "type": "int64", - "id": 13 - }, - "postPatchStepInstanceCount": { - "type": "int64", - "id": 14 - }, - "noAgentDetectedInstanceCount": { - "type": "int64", - "id": 15 - } - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "STARTED": 1, - "INSTANCE_LOOKUP": 2, - "PATCHING": 3, - "SUCCEEDED": 4, - "COMPLETED_WITH_ERRORS": 5, - "CANCELED": 6, - "TIMED_OUT": 7 - } - } - } - }, - "PatchConfig": { - "fields": { - "rebootConfig": { - "type": "RebootConfig", - "id": 1 - }, - "apt": { - "type": "AptSettings", - "id": 3 - }, - "yum": { - "type": "YumSettings", - "id": 4 - }, - "goo": { - "type": "GooSettings", - "id": 5 - }, - "zypper": { - "type": "ZypperSettings", - "id": 6 - }, - "windowsUpdate": { - "type": "WindowsUpdateSettings", - "id": 7 - }, - "preStep": { - "type": "ExecStep", - "id": 8 - }, - "postStep": { - "type": "ExecStep", - "id": 9 - } - }, - "nested": { - "RebootConfig": { - "values": { - "REBOOT_CONFIG_UNSPECIFIED": 0, - "DEFAULT": 1, - "ALWAYS": 2, - "NEVER": 3 - } - } - } - }, - "Instance": { - "fields": {}, - "nested": { - "PatchState": { - "values": { - "PATCH_STATE_UNSPECIFIED": 0, - "PENDING": 1, - "INACTIVE": 2, - "NOTIFIED": 3, - "STARTED": 4, - "DOWNLOADING_PATCHES": 5, - "APPLYING_PATCHES": 6, - "REBOOTING": 7, - "SUCCEEDED": 8, - "SUCCEEDED_REBOOT_REQUIRED": 9, - "FAILED": 10, - "ACKED": 11, - "TIMED_OUT": 12, - "RUNNING_PRE_PATCH_STEP": 13, - "RUNNING_POST_PATCH_STEP": 14, - "NO_AGENT_DETECTED": 15 - } - } - } - }, - "CancelPatchJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" - } - } - } - }, - "AptSettings": { - "fields": { - "type": { - "type": "Type", - "id": 1 - }, - "excludes": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "exclusivePackages": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "DIST": 1, - "UPGRADE": 2 - } - } - } - }, - "YumSettings": { - "fields": { - "security": { - "type": "bool", - "id": 1 - }, - "minimal": { - "type": "bool", - "id": 2 - }, - "excludes": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "exclusivePackages": { - "rule": "repeated", - "type": "string", - "id": 4 - } - } - }, - "GooSettings": { - "fields": {} - }, - "ZypperSettings": { - "fields": { - "withOptional": { - "type": "bool", - "id": 1 - }, - "withUpdate": { - "type": "bool", - "id": 2 - }, - "categories": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "severities": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "excludes": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "exclusivePatches": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "WindowsUpdateSettings": { - "fields": { - "classifications": { - "rule": "repeated", - "type": "Classification", - "id": 1 - }, - "excludes": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "exclusivePatches": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Classification": { - "values": { - "CLASSIFICATION_UNSPECIFIED": 0, - "CRITICAL": 1, - "SECURITY": 2, - "DEFINITION": 3, - "DRIVER": 4, - "FEATURE_PACK": 5, - "SERVICE_PACK": 6, - "TOOL": 7, - "UPDATE_ROLLUP": 8, - "UPDATE": 9 - } - } - } - }, - "ExecStep": { - "fields": { - "linuxExecStepConfig": { - "type": "ExecStepConfig", - "id": 1 - }, - "windowsExecStepConfig": { - "type": "ExecStepConfig", - "id": 2 - } - } - }, - "ExecStepConfig": { - "oneofs": { - "executable": { - "oneof": [ - "localPath", - "gcsObject" - ] - } - }, - "fields": { - "localPath": { - "type": "string", - "id": 1 - }, - "gcsObject": { - "type": "GcsObject", - "id": 2 - }, - "allowedSuccessCodes": { - "rule": "repeated", - "type": "int32", - "id": 3 - }, - "interpreter": { - "type": "Interpreter", - "id": 4 - } - }, - "nested": { - "Interpreter": { - "values": { - "INTERPRETER_UNSPECIFIED": 0, - "SHELL": 1, - "POWERSHELL": 2 - } - } - } - }, - "GcsObject": { - "fields": { - "bucket": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "object": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "generationNumber": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "PatchInstanceFilter": { - "fields": { - "all": { - "type": "bool", - "id": 1 - }, - "groupLabels": { - "rule": "repeated", - "type": "GroupLabel", - "id": 2 - }, - "zones": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "instances": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "instanceNamePrefixes": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "GroupLabel": { - "fields": { - "labels": { - "keyType": "string", - "type": "string", - "id": 1 - } - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "FieldBehaviorProto", - "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" - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5 - } - } - } - }, - "protobuf": { - "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, "end": { "type": "int32", @@ -1831,23 +607,165 @@ }, "lazy": { "type": "bool", - "id": 5, + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, "options": { "default": false } }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { "deprecated": { "type": "bool", - "id": 3, + "id": 33, "options": { "default": false } }, - "weak": { - "type": "bool", - "id": 10, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, "options": { - "default": false + "default": "IDEMPOTENCY_UNKNOWN" } }, "uninterpretedOption": { @@ -1862,303 +780,1711 @@ 536870911 ] ], - "reserved": [ - [ - 4, - 4 - ] - ], "nested": { - "CType": { + "IdempotencyLevel": { "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + }, + "cloud": { + "nested": { + "osconfig": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.OsConfig.V1", + "go_package": "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig", + "java_multiple_files": true, + "java_outer_classname": "PatchJobs", + "java_package": "com.google.cloud.osconfig.v1", + "php_namespace": "Google\\Cloud\\OsConfig\\V1", + "ruby_package": "Google::Cloud::OsConfig::V1", + "(google.api.resource_definition).type": "compute.googleapis.com/Instance", + "(google.api.resource_definition).pattern": "projects/{project}/zones/{zone}/instances/{instance}" + }, + "nested": { + "Inventory": { + "fields": { + "osInfo": { + "type": "OsInfo", + "id": 1 + }, + "items": { + "keyType": "string", + "type": "Item", + "id": 2 + } + }, + "nested": { + "OsInfo": { + "fields": { + "hostname": { + "type": "string", + "id": 9 + }, + "longName": { + "type": "string", + "id": 2 + }, + "shortName": { + "type": "string", + "id": 3 + }, + "version": { + "type": "string", + "id": 4 + }, + "architecture": { + "type": "string", + "id": 5 + }, + "kernelVersion": { + "type": "string", + "id": 6 + }, + "kernelRelease": { + "type": "string", + "id": 7 + }, + "osconfigAgentVersion": { + "type": "string", + "id": 8 + } + } + }, + "Item": { + "oneofs": { + "details": { + "oneof": [ + "installedPackage", + "availablePackage" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "originType": { + "type": "OriginType", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "type": { + "type": "Type", + "id": 5 + }, + "installedPackage": { + "type": "SoftwarePackage", + "id": 6 + }, + "availablePackage": { + "type": "SoftwarePackage", + "id": 7 + } + }, + "nested": { + "OriginType": { + "values": { + "ORIGIN_TYPE_UNSPECIFIED": 0, + "INVENTORY_REPORT": 1 + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "INSTALLED_PACKAGE": 1, + "AVAILABLE_PACKAGE": 2 + } + } + } + }, + "SoftwarePackage": { + "oneofs": { + "details": { + "oneof": [ + "yumPackage", + "aptPackage", + "zypperPackage", + "googetPackage", + "zypperPatch", + "wuaPackage", + "qfePackage", + "cosPackage" + ] + } + }, + "fields": { + "yumPackage": { + "type": "VersionedPackage", + "id": 1 + }, + "aptPackage": { + "type": "VersionedPackage", + "id": 2 + }, + "zypperPackage": { + "type": "VersionedPackage", + "id": 3 + }, + "googetPackage": { + "type": "VersionedPackage", + "id": 4 + }, + "zypperPatch": { + "type": "ZypperPatch", + "id": 5 + }, + "wuaPackage": { + "type": "WindowsUpdatePackage", + "id": 6 + }, + "qfePackage": { + "type": "WindowsQuickFixEngineeringPackage", + "id": 7 + }, + "cosPackage": { + "type": "VersionedPackage", + "id": 8 + } + } + }, + "VersionedPackage": { + "fields": { + "packageName": { + "type": "string", + "id": 4 + }, + "architecture": { + "type": "string", + "id": 2 + }, + "version": { + "type": "string", + "id": 3 + } + } + }, + "WindowsUpdatePackage": { + "fields": { + "title": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "categories": { + "rule": "repeated", + "type": "WindowsUpdateCategory", + "id": 3 + }, + "kbArticleIds": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "supportUrl": { + "type": "string", + "id": 11 + }, + "moreInfoUrls": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "updateId": { + "type": "string", + "id": 6 + }, + "revisionNumber": { + "type": "int32", + "id": 7 + }, + "lastDeploymentChangeTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + } + }, + "nested": { + "WindowsUpdateCategory": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + } + } + } + } + }, + "ZypperPatch": { + "fields": { + "patchName": { + "type": "string", + "id": 5 + }, + "category": { + "type": "string", + "id": 2 + }, + "severity": { + "type": "string", + "id": 3 + }, + "summary": { + "type": "string", + "id": 4 + } + } + }, + "WindowsQuickFixEngineeringPackage": { + "fields": { + "caption": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "hotFixId": { + "type": "string", + "id": 3 + }, + "installTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + } + } + } + }, + "FixedOrPercent": { + "oneofs": { + "mode": { + "oneof": [ + "fixed", + "percent" + ] + } + }, + "fields": { + "fixed": { + "type": "int32", + "id": 1 + }, + "percent": { + "type": "int32", + "id": 2 + } + } + }, + "OsConfigService": { + "options": { + "(google.api.default_host)": "osconfig.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ExecutePatchJob": { + "requestType": "ExecutePatchJobRequest", + "responseType": "PatchJob", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/patchJobs:execute", + "(google.api.http).body": "*" + } + }, + "GetPatchJob": { + "requestType": "GetPatchJobRequest", + "responseType": "PatchJob", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/patchJobs/*}", + "(google.api.method_signature)": "name" + } + }, + "CancelPatchJob": { + "requestType": "CancelPatchJobRequest", + "responseType": "PatchJob", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/patchJobs/*}:cancel", + "(google.api.http).body": "*" + } + }, + "ListPatchJobs": { + "requestType": "ListPatchJobsRequest", + "responseType": "ListPatchJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/patchJobs", + "(google.api.method_signature)": "parent" + } + }, + "ListPatchJobInstanceDetails": { + "requestType": "ListPatchJobInstanceDetailsRequest", + "responseType": "ListPatchJobInstanceDetailsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/patchJobs/*}/instanceDetails", + "(google.api.method_signature)": "parent" + } + }, + "CreatePatchDeployment": { + "requestType": "CreatePatchDeploymentRequest", + "responseType": "PatchDeployment", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/patchDeployments", + "(google.api.http).body": "patch_deployment", + "(google.api.method_signature)": "parent,patch_deployment,patch_deployment_id" + } + }, + "GetPatchDeployment": { + "requestType": "GetPatchDeploymentRequest", + "responseType": "PatchDeployment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/patchDeployments/*}", + "(google.api.method_signature)": "name" + } + }, + "ListPatchDeployments": { + "requestType": "ListPatchDeploymentsRequest", + "responseType": "ListPatchDeploymentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/patchDeployments", + "(google.api.method_signature)": "parent" + } + }, + "DeletePatchDeployment": { + "requestType": "DeletePatchDeploymentRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/patchDeployments/*}", + "(google.api.method_signature)": "name" + } + } + } + }, + "PatchDeployment": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/PatchDeployment", + "(google.api.resource).pattern": "projects/{project}/patchDeployments/{patch_deployment}" + }, + "oneofs": { + "schedule": { + "oneof": [ + "oneTimeSchedule", + "recurringSchedule" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "instanceFilter": { + "type": "PatchInstanceFilter", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "patchConfig": { + "type": "PatchConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oneTimeSchedule": { + "type": "OneTimeSchedule", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "recurringSchedule": { + "type": "RecurringSchedule", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastExecuteTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rollout": { + "type": "PatchRollout", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OneTimeSchedule": { + "fields": { + "executeTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RecurringSchedule": { + "oneofs": { + "scheduleConfig": { + "oneof": [ + "weekly", + "monthly" + ] + } + }, + "fields": { + "timeZone": { + "type": "google.type.TimeZone", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "timeOfDay": { + "type": "google.type.TimeOfDay", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "frequency": { + "type": "Frequency", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "weekly": { + "type": "WeeklySchedule", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "monthly": { + "type": "MonthlySchedule", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lastExecuteTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nextExecuteTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Frequency": { + "values": { + "FREQUENCY_UNSPECIFIED": 0, + "WEEKLY": 1, + "MONTHLY": 2 + } + } + } + }, + "WeeklySchedule": { + "fields": { + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MonthlySchedule": { + "oneofs": { + "dayOfMonth": { + "oneof": [ + "weekDayOfMonth", + "monthDay" + ] + } + }, + "fields": { + "weekDayOfMonth": { + "type": "WeekDayOfMonth", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "monthDay": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WeekDayOfMonth": { + "fields": { + "weekOrdinal": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreatePatchDeploymentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "patchDeploymentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "patchDeployment": { + "type": "PatchDeployment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetPatchDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" + } + } + } + }, + "ListPatchDeploymentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPatchDeploymentsResponse": { + "fields": { + "patchDeployments": { + "rule": "repeated", + "type": "PatchDeployment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeletePatchDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" + } + } + } + }, + "ExecutePatchJobRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "description": { + "type": "string", + "id": 2 + }, + "instanceFilter": { + "type": "PatchInstanceFilter", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "patchConfig": { + "type": "PatchConfig", + "id": 4 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 5 + }, + "dryRun": { + "type": "bool", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 8 + }, + "rollout": { + "type": "PatchRollout", + "id": 9 + } + } + }, + "GetPatchJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" + } + } + } + }, + "ListPatchJobInstanceDetailsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListPatchJobInstanceDetailsResponse": { + "fields": { + "patchJobInstanceDetails": { + "rule": "repeated", + "type": "PatchJobInstanceDetails", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "PatchJobInstanceDetails": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "compute.googleapis.com/Instance" + } + }, + "instanceSystemId": { + "type": "string", + "id": 2 + }, + "state": { + "type": "Instance.PatchState", + "id": 3 + }, + "failureReason": { + "type": "string", + "id": 4 + }, + "attemptCount": { + "type": "int64", + "id": 5 + } + } + }, + "ListPatchJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListPatchJobsResponse": { + "fields": { + "patchJobs": { + "rule": "repeated", + "type": "PatchJob", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "PatchJob": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/PatchJob", + "(google.api.resource).pattern": "projects/{project}/patchJobs/{patch_job}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 14 + }, + "description": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "state": { + "type": "State", + "id": 5 + }, + "instanceFilter": { + "type": "PatchInstanceFilter", + "id": 13 + }, + "patchConfig": { + "type": "PatchConfig", + "id": 7 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 8 + }, + "instanceDetailsSummary": { + "type": "InstanceDetailsSummary", + "id": 9 + }, + "dryRun": { + "type": "bool", + "id": 10 + }, + "errorMessage": { + "type": "string", + "id": 11 + }, + "percentComplete": { + "type": "double", + "id": 12 + }, + "patchDeployment": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" + } + }, + "rollout": { + "type": "PatchRollout", + "id": 16 + } + }, + "nested": { + "InstanceDetailsSummary": { + "fields": { + "pendingInstanceCount": { + "type": "int64", + "id": 1 + }, + "inactiveInstanceCount": { + "type": "int64", + "id": 2 + }, + "notifiedInstanceCount": { + "type": "int64", + "id": 3 + }, + "startedInstanceCount": { + "type": "int64", + "id": 4 + }, + "downloadingPatchesInstanceCount": { + "type": "int64", + "id": 5 + }, + "applyingPatchesInstanceCount": { + "type": "int64", + "id": 6 + }, + "rebootingInstanceCount": { + "type": "int64", + "id": 7 + }, + "succeededInstanceCount": { + "type": "int64", + "id": 8 + }, + "succeededRebootRequiredInstanceCount": { + "type": "int64", + "id": 9 + }, + "failedInstanceCount": { + "type": "int64", + "id": 10 + }, + "ackedInstanceCount": { + "type": "int64", + "id": 11 + }, + "timedOutInstanceCount": { + "type": "int64", + "id": 12 + }, + "prePatchStepInstanceCount": { + "type": "int64", + "id": 13 + }, + "postPatchStepInstanceCount": { + "type": "int64", + "id": 14 + }, + "noAgentDetectedInstanceCount": { + "type": "int64", + "id": 15 + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STARTED": 1, + "INSTANCE_LOOKUP": 2, + "PATCHING": 3, + "SUCCEEDED": 4, + "COMPLETED_WITH_ERRORS": 5, + "CANCELED": 6, + "TIMED_OUT": 7 + } + } + } + }, + "PatchConfig": { + "fields": { + "rebootConfig": { + "type": "RebootConfig", + "id": 1 + }, + "apt": { + "type": "AptSettings", + "id": 3 + }, + "yum": { + "type": "YumSettings", + "id": 4 + }, + "goo": { + "type": "GooSettings", + "id": 5 + }, + "zypper": { + "type": "ZypperSettings", + "id": 6 + }, + "windowsUpdate": { + "type": "WindowsUpdateSettings", + "id": 7 + }, + "preStep": { + "type": "ExecStep", + "id": 8 + }, + "postStep": { + "type": "ExecStep", + "id": 9 + } + }, + "nested": { + "RebootConfig": { + "values": { + "REBOOT_CONFIG_UNSPECIFIED": 0, + "DEFAULT": 1, + "ALWAYS": 2, + "NEVER": 3 + } + } + } + }, + "Instance": { + "fields": {}, + "nested": { + "PatchState": { + "values": { + "PATCH_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "INACTIVE": 2, + "NOTIFIED": 3, + "STARTED": 4, + "DOWNLOADING_PATCHES": 5, + "APPLYING_PATCHES": 6, + "REBOOTING": 7, + "SUCCEEDED": 8, + "SUCCEEDED_REBOOT_REQUIRED": 9, + "FAILED": 10, + "ACKED": 11, + "TIMED_OUT": 12, + "RUNNING_PRE_PATCH_STEP": 13, + "RUNNING_POST_PATCH_STEP": 14, + "NO_AGENT_DETECTED": 15 + } + } + } + }, + "CancelPatchJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" + } + } + } + }, + "AptSettings": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "exclusivePackages": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "DIST": 1, + "UPGRADE": 2 + } + } + } + }, + "YumSettings": { + "fields": { + "security": { + "type": "bool", + "id": 1 + }, + "minimal": { + "type": "bool", + "id": 2 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "exclusivePackages": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "GooSettings": { + "fields": {} + }, + "ZypperSettings": { + "fields": { + "withOptional": { + "type": "bool", + "id": 1 + }, + "withUpdate": { + "type": "bool", + "id": 2 + }, + "categories": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "severities": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "exclusivePatches": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "WindowsUpdateSettings": { + "fields": { + "classifications": { + "rule": "repeated", + "type": "Classification", + "id": 1 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "exclusivePatches": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Classification": { + "values": { + "CLASSIFICATION_UNSPECIFIED": 0, + "CRITICAL": 1, + "SECURITY": 2, + "DEFINITION": 3, + "DRIVER": 4, + "FEATURE_PACK": 5, + "SERVICE_PACK": 6, + "TOOL": 7, + "UPDATE_ROLLUP": 8, + "UPDATE": 9 + } + } + } + }, + "ExecStep": { + "fields": { + "linuxExecStepConfig": { + "type": "ExecStepConfig", + "id": 1 + }, + "windowsExecStepConfig": { + "type": "ExecStepConfig", + "id": 2 + } + } + }, + "ExecStepConfig": { + "oneofs": { + "executable": { + "oneof": [ + "localPath", + "gcsObject" + ] + } + }, + "fields": { + "localPath": { + "type": "string", + "id": 1 + }, + "gcsObject": { + "type": "GcsObject", + "id": 2 + }, + "allowedSuccessCodes": { + "rule": "repeated", + "type": "int32", + "id": 3 + }, + "interpreter": { + "type": "Interpreter", + "id": 4 + } + }, + "nested": { + "Interpreter": { + "values": { + "INTERPRETER_UNSPECIFIED": 0, + "SHELL": 1, + "POWERSHELL": 2 + } + } + } + }, + "GcsObject": { + "fields": { + "bucket": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "object": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "generationNumber": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PatchInstanceFilter": { + "fields": { + "all": { + "type": "bool", + "id": 1 + }, + "groupLabels": { + "rule": "repeated", + "type": "GroupLabel", + "id": 2 + }, + "zones": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "instances": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "instanceNamePrefixes": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "GroupLabel": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + } + } + }, + "PatchRollout": { + "fields": { + "mode": { + "type": "Mode", + "id": 1 + }, + "disruptionBudget": { + "type": "FixedOrPercent", + "id": 2 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "ZONE_BY_ZONE": 1, + "CONCURRENT_ZONES": 2 + } + } + } + } } } } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "FieldBehaviorProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" }, - "OneofOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "uninterpretedOption": { + "Http": { + "fields": { + "rules": { "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 } } }, - "UninterpretedOption": { + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", "id": 2 }, - "identifierValue": { + "put": { "type": "string", "id": 3 }, - "positiveIntValue": { - "type": "uint64", + "post": { + "type": "string", "id": 4 }, - "negativeIntValue": { - "type": "int64", + "delete": { + "type": "string", "id": 5 }, - "doubleValue": { - "type": "double", + "patch": { + "type": "string", "id": 6 }, - "stringValue": { - "type": "bytes", + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", "id": 7 }, - "aggregateValue": { + "responseBody": { "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 } } }, - "SourceCodeInfo": { + "CustomHttpPattern": { "fields": { - "location": { - "rule": "repeated", - "type": "Location", + "kind": { + "type": "string", "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } + }, + "path": { + "type": "string", + "id": 2 } } }, - "GeneratedCodeInfo": { + "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" + }, + "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": { - "annotation": { - "rule": "repeated", - "type": "Annotation", + "type": { + "type": "string", "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 } }, "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - } + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 } } } }, - "Duration": { + "ResourceReference": { "fields": { - "seconds": { - "type": "int64", + "type": { + "type": "string", "id": 1 }, - "nanos": { - "type": "int32", + "childType": { + "type": "string", "id": 2 } } }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" }, - "Empty": { - "fields": {} + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } } } }, diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index a871bfcd116..c1e0b995314 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -368,8 +368,8 @@ export class OsConfigServiceClient { * Description of the patch job. Length of the description is limited * to 1024 characters. * @param {google.cloud.osconfig.v1.PatchInstanceFilter} request.instanceFilter - * Required. Instances to patch, either explicitly or filtered by some criteria such - * as zone or labels. + * Required. Instances to patch, either explicitly or filtered by some + * criteria such as zone or labels. * @param {google.cloud.osconfig.v1.PatchConfig} request.patchConfig * Patch configuration being applied. If omitted, instances are * patched using the default configurations. @@ -381,6 +381,8 @@ export class OsConfigServiceClient { * will do nothing. * @param {string} request.displayName * Display name for this patch job. This does not have to be unique. + * @param {google.cloud.osconfig.v1.PatchRollout} request.rollout + * Rollout strategy of the patch job. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -646,10 +648,11 @@ export class OsConfigServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project to apply this patch deployment to in the form `projects/*`. + * Required. The project to apply this patch deployment to in the form + * `projects/*`. * @param {string} request.patchDeploymentId - * Required. A name for the patch deployment in the project. When creating a name - * the following rules apply: + * Required. A name for the patch deployment in the project. When creating a + * name the following rules apply: * * Must contain only lowercase letters, numbers, and hyphens. * * Must start with a letter. * * Must be between 1-63 characters. @@ -1138,7 +1141,8 @@ export class OsConfigServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent for the instances are in the form of `projects/* /patchJobs/*`. + * Required. The parent for the instances are in the form of + * `projects/* /patchJobs/*`. * @param {number} request.pageSize * The maximum number of instance details records to return. Default is 100. * @param {string} request.pageToken @@ -1215,7 +1219,8 @@ export class OsConfigServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent for the instances are in the form of `projects/* /patchJobs/*`. + * Required. The parent for the instances are in the form of + * `projects/* /patchJobs/*`. * @param {number} request.pageSize * The maximum number of instance details records to return. Default is 100. * @param {string} request.pageToken @@ -1266,7 +1271,8 @@ export class OsConfigServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent for the instances are in the form of `projects/* /patchJobs/*`. + * Required. The parent for the instances are in the form of + * `projects/* /patchJobs/*`. * @param {number} request.pageSize * The maximum number of instance details records to return. Default is 100. * @param {string} request.pageToken @@ -1355,10 +1361,12 @@ export class OsConfigServiceClient { * @param {string} request.parent * Required. The resource name of the parent in the form `projects/*`. * @param {number} [request.pageSize] - * Optional. The maximum number of patch deployments to return. Default is 100. + * Optional. The maximum number of patch deployments to return. Default is + * 100. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to ListPatchDeployments - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * ListPatchDeployments that indicates where this listing should continue + * from. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1424,10 +1432,12 @@ export class OsConfigServiceClient { * @param {string} request.parent * Required. The resource name of the parent in the form `projects/*`. * @param {number} [request.pageSize] - * Optional. The maximum number of patch deployments to return. Default is 100. + * Optional. The maximum number of patch deployments to return. Default is + * 100. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to ListPatchDeployments - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * ListPatchDeployments that indicates where this listing should continue + * from. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1471,10 +1481,12 @@ export class OsConfigServiceClient { * @param {string} request.parent * Required. The resource name of the parent in the form `projects/*`. * @param {number} [request.pageSize] - * Optional. The maximum number of patch deployments to return. Default is 100. + * Optional. The maximum number of patch deployments to return. Default is + * 100. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to ListPatchDeployments - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * ListPatchDeployments that indicates where this listing should continue + * from. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json b/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json index cf705ae88ac..07f48f3fa6c 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json @@ -1,4 +1,6 @@ [ + "../../protos/google/cloud/osconfig/v1/inventory.proto", + "../../protos/google/cloud/osconfig/v1/osconfig_common.proto", "../../protos/google/cloud/osconfig/v1/osconfig_service.proto", "../../protos/google/cloud/osconfig/v1/patch_deployments.proto", "../../protos/google/cloud/osconfig/v1/patch_jobs.proto" diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 3a74a57e19a..7c256438e36 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "ff5fe1c8a8fdc7ffd358baf76358249dfcaf3ccb" + "sha": "9c271700668a7835dc6644a49ec23c24a1a18fbe" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", - "internalRef": "327369997" + "sha": "4b0ad15b0ff483486ae90d73092e7be00f8c1848", + "internalRef": "341842584" } }, { @@ -87,7 +87,8 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.3313539706", + "protos/google/cloud/osconfig/v1/inventory.proto", + "protos/google/cloud/osconfig/v1/osconfig_common.proto", "protos/google/cloud/osconfig/v1/osconfig_service.proto", "protos/google/cloud/osconfig/v1/patch_deployments.proto", "protos/google/cloud/osconfig/v1/patch_jobs.proto", @@ -96,7 +97,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.3934198833", "src/index.ts", "src/v1/index.ts", "src/v1/os_config_service_client.ts", From c3a9370198e0ee9f480c614a80fd5624f4e824de Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2020 14:51:53 -0800 Subject: [PATCH 049/154] chore: release 1.3.0 (#63) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 189d28cc687..cc4c71d624b 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.2.3...v1.3.0) (2020-11-12) + + +### Features + +* Added PatchRollout feature to PatchDeployments inventory proto definitions for VM Manager Inventory ([#62](https://www.github.com/googleapis/nodejs-os-config/issues/62)) ([7c4e2a1](https://www.github.com/googleapis/nodejs-os-config/commit/7c4e2a171346cb5f5ad5068c25b4c982450585c3)) + ### [1.2.3](https://www.github.com/googleapis/nodejs-os-config/compare/v1.2.2...v1.2.3) (2020-11-07) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 8f6482202c4..f861f29a447 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.2.3", + "version": "1.3.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 95469225c35..1314d1f5c9f 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.2.3" + "@google-cloud/os-config": "^1.3.0" }, "devDependencies": { "c8": "^7.1.0", From f0eb03deba568599746fbae21c5d090ec04ce9b0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 17:30:41 +0100 Subject: [PATCH 050/154] chore(deps): update dependency gts to v3 (#65) --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index f861f29a447..575a17f5d45 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -36,7 +36,7 @@ "@types/node": "^12.12.37", "@types/sinon": "^9.0.0", "c8": "^7.1.2", - "gts": "^2.0.0", + "gts": "^3.0.0", "jsdoc": "^3.6.4", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.4", From b8d0f734654d8d2e27e002f85617aa71045dae4f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 11:39:35 -0800 Subject: [PATCH 051/154] build: update protos.json --- .../google-cloud-osconfig/protos/protos.json | 105 ++++++++++++++++-- .../src/v1/os_config_service_client.ts | 4 +- packages/google-cloud-osconfig/synth.metadata | 2 +- 3 files changed, 98 insertions(+), 13 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 01476bae876..9707d6d6ac2 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -1244,7 +1244,15 @@ "options": { "(google.api.http).post": "/v1/{parent=projects/*}/patchJobs:execute", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/patchJobs:execute", + "body": "*" + } + } + ] }, "GetPatchJob": { "requestType": "GetPatchJobRequest", @@ -1252,7 +1260,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/patchJobs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/patchJobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CancelPatchJob": { "requestType": "CancelPatchJobRequest", @@ -1260,7 +1278,15 @@ "options": { "(google.api.http).post": "/v1/{name=projects/*/patchJobs/*}:cancel", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/patchJobs/*}:cancel", + "body": "*" + } + } + ] }, "ListPatchJobs": { "requestType": "ListPatchJobsRequest", @@ -1268,7 +1294,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*}/patchJobs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/patchJobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "ListPatchJobInstanceDetails": { "requestType": "ListPatchJobInstanceDetailsRequest", @@ -1276,7 +1312,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*/patchJobs/*}/instanceDetails", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/patchJobs/*}/instanceDetails" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "CreatePatchDeployment": { "requestType": "CreatePatchDeploymentRequest", @@ -1285,7 +1331,18 @@ "(google.api.http).post": "/v1/{parent=projects/*}/patchDeployments", "(google.api.http).body": "patch_deployment", "(google.api.method_signature)": "parent,patch_deployment,patch_deployment_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/patchDeployments", + "body": "patch_deployment" + } + }, + { + "(google.api.method_signature)": "parent,patch_deployment,patch_deployment_id" + } + ] }, "GetPatchDeployment": { "requestType": "GetPatchDeploymentRequest", @@ -1293,7 +1350,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/patchDeployments/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/patchDeployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListPatchDeployments": { "requestType": "ListPatchDeploymentsRequest", @@ -1301,7 +1368,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*}/patchDeployments", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/patchDeployments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "DeletePatchDeployment": { "requestType": "DeletePatchDeploymentRequest", @@ -1309,7 +1386,17 @@ "options": { "(google.api.http).delete": "/v1/{name=projects/*/patchDeployments/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/patchDeployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index c1e0b995314..86176c25acf 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -1318,9 +1318,7 @@ export class OsConfigServiceClient { this.innerApiCalls['listPatchJobInstanceDetails'] as GaxCall, (request as unknown) as RequestType, callSettings - ) as AsyncIterable< - protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails - >; + ) as AsyncIterable; } listPatchDeployments( request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 7c256438e36..66d2aa06287 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "9c271700668a7835dc6644a49ec23c24a1a18fbe" + "sha": "42f4fce8c75fd9511f2fb60d66cb7adac0df06c4" } }, { From 31fb34ddbc536d75cd7ad67608798c73253605f8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 23 Nov 2020 20:48:04 +0100 Subject: [PATCH 052/154] chore(deps): update dependency webpack to v5 (#66) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [webpack](https://togithub.com/webpack/webpack) | [`^4.43.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/webpack/4.44.2/5.6.0) | [![age](https://badges.renovateapi.com/packages/npm/webpack/5.6.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/webpack/5.6.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/webpack/5.6.0/compatibility-slim/4.44.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/webpack/5.6.0/confidence-slim/4.44.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
webpack/webpack ### [`v5.6.0`](https://togithub.com/webpack/webpack/releases/v5.6.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.5.1...v5.6.0) ### Bugfixes - emit warnings/errors for exports in commonjs modules for which we know that they don't exist ### [`v5.5.1`](https://togithub.com/webpack/webpack/releases/v5.5.1) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.5.0...v5.5.1) ### Bugfixes - fix crash when \_\_esModule is defined with defineProperty without value ### [`v5.5.0`](https://togithub.com/webpack/webpack/releases/v5.5.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.4.0...v5.5.0) ### Bugfixes - fix ASI issues that occur between concatenated modules - fix incorrect handling of `[id]` and etc. in SourceMap sources - fix side-effect-free handling of exports for concatenated modules that causes an unused export - make ESM-CJS interop handling consistent - make `__esModule` flag consistent exposed - handle non enumerable exports - handle inherited exports - handle exported Promises ### [`v5.4.0`](https://togithub.com/webpack/webpack/releases/v5.4.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.3.2...v5.4.0) ### Bugfixes - fix renaming in super class expression in nested scopes - fix parsing and handling of browserlist queries - fix a few edge cases with ESM-CJS interop and .mjs - fix ASI edge cases ### [`v5.3.2`](https://togithub.com/webpack/webpack/releases/v5.3.2) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.3.1...v5.3.2) ### Bugfixes - runtime-dependent concatenated modules can generate code for runtime-dependent execution order of concatenated modules ### [`v5.3.1`](https://togithub.com/webpack/webpack/releases/v5.3.1) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.3.0...v5.3.1) ### Bugfixes - fix incorrect concatenation of modules when multiple runtimes are involved - fixes a "This should not happen" error - fixes a `__webpack_require__(null)` problem - run CLI correctly after installing - fixes a huge performance issue when processing minimized code with SourceMap - Use `string[]` types instead of `[string, ...string[]]` for arrays that must not be empty - this is more convinient to use ### Performance - avoid incorrect store of counts in the ProgressPlugin, which causes unneeded serialization of the Persistent Cache - upgrade terser-webpack-plugin for performance improvements - upgrade webpack-sources for performance improvements ### [`v5.3.0`](https://togithub.com/webpack/webpack/releases/v5.3.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.2.1...v5.3.0) ### Features and Bugfixes - generate runtime conditional code when modules are forcefully merged from multiple runtimes - This fixes a `Cannot read property 'call' of undefined` error in webpack runtime, because modules are used that are not in the graph in one runtime - disabled source code analysis for side effects in non-production modes - this causes unnecessary changes to parent modules in development - add `optimization.sideEffects: "flag"` as option for this ### [`v5.2.1`](https://togithub.com/webpack/webpack/releases/v5.2.1) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.2.0...v5.2.1) ##### Bugfixes - add `watchOptions.followSymlinks` option to schema - fix hard crash when calling resolve with undefined value - fix emit problem when files have hash in query string - fix unneeded generation of SourceMaps when no devtool is used - fixes a huge performance regression with terser-webpack-plugin ### [`v5.2.0`](https://togithub.com/webpack/webpack/releases/v5.2.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.1.3...v5.2.0) ### Features - add `sourceFilename` and `javascriptModule` to asset info for plugins ### Bugfixes - fix variable name collision when using module concatenation - fix arrow functions in ie 11 - fix `this` externals with module concatenation - force update for enhanced-resolve for critical bugfixes (see [changelog](https://togithub.com/webpack/enhanced-resolve/releases/tag/v5.3.0)) ### [`v5.1.3`](https://togithub.com/webpack/webpack/releases/v5.1.3) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.1.2...v5.1.3) ##### Bugfixes - omit unused modules from chunks when modules are only unused in some runtimes - fixes `Self-reference dependency has unused export name` error - fix order of asset optimization to fix conflict between compression-plugin and real hash plugin ### [`v5.1.2`](https://togithub.com/webpack/webpack/releases/v5.1.2) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.1.1...v5.1.2) ### Bugfixes - revert: omit unused modules from chunk when modules are only unused in some runtimes - caused issues with mini-css modules ### [`v5.1.1`](https://togithub.com/webpack/webpack/releases/v5.1.1) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.1.0...v5.1.1) ### Bugfixes - fix order of chunk hashing to allow to uses hashes in WebWorkers - update to terser-webpack-plugin 5 - reduces number of dependencies by dropping webpack 4 support - omit unused modules from chunk when modules are only unused in some runtimes - fixes `Self-reference dependency has unused export name` error - fix hanging production builds because of infinite loop in inner graph optimization - `Compilation.deleteAsset` updates chunk to file mappings ### [`v5.1.0`](https://togithub.com/webpack/webpack/releases/v5.1.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.0.0...v5.1.0) ### Features - expose `webpack` property from `Compiler` - expose `cleverMerge`, `EntryOptionPlugin`, `DynamicEntryPlugin` ### Bugfixes - missing `require("..").xxx` in try-catch produces a warning instead of an error now - handle reexports in concatenated modules correctly when they are side-effect-free - fix incorrect deprecation message for ModuleTemplate.hooks.hash ### [`v5.0.0`](https://togithub.com/webpack/webpack/releases/v5.0.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v4.44.2...v5.0.0) [Announcement and changelog](https://webpack.js.org/blog/2020-10-10-webpack-5-release/)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 575a17f5d45..0f993d5cc3b 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -47,7 +47,6 @@ "sinon": "^9.0.2", "ts-loader": "^8.0.0", "typescript": "~3.8.3", - "webpack": "^4.43.0", "webpack-cli": "^3.3.11", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" From 5438145586d2e5e29dbf4fea1df395ef049cd39c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 11:56:04 -0800 Subject: [PATCH 053/154] fix: check for fetch on window (#69) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/ab381a56-202c-4e55-bc48-9a7c17506861/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 343187793 Source-Link: https://github.com/googleapis/googleapis/commit/5587028631d4d743fd906c4eb4e4e4649a7ee5ce PiperOrigin-RevId: 343136730 Source-Link: https://github.com/googleapis/googleapis/commit/2cda8d285b66c14da57363201b7e4efbca47d034 PiperOrigin-RevId: 342976840 Source-Link: https://github.com/googleapis/googleapis/commit/c979fbeb80d1b940790a69183629d799e4c05b4c PiperOrigin-RevId: 342778480 Source-Link: https://github.com/googleapis/googleapis/commit/c6b1c72942991b1c605fe56a6041e06a86a9443e --- .../src/v1/os_config_service_client.ts | 118 ++++++++++-------- packages/google-cloud-osconfig/synth.metadata | 4 +- 2 files changed, 65 insertions(+), 57 deletions(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 86176c25acf..83b5130e3f8 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/os_config_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './os_config_service_client_config.json'; const version = require('../../../package.json').version; @@ -86,9 +92,9 @@ export class OsConfigServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -101,7 +107,9 @@ export class OsConfigServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -328,7 +336,7 @@ export class OsConfigServiceClient { // ------------------- executePatchJob( request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.osconfig.v1.IPatchJob, @@ -338,7 +346,7 @@ export class OsConfigServiceClient { >; executePatchJob( request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.osconfig.v1.IPatchJob, | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest @@ -396,7 +404,7 @@ export class OsConfigServiceClient { executePatchJob( request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.osconfig.v1.IPatchJob, | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest @@ -419,12 +427,12 @@ export class OsConfigServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -439,7 +447,7 @@ export class OsConfigServiceClient { } getPatchJob( request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.osconfig.v1.IPatchJob, @@ -449,7 +457,7 @@ export class OsConfigServiceClient { >; getPatchJob( request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.osconfig.v1.IPatchJob, protos.google.cloud.osconfig.v1.IGetPatchJobRequest | null | undefined, @@ -485,7 +493,7 @@ export class OsConfigServiceClient { getPatchJob( request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.osconfig.v1.IPatchJob, | protos.google.cloud.osconfig.v1.IGetPatchJobRequest @@ -506,12 +514,12 @@ export class OsConfigServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -526,7 +534,7 @@ export class OsConfigServiceClient { } cancelPatchJob( request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.osconfig.v1.IPatchJob, @@ -536,7 +544,7 @@ export class OsConfigServiceClient { >; cancelPatchJob( request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.osconfig.v1.IPatchJob, protos.google.cloud.osconfig.v1.ICancelPatchJobRequest | null | undefined, @@ -572,7 +580,7 @@ export class OsConfigServiceClient { cancelPatchJob( request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.osconfig.v1.IPatchJob, | protos.google.cloud.osconfig.v1.ICancelPatchJobRequest @@ -593,12 +601,12 @@ export class OsConfigServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -613,7 +621,7 @@ export class OsConfigServiceClient { } createPatchDeployment( request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.osconfig.v1.IPatchDeployment, @@ -623,7 +631,7 @@ export class OsConfigServiceClient { >; createPatchDeployment( request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.osconfig.v1.IPatchDeployment, | protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest @@ -673,7 +681,7 @@ export class OsConfigServiceClient { createPatchDeployment( request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.osconfig.v1.IPatchDeployment, | protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest @@ -696,12 +704,12 @@ export class OsConfigServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -716,7 +724,7 @@ export class OsConfigServiceClient { } getPatchDeployment( request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.osconfig.v1.IPatchDeployment, @@ -726,7 +734,7 @@ export class OsConfigServiceClient { >; getPatchDeployment( request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.osconfig.v1.IPatchDeployment, | protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest @@ -766,7 +774,7 @@ export class OsConfigServiceClient { getPatchDeployment( request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.osconfig.v1.IPatchDeployment, | protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest @@ -789,12 +797,12 @@ export class OsConfigServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -809,7 +817,7 @@ export class OsConfigServiceClient { } deletePatchDeployment( request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -819,7 +827,7 @@ export class OsConfigServiceClient { >; deletePatchDeployment( request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest @@ -859,7 +867,7 @@ export class OsConfigServiceClient { deletePatchDeployment( request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest @@ -882,12 +890,12 @@ export class OsConfigServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -903,7 +911,7 @@ export class OsConfigServiceClient { listPatchJobs( request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.osconfig.v1.IPatchJob[], @@ -913,7 +921,7 @@ export class OsConfigServiceClient { >; listPatchJobs( request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.osconfig.v1.IListPatchJobsRequest, protos.google.cloud.osconfig.v1.IListPatchJobsResponse | null | undefined, @@ -960,7 +968,7 @@ export class OsConfigServiceClient { listPatchJobs( request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.osconfig.v1.IListPatchJobsRequest, | protos.google.cloud.osconfig.v1.IListPatchJobsResponse @@ -981,12 +989,12 @@ export class OsConfigServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1029,7 +1037,7 @@ export class OsConfigServiceClient { */ listPatchJobsStream( request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1084,7 +1092,7 @@ export class OsConfigServiceClient { */ listPatchJobsAsync( request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1106,7 +1114,7 @@ export class OsConfigServiceClient { } listPatchJobInstanceDetails( request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[], @@ -1116,7 +1124,7 @@ export class OsConfigServiceClient { >; listPatchJobInstanceDetails( request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, | protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse @@ -1168,7 +1176,7 @@ export class OsConfigServiceClient { listPatchJobInstanceDetails( request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, | protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse @@ -1191,12 +1199,12 @@ export class OsConfigServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1244,7 +1252,7 @@ export class OsConfigServiceClient { */ listPatchJobInstanceDetailsStream( request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1300,7 +1308,7 @@ export class OsConfigServiceClient { */ listPatchJobInstanceDetailsAsync( request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1322,7 +1330,7 @@ export class OsConfigServiceClient { } listPatchDeployments( request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.osconfig.v1.IPatchDeployment[], @@ -1332,7 +1340,7 @@ export class OsConfigServiceClient { >; listPatchDeployments( request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, | protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse @@ -1381,7 +1389,7 @@ export class OsConfigServiceClient { listPatchDeployments( request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, | protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse @@ -1404,12 +1412,12 @@ export class OsConfigServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1450,7 +1458,7 @@ export class OsConfigServiceClient { */ listPatchDeploymentsStream( request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1503,7 +1511,7 @@ export class OsConfigServiceClient { */ listPatchDeploymentsAsync( request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 66d2aa06287..ceddd3b0c93 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4b0ad15b0ff483486ae90d73092e7be00f8c1848", - "internalRef": "341842584" + "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", + "internalRef": "343187793" } }, { From 04545f153714183a2ae9b56b364440f5931ce329 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 23 Nov 2020 21:08:04 +0100 Subject: [PATCH 054/154] chore(deps): update dependency webpack-cli to v4 (#67) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [webpack-cli](https://togithub.com/webpack/webpack-cli) | [`^3.3.11` -> `^4.0.0`](https://renovatebot.com/diffs/npm/webpack-cli/3.3.12/4.2.0) | [![age](https://badges.renovateapi.com/packages/npm/webpack-cli/4.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/webpack-cli/4.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/webpack-cli/4.2.0/compatibility-slim/3.3.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/webpack-cli/4.2.0/confidence-slim/3.3.12)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
webpack/webpack-cli ### [`v4.2.0`](https://togithub.com/webpack/webpack-cli/releases/webpack-cli@4.2.0) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/webpack-cli@4.1.0...webpack-cli@4.2.0) ##### Bug Fixes - \--config-name behaviour for functional configs ([#​2006](https://togithub.com/webpack/webpack-cli/issues/2006)) ([29ecf8d](https://togithub.com/webpack/webpack-cli/commit/29ecf8dbcd1c5c7d75fc7fb1634107697832d952)) - assign cache value for default configs ([#​2013](https://togithub.com/webpack/webpack-cli/issues/2013)) ([d2e3c74](https://togithub.com/webpack/webpack-cli/commit/d2e3c74d32b0141c694259cf4f31e6c48b0f681d)) - callback deprecation ([#​1977](https://togithub.com/webpack/webpack-cli/issues/1977)) ([2cb0c0e](https://togithub.com/webpack/webpack-cli/commit/2cb0c0e383670949ce31231edbfda514f47c3dfc)) - handle core flags for webpack 4 ([#​2023](https://togithub.com/webpack/webpack-cli/issues/2023)) ([ea66a7e](https://togithub.com/webpack/webpack-cli/commit/ea66a7e3ec6eabcc439b96acb21e2a25be2e35e5)) - help and version functionality ([#​1972](https://togithub.com/webpack/webpack-cli/issues/1972)) ([e8010b3](https://togithub.com/webpack/webpack-cli/commit/e8010b3aac695971e542ad4d3584ce534da39b8f)) ##### Features - export utils from core for other packages ([#​2011](https://togithub.com/webpack/webpack-cli/issues/2011)) ([3004549](https://togithub.com/webpack/webpack-cli/commit/3004549c06b3fe00708d8e1eecf42419e0f72f66)) - progress supports string argument ([#​2000](https://togithub.com/webpack/webpack-cli/issues/2000)) ([f13346e](https://togithub.com/webpack/webpack-cli/commit/f13346e6acb46e982a5d20fa1d2ae56fc52523dc)) - suggest the closest match based on the Levenshtein distance algorithm ([#​2010](https://togithub.com/webpack/webpack-cli/issues/2010)) ([491a582](https://togithub.com/webpack/webpack-cli/commit/491a582620b64ed4acbccd04f687adc28a5e4cff)) ### [`v4.1.0`](https://togithub.com/webpack/webpack-cli/releases/webpack-cli@4.1.0) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/webpack-cli@4.0.0...webpack-cli@4.1.0) ##### Bug Fixes - avoid unnecessary stringify ([#​1920](https://togithub.com/webpack/webpack-cli/issues/1920)) ([5ef1e7b](https://togithub.com/webpack/webpack-cli/commit/5ef1e7b074390406b76cb3e25dd90f045e1bd8a2)) - colored output ([#​1944](https://togithub.com/webpack/webpack-cli/issues/1944)) ([2bbbb14](https://togithub.com/webpack/webpack-cli/commit/2bbbb14ca9a404f2205c0f5a5515e73832ee6173)) - move init command to separate package ([#​1950](https://togithub.com/webpack/webpack-cli/issues/1950)) ([92ad475](https://togithub.com/webpack/webpack-cli/commit/92ad475d4b9606b5db7c31dd3666658301c95597)) - output stacktrace on errors ([#​1949](https://togithub.com/webpack/webpack-cli/issues/1949)) ([9ba9d6f](https://togithub.com/webpack/webpack-cli/commit/9ba9d6f460fb25fb79d52f4360239b8c4b471451)) - run CLI after webpack installation ([#​1951](https://togithub.com/webpack/webpack-cli/issues/1951)) ([564279e](https://togithub.com/webpack/webpack-cli/commit/564279e5b634a399647bcdb21449e5e6a7f0637e)) - support any config name ([#​1926](https://togithub.com/webpack/webpack-cli/issues/1926)) ([6f95b26](https://togithub.com/webpack/webpack-cli/commit/6f95b267bf6a3a3e71360f4de176a4ebbec3afa1)) - support array of functions and promises ([#​1946](https://togithub.com/webpack/webpack-cli/issues/1946)) ([2ace39b](https://togithub.com/webpack/webpack-cli/commit/2ace39b06117f558c0d8528cea9248253cbdf593)) - watch mode and options ([#​1931](https://togithub.com/webpack/webpack-cli/issues/1931)) ([258219a](https://togithub.com/webpack/webpack-cli/commit/258219a3bb606b228636e6373a3d20413c1f660e)) ##### Features - allow passing strings in env flag ([#​1939](https://togithub.com/webpack/webpack-cli/issues/1939)) ([cc081a2](https://togithub.com/webpack/webpack-cli/commit/cc081a256181e34137a89d2e9d37b04280b3f180)) ### [`v4.0.0`](https://togithub.com/webpack/webpack-cli/blob/master/CHANGELOG.md#​400-httpsgithubcomwebpackwebpack-clicomparewebpack-cli400-rc1webpack-cli400-2020-10-10) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/v3.3.12...webpack-cli@4.0.0) ##### Bug Fixes - add compilation lifecycle in watch instance ([#​1903](https://togithub.com/webpack/webpack-cli/issues/1903)) ([02b6d21](https://togithub.com/webpack/webpack-cli/commit/02b6d21eaa20166a7ed37816de716b8fc22b756a)) - cleanup `package-utils` package ([#​1822](https://togithub.com/webpack/webpack-cli/issues/1822)) ([fd5b92b](https://togithub.com/webpack/webpack-cli/commit/fd5b92b3cd40361daec5bf4486e455a41f4c9738)) - cli-executer supplies args further up ([#​1904](https://togithub.com/webpack/webpack-cli/issues/1904)) ([097564a](https://togithub.com/webpack/webpack-cli/commit/097564a851b36b63e0a6bf88144997ef65aa057a)) - exit code for validation errors ([59f6303](https://togithub.com/webpack/webpack-cli/commit/59f63037fcbdbb8934b578b9adf5725bc4ae1235)) - exit process in case of schema errors ([71e89b4](https://togithub.com/webpack/webpack-cli/commit/71e89b4092d953ea587cc4f606451ab78cbcdb93)) ##### Features - assign config paths in build dependencies in cache config ([#​1900](https://togithub.com/webpack/webpack-cli/issues/1900)) ([7e90f11](https://togithub.com/webpack/webpack-cli/commit/7e90f110b119f36ef9def4f66cf4e17ccf1438cd))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 0f993d5cc3b..61bdb396a04 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -47,7 +47,6 @@ "sinon": "^9.0.2", "ts-loader": "^8.0.0", "typescript": "~3.8.3", - "webpack-cli": "^3.3.11", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" }, From b1f600a1b744dcbf44f78fc1dd35f72063b9c26e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 08:36:13 -0800 Subject: [PATCH 055/154] docs: spelling correction for "targetting" (#71) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0d9476f5-156e-4a9b-9f97-94473eb544b9/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/15013eff642a7e7e855aed5a29e6e83c39beba2a --- packages/google-cloud-osconfig/README.md | 2 +- packages/google-cloud-osconfig/synth.metadata | 79 +------------------ 2 files changed, 3 insertions(+), 78 deletions(-) diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index 430ae01c707..36eea6b9dff 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -98,7 +98,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index ceddd3b0c93..71b19dcb765 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "42f4fce8c75fd9511f2fb60d66cb7adac0df06c4" + "sha": "eb7281de95613fa547acb262e4fc97980ab1e3a6" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], @@ -33,80 +33,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/lint.cfg", - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/continuous/node12/system-test.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", - ".kokoro/presubmit/node12/system-test.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "protos/google/cloud/osconfig/v1/inventory.proto", - "protos/google/cloud/osconfig/v1/osconfig_common.proto", - "protos/google/cloud/osconfig/v1/osconfig_service.proto", - "protos/google/cloud/osconfig/v1/patch_deployments.proto", - "protos/google/cloud/osconfig/v1/patch_jobs.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/index.ts", - "src/v1/index.ts", - "src/v1/os_config_service_client.ts", - "src/v1/os_config_service_client_config.json", - "src/v1/os_config_service_proto_list.json", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_os_config_service_v1.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file From 138517effc74c8588242d8693fc734f3ce08feab Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2020 19:42:18 +0000 Subject: [PATCH 056/154] chore: release 1.3.1 (#70) :robot: I have created a release \*beep\* \*boop\* --- ### [1.3.1](https://www.github.com/googleapis/nodejs-os-config/compare/v1.3.0...v1.3.1) (2020-11-25) ### Bug Fixes * check for fetch on window ([#69](https://www.github.com/googleapis/nodejs-os-config/issues/69)) ([02a5374](https://www.github.com/googleapis/nodejs-os-config/commit/02a53747e1b52d4a5d05714d8868ceee2c9eabb1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index cc4c71d624b..2f8343c28d0 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.3.1](https://www.github.com/googleapis/nodejs-os-config/compare/v1.3.0...v1.3.1) (2020-11-25) + + +### Bug Fixes + +* check for fetch on window ([#69](https://www.github.com/googleapis/nodejs-os-config/issues/69)) ([02a5374](https://www.github.com/googleapis/nodejs-os-config/commit/02a53747e1b52d4a5d05714d8868ceee2c9eabb1)) + ## [1.3.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.2.3...v1.3.0) (2020-11-12) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 61bdb396a04..41dcc1ee0d2 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.3.0", + "version": "1.3.1", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 1314d1f5c9f..d686c9a2f07 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.3.0" + "@google-cloud/os-config": "^1.3.1" }, "devDependencies": { "c8": "^7.1.0", From cb24194ed5cfef0da4064821741c0d10a1409b61 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Dec 2020 08:58:15 -0800 Subject: [PATCH 057/154] chore: generate GAPIC metadata JSON file (#72) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/86075bca-3db9-4047-98b6-39dbe4174275/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: https://github.com/googleapis/googleapis/commit/d189e871205fea665a9648f7c4676f027495ccaf --- .../src/v1/gapic_metadata.json | 125 ++++++++++++++++++ packages/google-cloud-osconfig/synth.metadata | 6 +- 2 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-osconfig/src/v1/gapic_metadata.json diff --git a/packages/google-cloud-osconfig/src/v1/gapic_metadata.json b/packages/google-cloud-osconfig/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..25450e990d1 --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1/gapic_metadata.json @@ -0,0 +1,125 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.osconfig.v1", + "libraryPackage": "@google-cloud/os-config", + "services": { + "OsConfigService": { + "clients": { + "grpc": { + "libraryClient": "OsConfigServiceClient", + "rpcs": { + "ExecutePatchJob": { + "methods": [ + "executePatchJob" + ] + }, + "GetPatchJob": { + "methods": [ + "getPatchJob" + ] + }, + "CancelPatchJob": { + "methods": [ + "cancelPatchJob" + ] + }, + "CreatePatchDeployment": { + "methods": [ + "createPatchDeployment" + ] + }, + "GetPatchDeployment": { + "methods": [ + "getPatchDeployment" + ] + }, + "DeletePatchDeployment": { + "methods": [ + "deletePatchDeployment" + ] + }, + "ListPatchJobs": { + "methods": [ + "listPatchJobs", + "listPatchJobsStream", + "listPatchJobsAsync" + ] + }, + "ListPatchJobInstanceDetails": { + "methods": [ + "listPatchJobInstanceDetails", + "listPatchJobInstanceDetailsStream", + "listPatchJobInstanceDetailsAsync" + ] + }, + "ListPatchDeployments": { + "methods": [ + "listPatchDeployments", + "listPatchDeploymentsStream", + "listPatchDeploymentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "OsConfigServiceClient", + "rpcs": { + "ExecutePatchJob": { + "methods": [ + "executePatchJob" + ] + }, + "GetPatchJob": { + "methods": [ + "getPatchJob" + ] + }, + "CancelPatchJob": { + "methods": [ + "cancelPatchJob" + ] + }, + "CreatePatchDeployment": { + "methods": [ + "createPatchDeployment" + ] + }, + "GetPatchDeployment": { + "methods": [ + "getPatchDeployment" + ] + }, + "DeletePatchDeployment": { + "methods": [ + "deletePatchDeployment" + ] + }, + "ListPatchJobs": { + "methods": [ + "listPatchJobs", + "listPatchJobsStream", + "listPatchJobsAsync" + ] + }, + "ListPatchJobInstanceDetails": { + "methods": [ + "listPatchJobInstanceDetails", + "listPatchJobInstanceDetailsStream", + "listPatchJobInstanceDetailsAsync" + ] + }, + "ListPatchDeployments": { + "methods": [ + "listPatchDeployments", + "listPatchDeploymentsStream", + "listPatchDeploymentsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 71b19dcb765..e1670376f96 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "eb7281de95613fa547acb262e4fc97980ab1e3a6" + "sha": "c41e3a634786be36c0b9dfcedca6825ceff63b54" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", - "internalRef": "343187793" + "sha": "d189e871205fea665a9648f7c4676f027495ccaf", + "internalRef": "345596855" } }, { From 8d928b2bfb8e46658303557fff69af63621311fd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 11:46:11 -0800 Subject: [PATCH 058/154] docs: add instructions for authenticating for system tests (#73) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/28ef5920-505e-44eb-bad6-0e53fa99adef/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- packages/google-cloud-osconfig/CONTRIBUTING.md | 14 ++++++++++++-- packages/google-cloud-osconfig/README.md | 3 +-- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-osconfig/CONTRIBUTING.md b/packages/google-cloud-osconfig/CONTRIBUTING.md index f6c4cf010e3..34c1ac3fb2a 100644 --- a/packages/google-cloud-osconfig/CONTRIBUTING.md +++ b/packages/google-cloud-osconfig/CONTRIBUTING.md @@ -37,6 +37,14 @@ accept your pull requests. 1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable the OS Config API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + ## Running the tests 1. [Prepare your environment for Node.js setup][setup]. @@ -51,11 +59,9 @@ accept your pull requests. npm test # Run sample integration tests. - gcloud auth application-default login npm run samples-test # Run all system tests. - gcloud auth application-default login npm run system-test 1. Lint (and maybe fix) any changes: @@ -63,3 +69,7 @@ accept your pull requests. npm run fix [setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=osconfig.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index 36eea6b9dff..b4edcde3f1f 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -80,8 +80,7 @@ const listPatchDeploymentsResponse = listPatchDeployments(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-os-config/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-os-config/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index e1670376f96..c7d103bcbc3 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "c41e3a634786be36c0b9dfcedca6825ceff63b54" + "sha": "d0fa76ece29d0e11a286621b3eae8684723b7fc0" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From 39d514d4c267958f3dec9a78f169f345e005fe98 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 7 Jan 2021 11:42:20 -0800 Subject: [PATCH 059/154] docs: update dates (#74) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d365a9d3-f86e-4598-8272-bbf6b821e385/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-osconfig/.jsdoc.js | 4 ++-- packages/google-cloud-osconfig/protos/protos.d.ts | 2 +- packages/google-cloud-osconfig/protos/protos.js | 2 +- packages/google-cloud-osconfig/src/v1/index.ts | 2 +- .../google-cloud-osconfig/src/v1/os_config_service_client.ts | 2 +- packages/google-cloud-osconfig/synth.metadata | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-osconfig/system-test/install.ts | 2 +- .../google-cloud-osconfig/test/gapic_os_config_service_v1.ts | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/google-cloud-osconfig/.jsdoc.js b/packages/google-cloud-osconfig/.jsdoc.js index 2bef80dff21..5a541779018 100644 --- a/packages/google-cloud-osconfig/.jsdoc.js +++ b/packages/google-cloud-osconfig/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2020 Google LLC', + copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/os-config', diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 500a38dbeb3..dee229bfb08 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 76a2bb9772b..35d15cb00c5 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/src/v1/index.ts b/packages/google-cloud-osconfig/src/v1/index.ts index 74686c95d8f..3706f0aec96 100644 --- a/packages/google-cloud-osconfig/src/v1/index.ts +++ b/packages/google-cloud-osconfig/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 83b5130e3f8..5f0dddceb99 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index c7d103bcbc3..7cd4862f667 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "d0fa76ece29d0e11a286621b3eae8684723b7fc0" + "sha": "e53bb15987023407c88d6c69827c721204fd3344" } }, { diff --git a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js index c9ed2b1ffb4..8892c338a6f 100644 --- a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts index c7f15c4ddda..5a24c05fa22 100644 --- a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/system-test/install.ts b/packages/google-cloud-osconfig/system-test/install.ts index 39d90f771de..d2d61c0396f 100644 --- a/packages/google-cloud-osconfig/system-test/install.ts +++ b/packages/google-cloud-osconfig/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index 1c40b61bff4..c13a834068c 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From d4962590850e4785098755097312035f00b3daf3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 Jan 2021 18:42:24 -0800 Subject: [PATCH 060/154] feat: adds style enumeration (#75) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/8b7e3986-c966-4325-9ced-bdd850176095/targets - [ ] To automatically regenerate this PR, check this box. --- .../google-cloud-osconfig/protos/protos.d.ts | 12 +++ .../google-cloud-osconfig/protos/protos.js | 78 ++++++++++++++++++- .../google-cloud-osconfig/protos/protos.json | 13 +++- packages/google-cloud-osconfig/synth.metadata | 2 +- 4 files changed, 102 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index dee229bfb08..4ad02cfdb59 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -8956,6 +8956,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -8985,6 +8988,9 @@ export namespace google { /** ResourceDescriptor singular. */ public singular: string; + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set @@ -9064,6 +9070,12 @@ export namespace google { ORIGINALLY_SINGLE_PATTERN = 1, FUTURE_MULTI_PATTERN = 2 } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } /** Properties of a ResourceReference. */ diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 35d15cb00c5..9c9a9ce68ba 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -23763,6 +23763,7 @@ * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history * @property {string|null} [plural] ResourceDescriptor plural * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** @@ -23775,6 +23776,7 @@ */ function ResourceDescriptor(properties) { this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23829,6 +23831,14 @@ */ ResourceDescriptor.prototype.singular = ""; + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @function create @@ -23866,6 +23876,12 @@ writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; @@ -23920,6 +23936,16 @@ case 6: message.singular = reader.string(); break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; default: reader.skipType(tag & 7); break; @@ -23983,6 +24009,18 @@ if (message.singular != null && message.hasOwnProperty("singular")) if (!$util.isString(message.singular)) return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } return null; }; @@ -24027,6 +24065,23 @@ message.plural = String(object.plural); if (object.singular != null) message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; @@ -24043,8 +24098,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.pattern = []; + object.style = []; + } if (options.defaults) { object.type = ""; object.nameField = ""; @@ -24067,6 +24124,11 @@ object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } return object; }; @@ -24097,6 +24159,20 @@ return values; })(); + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + return ResourceDescriptor; })(); diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 9707d6d6ac2..f2a57b5fdbc 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -4,7 +4,7 @@ "nested": { "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", @@ -2533,6 +2533,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -2542,6 +2547,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 7cd4862f667..cb143802b7d 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "e53bb15987023407c88d6c69827c721204fd3344" + "sha": "7af222233c240dc2a468e1c7b6c1d996fcd7e012" } }, { From 4fa2b9de34e4bf1623ec230dec94bd4cf1ee743f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:36:48 +0000 Subject: [PATCH 061/154] chore: release 1.4.0 (#76) :robot: I have created a release \*beep\* \*boop\* --- ## [1.4.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.3.1...v1.4.0) (2021-01-09) ### Features * adds style enumeration ([#75](https://www.github.com/googleapis/nodejs-os-config/issues/75)) ([797ad14](https://www.github.com/googleapis/nodejs-os-config/commit/797ad14b56e331d5926ca7d952583b4094217ccc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 2f8343c28d0..b374c485d24 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.4.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.3.1...v1.4.0) (2021-01-09) + + +### Features + +* adds style enumeration ([#75](https://www.github.com/googleapis/nodejs-os-config/issues/75)) ([797ad14](https://www.github.com/googleapis/nodejs-os-config/commit/797ad14b56e331d5926ca7d952583b4094217ccc)) + ### [1.3.1](https://www.github.com/googleapis/nodejs-os-config/compare/v1.3.0...v1.3.1) (2020-11-25) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 41dcc1ee0d2..aea05333841 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.3.1", + "version": "1.4.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index d686c9a2f07..73ebc29c617 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.3.1" + "@google-cloud/os-config": "^1.4.0" }, "devDependencies": { "c8": "^7.1.0", From c4c102cd7d5b26e7796a4b944c93258022d3d336 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 08:44:23 -0800 Subject: [PATCH 062/154] refactor(nodejs): move build cop to flakybot (#78) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/79ba0372-ded2-4df4-829f-0c53e04a7c6d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- packages/google-cloud-osconfig/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index cb143802b7d..82b3cc95264 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "7af222233c240dc2a468e1c7b6c1d996fcd7e012" + "sha": "829480d2c4a1531ba63519011382b17f2a0a14c2" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From f04a492f82b89fe7535f04ad972e451d045d34b4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 17:58:13 -0800 Subject: [PATCH 063/154] build: adds UNORDERED_LIST enum (#79) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/f20ba027-76a5-44ba-baa4-962e18a97819/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-osconfig/protos/protos.d.ts | 3 ++- packages/google-cloud-osconfig/protos/protos.js | 7 +++++++ packages/google-cloud-osconfig/protos/protos.json | 3 ++- packages/google-cloud-osconfig/synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 4ad02cfdb59..a10268149da 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -9181,7 +9181,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } } diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 9c9a9ce68ba..c2fbc39bdf7 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -5794,6 +5794,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -5894,6 +5895,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } return message; @@ -24396,6 +24401,7 @@ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -24405,6 +24411,7 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index f2a57b5fdbc..ed59e27b73a 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -2581,7 +2581,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } } } diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 82b3cc95264..0666e5515d0 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "829480d2c4a1531ba63519011382b17f2a0a14c2" + "sha": "ab6e81ccb71d44cb57b600f8acfa1318b9527086" } }, { From bdffe3fced28415afb60b9930f1fb7f1747de2dc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:00:43 -0800 Subject: [PATCH 064/154] build: update gapic-generator-typescript to v1.2.10. (#80) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/a27e585a-8362-450e-a458-6225be320237/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- packages/google-cloud-osconfig/synth.metadata | 6 +++--- packages/google-cloud-osconfig/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata index 0666e5515d0..3b4f1d99adb 100644 --- a/packages/google-cloud-osconfig/synth.metadata +++ b/packages/google-cloud-osconfig/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "ab6e81ccb71d44cb57b600f8acfa1318b9527086" + "sha": "3762933788476061bf2ec38cd28adcd3e66da856" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/packages/google-cloud-osconfig/webpack.config.js b/packages/google-cloud-osconfig/webpack.config.js index b18d0e76432..eb0a92bea1c 100644 --- a/packages/google-cloud-osconfig/webpack.config.js +++ b/packages/google-cloud-osconfig/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 3f0591fe16f341c2652ca9c31998ff47c1c3995c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Mar 2021 17:50:28 +0100 Subject: [PATCH 065/154] chore(deps): update dependency sinon to v10 (#82) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^9.0.2` -> `^10.0.0`](https://renovatebot.com/diffs/npm/sinon/9.2.4/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/compatibility-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/confidence-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v10.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1000--2021-03-22) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v9.2.4...v10.0.0) ================== - Upgrade nise to 4.1.0 - Use [@​sinonjs/eslint-config](https://togithub.com/sinonjs/eslint-config)[@​4](https://togithub.com/4) => Adopts ES2017 => Drops support for IE 11, Legacy Edge and legacy Safari
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index aea05333841..d12d7ca3d1f 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -44,7 +44,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^9.0.2", + "sinon": "^10.0.0", "ts-loader": "^8.0.0", "typescript": "~3.8.3", "@microsoft/api-documenter": "^7.8.10", From b203251295aeb384486f2e9534dcf10e6b606f0b Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Thu, 1 Apr 2021 23:53:29 -0700 Subject: [PATCH 066/154] chore: migrate to owl bot (#83) * chore: migrate to owl bot * chore: copy files from googleapis-gen fb91803ccef5d7c695139b22788b309e2197856b * chore: run the post processor --- .../.github/.OwlBot.yaml | 28 ++++++++++++++ .../google-cloud-osconfig/.repo-metadata.json | 13 ++++--- packages/google-cloud-osconfig/synth.metadata | 37 ------------------ packages/google-cloud-osconfig/synth.py | 38 ------------------- 4 files changed, 35 insertions(+), 81 deletions(-) create mode 100644 packages/google-cloud-osconfig/.github/.OwlBot.yaml delete mode 100644 packages/google-cloud-osconfig/synth.metadata delete mode 100644 packages/google-cloud-osconfig/synth.py diff --git a/packages/google-cloud-osconfig/.github/.OwlBot.yaml b/packages/google-cloud-osconfig/.github/.OwlBot.yaml new file mode 100644 index 00000000000..d09c53c9a0c --- /dev/null +++ b/packages/google-cloud-osconfig/.github/.OwlBot.yaml @@ -0,0 +1,28 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-preserve-regex: + - /owl-bot-staging/v1beta + +deep-copy-regex: + - source: /google/cloud/osconfig/(v.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + +begin-after-commit-hash: fb91803ccef5d7c695139b22788b309e2197856b + diff --git a/packages/google-cloud-osconfig/.repo-metadata.json b/packages/google-cloud-osconfig/.repo-metadata.json index d14c13a3e39..d0804f7e926 100644 --- a/packages/google-cloud-osconfig/.repo-metadata.json +++ b/packages/google-cloud-osconfig/.repo-metadata.json @@ -1,13 +1,14 @@ { - "name": "osconfig", - "name_pretty": "OS Config API", - "product_documentation": "https://cloud.google.com/compute/docs/os-patch-management", - "api_description": "provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", - "client_documentation": "https://googleapis.dev/nodejs/osconfig/latest/index.html", - "release_level": "ga", "language": "nodejs", + "product_documentation": "https://cloud.google.com/compute/docs/os-patch-management", "repo": "googleapis/nodejs-os-config", "repo_short": "nodejs-os-config", + "default_version": "v1", + "api_description": "provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", + "name_pretty": "OS Config API", + "release_level": "ga", "distribution_name": "@google-cloud/os-config", + "name": "osconfig", + "client_documentation": "https://googleapis.dev/nodejs/osconfig/latest/index.html", "api_id": "osconfig.googleapis.com" } diff --git a/packages/google-cloud-osconfig/synth.metadata b/packages/google-cloud-osconfig/synth.metadata deleted file mode 100644 index 3b4f1d99adb..00000000000 --- a/packages/google-cloud-osconfig/synth.metadata +++ /dev/null @@ -1,37 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-os-config.git", - "sha": "3762933788476061bf2ec38cd28adcd3e66da856" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "osconfig", - "apiVersion": "v1", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file diff --git a/packages/google-cloud-osconfig/synth.py b/packages/google-cloud-osconfig/synth.py deleted file mode 100644 index f23b478e6d0..00000000000 --- a/packages/google-cloud-osconfig/synth.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""This script is used to synthesize generated parts of this library.""" - -import synthtool as s -import synthtool.gcp as gcp -import synthtool.languages.node as node -import subprocess -import logging - -logging.basicConfig(level=logging.DEBUG) - -# run the gapic generator -gapic = gcp.GAPICBazel() -versions = ['v1'] -name = 'osconfig' -for version in versions: - library = gapic.node_library(name, version) -s.copy(library, excludes=['README.md', 'package.json']) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=['v1'], default_version='v1') -s.copy(templates, excludes=[]) - -node.postprocess_gapic_library() From 4b2d0b0dbdfaad7774379c201f853da1313eeb47 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:12:02 +0200 Subject: [PATCH 067/154] chore(deps): update dependency @types/sinon to v10 (#87) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^9.0.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/9.0.11/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/compatibility-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/confidence-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index d12d7ca3d1f..26f621af078 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/mocha": "^8.0.0", "@types/node": "^12.12.37", - "@types/sinon": "^9.0.0", + "@types/sinon": "^10.0.0", "c8": "^7.1.2", "gts": "^3.0.0", "jsdoc": "^3.6.4", From b080b3a83339f6dd3657ac627913cf55a1fabe71 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Apr 2021 00:56:36 +0200 Subject: [PATCH 068/154] chore(deps): update dependency ts-loader to v9 (#91) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/ts-loader/8.1.0/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/compatibility-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/confidence-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
TypeStrong/ts-loader ### [`v9.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v900) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v8.1.0...v9.0.0) Breaking changes: - minimum webpack version: 5 - minimum node version: 12 Changes: - [webpack 5 migration](https://togithub.com/TypeStrong/ts-loader/pull/1251) - thanks [@​johnnyreilly](https://togithub.com/johnnyreilly), [@​jonwallsten](https://togithub.com/jonwallsten), [@​sokra](https://togithub.com/sokra), [@​appzuka](https://togithub.com/appzuka), [@​alexander-akait](https://togithub.com/alexander-akait)
--- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 26f621af078..3ada18f0a4d 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -45,7 +45,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", - "ts-loader": "^8.0.0", + "ts-loader": "^9.0.0", "typescript": "~3.8.3", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" From 61bde8fe68647c703df310f2d2ab384e90701fbd Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:52:08 -0700 Subject: [PATCH 069/154] fix(deps): require google-gax v2.12.0 (#95) --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 3ada18f0a4d..a2ee581e5ea 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -29,7 +29,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "google-gax": "^2.9.2" + "google-gax": "^2.12.0" }, "devDependencies": { "@types/mocha": "^8.0.0", From 0ce4e4425cc64a413f47c83d4e3a0c55d80e5556 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 17:02:18 +0000 Subject: [PATCH 070/154] chore: new owl bot post processor docker image (#97) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f --- .../google-cloud-osconfig/protos/protos.d.ts | 18 +- .../google-cloud-osconfig/protos/protos.js | 36 +-- .../src/v1/os_config_service_client.ts | 156 +++++---- .../test/gapic_os_config_service_v1.ts | 295 ++++++++---------- 4 files changed, 233 insertions(+), 272 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index a10268149da..c5daa44e583 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -4518,10 +4518,10 @@ export namespace google { constructor(properties?: google.cloud.osconfig.v1.IFixedOrPercent); /** FixedOrPercent fixed. */ - public fixed: number; + public fixed?: (number|null); /** FixedOrPercent percent. */ - public percent: number; + public percent?: (number|null); /** FixedOrPercent mode. */ public mode?: ("fixed"|"percent"); @@ -5317,7 +5317,7 @@ export namespace google { public weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); /** MonthlySchedule monthDay. */ - public monthDay: number; + public monthDay?: (number|null); /** MonthlySchedule dayOfMonth. */ public dayOfMonth?: ("weekDayOfMonth"|"monthDay"); @@ -8081,7 +8081,7 @@ export namespace google { constructor(properties?: google.cloud.osconfig.v1.IExecStepConfig); /** ExecStepConfig localPath. */ - public localPath: string; + public localPath?: (string|null); /** ExecStepConfig gcsObject. */ public gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); @@ -8740,19 +8740,19 @@ export namespace google { public selector: string; /** HttpRule get. */ - public get: string; + public get?: (string|null); /** HttpRule put. */ - public put: string; + public put?: (string|null); /** HttpRule post. */ - public post: string; + public post?: (string|null); /** HttpRule delete. */ - public delete: string; + public delete?: (string|null); /** HttpRule patch. */ - public patch: string; + public patch?: (string|null); /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index c2fbc39bdf7..da6f5145af8 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -12248,19 +12248,19 @@ /** * FixedOrPercent fixed. - * @member {number} fixed + * @member {number|null|undefined} fixed * @memberof google.cloud.osconfig.v1.FixedOrPercent * @instance */ - FixedOrPercent.prototype.fixed = 0; + FixedOrPercent.prototype.fixed = null; /** * FixedOrPercent percent. - * @member {number} percent + * @member {number|null|undefined} percent * @memberof google.cloud.osconfig.v1.FixedOrPercent * @instance */ - FixedOrPercent.prototype.percent = 0; + FixedOrPercent.prototype.percent = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -14188,11 +14188,11 @@ /** * MonthlySchedule monthDay. - * @member {number} monthDay + * @member {number|null|undefined} monthDay * @memberof google.cloud.osconfig.v1.MonthlySchedule * @instance */ - MonthlySchedule.prototype.monthDay = 0; + MonthlySchedule.prototype.monthDay = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -21458,11 +21458,11 @@ /** * ExecStepConfig localPath. - * @member {string} localPath + * @member {string|null|undefined} localPath * @memberof google.cloud.osconfig.v1.ExecStepConfig * @instance */ - ExecStepConfig.prototype.localPath = ""; + ExecStepConfig.prototype.localPath = null; /** * ExecStepConfig gcsObject. @@ -23127,43 +23127,43 @@ /** * HttpRule get. - * @member {string} get + * @member {string|null|undefined} get * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.get = ""; + HttpRule.prototype.get = null; /** * HttpRule put. - * @member {string} put + * @member {string|null|undefined} put * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.put = ""; + HttpRule.prototype.put = null; /** * HttpRule post. - * @member {string} post + * @member {string|null|undefined} post * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.post = ""; + HttpRule.prototype.post = null; /** * HttpRule delete. - * @member {string} delete + * @member {string|null|undefined} delete * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype["delete"] = ""; + HttpRule.prototype["delete"] = null; /** * HttpRule patch. - * @member {string} patch + * @member {string|null|undefined} patch * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.patch = ""; + HttpRule.prototype.patch = null; /** * HttpRule custom. diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 5f0dddceb99..e98bb6263b9 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -256,13 +256,14 @@ export class OsConfigServiceClient { ]; for (const methodName of osConfigServiceStubMethods) { const callPromise = this.osConfigServiceStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, (err: Error | null | undefined) => () => { throw err; } @@ -437,11 +438,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.executePatchJob(request, options, callback); } @@ -524,11 +524,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getPatchJob(request, options, callback); } @@ -611,11 +610,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.cancelPatchJob(request, options, callback); } @@ -714,11 +712,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createPatchDeployment(request, options, callback); } @@ -807,11 +804,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getPatchDeployment(request, options, callback); } @@ -900,11 +896,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.deletePatchDeployment(request, options, callback); } @@ -999,11 +994,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listPatchJobs(request, options, callback); } @@ -1043,11 +1037,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listPatchJobs.createStream( @@ -1098,17 +1091,16 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listPatchJobs.asyncIterate( this.innerApiCalls['listPatchJobs'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1209,11 +1201,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listPatchJobInstanceDetails( request, @@ -1258,11 +1249,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listPatchJobInstanceDetails.createStream( @@ -1314,17 +1304,16 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listPatchJobInstanceDetails.asyncIterate( this.innerApiCalls['listPatchJobInstanceDetails'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1422,11 +1411,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listPatchDeployments(request, options, callback); } @@ -1464,11 +1452,10 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listPatchDeployments.createStream( @@ -1517,17 +1504,16 @@ export class OsConfigServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listPatchDeployments.asyncIterate( this.innerApiCalls['listPatchDeployments'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index c13a834068c..f7c6f01a71c 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( filledObject ) as T; @@ -249,9 +248,8 @@ describe('v1.OsConfigServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJob() ); - client.innerApiCalls.executePatchJob = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.executePatchJob = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.executePatchJob( request, @@ -361,9 +359,8 @@ describe('v1.OsConfigServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJob() ); - client.innerApiCalls.getPatchJob = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getPatchJob = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getPatchJob( request, @@ -473,9 +470,8 @@ describe('v1.OsConfigServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJob() ); - client.innerApiCalls.cancelPatchJob = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.cancelPatchJob = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.cancelPatchJob( request, @@ -554,9 +550,8 @@ describe('v1.OsConfigServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); - client.innerApiCalls.createPatchDeployment = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.createPatchDeployment = + stubSimpleCall(expectedResponse); const [response] = await client.createPatchDeployment(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -587,9 +582,8 @@ describe('v1.OsConfigServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); - client.innerApiCalls.createPatchDeployment = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createPatchDeployment = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createPatchDeployment( request, @@ -671,9 +665,8 @@ describe('v1.OsConfigServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); - client.innerApiCalls.getPatchDeployment = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getPatchDeployment = + stubSimpleCall(expectedResponse); const [response] = await client.getPatchDeployment(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -704,9 +697,8 @@ describe('v1.OsConfigServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); - client.innerApiCalls.getPatchDeployment = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getPatchDeployment = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getPatchDeployment( request, @@ -785,9 +777,8 @@ describe('v1.OsConfigServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deletePatchDeployment = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.deletePatchDeployment = + stubSimpleCall(expectedResponse); const [response] = await client.deletePatchDeployment(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -818,9 +809,8 @@ describe('v1.OsConfigServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deletePatchDeployment = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deletePatchDeployment = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deletePatchDeployment( request, @@ -937,9 +927,8 @@ describe('v1.OsConfigServiceClient', () => { generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), ]; - client.innerApiCalls.listPatchJobs = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listPatchJobs = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listPatchJobs( request, @@ -1011,9 +1000,8 @@ describe('v1.OsConfigServiceClient', () => { generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), ]; - client.descriptors.page.listPatchJobs.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listPatchJobs.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listPatchJobsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.osconfig.v1.PatchJob[] = []; @@ -1038,10 +1026,9 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(client.innerApiCalls.listPatchJobs, request) ); assert.strictEqual( - (client.descriptors.page.listPatchJobs - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchJobs.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1058,10 +1045,8 @@ describe('v1.OsConfigServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listPatchJobs.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listPatchJobs.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listPatchJobsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.osconfig.v1.PatchJob[] = []; @@ -1085,10 +1070,9 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(client.innerApiCalls.listPatchJobs, request) ); assert.strictEqual( - (client.descriptors.page.listPatchJobs - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchJobs.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1109,9 +1093,8 @@ describe('v1.OsConfigServiceClient', () => { generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), ]; - client.descriptors.page.listPatchJobs.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listPatchJobs.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.cloud.osconfig.v1.IPatchJob[] = []; const iterable = client.listPatchJobsAsync(request); for await (const resource of iterable) { @@ -1119,15 +1102,15 @@ describe('v1.OsConfigServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listPatchJobs - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listPatchJobs.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listPatchJobs - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchJobs.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1144,10 +1127,8 @@ describe('v1.OsConfigServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listPatchJobs.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listPatchJobs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listPatchJobsAsync(request); await assert.rejects(async () => { const responses: protos.google.cloud.osconfig.v1.IPatchJob[] = []; @@ -1156,15 +1137,15 @@ describe('v1.OsConfigServiceClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listPatchJobs - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listPatchJobs.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listPatchJobs - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchJobs.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1200,9 +1181,8 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() ), ]; - client.innerApiCalls.listPatchJobInstanceDetails = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listPatchJobInstanceDetails = + stubSimpleCall(expectedResponse); const [response] = await client.listPatchJobInstanceDetails(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1241,9 +1221,8 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() ), ]; - client.innerApiCalls.listPatchJobInstanceDetails = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listPatchJobInstanceDetails = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listPatchJobInstanceDetails( request, @@ -1326,12 +1305,12 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() ), ]; - client.descriptors.page.listPatchJobInstanceDetails.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listPatchJobInstanceDetails.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listPatchJobInstanceDetailsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.osconfig.v1.PatchJobInstanceDetails[] = []; + const responses: protos.google.cloud.osconfig.v1.PatchJobInstanceDetails[] = + []; stream.on( 'data', ( @@ -1350,16 +1329,18 @@ describe('v1.OsConfigServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listPatchJobInstanceDetails - .createStream as SinonStub) + ( + client.descriptors.page.listPatchJobInstanceDetails + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listPatchJobInstanceDetails, request) ); assert.strictEqual( - (client.descriptors.page.listPatchJobInstanceDetails - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchJobInstanceDetails + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1376,13 +1357,12 @@ describe('v1.OsConfigServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listPatchJobInstanceDetails.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listPatchJobInstanceDetails.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listPatchJobInstanceDetailsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.osconfig.v1.PatchJobInstanceDetails[] = []; + const responses: protos.google.cloud.osconfig.v1.PatchJobInstanceDetails[] = + []; stream.on( 'data', ( @@ -1400,16 +1380,18 @@ describe('v1.OsConfigServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listPatchJobInstanceDetails - .createStream as SinonStub) + ( + client.descriptors.page.listPatchJobInstanceDetails + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listPatchJobInstanceDetails, request) ); assert.strictEqual( - (client.descriptors.page.listPatchJobInstanceDetails - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchJobInstanceDetails + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1436,25 +1418,27 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() ), ]; - client.descriptors.page.listPatchJobInstanceDetails.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[] = []; + client.descriptors.page.listPatchJobInstanceDetails.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[] = + []; const iterable = client.listPatchJobInstanceDetailsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listPatchJobInstanceDetails - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listPatchJobInstanceDetails + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listPatchJobInstanceDetails - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchJobInstanceDetails + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1471,27 +1455,28 @@ describe('v1.OsConfigServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listPatchJobInstanceDetails.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listPatchJobInstanceDetails.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listPatchJobInstanceDetailsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[] = []; + const responses: protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listPatchJobInstanceDetails - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listPatchJobInstanceDetails + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listPatchJobInstanceDetails - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchJobInstanceDetails + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1527,9 +1512,8 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.PatchDeployment() ), ]; - client.innerApiCalls.listPatchDeployments = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listPatchDeployments = + stubSimpleCall(expectedResponse); const [response] = await client.listPatchDeployments(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1568,9 +1552,8 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.PatchDeployment() ), ]; - client.innerApiCalls.listPatchDeployments = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listPatchDeployments = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listPatchDeployments( request, @@ -1648,9 +1631,8 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.PatchDeployment() ), ]; - client.descriptors.page.listPatchDeployments.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listPatchDeployments.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listPatchDeploymentsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.osconfig.v1.PatchDeployment[] = []; @@ -1675,10 +1657,9 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(client.innerApiCalls.listPatchDeployments, request) ); assert.strictEqual( - (client.descriptors.page.listPatchDeployments - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchDeployments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1695,10 +1676,8 @@ describe('v1.OsConfigServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listPatchDeployments.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listPatchDeployments.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listPatchDeploymentsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.osconfig.v1.PatchDeployment[] = []; @@ -1722,10 +1701,9 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(client.innerApiCalls.listPatchDeployments, request) ); assert.strictEqual( - (client.descriptors.page.listPatchDeployments - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchDeployments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1752,9 +1730,8 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.PatchDeployment() ), ]; - client.descriptors.page.listPatchDeployments.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listPatchDeployments.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.cloud.osconfig.v1.IPatchDeployment[] = []; const iterable = client.listPatchDeploymentsAsync(request); for await (const resource of iterable) { @@ -1762,15 +1739,15 @@ describe('v1.OsConfigServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listPatchDeployments - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listPatchDeployments.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listPatchDeployments - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchDeployments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1787,27 +1764,26 @@ describe('v1.OsConfigServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listPatchDeployments.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listPatchDeployments.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listPatchDeploymentsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.osconfig.v1.IPatchDeployment[] = []; + const responses: protos.google.cloud.osconfig.v1.IPatchDeployment[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listPatchDeployments - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listPatchDeployments.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listPatchDeployments - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listPatchDeployments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1856,9 +1832,8 @@ describe('v1.OsConfigServiceClient', () => { }); it('matchPatchDeploymentFromPatchDeploymentName', () => { - const result = client.matchPatchDeploymentFromPatchDeploymentName( - fakePath - ); + const result = + client.matchPatchDeploymentFromPatchDeploymentName(fakePath); assert.strictEqual(result, 'patchDeploymentValue'); assert( (client.pathTemplates.patchDeploymentPathTemplate.match as SinonStub) From aa027234136253be3fc8685a25015170c1a02c63 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 21:58:17 +0000 Subject: [PATCH 071/154] fix: use require() to load JSON protos (#98) The library is regenerated with gapic-generator-typescript v1.3.1. Committer: @alexander-fenster PiperOrigin-RevId: 372468161 Source-Link: https://github.com/googleapis/googleapis/commit/75880c3e6a6aa2597400582848e81bbbfac51dea Source-Link: https://github.com/googleapis/googleapis-gen/commit/77b18044813d4c8c415ff9ea68e76e307eb8e904 --- .../src/v1/os_config_service_client.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index e98bb6263b9..bd75063db83 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -31,6 +31,7 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v1/os_config_service_client_config.json`. @@ -148,22 +149,7 @@ export class OsConfigServiceClient { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. From 76ef82ec53660fa5f9a7ba24250f6abcd5b51d7e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 23:12:37 +0000 Subject: [PATCH 072/154] chore: update gapic-generator-typescript to v1.3.2 (#99) Committer: @alexander-fenster PiperOrigin-RevId: 372656503 Source-Link: https://github.com/googleapis/googleapis/commit/6fa858c6489b1bbc505a7d7afe39f2dc45819c38 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d7c95df3ab1ea1b4c22a4542bad4924cc46d1388 --- .../google-cloud-osconfig/src/v1/os_config_service_client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index bd75063db83..6dbce1323e0 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; From 2537f50d3bba973cd726e2de7a49d19fc4db77a9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 15:48:04 +0000 Subject: [PATCH 073/154] feat: add OSConfig v1alpha api (#100) Committer: @adjackura PiperOrigin-RevId: 373246904 Source-Link: https://github.com/googleapis/googleapis/commit/4e3e319a842c72911121ccabb67f9e4710ec9bae Source-Link: https://github.com/googleapis/googleapis-gen/commit/513beb9718c83468c65ed4b1b0f23bb435a7260a --- .../osconfig/v1alpha/config_common.proto | 103 + .../instance_os_policies_compliance.proto | 175 + .../cloud/osconfig/v1alpha/inventory.proto | 360 + .../cloud/osconfig/v1alpha/os_policy.proto | 528 + .../v1alpha/os_policy_assignments.proto | 366 + .../osconfig/v1alpha/osconfig_common.proto | 39 + .../v1alpha/osconfig_zonal_service.proto | 211 + .../osconfig/v1alpha/vulnerability.proto | 336 + .../google-cloud-osconfig/protos/protos.d.ts | 9476 +++++- .../google-cloud-osconfig/protos/protos.js | 24142 +++++++++++++++- .../google-cloud-osconfig/protos/protos.json | 2742 +- packages/google-cloud-osconfig/src/index.ts | 5 +- .../src/v1alpha/gapic_metadata.json | 163 + .../src/v1alpha/index.ts | 19 + .../v1alpha/os_config_zonal_service_client.ts | 2657 ++ ...os_config_zonal_service_client_config.json | 98 + .../os_config_zonal_service_proto_list.json | 10 + .../gapic_os_config_zonal_service_v1alpha.ts | 3300 +++ 18 files changed, 42390 insertions(+), 2340 deletions(-) create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto create mode 100644 packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json create mode 100644 packages/google-cloud-osconfig/src/v1alpha/index.ts create mode 100644 packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts create mode 100644 packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client_config.json create mode 100644 packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_proto_list.json create mode 100644 packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto new file mode 100644 index 00000000000..d684ecaca6c --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto @@ -0,0 +1,103 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_outer_classname = "ConfigCommonProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option java_multiple_files = true; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// Step performed by the OS Config agent for configuring an `OSPolicyResource` +// to its desired state. +message OSPolicyResourceConfigStep { + // Supported configuration step types + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // Validation to detect resource conflicts, schema errors, etc. + VALIDATION = 1; + + // Check the current desired state status of the resource. + DESIRED_STATE_CHECK = 2; + + // Enforce the desired state for a resource that is not in desired state. + DESIRED_STATE_ENFORCEMENT = 3; + + // Re-check desired state status for a resource after enforcement of all + // resources in the current configuration run. + // + // This step is used to determine the final desired state status for the + // resource. It accounts for any resources that might have drifted from + // their desired state due to side effects from configuring other resources + // during the current configuration run. + DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + } + + // Supported outcomes for a configuration step. + enum Outcome { + // Default value. This value is unused. + OUTCOME_UNSPECIFIED = 0; + + // The step succeeded. + SUCCEEDED = 1; + + // The step failed. + FAILED = 2; + } + + // Configuration step type. + Type type = 1; + + // Outcome of the configuration step. + Outcome outcome = 2; +} + +// Compliance data for an OS policy resource. +message OSPolicyResourceCompliance { + // The id of the OS policy resource. + string os_policy_resource_id = 1; + + // Ordered list of configuration steps taken by the agent for the OS policy + // resource. + repeated OSPolicyResourceConfigStep config_steps = 2; + + // Compliance state of the OS policy resource. + OSPolicyComplianceState state = 3; +} + +// Supported OSPolicy compliance states. +enum OSPolicyComplianceState { + // Default value. This value is unused. + OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0; + + // Compliant state. + COMPLIANT = 1; + + // Non-compliant state + NON_COMPLIANT = 2; + + // Unknown compliance state. + UNKNOWN = 3; + + // No applicable OS policies were found for the instance. + // This state is only applicable to the instance. + NO_OS_POLICIES_APPLICABLE = 4; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto new file mode 100644 index 00000000000..f56738f5537 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto @@ -0,0 +1,175 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1alpha/config_common.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_outer_classname = "InstanceOSPoliciesComplianceProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option java_multiple_files = true; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// This API resource represents the OS policies compliance data for a Compute +// Engine virtual machine (VM) instance at a given point in time. +// +// A Compute Engine VM can have multiple OS policy assignments, and each +// assignment can have multiple OS policies. As a result, multiple OS policies +// could be applied to a single VM. +// +// You can use this API resource to determine both the compliance state of your +// VM as well as the compliance state of an individual OS policy. +// +// For more information, see [View +// compliance](https://cloud.google.com/compute/docs/os-configuration-management/view-compliance). +message InstanceOSPoliciesCompliance { + option (google.api.resource) = { + type: "osconfig.googleapis.com/InstanceOSPoliciesCompliance" + pattern: "projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}" + }; + + // Compliance data for an OS policy + message OSPolicyCompliance { + // The OS policy id + string os_policy_id = 1; + + // Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` + // belongs to. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + string os_policy_assignment = 2 [(google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; + + // Compliance state of the OS policy. + OSPolicyComplianceState state = 4; + + // Compliance data for each `OSPolicyResource` that is applied to the + // VM. + repeated OSPolicyResourceCompliance os_policy_resource_compliances = 5; + } + + // Output only. The `InstanceOSPoliciesCompliance` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Compute Engine VM instance name. + string instance = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Compliance state of the VM. + OSPolicyComplianceState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detailed compliance state of the VM. + // This field is populated only when compliance state is `UNKNOWN`. + // + // It may contain one of the following values: + // + // * `no-compliance-data`: Compliance data is not available for this VM. + // * `no-agent-detected`: OS Config agent is not detected for this VM. + // * `config-not-supported-by-agent`: The version of the OS Config agent + // running on this VM does not support configuration management. + // * `inactive`: VM is not running. + // * `internal-service-errors`: There were internal service errors encountered + // while enforcing compliance. + // * `agent-errors`: OS config agent encountered errors while enforcing + // compliance. + string detailed_state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reason for the `detailed_state` of the VM (if any). + string detailed_state_reason = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Compliance data for each `OSPolicy` that is applied to the VM. + repeated OSPolicyCompliance os_policy_compliances = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the last compliance check for the VM. + google.protobuf.Timestamp last_compliance_check_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unique identifier for the last compliance run. + // This id will be logged by the OS config agent during a compliance run and + // can be used for debugging and tracing purpose. + string last_compliance_run_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request message for getting OS policies compliance data for the given +// Compute Engine VM instance. +message GetInstanceOSPoliciesComplianceRequest { + // Required. API resource name for instance OS policies compliance resource. + // + // Format: + // `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` + // + // For `{project}`, either Compute Engine project-number or project-id can be + // provided. + // For `{instance}`, either Compute Engine VM instance-id or instance-name can + // be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/InstanceOSPoliciesCompliance" + } + ]; +} + +// A request message for listing OS policies compliance data for all Compute +// Engine VMs in the given location. +message ListInstanceOSPoliciesCompliancesRequest { + // Required. The parent resource name. + // + // Format: `projects/{project}/locations/{location}` + // + // For `{project}`, either Compute Engine project-number or project-id can be + // provided. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of results to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListInstanceOSPoliciesCompliances` that indicates where this listing + // should continue from. + string page_token = 3; + + // If provided, this field specifies the criteria that must be met by a + // `InstanceOSPoliciesCompliance` API resource to be included in the response. + string filter = 4; +} + +// A response message for listing OS policies compliance data for all Compute +// Engine VMs in the given location. +message ListInstanceOSPoliciesCompliancesResponse { + // List of instance OS policies compliance objects. + repeated InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + + // The pagination token to retrieve the next page of instance OS policies + // compliance objects. + string next_page_token = 2; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto new file mode 100644 index 00000000000..303fde11127 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto @@ -0,0 +1,360 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_outer_classname = "Inventories"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option java_multiple_files = true; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// OS Inventory is a service for collecting and reporting operating +// system and package information on VM instances. + +// This API resource represents the available inventory data for a +// Compute Engine virtual machine (VM) instance at a given point in time. +// +// You can use this API resource to determine the inventory data of your VM. +// +// For more information, see [Information provided by OS inventory +// management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected). +message Inventory { + option (google.api.resource) = { + type: "osconfig.googleapis.com/Inventory" + pattern: "projects/{project}/locations/{location}/instances/{instance}/inventory" + }; + + // Operating system information for the VM. + message OsInfo { + // The VM hostname. + string hostname = 9; + + // The operating system long name. + // For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 + // Datacenter'. + string long_name = 2; + + // The operating system short name. + // For example, 'windows' or 'debian'. + string short_name = 3; + + // The version of the operating system. + string version = 4; + + // The system architecture of the operating system. + string architecture = 5; + + // The kernel version of the operating system. + string kernel_version = 6; + + // The kernel release of the operating system. + string kernel_release = 7; + + // The current version of the OS Config agent running on the VM. + string osconfig_agent_version = 8; + } + + // A single piece of inventory on a VM. + message Item { + // The origin of a specific inventory item. + enum OriginType { + // Invalid. An origin type must be specified. + ORIGIN_TYPE_UNSPECIFIED = 0; + + // This inventory item was discovered as the result of the agent + // reporting inventory via the reporting API. + INVENTORY_REPORT = 1; + } + + // The different types of inventory that are tracked on a VM. + enum Type { + // Invalid. An type must be specified. + TYPE_UNSPECIFIED = 0; + + // This represents a package that is installed on the VM. + INSTALLED_PACKAGE = 1; + + // This represents an update that is available for a package. + AVAILABLE_PACKAGE = 2; + } + + // Identifier for this item, unique across items for this VM. + string id = 1; + + // The origin of this inventory item. + OriginType origin_type = 2; + + // When this inventory item was first detected. + google.protobuf.Timestamp create_time = 8; + + // When this inventory item was last modified. + google.protobuf.Timestamp update_time = 9; + + // The specific type of inventory, correlating to its specific details. + Type type = 5; + + // Specific details of this inventory item based on its type. + oneof details { + // Software package present on the VM instance. + SoftwarePackage installed_package = 6; + + // Software package available to be installed on the VM instance. + SoftwarePackage available_package = 7; + } + } + + // Software package information of the operating system. + message SoftwarePackage { + // Information about the different types of software packages. + oneof details { + // Yum package info. + // For details about the yum package manager, see + // https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. + VersionedPackage yum_package = 1; + + // Details of an APT package. + // For details about the apt package manager, see + // https://wiki.debian.org/Apt. + VersionedPackage apt_package = 2; + + // Details of a Zypper package. + // For details about the Zypper package manager, see + // https://en.opensuse.org/SDB:Zypper_manual. + VersionedPackage zypper_package = 3; + + // Details of a Googet package. + // For details about the googet package manager, see + // https://github.com/google/googet. + VersionedPackage googet_package = 4; + + // Details of a Zypper patch. + // For details about the Zypper package manager, see + // https://en.opensuse.org/SDB:Zypper_manual. + ZypperPatch zypper_patch = 5; + + // Details of a Windows Update package. + // See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for + // information about Windows Update. + WindowsUpdatePackage wua_package = 6; + + // Details of a Windows Quick Fix engineering package. + // See + // https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + // for info in Windows Quick Fix Engineering. + WindowsQuickFixEngineeringPackage qfe_package = 7; + + // Details of a COS package. + VersionedPackage cos_package = 8; + } + } + + // Information related to the a standard versioned package. This includes + // package info for APT, Yum, Zypper, and Googet package managers. + message VersionedPackage { + // The name of the package. + string package_name = 4; + + // The system architecture this package is intended for. + string architecture = 2; + + // The version of the package. + string version = 3; + } + + // Details related to a Zypper Patch. + message ZypperPatch { + // The name of the patch. + string patch_name = 5; + + // The category of the patch. + string category = 2; + + // The severity specified for this patch + string severity = 3; + + // Any summary information provided about this patch. + string summary = 4; + } + + // Details related to a Windows Update package. + // Field data and names are taken from Windows Update API IUpdate Interface: + // https://docs.microsoft.com/en-us/windows/win32/api/_wua/ + // Descriptive fields like title, and description are localized based on + // the locale of the VM being updated. + message WindowsUpdatePackage { + // Categories specified by the Windows Update. + message WindowsUpdateCategory { + // The identifier of the windows update category. + string id = 1; + + // The name of the windows update category. + string name = 2; + } + + // The localized title of the update package. + string title = 1; + + // The localized description of the update package. + string description = 2; + + // The categories that are associated with this update package. + repeated WindowsUpdateCategory categories = 3; + + // A collection of Microsoft Knowledge Base article IDs that are associated + // with the update package. + repeated string kb_article_ids = 4; + + // A hyperlink to the language-specific support information for the update. + string support_url = 11; + + // A collection of URLs that provide more information about the update + // package. + repeated string more_info_urls = 5; + + // Gets the identifier of an update package. Stays the same across + // revisions. + string update_id = 6; + + // The revision number of this update package. + int32 revision_number = 7; + + // The last published date of the update, in (UTC) date and time. + google.protobuf.Timestamp last_deployment_change_time = 10; + } + + // Information related to a Quick Fix Engineering package. + // Fields are taken from Windows QuickFixEngineering Interface and match + // the source names: + // https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + message WindowsQuickFixEngineeringPackage { + // A short textual description of the QFE update. + string caption = 1; + + // A textual description of the QFE update. + string description = 2; + + // Unique identifier associated with a particular QFE update. + string hot_fix_id = 3; + + // Date that the QFE update was installed. Mapped from installed_on field. + google.protobuf.Timestamp install_time = 5; + } + + // Output only. The `Inventory` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` + string name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Base level operating system information for the VM. + OsInfo os_info = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Inventory items related to the VM keyed by an opaque unique + // identifier for each inventory item. The identifier is unique to each + // distinct and addressable inventory item and will change, when there is a + // new package version. + map items = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the last reported inventory for the VM. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request message for getting inventory data for the specified VM. +message GetInventoryRequest { + // Required. API resource name for inventory resource. + // + // Format: + // `projects/{project}/locations/{location}/instances/{instance}/inventory` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, either Compute Engine `instance-id` or `instance-name` + // can be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/Inventory" + } + ]; + + // Inventory view indicating what information should be included in the + // inventory resource. If unspecified, the default view is BASIC. + InventoryView view = 2; +} + +// A request message for listing inventory data for all VMs in the specified +// location. +message ListInventoriesRequest { + // Required. The parent resource name. + // + // Format: `projects/{project}/locations/{location}/instances/{instance}` + // + // For `{project}`, either `project-number` or `project-id` can be + // provided. For `{instance}`, only hyphen or dash character is supported to + // list inventories across VMs. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + } + ]; + + // Inventory view indicating what information should be included in the + // inventory resource. If unspecified, the default view is BASIC. + InventoryView view = 2; + + // The maximum number of results to return. + int32 page_size = 3; + + // A pagination token returned from a previous call to + // `ListInventories` that indicates where this listing + // should continue from. + string page_token = 4; + + // If provided, this field specifies the criteria that must be met by a + // `Inventory` API resource to be included in the response. + string filter = 5; +} + +// A response message for listing inventory data for all VMs in a specified +// location. +message ListInventoriesResponse { + // List of inventory objects. + repeated Inventory inventories = 1; + + // The pagination token to retrieve the next page of inventory objects. + string next_page_token = 2; +} + +// The view for inventory objects. +enum InventoryView { + // The default value. + // The API defaults to the BASIC view. + INVENTORY_VIEW_UNSPECIFIED = 0; + + // Returns the basic inventory information that includes `os_info`. + BASIC = 1; + + // Returns all fields. + FULL = 2; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto new file mode 100644 index 00000000000..f3dd6338707 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto @@ -0,0 +1,528 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_outer_classname = "OSPolicyProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option java_multiple_files = true; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// An OS policy defines the desired state configuration for a VM. +message OSPolicy { + // The `OSFilter` is used to specify the OS filtering criteria for the + // resource group. + message OSFilter { + // This should match OS short name emitted by the OS inventory agent. + // An empty value matches any OS. + string os_short_name = 1; + + // This value should match the version emitted by the OS inventory + // agent. + // Prefix matches are supported if asterisk(*) is provided as the + // last character. For example, to match all versions with a major + // version of `7`, specify the following value for this field `7.*` + string os_version = 2; + } + + // An OS policy resource is used to define the desired state configuration + // and provides a specific functionality like installing/removing packages, + // executing a script etc. + // + // The system ensures that resources are always in their desired state by + // taking necessary actions if they have drifted from their desired state. + message Resource { + // A remote or local file. + message File { + // Specifies a file available via some URI. + message Remote { + // Required. URI from which to fetch the object. It should contain both + // the protocol and path following the format `{protocol}://{location}`. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // SHA256 checksum of the remote file. + string sha256_checksum = 2; + } + + // Specifies a file available as a Cloud Storage Object. + message Gcs { + // Required. Bucket of the Cloud Storage object. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Cloud Storage object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Generation number of the Cloud Storage object. + int64 generation = 3; + } + + // A specific type of file. + oneof type { + // A generic remote file. + Remote remote = 1; + + // A Cloud Storage object. + Gcs gcs = 2; + + // A local path within the VM to use. + string local_path = 3; + } + + // Defaults to false. When false, files are subject to validations + // based on the file type: + // + // Remote: A checksum must be specified. + // Cloud Storage: An object generation number must be specified. + bool allow_insecure = 4; + } + + // A resource that manages a system package. + message PackageResource { + // A deb package file. dpkg packages only support INSTALLED state. + message Deb { + // Required. A deb package. + File source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Whether dependencies should also be installed. + // - install when false: `dpkg -i package` + // - install when true: `apt-get update && apt-get -y install + // package.deb` + bool pull_deps = 2; + } + + // A package managed by APT. + // - install: `apt-get update && apt-get -y install [name]` + // - remove: `apt-get -y remove [name]` + message APT { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // An RPM package file. RPM packages only support INSTALLED state. + message RPM { + // Required. An rpm package. + File source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Whether dependencies should also be installed. + // - install when false: `rpm --upgrade --replacepkgs package.rpm` + // - install when true: `yum -y install package.rpm` or + // `zypper -y install package.rpm` + bool pull_deps = 2; + } + + // A package managed by YUM. + // - install: `yum -y install package` + // - remove: `yum -y remove package` + message YUM { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A package managed by Zypper. + // - install: `zypper -y install package` + // - remove: `zypper -y rm package` + message Zypper { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A package managed by GooGet. + // - install: `googet -noconfirm install package` + // - remove: `googet -noconfirm remove package` + message GooGet { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // An MSI package. MSI packages only support INSTALLED state. + message MSI { + // Required. The MSI package. + File source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Additional properties to use during installation. + // This should be in the format of Property=Setting. + // Appended to the defaults of `ACTION=INSTALL + // REBOOT=ReallySuppress`. + repeated string properties = 2; + } + + // The desired state that the OS Config agent maintains on the VM. + enum DesiredState { + // Unspecified is invalid. + DESIRED_STATE_UNSPECIFIED = 0; + + // Ensure that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is not installed and + // uninstalls it if detected. + REMOVED = 2; + } + + // Required. The desired state the agent should maintain for this package. + DesiredState desired_state = 1 [(google.api.field_behavior) = REQUIRED]; + + // A system package. + oneof system_package { + // A package managed by Apt. + APT apt = 2; + + // A deb package file. + Deb deb = 3; + + // A package managed by YUM. + YUM yum = 4; + + // A package managed by Zypper. + Zypper zypper = 5; + + // An rpm package file. + RPM rpm = 6; + + // A package managed by GooGet. + GooGet googet = 7; + + // An MSI package. + MSI msi = 8; + } + } + + // A resource that manages a package repository. + message RepositoryResource { + // Represents a single apt package repository. These will be added to + // a repo file that will be managed at + // `/etc/apt/sources.list.d/google_osconfig.list`. + message AptRepository { + // Type of archive. + enum ArchiveType { + // Unspecified is invalid. + ARCHIVE_TYPE_UNSPECIFIED = 0; + + // Deb indicates that the archive contains binary files. + DEB = 1; + + // Deb-src indicates that the archive contains source files. + DEB_SRC = 2; + } + + // Required. Type of archive files in this repository. + ArchiveType archive_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URI for this repository. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Distribution of this repository. + string distribution = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of components for this repository. Must contain at + // least one item. + repeated string components = 4 [(google.api.field_behavior) = REQUIRED]; + + // URI of the key file for this repository. The agent maintains a + // keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. + string gpg_key = 5; + } + + // Represents a single yum package repository. These are added to a + // repo file that is managed at + // `/etc/yum.repos.d/google_osconfig.repo`. + message YumRepository { + // Required. A one word, unique name for this repository. This is the + // `repo id` in the yum config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique + // identifier when checking for resource conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; + } + + // Represents a single zypper package repository. These are added to a + // repo file that is managed at + // `/etc/zypp/repos.d/google_osconfig.repo`. + message ZypperRepository { + // Required. A one word, unique name for this repository. This is the + // `repo id` in the zypper config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique + // identifier when checking for GuestPolicy conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; + } + + // Represents a Goo package repository. These are added to a repo file + // that is managed at + // `C:/ProgramData/GooGet/repos/google_osconfig.repo`. + message GooRepository { + // Required. The name of the repository. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The url of the repository. + string url = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A specific type of repository. + oneof repository { + // An Apt Repository. + AptRepository apt = 1; + + // A Yum Repository. + YumRepository yum = 2; + + // A Zypper Repository. + ZypperRepository zypper = 3; + + // A Goo Repository. + GooRepository goo = 4; + } + } + + // A resource that allows executing scripts on the VM. + // + // The `ExecResource` has 2 stages: `validate` and `enforce` and both stages + // accept a script as an argument to execute. + // + // When the `ExecResource` is applied by the agent, it first executes the + // script in the `validate` stage. The `validate` stage can signal that the + // `ExecResource` is already in the desired state by returning an exit code + // of `100`. If the `ExecResource` is not in the desired state, it should + // return an exit code of `101`. Any other exit code returned by this stage + // is considered an error. + // + // If the `ExecResource` is not in the desired state based on the exit code + // from the `validate` stage, the agent proceeds to execute the script from + // the `enforce` stage. If the `ExecResource` is already in the desired + // state, the `enforce` stage will not be run. + // Similar to `validate` stage, the `enforce` stage should return an exit + // code of `100` to indicate that the resource in now in its desired state. + // Any other exit code is considered an error. + // + // NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to + // have an explicit indicator of `in desired state`, `not in desired state` + // and errors. Because, for example, Powershell will always return an exit + // code of `0` unless an `exit` statement is provided in the script. So, for + // reasons of consistency and being explicit, exit codes `100` and `101` + // were chosen. + message ExecResource { + // A file or script to execute. + message Exec { + // The interpreter to use. + enum Interpreter { + // Defaults to NONE. + INTERPRETER_UNSPECIFIED = 0; + + // If no interpreter is specified the + // source will be executed directly, which will likely only + // succeed for executables and scripts with shebang lines. + // [Wikipedia + // shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)). + NONE = 1; + + // Indicates that the script will be run with /bin/sh on Linux and + // cmd.exe on windows. + SHELL = 2; + + // Indicates that the script will be run with powershell. + POWERSHELL = 3; + } + + // What to execute. + oneof source { + // A remote or local file. + File file = 1; + + // An inline script. + // The size of the script is limited to 1024 characters. + string script = 2; + } + + // Optional arguments to pass to the source during execution. + repeated string args = 3; + + // Required. The script interpreter to use. + Interpreter interpreter = 4 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. What to run to validate this resource is in the desired + // state. An exit code of 100 indicates "in desired state", and exit code + // of 101 indicates "not in desired state". Any other exit code indicates + // a failure running validate. + Exec validate = 1 [(google.api.field_behavior) = REQUIRED]; + + // What to run to bring this resource into the desired state. + // An exit code of 100 indicates "success", any other exit code indicates + // a failure running enforce. + Exec enforce = 2; + } + + // A resource that manages the state of a file. + message FileResource { + // Desired state of the file. + enum DesiredState { + // Unspecified is invalid. + DESIRED_STATE_UNSPECIFIED = 0; + + // Ensure file at path is present. + PRESENT = 1; + + // Ensure file at path is absent. + ABSENT = 2; + + // Ensure the contents of the file at path matches. If the file does + // not exist it will be created. + CONTENTS_MATCH = 3; + } + + // The source for the contents of the file. + oneof source { + // A remote or local source. + File file = 1; + + // A a file with this content. + // The size of the content is limited to 1024 characters. + string content = 2; + } + + // Required. The absolute path of the file within the VM. + string path = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Desired state of the file. + DesiredState state = 4 [(google.api.field_behavior) = REQUIRED]; + + // Consists of three octal digits which represent, in + // order, the permissions of the owner, group, and other users for the + // file (similarly to the numeric mode used in the linux chmod + // utility). Each digit represents a three bit number with the 4 bit + // corresponding to the read permissions, the 2 bit corresponds to the + // write bit, and the one bit corresponds to the execute permission. + // Default behavior is 755. + // + // Below are some examples of permissions and their associated values: + // read, write, and execute: 7 + // read and execute: 5 + // read and write: 6 + // read only: 4 + string permissions = 5; + } + + // Required. The id of the resource with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the OS policy. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Resource type. + oneof resource_type { + // Package resource + PackageResource pkg = 2; + + // Package repository resource + RepositoryResource repository = 3; + + // Exec resource + ExecResource exec = 4; + + // File resource + FileResource file = 5; + } + } + + // Resource groups provide a mechanism to group OS policy resources. + // + // Resource groups enable OS policy authors to create a single OS policy + // to be applied to VMs running different operating Systems. + // + // When the OS policy is applied to a target VM, the appropriate resource + // group within the OS policy is selected based on the `OSFilter` specified + // within the resource group. + message ResourceGroup { + // Used to specify the OS filter for a resource group + OSFilter os_filter = 1; + + // Required. List of resources configured for this resource group. + // The resources are executed in the exact order specified here. + repeated Resource resources = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Policy mode + enum Mode { + // Invalid mode + MODE_UNSPECIFIED = 0; + + // This mode checks if the configuration resources in the policy are in + // their desired state. No actions are performed if they are not in the + // desired state. This mode is used for reporting purposes. + VALIDATION = 1; + + // This mode checks if the configuration resources in the policy are in + // their desired state, and if not, enforces the desired state. + ENFORCEMENT = 2; + } + + // Required. The id of the OS policy with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the assignment. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Policy description. + // Length of the description is limited to 1024 characters. + string description = 2; + + // Required. Policy mode + Mode mode = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of resource groups for the policy. + // For a particular VM, resource groups are evaluated in the order specified + // and the first resource group that is applicable is selected and the rest + // are ignored. + // + // If none of the resource groups are applicable for a VM, the VM is + // considered to be non-compliant w.r.t this policy. This behavior can be + // toggled by the flag `allow_no_resource_group_match` + repeated ResourceGroup resource_groups = 4 + [(google.api.field_behavior) = REQUIRED]; + + // This flag determines the OS policy compliance status when none of the + // resource groups within the policy are applicable for a VM. Set this value + // to `true` if the policy needs to be reported as compliant even if the + // policy has nothing to validate or enforce. + bool allow_no_resource_group_match = 5; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto new file mode 100644 index 00000000000..43c9cfe6c07 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto @@ -0,0 +1,366 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1alpha/os_policy.proto"; +import "google/cloud/osconfig/v1alpha/osconfig_common.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_outer_classname = "OSPolicyAssignments"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option java_multiple_files = true; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// OS policy assignment is an API resource that is used to +// apply a set of OS policies to a dynamically targeted group of Compute Engine +// VM instances. +// +// An OS policy is used to define the desired state configuration for a +// Compute Engine VM instance through a set of configuration resources that +// provide capabilities such as installing or removing software packages, or +// executing a script. +// +// For more information, see [OS policy and OS policy +// assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies). +message OSPolicyAssignment { + option (google.api.resource) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + pattern: "projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}" + }; + + // Message representing label set. + // * A label is a key value pair set for a VM. + // * A LabelSet is a set of labels. + // * Labels within a LabelSet are ANDed. In other words, a LabelSet is + // applicable for a VM only if it matches all the labels in the + // LabelSet. + // * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will + // only be applicable for those VMs with both labels + // present. + message LabelSet { + // Labels are identified by key/value pairs in this map. + // A VM should contain all the key/value pairs specified in this + // map to be selected. + map labels = 1; + } + + // Message to represent the filters to select VMs for an assignment + message InstanceFilter { + // Target all VMs in the project. If true, no other criteria is + // permitted. + bool all = 1; + + // A VM is included if it's OS short name matches with any of the + // values provided in this list. + repeated string os_short_names = 2; + + // List of label sets used for VM inclusion. + // + // If the list has more than one `LabelSet`, the VM is included if any + // of the label sets are applicable for the VM. + repeated LabelSet inclusion_labels = 3; + + // List of label sets used for VM exclusion. + // + // If the list has more than one label set, the VM is excluded if any + // of the label sets are applicable for the VM. + // + // This filter is applied last in the filtering chain and therefore a + // VM is guaranteed to be excluded if it satisfies one of the below + // label sets. + repeated LabelSet exclusion_labels = 4; + } + + // Message to configure the rollout at the zonal level for the OS policy + // assignment. + message Rollout { + // Required. The maximum number (or percentage) of VMs per zone to disrupt + // at any given moment. + FixedOrPercent disruption_budget = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. This determines the minimum duration of time to wait after the + // configuration changes are applied through the current rollout. A + // VM continues to count towards the `disruption_budget` at least + // until this duration of time has passed after configuration changes are + // applied. + google.protobuf.Duration min_wait_duration = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + // OS policy assignment rollout state + enum RolloutState { + // Invalid value + ROLLOUT_STATE_UNSPECIFIED = 0; + + // The rollout is in progress. + IN_PROGRESS = 1; + + // The rollout is being cancelled. + CANCELLING = 2; + + // The rollout is cancelled. + CANCELLED = 3; + + // The rollout has completed successfully. + SUCCEEDED = 4; + } + + // Resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` + // + // This field is ignored when you create an OS policy assignment. + string name = 1; + + // OS policy assignment description. + // Length of the description is limited to 1024 characters. + string description = 2; + + // Required. List of OS policies to be applied to the VMs. + repeated OSPolicy os_policies = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Filter to select VMs. + InstanceFilter instance_filter = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Rollout to deploy the OS policy assignment. + // A rollout is triggered in the following situations: + // 1) OSPolicyAssignment is created. + // 2) OSPolicyAssignment is updated and the update contains changes to one of + // the following fields: + // - instance_filter + // - os_policies + // 3) OSPolicyAssignment is deleted. + Rollout rollout = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The assignment revision ID + // A new revision is committed whenever a rollout is triggered for a OS policy + // assignment + string revision_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp that the revision was created. + google.protobuf.Timestamp revision_create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. OS policy assignment rollout state + RolloutState rollout_state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates that this revision has been successfully rolled out + // in this zone and new VMs will be assigned OS policies from this revision. + // + // For a given OS policy assignment, there is only one revision with a value + // of `true` for this field. + bool baseline = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates that this revision deletes the OS policy assignment. + bool deleted = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates that reconciliation is in progress for the revision. + // This value is `true` when the `rollout_state` is one of: + // * IN_PROGRESS + // * CANCELLING + bool reconciling = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server generated unique id for the OS policy assignment + // resource. + string uid = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// OS policy assignment operation metadata provided by OS policy assignment API +// methods that return long running operations. +message OSPolicyAssignmentOperationMetadata { + // The OS policy assignment API method. + enum APIMethod { + // Invalid value + API_METHOD_UNSPECIFIED = 0; + + // Create OS policy assignment API method + CREATE = 1; + + // Update OS policy assignment API method + UPDATE = 2; + + // Delete OS policy assignment API method + DELETE = 3; + } + + // State of the rollout + enum RolloutState { + // Invalid value + ROLLOUT_STATE_UNSPECIFIED = 0; + + // The rollout is in progress. + IN_PROGRESS = 1; + + // The rollout is being cancelled. + CANCELLING = 2; + + // The rollout is cancelled. + CANCELLED = 3; + + // The rollout has completed successfully. + SUCCEEDED = 4; + } + + // Reference to the `OSPolicyAssignment` API resource. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + string os_policy_assignment = 1 [(google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; + + // The OS policy assignment API method. + APIMethod api_method = 2; + + // State of the rollout + RolloutState rollout_state = 3; + + // Rollout start time + google.protobuf.Timestamp rollout_start_time = 4; + + // Rollout update time + google.protobuf.Timestamp rollout_update_time = 5; +} + +// A request message to create an OS policy assignment +message CreateOSPolicyAssignmentRequest { + // Required. The parent resource name in the form: + // projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The OS policy assignment to be created. + OSPolicyAssignment os_policy_assignment = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The logical name of the OS policy assignment in the project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the project. + string os_policy_assignment_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message to update an OS policy assignment +message UpdateOSPolicyAssignmentRequest { + // Required. The updated OS policy assignment. + OSPolicyAssignment os_policy_assignment = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field mask that controls which fields of the assignment should be + // updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message to get an OS policy assignment +message GetOSPolicyAssignmentRequest { + // Required. The resource name of OS policy assignment. + // + // Format: + // `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + } + ]; +} + +// A request message to list OS policy assignments for a parent resource +message ListOSPolicyAssignmentsRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of assignments to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListOSPolicyAssignments` that indicates where this listing should continue + // from. + string page_token = 3; +} + +// A response message for listing all assignments under given parent. +message ListOSPolicyAssignmentsResponse { + // The list of assignments + repeated OSPolicyAssignment os_policy_assignments = 1; + + // The pagination token to retrieve the next page of OS policy assignments. + string next_page_token = 2; +} + +// A request message to list revisions for a OS policy assignment +message ListOSPolicyAssignmentRevisionsRequest { + // Required. The name of the OS policy assignment to list revisions for. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + } + ]; + + // The maximum number of revisions to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListOSPolicyAssignmentRevisions` that indicates where this listing should + // continue from. + string page_token = 3; +} + +// A response message for listing all revisions for a OS policy assignment. +message ListOSPolicyAssignmentRevisionsResponse { + // The OS policy assignment revisions + repeated OSPolicyAssignment os_policy_assignments = 1; + + // The pagination token to retrieve the next page of OS policy assignment + // revisions. + string next_page_token = 2; +} + +// A request message for deleting a OS policy assignment. +message DeleteOSPolicyAssignmentRequest { + // Required. The name of the OS policy assignment to be deleted + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + } + ]; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto new file mode 100644 index 00000000000..2b99a97cbfa --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto @@ -0,0 +1,39 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_outer_classname = "Common"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option java_multiple_files = true; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// Message encapsulating a value that can be either absolute ("fixed") or +// relative ("percent") to a value. +message FixedOrPercent { + // Type of the value. + oneof mode { + // Specifies a fixed value. + int32 fixed = 1; + + // Specifies the relative value defined as a percentage, which will be + // multiplied by a reference value. + int32 percent = 2; + } +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto new file mode 100644 index 00000000000..3e7d847921d --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto @@ -0,0 +1,211 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto"; +import "google/cloud/osconfig/v1alpha/inventory.proto"; +import "google/cloud/osconfig/v1alpha/os_policy_assignments.proto"; +import "google/cloud/osconfig/v1alpha/vulnerability.proto"; +import "google/longrunning/operations.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_outer_classname = "OsConfigZonalServiceProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option java_multiple_files = true; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// Some messages refer to Compute API resources; the resource names +// need to be defined so that client library generators know how to handle them. +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" +}; + +// Zonal OS Config API +// +// The OS Config service is the server-side component that allows users to +// manage package installations and patch jobs for Compute Engine VM instances. +service OsConfigZonalService { + option (google.api.default_host) = "osconfig.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Create an OS policy assignment. + // + // This method also creates the first revision of the OS policy assignment. + // + // This method returns a long running operation (LRO) that contains the + // rollout details. The rollout can be cancelled by cancelling the LRO. + // + // For more information, see [Method: + // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + rpc CreateOSPolicyAssignment(CreateOSPolicyAssignmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments" + body: "os_policy_assignment" + }; + option (google.api.method_signature) = + "parent,os_policy_assignment,os_policy_assignment_id"; + option (google.longrunning.operation_info) = { + response_type: "OSPolicyAssignment" + metadata_type: "OSPolicyAssignmentOperationMetadata" + }; + } + + // Update an existing OS policy assignment. + // + // This method creates a new revision of the OS policy assignment. + // + // This method returns a long running operation (LRO) that contains the + // rollout details. The rollout can be cancelled by cancelling the LRO. + // + // For more information, see [Method: + // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + rpc UpdateOSPolicyAssignment(UpdateOSPolicyAssignmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}" + body: "os_policy_assignment" + }; + option (google.api.method_signature) = "os_policy_assignment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "OSPolicyAssignment" + metadata_type: "OSPolicyAssignmentOperationMetadata" + }; + } + + // Retrieve an existing OS policy assignment. + // + // This method always returns the latest revision. In order to retrieve a + // previous revision of the assignment, also provide the revision ID in the + // `name` parameter. + rpc GetOSPolicyAssignment(GetOSPolicyAssignmentRequest) + returns (OSPolicyAssignment) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List the OS policy assignments under the parent resource. + // + // For each OS policy assignment, the latest revision is returned. + rpc ListOSPolicyAssignments(ListOSPolicyAssignmentsRequest) + returns (ListOSPolicyAssignmentsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments" + }; + option (google.api.method_signature) = "parent"; + } + + // List the OS policy assignment revisions for a given OS policy assignment. + rpc ListOSPolicyAssignmentRevisions(ListOSPolicyAssignmentRevisionsRequest) + returns (ListOSPolicyAssignmentRevisionsResponse) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions" + }; + option (google.api.method_signature) = "name"; + } + + // Delete the OS policy assignment. + // + // This method creates a new revision of the OS policy assignment. + // + // This method returns a long running operation (LRO) that contains the + // rollout details. The rollout can be cancelled by cancelling the LRO. + // + // If the LRO completes and is not cancelled, all revisions associated with + // the OS policy assignment are deleted. + // + // For more information, see [Method: + // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + rpc DeleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OSPolicyAssignmentOperationMetadata" + }; + } + + // Get OS policies compliance data for the specified Compute Engine VM + // instance. + rpc GetInstanceOSPoliciesCompliance(GetInstanceOSPoliciesComplianceRequest) + returns (InstanceOSPoliciesCompliance) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List OS policies compliance data for all Compute Engine VM instances in the + // specified zone. + rpc ListInstanceOSPoliciesCompliances( + ListInstanceOSPoliciesCompliancesRequest) + returns (ListInstanceOSPoliciesCompliancesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances" + }; + option (google.api.method_signature) = "parent"; + } + + // Get inventory data for the specified VM instance. If the VM has no + // associated inventory, the message `NOT_FOUND` is returned. + rpc GetInventory(GetInventoryRequest) returns (Inventory) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/instances/*/inventory}" + }; + option (google.api.method_signature) = "name"; + } + + // List inventory data for all VM instances in the specified zone. + rpc ListInventories(ListInventoriesRequest) + returns (ListInventoriesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/instances/*}/inventories" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the vulnerability report for the specified VM instance. Only VMs with + // inventory data have vulnerability reports associated with them. + rpc GetVulnerabilityReport(GetVulnerabilityReportRequest) + returns (VulnerabilityReport) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/instances/*/vulnerabilityReport}" + }; + option (google.api.method_signature) = "name"; + } + + // List vulnerability reports for all VM instances in the specified zone. + rpc ListVulnerabilityReports(ListVulnerabilityReportsRequest) + returns (ListVulnerabilityReportsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports" + }; + option (google.api.method_signature) = "parent"; + } +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto new file mode 100644 index 00000000000..8dcfb327597 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto @@ -0,0 +1,336 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_outer_classname = "VulnerabilityProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option java_multiple_files = true; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// This API resource represents the vulnerability report for a specified +// Compute Engine virtual machine (VM) instance at a given point in time. +// +// For more information, see [Vulnerability +// reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports). +message VulnerabilityReport { + option (google.api.resource) = { + type: "osconfig.googleapis.com/VulnerabilityReport" + pattern: "projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport" + }; + + // A vulnerability affecting the VM instance. + message Vulnerability { + // Contains metadata information for the vulnerability. This information is + // collected from the upstream feed of the operating system. + message Details { + // A reference for this vulnerability. + message Reference { + // The url of the reference. + string url = 1; + } + + // The CVE of the vulnerability. CVE cannot be + // empty and the combination of should be unique + // across vulnerabilities for a VM. + string cve = 1; + + // The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of + // 0 - 10 where 0 indicates low severity and 10 indicates high severity. + float cvss_v2_score = 2; + + // The full description of the CVSSv3 for this vulnerability. + CVSSv3 cvss_v3 = 3; + + // Assigned severity/impact ranking. + string severity = 4; + + // The note or description describing the vulnerability. + string description = 5; + + // Corresponds to the references attached to the `VulnerabilityDetails`. + repeated Reference references = 6; + } + + // Contains metadata as per the upstream feed of the operating system. + Details details = 1; + + // Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + // This field displays the inventory items affected by this vulnerability. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. For some distros, + // this field may be empty. + repeated string installed_inventory_item_ids = 2; + + // Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. If there is no + // available fix, the field is empty. The `inventory_item` value specifies + // the latest `SoftwarePackage` available to the VM that fixes the + // vulnerability. + repeated string available_inventory_item_ids = 3; + + // The timestamp for when the vulnerability was first detected. + google.protobuf.Timestamp create_time = 4; + + // The timestamp for when the vulnerability was last modified. + google.protobuf.Timestamp update_time = 5; + } + + // Output only. The `vulnerabilityReport` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of vulnerabilities affecting the VM. + repeated Vulnerability vulnerabilities = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp for when the last vulnerability report was + // generated for the VM. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request message for getting the vulnerability report for the specified VM. +message GetVulnerabilityReportRequest { + // Required. API resource name for vulnerability resource. + // + // Format: + // `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, either Compute Engine `instance-id` or `instance-name` + // can be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/VulnerabilityReport" + } + ]; +} + +// A request message for listing vulnerability reports for all VM instances in +// the specified location. +message ListVulnerabilityReportsRequest { + // Required. The parent resource name. + // + // Format: `projects/{project}/locations/{location}/instances/{instance}` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, only `-` character is supported to list vulnerability + // reports across VMs. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + } + ]; + + // The maximum number of results to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListVulnerabilityReports` that indicates where this listing + // should continue from. + string page_token = 3; + + // If provided, this field specifies the criteria that must be met by a + // `vulnerabilityReport` API resource to be included in the response. + string filter = 4; +} + +// A response message for listing vulnerability reports for all VM instances in +// the specified location. +message ListVulnerabilityReportsResponse { + // List of vulnerabilityReport objects. + repeated VulnerabilityReport vulnerability_reports = 1; + + // The pagination token to retrieve the next page of vulnerabilityReports + // object. + string next_page_token = 2; +} + +// Common Vulnerability Scoring System version 3. +// For details, see https://www.first.org/cvss/specification-document +message CVSSv3 { + // This metric reflects the context by which vulnerability exploitation is + // possible. + enum AttackVector { + // Invalid value. + ATTACK_VECTOR_UNSPECIFIED = 0; + + // The vulnerable component is bound to the network stack and the set of + // possible attackers extends beyond the other options listed below, up to + // and including the entire Internet. + ATTACK_VECTOR_NETWORK = 1; + + // The vulnerable component is bound to the network stack, but the attack is + // limited at the protocol level to a logically adjacent topology. + ATTACK_VECTOR_ADJACENT = 2; + + // The vulnerable component is not bound to the network stack and the + // attacker's path is via read/write/execute capabilities. + ATTACK_VECTOR_LOCAL = 3; + + // The attack requires the attacker to physically touch or manipulate the + // vulnerable component. + ATTACK_VECTOR_PHYSICAL = 4; + } + + // This metric describes the conditions beyond the attacker's control that + // must exist in order to exploit the vulnerability. + enum AttackComplexity { + // Invalid value. + ATTACK_COMPLEXITY_UNSPECIFIED = 0; + + // Specialized access conditions or extenuating circumstances do not exist. + // An attacker can expect repeatable success when attacking the vulnerable + // component. + ATTACK_COMPLEXITY_LOW = 1; + + // A successful attack depends on conditions beyond the attacker's control. + // That is, a successful attack cannot be accomplished at will, but requires + // the attacker to invest in some measurable amount of effort in preparation + // or execution against the vulnerable component before a successful attack + // can be expected. + ATTACK_COMPLEXITY_HIGH = 2; + } + + // This metric describes the level of privileges an attacker must possess + // before successfully exploiting the vulnerability. + enum PrivilegesRequired { + // Invalid value. + PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + + // The attacker is unauthorized prior to attack, and therefore does not + // require any access to settings or files of the vulnerable system to + // carry out an attack. + PRIVILEGES_REQUIRED_NONE = 1; + + // The attacker requires privileges that provide basic user capabilities + // that could normally affect only settings and files owned by a user. + // Alternatively, an attacker with Low privileges has the ability to access + // only non-sensitive resources. + PRIVILEGES_REQUIRED_LOW = 2; + + // The attacker requires privileges that provide significant (e.g., + // administrative) control over the vulnerable component allowing access to + // component-wide settings and files. + PRIVILEGES_REQUIRED_HIGH = 3; + } + + // This metric captures the requirement for a human user, other than the + // attacker, to participate in the successful compromise of the vulnerable + // component. + enum UserInteraction { + // Invalid value. + USER_INTERACTION_UNSPECIFIED = 0; + + // The vulnerable system can be exploited without interaction from any user. + USER_INTERACTION_NONE = 1; + + // Successful exploitation of this vulnerability requires a user to take + // some action before the vulnerability can be exploited. + USER_INTERACTION_REQUIRED = 2; + } + + // The Scope metric captures whether a vulnerability in one vulnerable + // component impacts resources in components beyond its security scope. + enum Scope { + // Invalid value. + SCOPE_UNSPECIFIED = 0; + + // An exploited vulnerability can only affect resources managed by the same + // security authority. + SCOPE_UNCHANGED = 1; + + // An exploited vulnerability can affect resources beyond the security scope + // managed by the security authority of the vulnerable component. + SCOPE_CHANGED = 2; + } + + // The Impact metrics capture the effects of a successfully exploited + // vulnerability on the component that suffers the worst outcome that is most + // directly and predictably associated with the attack. + enum Impact { + // Invalid value. + IMPACT_UNSPECIFIED = 0; + + // High impact. + IMPACT_HIGH = 1; + + // Low impact. + IMPACT_LOW = 2; + + // No impact. + IMPACT_NONE = 3; + } + + // The base score is a function of the base metric scores. + // https://www.first.org/cvss/specification-document#Base-Metrics + float base_score = 1; + + // The Exploitability sub-score equation is derived from the Base + // Exploitability metrics. + // https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics + float exploitability_score = 2; + + // The Impact sub-score equation is derived from the Base Impact metrics. + float impact_score = 3; + + // This metric reflects the context by which vulnerability exploitation is + // possible. + AttackVector attack_vector = 5; + + // This metric describes the conditions beyond the attacker's control that + // must exist in order to exploit the vulnerability. + AttackComplexity attack_complexity = 6; + + // This metric describes the level of privileges an attacker must possess + // before successfully exploiting the vulnerability. + PrivilegesRequired privileges_required = 7; + + // This metric captures the requirement for a human user, other than the + // attacker, to participate in the successful compromise of the vulnerable + // component. + UserInteraction user_interaction = 8; + + // The Scope metric captures whether a vulnerability in one vulnerable + // component impacts resources in components beyond its security scope. + Scope scope = 9; + + // This metric measures the impact to the confidentiality of the information + // resources managed by a software component due to a successfully exploited + // vulnerability. + Impact confidentiality_impact = 10; + + // This metric measures the impact to integrity of a successfully exploited + // vulnerability. + Impact integrity_impact = 11; + + // This metric measures the impact to the availability of the impacted + // component resulting from a successfully exploited vulnerability. + Impact availability_impact = 12; +} diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index c5daa44e583..e62e94bc58b 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -2508,6 +2508,9 @@ export namespace google { /** MethodOptions .google.api.methodSignature */ ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); } /** Represents a MethodOptions. */ @@ -3421,6 +3424,192 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Namespace cloud. */ @@ -8591,956 +8780,9249 @@ export namespace google { } } } - } - } - /** Namespace api. */ - namespace api { + /** Namespace v1alpha. */ + namespace v1alpha { - /** Properties of a Http. */ - interface IHttp { + /** Properties of a OSPolicyResourceConfigStep. */ + interface IOSPolicyResourceConfigStep { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** OSPolicyResourceConfigStep type */ + type?: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } + /** OSPolicyResourceConfigStep outcome */ + outcome?: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|null); + } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a OSPolicyResourceConfigStep. */ + class OSPolicyResourceConfigStep implements IOSPolicyResourceConfigStep { - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); + /** + * Constructs a new OSPolicyResourceConfigStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** OSPolicyResourceConfigStep type. */ + public type: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type); - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** OSPolicyResourceConfigStep outcome. */ + public outcome: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome); - /** - * 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; + /** + * Creates a new OSPolicyResourceConfigStep instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyResourceConfigStep instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; - /** - * 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 OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. + * @param message OSPolicyResourceConfigStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep, 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; + /** + * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. + * @param message OSPolicyResourceConfigStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep, 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 OSPolicyResourceConfigStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; - /** - * 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; + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; - /** - * 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); + /** + * Verifies a OSPolicyResourceConfigStep message. + * @param message Plain object 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 OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyResourceConfigStep + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. + * @param message OSPolicyResourceConfigStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this OSPolicyResourceConfigStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a HttpRule. */ - interface IHttpRule { + namespace OSPolicyResourceConfigStep { - /** HttpRule selector */ - selector?: (string|null); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + VALIDATION = 1, + DESIRED_STATE_CHECK = 2, + DESIRED_STATE_ENFORCEMENT = 3, + DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4 + } - /** HttpRule get */ - get?: (string|null); + /** Outcome enum. */ + enum Outcome { + OUTCOME_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2 + } + } + + /** Properties of a OSPolicyResourceCompliance. */ + interface IOSPolicyResourceCompliance { + + /** OSPolicyResourceCompliance osPolicyResourceId */ + osPolicyResourceId?: (string|null); + + /** OSPolicyResourceCompliance configSteps */ + configSteps?: (google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep[]|null); + + /** OSPolicyResourceCompliance state */ + state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); + } + + /** Represents a OSPolicyResourceCompliance. */ + class OSPolicyResourceCompliance implements IOSPolicyResourceCompliance { + + /** + * Constructs a new OSPolicyResourceCompliance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance); + + /** OSPolicyResourceCompliance osPolicyResourceId. */ + public osPolicyResourceId: string; + + /** OSPolicyResourceCompliance configSteps. */ + public configSteps: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep[]; + + /** OSPolicyResourceCompliance state. */ + public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); + + /** + * Creates a new OSPolicyResourceCompliance instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyResourceCompliance instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; + + /** + * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. + * @param message OSPolicyResourceCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. + * @param message OSPolicyResourceCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; + + /** + * Verifies a OSPolicyResourceCompliance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyResourceCompliance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; + + /** + * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. + * @param message OSPolicyResourceCompliance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyResourceCompliance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** OSPolicyComplianceState enum. */ + enum OSPolicyComplianceState { + OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0, + COMPLIANT = 1, + NON_COMPLIANT = 2, + UNKNOWN = 3, + NO_OS_POLICIES_APPLICABLE = 4 + } + + /** Properties of an InstanceOSPoliciesCompliance. */ + interface IInstanceOSPoliciesCompliance { + + /** InstanceOSPoliciesCompliance name */ + name?: (string|null); + + /** InstanceOSPoliciesCompliance instance */ + instance?: (string|null); + + /** InstanceOSPoliciesCompliance state */ + state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); + + /** InstanceOSPoliciesCompliance detailedState */ + detailedState?: (string|null); + + /** InstanceOSPoliciesCompliance detailedStateReason */ + detailedStateReason?: (string|null); + + /** InstanceOSPoliciesCompliance osPolicyCompliances */ + osPolicyCompliances?: (google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance[]|null); + + /** InstanceOSPoliciesCompliance lastComplianceCheckTime */ + lastComplianceCheckTime?: (google.protobuf.ITimestamp|null); + + /** InstanceOSPoliciesCompliance lastComplianceRunId */ + lastComplianceRunId?: (string|null); + } + + /** Represents an InstanceOSPoliciesCompliance. */ + class InstanceOSPoliciesCompliance implements IInstanceOSPoliciesCompliance { + + /** + * Constructs a new InstanceOSPoliciesCompliance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance); + + /** InstanceOSPoliciesCompliance name. */ + public name: string; + + /** InstanceOSPoliciesCompliance instance. */ + public instance: string; + + /** InstanceOSPoliciesCompliance state. */ + public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); + + /** InstanceOSPoliciesCompliance detailedState. */ + public detailedState: string; + + /** InstanceOSPoliciesCompliance detailedStateReason. */ + public detailedStateReason: string; + + /** InstanceOSPoliciesCompliance osPolicyCompliances. */ + public osPolicyCompliances: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance[]; + + /** InstanceOSPoliciesCompliance lastComplianceCheckTime. */ + public lastComplianceCheckTime?: (google.protobuf.ITimestamp|null); + + /** InstanceOSPoliciesCompliance lastComplianceRunId. */ + public lastComplianceRunId: string; + + /** + * Creates a new InstanceOSPoliciesCompliance instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceOSPoliciesCompliance instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; + + /** + * Encodes the specified InstanceOSPoliciesCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. + * @param message InstanceOSPoliciesCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceOSPoliciesCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. + * @param message InstanceOSPoliciesCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceOSPoliciesCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; + + /** + * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceOSPoliciesCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; + + /** + * Verifies an InstanceOSPoliciesCompliance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstanceOSPoliciesCompliance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceOSPoliciesCompliance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; + + /** + * Creates a plain object from an InstanceOSPoliciesCompliance message. Also converts values to other types if specified. + * @param message InstanceOSPoliciesCompliance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceOSPoliciesCompliance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InstanceOSPoliciesCompliance { + + /** Properties of a OSPolicyCompliance. */ + interface IOSPolicyCompliance { + + /** OSPolicyCompliance osPolicyId */ + osPolicyId?: (string|null); + + /** OSPolicyCompliance osPolicyAssignment */ + osPolicyAssignment?: (string|null); + + /** OSPolicyCompliance state */ + state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); + + /** OSPolicyCompliance osPolicyResourceCompliances */ + osPolicyResourceCompliances?: (google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance[]|null); + } + + /** Represents a OSPolicyCompliance. */ + class OSPolicyCompliance implements IOSPolicyCompliance { + + /** + * Constructs a new OSPolicyCompliance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance); + + /** OSPolicyCompliance osPolicyId. */ + public osPolicyId: string; + + /** OSPolicyCompliance osPolicyAssignment. */ + public osPolicyAssignment: string; + + /** OSPolicyCompliance state. */ + public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); + + /** OSPolicyCompliance osPolicyResourceCompliances. */ + public osPolicyResourceCompliances: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance[]; + + /** + * Creates a new OSPolicyCompliance instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyCompliance instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + + /** + * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. + * @param message OSPolicyCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. + * @param message OSPolicyCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + + /** + * Verifies a OSPolicyCompliance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyCompliance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + + /** + * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. + * @param message OSPolicyCompliance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyCompliance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GetInstanceOSPoliciesComplianceRequest. */ + interface IGetInstanceOSPoliciesComplianceRequest { + + /** GetInstanceOSPoliciesComplianceRequest name */ + name?: (string|null); + } + + /** Represents a GetInstanceOSPoliciesComplianceRequest. */ + class GetInstanceOSPoliciesComplianceRequest implements IGetInstanceOSPoliciesComplianceRequest { + + /** + * Constructs a new GetInstanceOSPoliciesComplianceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest); + + /** GetInstanceOSPoliciesComplianceRequest name. */ + public name: string; + + /** + * Creates a new GetInstanceOSPoliciesComplianceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetInstanceOSPoliciesComplianceRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; + + /** + * Encodes the specified GetInstanceOSPoliciesComplianceRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. + * @param message GetInstanceOSPoliciesComplianceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetInstanceOSPoliciesComplianceRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. + * @param message GetInstanceOSPoliciesComplianceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetInstanceOSPoliciesComplianceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; + + /** + * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetInstanceOSPoliciesComplianceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; + + /** + * Verifies a GetInstanceOSPoliciesComplianceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetInstanceOSPoliciesComplianceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetInstanceOSPoliciesComplianceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; + + /** + * Creates a plain object from a GetInstanceOSPoliciesComplianceRequest message. Also converts values to other types if specified. + * @param message GetInstanceOSPoliciesComplianceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetInstanceOSPoliciesComplianceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListInstanceOSPoliciesCompliancesRequest. */ + interface IListInstanceOSPoliciesCompliancesRequest { + + /** ListInstanceOSPoliciesCompliancesRequest parent */ + parent?: (string|null); + + /** ListInstanceOSPoliciesCompliancesRequest pageSize */ + pageSize?: (number|null); + + /** ListInstanceOSPoliciesCompliancesRequest pageToken */ + pageToken?: (string|null); + + /** ListInstanceOSPoliciesCompliancesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListInstanceOSPoliciesCompliancesRequest. */ + class ListInstanceOSPoliciesCompliancesRequest implements IListInstanceOSPoliciesCompliancesRequest { + + /** + * Constructs a new ListInstanceOSPoliciesCompliancesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest); + + /** ListInstanceOSPoliciesCompliancesRequest parent. */ + public parent: string; + + /** ListInstanceOSPoliciesCompliancesRequest pageSize. */ + public pageSize: number; + + /** ListInstanceOSPoliciesCompliancesRequest pageToken. */ + public pageToken: string; + + /** ListInstanceOSPoliciesCompliancesRequest filter. */ + public filter: string; + + /** + * Creates a new ListInstanceOSPoliciesCompliancesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInstanceOSPoliciesCompliancesRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; + + /** + * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. + * @param message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. + * @param message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInstanceOSPoliciesCompliancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; + + /** + * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInstanceOSPoliciesCompliancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; + + /** + * Verifies a ListInstanceOSPoliciesCompliancesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInstanceOSPoliciesCompliancesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInstanceOSPoliciesCompliancesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; + + /** + * Creates a plain object from a ListInstanceOSPoliciesCompliancesRequest message. Also converts values to other types if specified. + * @param message ListInstanceOSPoliciesCompliancesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInstanceOSPoliciesCompliancesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListInstanceOSPoliciesCompliancesResponse. */ + interface IListInstanceOSPoliciesCompliancesResponse { + + /** ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances */ + instanceOsPoliciesCompliances?: (google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[]|null); + + /** ListInstanceOSPoliciesCompliancesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListInstanceOSPoliciesCompliancesResponse. */ + class ListInstanceOSPoliciesCompliancesResponse implements IListInstanceOSPoliciesCompliancesResponse { + + /** + * Constructs a new ListInstanceOSPoliciesCompliancesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse); + + /** ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances. */ + public instanceOsPoliciesCompliances: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[]; + + /** ListInstanceOSPoliciesCompliancesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListInstanceOSPoliciesCompliancesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInstanceOSPoliciesCompliancesResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; + + /** + * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. + * @param message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. + * @param message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInstanceOSPoliciesCompliancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; + + /** + * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInstanceOSPoliciesCompliancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; + + /** + * Verifies a ListInstanceOSPoliciesCompliancesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInstanceOSPoliciesCompliancesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInstanceOSPoliciesCompliancesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; + + /** + * Creates a plain object from a ListInstanceOSPoliciesCompliancesResponse message. Also converts values to other types if specified. + * @param message ListInstanceOSPoliciesCompliancesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInstanceOSPoliciesCompliancesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Inventory. */ + interface IInventory { + + /** Inventory name */ + name?: (string|null); + + /** Inventory osInfo */ + osInfo?: (google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null); + + /** Inventory items */ + items?: ({ [k: string]: google.cloud.osconfig.v1alpha.Inventory.IItem }|null); + + /** Inventory updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Inventory. */ + class Inventory implements IInventory { + + /** + * Constructs a new Inventory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IInventory); + + /** Inventory name. */ + public name: string; + + /** Inventory osInfo. */ + public osInfo?: (google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null); + + /** Inventory items. */ + public items: { [k: string]: google.cloud.osconfig.v1alpha.Inventory.IItem }; + + /** Inventory updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Inventory instance using the specified properties. + * @param [properties] Properties to set + * @returns Inventory instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IInventory): google.cloud.osconfig.v1alpha.Inventory; + + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Inventory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory; + + /** + * Decodes an Inventory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory; + + /** + * Verifies an Inventory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Inventory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory; + + /** + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @param message Inventory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Inventory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Inventory { + + /** Properties of an OsInfo. */ + interface IOsInfo { + + /** OsInfo hostname */ + hostname?: (string|null); + + /** OsInfo longName */ + longName?: (string|null); + + /** OsInfo shortName */ + shortName?: (string|null); + + /** OsInfo version */ + version?: (string|null); + + /** OsInfo architecture */ + architecture?: (string|null); + + /** OsInfo kernelVersion */ + kernelVersion?: (string|null); + + /** OsInfo kernelRelease */ + kernelRelease?: (string|null); + + /** OsInfo osconfigAgentVersion */ + osconfigAgentVersion?: (string|null); + } + + /** Represents an OsInfo. */ + class OsInfo implements IOsInfo { + + /** + * Constructs a new OsInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IOsInfo); + + /** OsInfo hostname. */ + public hostname: string; + + /** OsInfo longName. */ + public longName: string; + + /** OsInfo shortName. */ + public shortName: string; + + /** OsInfo version. */ + public version: string; + + /** OsInfo architecture. */ + public architecture: string; + + /** OsInfo kernelVersion. */ + public kernelVersion: string; + + /** OsInfo kernelRelease. */ + public kernelRelease: string; + + /** OsInfo osconfigAgentVersion. */ + public osconfigAgentVersion: string; + + /** + * Creates a new OsInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OsInfo instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IOsInfo): google.cloud.osconfig.v1alpha.Inventory.OsInfo; + + /** + * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * @param message OsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * @param message OsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OsInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.OsInfo; + + /** + * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.OsInfo; + + /** + * Verifies an OsInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OsInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.OsInfo; + + /** + * Creates a plain object from an OsInfo message. Also converts values to other types if specified. + * @param message OsInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.OsInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OsInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Item. */ + interface IItem { + + /** Item id */ + id?: (string|null); + + /** Item originType */ + originType?: (google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|null); + + /** Item createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Item updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Item type */ + type?: (google.cloud.osconfig.v1alpha.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.Type|null); + + /** Item installedPackage */ + installedPackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); + + /** Item availablePackage */ + availablePackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); + } + + /** Represents an Item. */ + class Item implements IItem { + + /** + * Constructs a new Item. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IItem); + + /** Item id. */ + public id: string; + + /** Item originType. */ + public originType: (google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.OriginType); + + /** Item createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Item updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Item type. */ + public type: (google.cloud.osconfig.v1alpha.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.Type); + + /** Item installedPackage. */ + public installedPackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); + + /** Item availablePackage. */ + public availablePackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); + + /** Item details. */ + public details?: ("installedPackage"|"availablePackage"); + + /** + * Creates a new Item instance using the specified properties. + * @param [properties] Properties to set + * @returns Item instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IItem): google.cloud.osconfig.v1alpha.Inventory.Item; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Item message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.Item; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.Item; + + /** + * Verifies an Item message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Item + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.Item; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @param message Item + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Item to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Item { + + /** OriginType enum. */ + enum OriginType { + ORIGIN_TYPE_UNSPECIFIED = 0, + INVENTORY_REPORT = 1 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + INSTALLED_PACKAGE = 1, + AVAILABLE_PACKAGE = 2 + } + } + + /** Properties of a SoftwarePackage. */ + interface ISoftwarePackage { + + /** SoftwarePackage yumPackage */ + yumPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage aptPackage */ + aptPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage zypperPackage */ + zypperPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage googetPackage */ + googetPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage zypperPatch */ + zypperPatch?: (google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null); + + /** SoftwarePackage wuaPackage */ + wuaPackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null); + + /** SoftwarePackage qfePackage */ + qfePackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null); + + /** SoftwarePackage cosPackage */ + cosPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + } + + /** Represents a SoftwarePackage. */ + class SoftwarePackage implements ISoftwarePackage { + + /** + * Constructs a new SoftwarePackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage); + + /** SoftwarePackage yumPackage. */ + public yumPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage aptPackage. */ + public aptPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage zypperPackage. */ + public zypperPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage googetPackage. */ + public googetPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage zypperPatch. */ + public zypperPatch?: (google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null); + + /** SoftwarePackage wuaPackage. */ + public wuaPackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null); + + /** SoftwarePackage qfePackage. */ + public qfePackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null); + + /** SoftwarePackage cosPackage. */ + public cosPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage details. */ + public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"); + + /** + * Creates a new SoftwarePackage instance using the specified properties. + * @param [properties] Properties to set + * @returns SoftwarePackage instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; + + /** + * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. + * @param message SoftwarePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. + * @param message SoftwarePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoftwarePackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; + + /** + * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; + + /** + * Verifies a SoftwarePackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoftwarePackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; + + /** + * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. + * @param message SoftwarePackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoftwarePackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a VersionedPackage. */ + interface IVersionedPackage { + + /** VersionedPackage packageName */ + packageName?: (string|null); + + /** VersionedPackage architecture */ + architecture?: (string|null); + + /** VersionedPackage version */ + version?: (string|null); + } + + /** Represents a VersionedPackage. */ + class VersionedPackage implements IVersionedPackage { + + /** + * Constructs a new VersionedPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage); + + /** VersionedPackage packageName. */ + public packageName: string; + + /** VersionedPackage architecture. */ + public architecture: string; + + /** VersionedPackage version. */ + public version: string; + + /** + * Creates a new VersionedPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionedPackage instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; + + /** + * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. + * @param message VersionedPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. + * @param message VersionedPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersionedPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; + + /** + * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; + + /** + * Verifies a VersionedPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionedPackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; + + /** + * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. + * @param message VersionedPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersionedPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ZypperPatch. */ + interface IZypperPatch { + + /** ZypperPatch patchName */ + patchName?: (string|null); + + /** ZypperPatch category */ + category?: (string|null); + + /** ZypperPatch severity */ + severity?: (string|null); + + /** ZypperPatch summary */ + summary?: (string|null); + } + + /** Represents a ZypperPatch. */ + class ZypperPatch implements IZypperPatch { + + /** + * Constructs a new ZypperPatch. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch); + + /** ZypperPatch patchName. */ + public patchName: string; + + /** ZypperPatch category. */ + public category: string; + + /** ZypperPatch severity. */ + public severity: string; + + /** ZypperPatch summary. */ + public summary: string; + + /** + * Creates a new ZypperPatch instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperPatch instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; + + /** + * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. + * @param message ZypperPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. + * @param message ZypperPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ZypperPatch message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; + + /** + * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; + + /** + * Verifies a ZypperPatch message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperPatch + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; + + /** + * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. + * @param message ZypperPatch + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.ZypperPatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ZypperPatch to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WindowsUpdatePackage. */ + interface IWindowsUpdatePackage { + + /** WindowsUpdatePackage title */ + title?: (string|null); + + /** WindowsUpdatePackage description */ + description?: (string|null); + + /** WindowsUpdatePackage categories */ + categories?: (google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]|null); + + /** WindowsUpdatePackage kbArticleIds */ + kbArticleIds?: (string[]|null); + + /** WindowsUpdatePackage supportUrl */ + supportUrl?: (string|null); + + /** WindowsUpdatePackage moreInfoUrls */ + moreInfoUrls?: (string[]|null); + + /** WindowsUpdatePackage updateId */ + updateId?: (string|null); + + /** WindowsUpdatePackage revisionNumber */ + revisionNumber?: (number|null); + + /** WindowsUpdatePackage lastDeploymentChangeTime */ + lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a WindowsUpdatePackage. */ + class WindowsUpdatePackage implements IWindowsUpdatePackage { + + /** + * Constructs a new WindowsUpdatePackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage); + + /** WindowsUpdatePackage title. */ + public title: string; + + /** WindowsUpdatePackage description. */ + public description: string; + + /** WindowsUpdatePackage categories. */ + public categories: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]; + + /** WindowsUpdatePackage kbArticleIds. */ + public kbArticleIds: string[]; + + /** WindowsUpdatePackage supportUrl. */ + public supportUrl: string; + + /** WindowsUpdatePackage moreInfoUrls. */ + public moreInfoUrls: string[]; + + /** WindowsUpdatePackage updateId. */ + public updateId: string; + + /** WindowsUpdatePackage revisionNumber. */ + public revisionNumber: number; + + /** WindowsUpdatePackage lastDeploymentChangeTime. */ + public lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new WindowsUpdatePackage instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdatePackage instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; + + /** + * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @param message WindowsUpdatePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @param message WindowsUpdatePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; + + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; + + /** + * Verifies a WindowsUpdatePackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdatePackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; + + /** + * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. + * @param message WindowsUpdatePackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsUpdatePackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WindowsUpdatePackage { + + /** Properties of a WindowsUpdateCategory. */ + interface IWindowsUpdateCategory { + + /** WindowsUpdateCategory id */ + id?: (string|null); + + /** WindowsUpdateCategory name */ + name?: (string|null); + } + + /** Represents a WindowsUpdateCategory. */ + class WindowsUpdateCategory implements IWindowsUpdateCategory { + + /** + * Constructs a new WindowsUpdateCategory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory); + + /** WindowsUpdateCategory id. */ + public id: string; + + /** WindowsUpdateCategory name. */ + public name: string; + + /** + * Creates a new WindowsUpdateCategory instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdateCategory instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + + /** + * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @param message WindowsUpdateCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @param message WindowsUpdateCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + + /** + * Verifies a WindowsUpdateCategory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdateCategory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + + /** + * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. + * @param message WindowsUpdateCategory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsUpdateCategory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a WindowsQuickFixEngineeringPackage. */ + interface IWindowsQuickFixEngineeringPackage { + + /** WindowsQuickFixEngineeringPackage caption */ + caption?: (string|null); + + /** WindowsQuickFixEngineeringPackage description */ + description?: (string|null); + + /** WindowsQuickFixEngineeringPackage hotFixId */ + hotFixId?: (string|null); + + /** WindowsQuickFixEngineeringPackage installTime */ + installTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a WindowsQuickFixEngineeringPackage. */ + class WindowsQuickFixEngineeringPackage implements IWindowsQuickFixEngineeringPackage { + + /** + * Constructs a new WindowsQuickFixEngineeringPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage); + + /** WindowsQuickFixEngineeringPackage caption. */ + public caption: string; + + /** WindowsQuickFixEngineeringPackage description. */ + public description: string; + + /** WindowsQuickFixEngineeringPackage hotFixId. */ + public hotFixId: string; + + /** WindowsQuickFixEngineeringPackage installTime. */ + public installTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsQuickFixEngineeringPackage instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; + + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @param message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @param message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; + + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; + + /** + * Verifies a WindowsQuickFixEngineeringPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsQuickFixEngineeringPackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; + + /** + * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. + * @param message WindowsQuickFixEngineeringPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsQuickFixEngineeringPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GetInventoryRequest. */ + interface IGetInventoryRequest { + + /** GetInventoryRequest name */ + name?: (string|null); + + /** GetInventoryRequest view */ + view?: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView|null); + } + + /** Represents a GetInventoryRequest. */ + class GetInventoryRequest implements IGetInventoryRequest { + + /** + * Constructs a new GetInventoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IGetInventoryRequest); + + /** GetInventoryRequest name. */ + public name: string; + + /** GetInventoryRequest view. */ + public view: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView); + + /** + * Creates a new GetInventoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetInventoryRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IGetInventoryRequest): google.cloud.osconfig.v1alpha.GetInventoryRequest; + + /** + * Encodes the specified GetInventoryRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. + * @param message GetInventoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IGetInventoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetInventoryRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. + * @param message GetInventoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetInventoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetInventoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetInventoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetInventoryRequest; + + /** + * Decodes a GetInventoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetInventoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetInventoryRequest; + + /** + * Verifies a GetInventoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetInventoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetInventoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetInventoryRequest; + + /** + * Creates a plain object from a GetInventoryRequest message. Also converts values to other types if specified. + * @param message GetInventoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.GetInventoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetInventoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListInventoriesRequest. */ + interface IListInventoriesRequest { + + /** ListInventoriesRequest parent */ + parent?: (string|null); + + /** ListInventoriesRequest view */ + view?: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView|null); + + /** ListInventoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListInventoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListInventoriesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListInventoriesRequest. */ + class ListInventoriesRequest implements IListInventoriesRequest { + + /** + * Constructs a new ListInventoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListInventoriesRequest); + + /** ListInventoriesRequest parent. */ + public parent: string; + + /** ListInventoriesRequest view. */ + public view: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView); + + /** ListInventoriesRequest pageSize. */ + public pageSize: number; + + /** ListInventoriesRequest pageToken. */ + public pageToken: string; + + /** ListInventoriesRequest filter. */ + public filter: string; + + /** + * Creates a new ListInventoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInventoriesRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListInventoriesRequest): google.cloud.osconfig.v1alpha.ListInventoriesRequest; + + /** + * Encodes the specified ListInventoriesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. + * @param message ListInventoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListInventoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInventoriesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. + * @param message ListInventoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInventoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInventoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInventoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInventoriesRequest; + + /** + * Decodes a ListInventoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInventoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInventoriesRequest; + + /** + * Verifies a ListInventoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInventoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInventoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInventoriesRequest; + + /** + * Creates a plain object from a ListInventoriesRequest message. Also converts values to other types if specified. + * @param message ListInventoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListInventoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInventoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListInventoriesResponse. */ + interface IListInventoriesResponse { + + /** ListInventoriesResponse inventories */ + inventories?: (google.cloud.osconfig.v1alpha.IInventory[]|null); + + /** ListInventoriesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListInventoriesResponse. */ + class ListInventoriesResponse implements IListInventoriesResponse { + + /** + * Constructs a new ListInventoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListInventoriesResponse); + + /** ListInventoriesResponse inventories. */ + public inventories: google.cloud.osconfig.v1alpha.IInventory[]; + + /** ListInventoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListInventoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInventoriesResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListInventoriesResponse): google.cloud.osconfig.v1alpha.ListInventoriesResponse; + + /** + * Encodes the specified ListInventoriesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. + * @param message ListInventoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListInventoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInventoriesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. + * @param message ListInventoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInventoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInventoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInventoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInventoriesResponse; + + /** + * Decodes a ListInventoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInventoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInventoriesResponse; + + /** + * Verifies a ListInventoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInventoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInventoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInventoriesResponse; + + /** + * Creates a plain object from a ListInventoriesResponse message. Also converts values to other types if specified. + * @param message ListInventoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListInventoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInventoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** InventoryView enum. */ + enum InventoryView { + INVENTORY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } + + /** Properties of a OSPolicy. */ + interface IOSPolicy { + + /** OSPolicy id */ + id?: (string|null); + + /** OSPolicy description */ + description?: (string|null); + + /** OSPolicy mode */ + mode?: (google.cloud.osconfig.v1alpha.OSPolicy.Mode|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Mode|null); + + /** OSPolicy resourceGroups */ + resourceGroups?: (google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup[]|null); + + /** OSPolicy allowNoResourceGroupMatch */ + allowNoResourceGroupMatch?: (boolean|null); + } + + /** Represents a OSPolicy. */ + class OSPolicy implements IOSPolicy { + + /** + * Constructs a new OSPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicy); + + /** OSPolicy id. */ + public id: string; + + /** OSPolicy description. */ + public description: string; + + /** OSPolicy mode. */ + public mode: (google.cloud.osconfig.v1alpha.OSPolicy.Mode|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Mode); + + /** OSPolicy resourceGroups. */ + public resourceGroups: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup[]; + + /** OSPolicy allowNoResourceGroupMatch. */ + public allowNoResourceGroupMatch: boolean; + + /** + * Creates a new OSPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicy instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicy): google.cloud.osconfig.v1alpha.OSPolicy; + + /** + * Encodes the specified OSPolicy message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. + * @param message OSPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicy message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. + * @param message OSPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy; + + /** + * Decodes a OSPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy; + + /** + * Verifies a OSPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy; + + /** + * Creates a plain object from a OSPolicy message. Also converts values to other types if specified. + * @param message OSPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicy { + + /** Properties of a OSFilter. */ + interface IOSFilter { + + /** OSFilter osShortName */ + osShortName?: (string|null); + + /** OSFilter osVersion */ + osVersion?: (string|null); + } + + /** Represents a OSFilter. */ + class OSFilter implements IOSFilter { + + /** + * Constructs a new OSFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter); + + /** OSFilter osShortName. */ + public osShortName: string; + + /** OSFilter osVersion. */ + public osVersion: string; + + /** + * Creates a new OSFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns OSFilter instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; + + /** + * Encodes the specified OSFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. + * @param message OSFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. + * @param message OSFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; + + /** + * Decodes a OSFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; + + /** + * Verifies a OSFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; + + /** + * Creates a plain object from a OSFilter message. Also converts values to other types if specified. + * @param message OSFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Resource. */ + interface IResource { + + /** Resource id */ + id?: (string|null); + + /** Resource pkg */ + pkg?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null); + + /** Resource repository */ + repository?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null); + + /** Resource exec */ + exec?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null); + + /** Resource file */ + file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null); + } + + /** Represents a Resource. */ + class Resource implements IResource { + + /** + * Constructs a new Resource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResource); + + /** Resource id. */ + public id: string; + + /** Resource pkg. */ + public pkg?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null); + + /** Resource repository. */ + public repository?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null); + + /** Resource exec. */ + public exec?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null); + + /** Resource file. */ + public file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null); + + /** Resource resourceType. */ + public resourceType?: ("pkg"|"repository"|"exec"|"file"); + + /** + * Creates a new Resource instance using the specified properties. + * @param [properties] Properties to set + * @returns Resource instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Resource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Resource { + + /** Properties of a File. */ + interface IFile { + + /** File remote */ + remote?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null); + + /** File gcs */ + gcs?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null); + + /** File localPath */ + localPath?: (string|null); + + /** File allowInsecure */ + allowInsecure?: (boolean|null); + } + + /** Represents a File. */ + class File implements IFile { + + /** + * Constructs a new File. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile); + + /** File remote. */ + public remote?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null); + + /** File gcs. */ + public gcs?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null); + + /** File localPath. */ + public localPath?: (string|null); + + /** File allowInsecure. */ + public allowInsecure: boolean; + + /** File type. */ + public type?: ("remote"|"gcs"|"localPath"); + + /** + * Creates a new File instance using the specified properties. + * @param [properties] Properties to set + * @returns File instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; + + /** + * Encodes the specified File message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a File message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; + + /** + * Verifies a File message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns File + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; + + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @param message File + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this File to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace File { + + /** Properties of a Remote. */ + interface IRemote { + + /** Remote uri */ + uri?: (string|null); + + /** Remote sha256Checksum */ + sha256Checksum?: (string|null); + } + + /** Represents a Remote. */ + class Remote implements IRemote { + + /** + * Constructs a new Remote. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote); + + /** Remote uri. */ + public uri: string; + + /** Remote sha256Checksum. */ + public sha256Checksum: string; + + /** + * Creates a new Remote instance using the specified properties. + * @param [properties] Properties to set + * @returns Remote instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; + + /** + * Encodes the specified Remote message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @param message Remote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Remote message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @param message Remote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Remote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; + + /** + * Decodes a Remote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; + + /** + * Verifies a Remote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Remote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Remote + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; + + /** + * Creates a plain object from a Remote message. Also converts values to other types if specified. + * @param message Remote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Remote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Gcs. */ + interface IGcs { + + /** Gcs bucket */ + bucket?: (string|null); + + /** Gcs object */ + object?: (string|null); + + /** Gcs generation */ + generation?: (number|Long|string|null); + } + + /** Represents a Gcs. */ + class Gcs implements IGcs { + + /** + * Constructs a new Gcs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs); + + /** Gcs bucket. */ + public bucket: string; + + /** Gcs object. */ + public object: string; + + /** Gcs generation. */ + public generation: (number|Long|string); + + /** + * Creates a new Gcs instance using the specified properties. + * @param [properties] Properties to set + * @returns Gcs instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; + + /** + * Encodes the specified Gcs message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @param message Gcs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Gcs message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @param message Gcs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Gcs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; + + /** + * Decodes a Gcs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; + + /** + * Verifies a Gcs message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Gcs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Gcs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; + + /** + * Creates a plain object from a Gcs message. Also converts values to other types if specified. + * @param message Gcs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Gcs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a PackageResource. */ + interface IPackageResource { + + /** PackageResource desiredState */ + desiredState?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|null); + + /** PackageResource apt */ + apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null); + + /** PackageResource deb */ + deb?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null); + + /** PackageResource yum */ + yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null); + + /** PackageResource zypper */ + zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null); + + /** PackageResource rpm */ + rpm?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null); + + /** PackageResource googet */ + googet?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null); + + /** PackageResource msi */ + msi?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null); + } + + /** Represents a PackageResource. */ + class PackageResource implements IPackageResource { + + /** + * Constructs a new PackageResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource); + + /** PackageResource desiredState. */ + public desiredState: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState); + + /** PackageResource apt. */ + public apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null); + + /** PackageResource deb. */ + public deb?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null); + + /** PackageResource yum. */ + public yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null); + + /** PackageResource zypper. */ + public zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null); + + /** PackageResource rpm. */ + public rpm?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null); + + /** PackageResource googet. */ + public googet?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null); + + /** PackageResource msi. */ + public msi?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null); + + /** PackageResource systemPackage. */ + public systemPackage?: ("apt"|"deb"|"yum"|"zypper"|"rpm"|"googet"|"msi"); + + /** + * Creates a new PackageResource instance using the specified properties. + * @param [properties] Properties to set + * @returns PackageResource instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; + + /** + * Encodes the specified PackageResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @param message PackageResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PackageResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @param message PackageResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PackageResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; + + /** + * Decodes a PackageResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; + + /** + * Verifies a PackageResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PackageResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PackageResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; + + /** + * Creates a plain object from a PackageResource message. Also converts values to other types if specified. + * @param message PackageResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PackageResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PackageResource { + + /** Properties of a Deb. */ + interface IDeb { + + /** Deb source */ + source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** Deb pullDeps */ + pullDeps?: (boolean|null); + } + + /** Represents a Deb. */ + class Deb implements IDeb { + + /** + * Constructs a new Deb. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb); + + /** Deb source. */ + public source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** Deb pullDeps. */ + public pullDeps: boolean; + + /** + * Creates a new Deb instance using the specified properties. + * @param [properties] Properties to set + * @returns Deb instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; + + /** + * Encodes the specified Deb message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @param message Deb message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Deb message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @param message Deb message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Deb message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; + + /** + * Decodes a Deb message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; + + /** + * Verifies a Deb message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Deb message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deb + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; + + /** + * Creates a plain object from a Deb message. Also converts values to other types if specified. + * @param message Deb + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Deb to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a APT. */ + interface IAPT { + + /** APT name */ + name?: (string|null); + } + + /** Represents a APT. */ + class APT implements IAPT { + + /** + * Constructs a new APT. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT); + + /** APT name. */ + public name: string; + + /** + * Creates a new APT instance using the specified properties. + * @param [properties] Properties to set + * @returns APT instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + + /** + * Encodes the specified APT message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @param message APT message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified APT message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @param message APT message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a APT message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + + /** + * Decodes a APT message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + + /** + * Verifies a APT message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a APT message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns APT + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + + /** + * Creates a plain object from a APT message. Also converts values to other types if specified. + * @param message APT + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this APT to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RPM. */ + interface IRPM { + + /** RPM source */ + source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** RPM pullDeps */ + pullDeps?: (boolean|null); + } + + /** Represents a RPM. */ + class RPM implements IRPM { + + /** + * Constructs a new RPM. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM); + + /** RPM source. */ + public source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** RPM pullDeps. */ + public pullDeps: boolean; + + /** + * Creates a new RPM instance using the specified properties. + * @param [properties] Properties to set + * @returns RPM instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + + /** + * Encodes the specified RPM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @param message RPM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RPM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @param message RPM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RPM message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + + /** + * Decodes a RPM message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + + /** + * Verifies a RPM message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RPM message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RPM + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + + /** + * Creates a plain object from a RPM message. Also converts values to other types if specified. + * @param message RPM + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RPM to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a YUM. */ + interface IYUM { + + /** YUM name */ + name?: (string|null); + } + + /** Represents a YUM. */ + class YUM implements IYUM { + + /** + * Constructs a new YUM. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM); + + /** YUM name. */ + public name: string; + + /** + * Creates a new YUM instance using the specified properties. + * @param [properties] Properties to set + * @returns YUM instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + + /** + * Encodes the specified YUM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @param message YUM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YUM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @param message YUM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YUM message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + + /** + * Decodes a YUM message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + + /** + * Verifies a YUM message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a YUM message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YUM + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + + /** + * Creates a plain object from a YUM message. Also converts values to other types if specified. + * @param message YUM + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YUM to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Zypper. */ + interface IZypper { + + /** Zypper name */ + name?: (string|null); + } + + /** Represents a Zypper. */ + class Zypper implements IZypper { + + /** + * Constructs a new Zypper. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper); + + /** Zypper name. */ + public name: string; + + /** + * Creates a new Zypper instance using the specified properties. + * @param [properties] Properties to set + * @returns Zypper instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Encodes the specified Zypper message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @param message Zypper message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Zypper message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @param message Zypper message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Zypper message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Decodes a Zypper message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Verifies a Zypper message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Zypper message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Zypper + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Creates a plain object from a Zypper message. Also converts values to other types if specified. + * @param message Zypper + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Zypper to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GooGet. */ + interface IGooGet { + + /** GooGet name */ + name?: (string|null); + } + + /** Represents a GooGet. */ + class GooGet implements IGooGet { + + /** + * Constructs a new GooGet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet); + + /** GooGet name. */ + public name: string; + + /** + * Creates a new GooGet instance using the specified properties. + * @param [properties] Properties to set + * @returns GooGet instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Encodes the specified GooGet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @param message GooGet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GooGet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @param message GooGet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GooGet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Decodes a GooGet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Verifies a GooGet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GooGet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GooGet + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Creates a plain object from a GooGet message. Also converts values to other types if specified. + * @param message GooGet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GooGet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MSI. */ + interface IMSI { + + /** MSI source */ + source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** MSI properties */ + properties?: (string[]|null); + } + + /** Represents a MSI. */ + class MSI implements IMSI { + + /** + * Constructs a new MSI. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI); + + /** MSI source. */ + public source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** MSI properties. */ + public properties: string[]; + + /** + * Creates a new MSI instance using the specified properties. + * @param [properties] Properties to set + * @returns MSI instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + + /** + * Encodes the specified MSI message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @param message MSI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MSI message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @param message MSI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MSI message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + + /** + * Decodes a MSI message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + + /** + * Verifies a MSI message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MSI message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MSI + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + + /** + * Creates a plain object from a MSI message. Also converts values to other types if specified. + * @param message MSI + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MSI to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** DesiredState enum. */ + enum DesiredState { + DESIRED_STATE_UNSPECIFIED = 0, + INSTALLED = 1, + REMOVED = 2 + } + } + + /** Properties of a RepositoryResource. */ + interface IRepositoryResource { + + /** RepositoryResource apt */ + apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null); + + /** RepositoryResource yum */ + yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null); + + /** RepositoryResource zypper */ + zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null); + + /** RepositoryResource goo */ + goo?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null); + } + + /** Represents a RepositoryResource. */ + class RepositoryResource implements IRepositoryResource { + + /** + * Constructs a new RepositoryResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource); + + /** RepositoryResource apt. */ + public apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null); + + /** RepositoryResource yum. */ + public yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null); + + /** RepositoryResource zypper. */ + public zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null); + + /** RepositoryResource goo. */ + public goo?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null); + + /** RepositoryResource repository. */ + public repository?: ("apt"|"yum"|"zypper"|"goo"); + + /** + * Creates a new RepositoryResource instance using the specified properties. + * @param [properties] Properties to set + * @returns RepositoryResource instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + + /** + * Encodes the specified RepositoryResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @param message RepositoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepositoryResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @param message RepositoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + + /** + * Verifies a RepositoryResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RepositoryResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepositoryResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + + /** + * Creates a plain object from a RepositoryResource message. Also converts values to other types if specified. + * @param message RepositoryResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepositoryResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RepositoryResource { + + /** Properties of an AptRepository. */ + interface IAptRepository { + + /** AptRepository archiveType */ + archiveType?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|null); + + /** AptRepository uri */ + uri?: (string|null); + + /** AptRepository distribution */ + distribution?: (string|null); + + /** AptRepository components */ + components?: (string[]|null); + + /** AptRepository gpgKey */ + gpgKey?: (string|null); + } + + /** Represents an AptRepository. */ + class AptRepository implements IAptRepository { + + /** + * Constructs a new AptRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository); + + /** AptRepository archiveType. */ + public archiveType: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType); + + /** AptRepository uri. */ + public uri: string; + + /** AptRepository distribution. */ + public distribution: string; + + /** AptRepository components. */ + public components: string[]; + + /** AptRepository gpgKey. */ + public gpgKey: string; + + /** + * Creates a new AptRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns AptRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Encodes the specified AptRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @param message AptRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @param message AptRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AptRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Decodes an AptRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Verifies an AptRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AptRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Creates a plain object from an AptRepository message. Also converts values to other types if specified. + * @param message AptRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AptRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AptRepository { + + /** ArchiveType enum. */ + enum ArchiveType { + ARCHIVE_TYPE_UNSPECIFIED = 0, + DEB = 1, + DEB_SRC = 2 + } + } + + /** Properties of a YumRepository. */ + interface IYumRepository { + + /** YumRepository id */ + id?: (string|null); + + /** YumRepository displayName */ + displayName?: (string|null); + + /** YumRepository baseUrl */ + baseUrl?: (string|null); + + /** YumRepository gpgKeys */ + gpgKeys?: (string[]|null); + } + + /** Represents a YumRepository. */ + class YumRepository implements IYumRepository { + + /** + * Constructs a new YumRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository); + + /** YumRepository id. */ + public id: string; + + /** YumRepository displayName. */ + public displayName: string; + + /** YumRepository baseUrl. */ + public baseUrl: string; + + /** YumRepository gpgKeys. */ + public gpgKeys: string[]; + + /** + * Creates a new YumRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns YumRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Encodes the specified YumRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @param message YumRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @param message YumRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YumRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Decodes a YumRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Verifies a YumRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Creates a plain object from a YumRepository message. Also converts values to other types if specified. + * @param message YumRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YumRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ZypperRepository. */ + interface IZypperRepository { + + /** ZypperRepository id */ + id?: (string|null); + + /** ZypperRepository displayName */ + displayName?: (string|null); + + /** ZypperRepository baseUrl */ + baseUrl?: (string|null); + + /** ZypperRepository gpgKeys */ + gpgKeys?: (string[]|null); + } + + /** Represents a ZypperRepository. */ + class ZypperRepository implements IZypperRepository { + + /** + * Constructs a new ZypperRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository); + + /** ZypperRepository id. */ + public id: string; + + /** ZypperRepository displayName. */ + public displayName: string; + + /** ZypperRepository baseUrl. */ + public baseUrl: string; + + /** ZypperRepository gpgKeys. */ + public gpgKeys: string[]; + + /** + * Creates a new ZypperRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; + + /** + * Encodes the specified ZypperRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @param message ZypperRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ZypperRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @param message ZypperRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ZypperRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; + + /** + * Decodes a ZypperRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; + + /** + * Verifies a ZypperRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ZypperRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; + + /** + * Creates a plain object from a ZypperRepository message. Also converts values to other types if specified. + * @param message ZypperRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ZypperRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GooRepository. */ + interface IGooRepository { + + /** GooRepository name */ + name?: (string|null); + + /** GooRepository url */ + url?: (string|null); + } + + /** Represents a GooRepository. */ + class GooRepository implements IGooRepository { + + /** + * Constructs a new GooRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository); + + /** GooRepository name. */ + public name: string; + + /** GooRepository url. */ + public url: string; + + /** + * Creates a new GooRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns GooRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Encodes the specified GooRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @param message GooRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GooRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @param message GooRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GooRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Decodes a GooRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Verifies a GooRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GooRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GooRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Creates a plain object from a GooRepository message. Also converts values to other types if specified. + * @param message GooRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GooRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExecResource. */ + interface IExecResource { + + /** ExecResource validate */ + validate?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); + + /** ExecResource enforce */ + enforce?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); + } + + /** Represents an ExecResource. */ + class ExecResource implements IExecResource { + + /** + * Constructs a new ExecResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource); + + /** ExecResource validate. */ + public validate?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); + + /** ExecResource enforce. */ + public enforce?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); + + /** + * Creates a new ExecResource instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecResource instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; + + /** + * Encodes the specified ExecResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @param message ExecResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @param message ExecResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; + + /** + * Decodes an ExecResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; + + /** + * Verifies an ExecResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; + + /** + * Creates a plain object from an ExecResource message. Also converts values to other types if specified. + * @param message ExecResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ExecResource { + + /** Properties of an Exec. */ + interface IExec { + + /** Exec file */ + file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** Exec script */ + script?: (string|null); + + /** Exec args */ + args?: (string[]|null); + + /** Exec interpreter */ + interpreter?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|null); + } + + /** Represents an Exec. */ + class Exec implements IExec { + + /** + * Constructs a new Exec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec); + + /** Exec file. */ + public file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** Exec script. */ + public script?: (string|null); + + /** Exec args. */ + public args: string[]; + + /** Exec interpreter. */ + public interpreter: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter); + + /** Exec source. */ + public source?: ("file"|"script"); + + /** + * Creates a new Exec instance using the specified properties. + * @param [properties] Properties to set + * @returns Exec instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; + + /** + * Encodes the specified Exec message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @param message Exec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exec message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @param message Exec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; + + /** + * Decodes an Exec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; + + /** + * Verifies an Exec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Exec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; + + /** + * Creates a plain object from an Exec message. Also converts values to other types if specified. + * @param message Exec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Exec { + + /** Interpreter enum. */ + enum Interpreter { + INTERPRETER_UNSPECIFIED = 0, + NONE = 1, + SHELL = 2, + POWERSHELL = 3 + } + } + } + + /** Properties of a FileResource. */ + interface IFileResource { + + /** FileResource file */ + file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** FileResource content */ + content?: (string|null); + + /** FileResource path */ + path?: (string|null); + + /** FileResource state */ + state?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|null); + + /** FileResource permissions */ + permissions?: (string|null); + } + + /** Represents a FileResource. */ + class FileResource implements IFileResource { + + /** + * Constructs a new FileResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource); + + /** FileResource file. */ + public file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** FileResource content. */ + public content?: (string|null); + + /** FileResource path. */ + public path: string; + + /** FileResource state. */ + public state: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState); + + /** FileResource permissions. */ + public permissions: string; + + /** FileResource source. */ + public source?: ("file"|"content"); + + /** + * Creates a new FileResource instance using the specified properties. + * @param [properties] Properties to set + * @returns FileResource instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; + + /** + * Encodes the specified FileResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. + * @param message FileResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. + * @param message FileResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; + + /** + * Decodes a FileResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; + + /** + * Verifies a FileResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; + + /** + * Creates a plain object from a FileResource message. Also converts values to other types if specified. + * @param message FileResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileResource { + + /** DesiredState enum. */ + enum DesiredState { + DESIRED_STATE_UNSPECIFIED = 0, + PRESENT = 1, + ABSENT = 2, + CONTENTS_MATCH = 3 + } + } + } + + /** Properties of a ResourceGroup. */ + interface IResourceGroup { + + /** ResourceGroup osFilter */ + osFilter?: (google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null); + + /** ResourceGroup resources */ + resources?: (google.cloud.osconfig.v1alpha.OSPolicy.IResource[]|null); + } + + /** Represents a ResourceGroup. */ + class ResourceGroup implements IResourceGroup { + + /** + * Constructs a new ResourceGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup); + + /** ResourceGroup osFilter. */ + public osFilter?: (google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null); + + /** ResourceGroup resources. */ + public resources: google.cloud.osconfig.v1alpha.OSPolicy.IResource[]; + + /** + * Creates a new ResourceGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceGroup instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; + + /** + * Encodes the specified ResourceGroup message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; + + /** + * Verifies a ResourceGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceGroup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; + + /** + * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. + * @param message ResourceGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + VALIDATION = 1, + ENFORCEMENT = 2 + } + } + + /** Properties of a OSPolicyAssignment. */ + interface IOSPolicyAssignment { + + /** OSPolicyAssignment name */ + name?: (string|null); + + /** OSPolicyAssignment description */ + description?: (string|null); + + /** OSPolicyAssignment osPolicies */ + osPolicies?: (google.cloud.osconfig.v1alpha.IOSPolicy[]|null); + + /** OSPolicyAssignment instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); + + /** OSPolicyAssignment rollout */ + rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); + + /** OSPolicyAssignment revisionId */ + revisionId?: (string|null); + + /** OSPolicyAssignment revisionCreateTime */ + revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignment rolloutState */ + rolloutState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null); + + /** OSPolicyAssignment baseline */ + baseline?: (boolean|null); + + /** OSPolicyAssignment deleted */ + deleted?: (boolean|null); + + /** OSPolicyAssignment reconciling */ + reconciling?: (boolean|null); + + /** OSPolicyAssignment uid */ + uid?: (string|null); + } + + /** Represents a OSPolicyAssignment. */ + class OSPolicyAssignment implements IOSPolicyAssignment { + + /** + * Constructs a new OSPolicyAssignment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment); + + /** OSPolicyAssignment name. */ + public name: string; + + /** OSPolicyAssignment description. */ + public description: string; + + /** OSPolicyAssignment osPolicies. */ + public osPolicies: google.cloud.osconfig.v1alpha.IOSPolicy[]; + + /** OSPolicyAssignment instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); + + /** OSPolicyAssignment rollout. */ + public rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); + + /** OSPolicyAssignment revisionId. */ + public revisionId: string; + + /** OSPolicyAssignment revisionCreateTime. */ + public revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignment rolloutState. */ + public rolloutState: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState); + + /** OSPolicyAssignment baseline. */ + public baseline: boolean; + + /** OSPolicyAssignment deleted. */ + public deleted: boolean; + + /** OSPolicyAssignment reconciling. */ + public reconciling: boolean; + + /** OSPolicyAssignment uid. */ + public uid: string; + + /** + * Creates a new OSPolicyAssignment instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyAssignment instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + + /** + * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @param message OSPolicyAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @param message OSPolicyAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + + /** + * Verifies a OSPolicyAssignment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyAssignment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + + /** + * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. + * @param message OSPolicyAssignment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyAssignment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyAssignment { + + /** Properties of a LabelSet. */ + interface ILabelSet { + + /** LabelSet labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a LabelSet. */ + class LabelSet implements ILabelSet { + + /** + * Constructs a new LabelSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet); + + /** LabelSet labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new LabelSet instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelSet instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; + + /** + * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @param message LabelSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelSet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @param message LabelSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; + + /** + * Decodes a LabelSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; + + /** + * Verifies a LabelSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LabelSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelSet + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; + + /** + * Creates a plain object from a LabelSet message. Also converts values to other types if specified. + * @param message LabelSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InstanceFilter. */ + interface IInstanceFilter { + + /** InstanceFilter all */ + all?: (boolean|null); + + /** InstanceFilter osShortNames */ + osShortNames?: (string[]|null); + + /** InstanceFilter inclusionLabels */ + inclusionLabels?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]|null); + + /** InstanceFilter exclusionLabels */ + exclusionLabels?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]|null); + } + + /** Represents an InstanceFilter. */ + class InstanceFilter implements IInstanceFilter { + + /** + * Constructs a new InstanceFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter); + + /** InstanceFilter all. */ + public all: boolean; + + /** InstanceFilter osShortNames. */ + public osShortNames: string[]; + + /** InstanceFilter inclusionLabels. */ + public inclusionLabels: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]; + + /** InstanceFilter exclusionLabels. */ + public exclusionLabels: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]; + + /** + * Creates a new InstanceFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceFilter instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; + + /** + * Encodes the specified InstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @param message InstanceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @param message InstanceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; + + /** + * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; + + /** + * Verifies an InstanceFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; + + /** + * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. + * @param message InstanceFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Rollout. */ + interface IRollout { + + /** Rollout disruptionBudget */ + disruptionBudget?: (google.cloud.osconfig.v1alpha.IFixedOrPercent|null); + + /** Rollout minWaitDuration */ + minWaitDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a Rollout. */ + class Rollout implements IRollout { + + /** + * Constructs a new Rollout. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout); + + /** Rollout disruptionBudget. */ + public disruptionBudget?: (google.cloud.osconfig.v1alpha.IFixedOrPercent|null); + + /** Rollout minWaitDuration. */ + public minWaitDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new Rollout instance using the specified properties. + * @param [properties] Properties to set + * @returns Rollout instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; + + /** + * Verifies a Rollout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rollout + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @param message Rollout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rollout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** RolloutState enum. */ + enum RolloutState { + ROLLOUT_STATE_UNSPECIFIED = 0, + IN_PROGRESS = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4 + } + } + + /** Properties of a OSPolicyAssignmentOperationMetadata. */ + interface IOSPolicyAssignmentOperationMetadata { + + /** OSPolicyAssignmentOperationMetadata osPolicyAssignment */ + osPolicyAssignment?: (string|null); + + /** OSPolicyAssignmentOperationMetadata apiMethod */ + apiMethod?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|null); + + /** OSPolicyAssignmentOperationMetadata rolloutState */ + rolloutState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|null); + + /** OSPolicyAssignmentOperationMetadata rolloutStartTime */ + rolloutStartTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignmentOperationMetadata rolloutUpdateTime */ + rolloutUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a OSPolicyAssignmentOperationMetadata. */ + class OSPolicyAssignmentOperationMetadata implements IOSPolicyAssignmentOperationMetadata { + + /** + * Constructs a new OSPolicyAssignmentOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata); + + /** OSPolicyAssignmentOperationMetadata osPolicyAssignment. */ + public osPolicyAssignment: string; + + /** OSPolicyAssignmentOperationMetadata apiMethod. */ + public apiMethod: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod); + + /** OSPolicyAssignmentOperationMetadata rolloutState. */ + public rolloutState: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState); + + /** OSPolicyAssignmentOperationMetadata rolloutStartTime. */ + public rolloutStartTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignmentOperationMetadata rolloutUpdateTime. */ + public rolloutUpdateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OSPolicyAssignmentOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyAssignmentOperationMetadata instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @param message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @param message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + + /** + * Verifies a OSPolicyAssignmentOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyAssignmentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyAssignmentOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + + /** + * Creates a plain object from a OSPolicyAssignmentOperationMetadata message. Also converts values to other types if specified. + * @param message OSPolicyAssignmentOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyAssignmentOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyAssignmentOperationMetadata { + + /** APIMethod enum. */ + enum APIMethod { + API_METHOD_UNSPECIFIED = 0, + CREATE = 1, + UPDATE = 2, + DELETE = 3 + } + + /** RolloutState enum. */ + enum RolloutState { + ROLLOUT_STATE_UNSPECIFIED = 0, + IN_PROGRESS = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4 + } + } + + /** Properties of a CreateOSPolicyAssignmentRequest. */ + interface ICreateOSPolicyAssignmentRequest { + + /** CreateOSPolicyAssignmentRequest parent */ + parent?: (string|null); + + /** CreateOSPolicyAssignmentRequest osPolicyAssignment */ + osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); + + /** CreateOSPolicyAssignmentRequest osPolicyAssignmentId */ + osPolicyAssignmentId?: (string|null); + } + + /** Represents a CreateOSPolicyAssignmentRequest. */ + class CreateOSPolicyAssignmentRequest implements ICreateOSPolicyAssignmentRequest { + + /** + * Constructs a new CreateOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest); + + /** CreateOSPolicyAssignmentRequest parent. */ + public parent: string; + + /** CreateOSPolicyAssignmentRequest osPolicyAssignment. */ + public osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); + + /** CreateOSPolicyAssignmentRequest osPolicyAssignmentId. */ + public osPolicyAssignmentId: string; + + /** + * Creates a new CreateOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; + + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; + + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; + + /** + * Verifies a CreateOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; + + /** + * Creates a plain object from a CreateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message CreateOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateOSPolicyAssignmentRequest. */ + interface IUpdateOSPolicyAssignmentRequest { + + /** UpdateOSPolicyAssignmentRequest osPolicyAssignment */ + osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); + + /** UpdateOSPolicyAssignmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateOSPolicyAssignmentRequest. */ + class UpdateOSPolicyAssignmentRequest implements IUpdateOSPolicyAssignmentRequest { + + /** + * Constructs a new UpdateOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest); + + /** UpdateOSPolicyAssignmentRequest osPolicyAssignment. */ + public osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); + + /** UpdateOSPolicyAssignmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; + + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; + + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; + + /** + * Verifies an UpdateOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; + + /** + * Creates a plain object from an UpdateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message UpdateOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOSPolicyAssignmentRequest. */ + interface IGetOSPolicyAssignmentRequest { + + /** GetOSPolicyAssignmentRequest name */ + name?: (string|null); + } + + /** Represents a GetOSPolicyAssignmentRequest. */ + class GetOSPolicyAssignmentRequest implements IGetOSPolicyAssignmentRequest { + + /** + * Constructs a new GetOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest); + + /** GetOSPolicyAssignmentRequest name. */ + public name: string; + + /** + * Creates a new GetOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; + + /** + * Encodes the specified GetOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; + + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; + + /** + * Verifies a GetOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; + + /** + * Creates a plain object from a GetOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message GetOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentsRequest. */ + interface IListOSPolicyAssignmentsRequest { + + /** ListOSPolicyAssignmentsRequest parent */ + parent?: (string|null); + + /** ListOSPolicyAssignmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListOSPolicyAssignmentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentsRequest. */ + class ListOSPolicyAssignmentsRequest implements IListOSPolicyAssignmentsRequest { + + /** + * Constructs a new ListOSPolicyAssignmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest); + + /** ListOSPolicyAssignmentsRequest parent. */ + public parent: string; + + /** ListOSPolicyAssignmentsRequest pageSize. */ + public pageSize: number; + + /** ListOSPolicyAssignmentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; + + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; + + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; + + /** + * Verifies a ListOSPolicyAssignmentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; + + /** + * Creates a plain object from a ListOSPolicyAssignmentsRequest message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentsResponse. */ + interface IListOSPolicyAssignmentsResponse { + + /** ListOSPolicyAssignmentsResponse osPolicyAssignments */ + osPolicyAssignments?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]|null); + + /** ListOSPolicyAssignmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentsResponse. */ + class ListOSPolicyAssignmentsResponse implements IListOSPolicyAssignmentsResponse { + + /** + * Constructs a new ListOSPolicyAssignmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse); + + /** ListOSPolicyAssignmentsResponse osPolicyAssignments. */ + public osPolicyAssignments: google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]; + + /** ListOSPolicyAssignmentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; + + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; + + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; + + /** + * Verifies a ListOSPolicyAssignmentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; + + /** + * Creates a plain object from a ListOSPolicyAssignmentsResponse message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentRevisionsRequest. */ + interface IListOSPolicyAssignmentRevisionsRequest { + + /** ListOSPolicyAssignmentRevisionsRequest name */ + name?: (string|null); + + /** ListOSPolicyAssignmentRevisionsRequest pageSize */ + pageSize?: (number|null); + + /** ListOSPolicyAssignmentRevisionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentRevisionsRequest. */ + class ListOSPolicyAssignmentRevisionsRequest implements IListOSPolicyAssignmentRevisionsRequest { + + /** + * Constructs a new ListOSPolicyAssignmentRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest); + + /** ListOSPolicyAssignmentRevisionsRequest name. */ + public name: string; + + /** ListOSPolicyAssignmentRevisionsRequest pageSize. */ + public pageSize: number; + + /** ListOSPolicyAssignmentRevisionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentRevisionsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; + + /** + * Verifies a ListOSPolicyAssignmentRevisionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; + + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsRequest message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentRevisionsResponse. */ + interface IListOSPolicyAssignmentRevisionsResponse { + + /** ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments */ + osPolicyAssignments?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]|null); + + /** ListOSPolicyAssignmentRevisionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentRevisionsResponse. */ + class ListOSPolicyAssignmentRevisionsResponse implements IListOSPolicyAssignmentRevisionsResponse { + + /** + * Constructs a new ListOSPolicyAssignmentRevisionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse); + + /** ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments. */ + public osPolicyAssignments: google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]; + + /** ListOSPolicyAssignmentRevisionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentRevisionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentRevisionsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; + + /** + * Verifies a ListOSPolicyAssignmentRevisionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentRevisionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; + + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsResponse message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentRevisionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentRevisionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOSPolicyAssignmentRequest. */ + interface IDeleteOSPolicyAssignmentRequest { + + /** DeleteOSPolicyAssignmentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOSPolicyAssignmentRequest. */ + class DeleteOSPolicyAssignmentRequest implements IDeleteOSPolicyAssignmentRequest { + + /** + * Constructs a new DeleteOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest); + + /** DeleteOSPolicyAssignmentRequest name. */ + public name: string; + + /** + * Creates a new DeleteOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; + + /** + * Encodes the specified DeleteOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @param message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @param message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; + + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; + + /** + * Verifies a DeleteOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; + + /** + * Creates a plain object from a DeleteOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message DeleteOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FixedOrPercent. */ + interface IFixedOrPercent { + + /** FixedOrPercent fixed */ + fixed?: (number|null); + + /** FixedOrPercent percent */ + percent?: (number|null); + } + + /** Represents a FixedOrPercent. */ + class FixedOrPercent implements IFixedOrPercent { + + /** + * Constructs a new FixedOrPercent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IFixedOrPercent); + + /** FixedOrPercent fixed. */ + public fixed?: (number|null); + + /** FixedOrPercent percent. */ + public percent?: (number|null); + + /** FixedOrPercent mode. */ + public mode?: ("fixed"|"percent"); + + /** + * Creates a new FixedOrPercent instance using the specified properties. + * @param [properties] Properties to set + * @returns FixedOrPercent instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IFixedOrPercent): google.cloud.osconfig.v1alpha.FixedOrPercent; + + /** + * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. + * @param message FixedOrPercent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. + * @param message FixedOrPercent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FixedOrPercent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.FixedOrPercent; + + /** + * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.FixedOrPercent; + + /** + * Verifies a FixedOrPercent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FixedOrPercent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.FixedOrPercent; + + /** + * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. + * @param message FixedOrPercent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.FixedOrPercent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FixedOrPercent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents an OsConfigZonalService */ + class OsConfigZonalService extends $protobuf.rpc.Service { + + /** + * Constructs a new OsConfigZonalService 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 OsConfigZonalService 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): OsConfigZonalService; + + /** + * Calls CreateOSPolicyAssignment. + * @param request CreateOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignmentCallback): void; + + /** + * Calls CreateOSPolicyAssignment. + * @param request CreateOSPolicyAssignmentRequest message or plain object + * @returns Promise + */ + public createOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest): Promise; + + /** + * Calls UpdateOSPolicyAssignment. + * @param request UpdateOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignmentCallback): void; + + /** + * Calls UpdateOSPolicyAssignment. + * @param request UpdateOSPolicyAssignmentRequest message or plain object + * @returns Promise + */ + public updateOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest): Promise; + + /** + * Calls GetOSPolicyAssignment. + * @param request GetOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OSPolicyAssignment + */ + public getOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentCallback): void; + + /** + * Calls GetOSPolicyAssignment. + * @param request GetOSPolicyAssignmentRequest message or plain object + * @returns Promise + */ + public getOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest): Promise; + + /** + * Calls ListOSPolicyAssignments. + * @param request ListOSPolicyAssignmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentsResponse + */ + public listOSPolicyAssignments(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentsCallback): void; + + /** + * Calls ListOSPolicyAssignments. + * @param request ListOSPolicyAssignmentsRequest message or plain object + * @returns Promise + */ + public listOSPolicyAssignments(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest): Promise; + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @param request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentRevisionsResponse + */ + public listOSPolicyAssignmentRevisions(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisionsCallback): void; + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @param request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @returns Promise + */ + public listOSPolicyAssignmentRevisions(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest): Promise; + + /** + * Calls DeleteOSPolicyAssignment. + * @param request DeleteOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignmentCallback): void; + + /** + * Calls DeleteOSPolicyAssignment. + * @param request DeleteOSPolicyAssignmentRequest message or plain object + * @returns Promise + */ + public deleteOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest): Promise; + + /** + * Calls GetInstanceOSPoliciesCompliance. + * @param request GetInstanceOSPoliciesComplianceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InstanceOSPoliciesCompliance + */ + public getInstanceOSPoliciesCompliance(request: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesComplianceCallback): void; + + /** + * Calls GetInstanceOSPoliciesCompliance. + * @param request GetInstanceOSPoliciesComplianceRequest message or plain object + * @returns Promise + */ + public getInstanceOSPoliciesCompliance(request: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest): Promise; + + /** + * Calls ListInstanceOSPoliciesCompliances. + * @param request ListInstanceOSPoliciesCompliancesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListInstanceOSPoliciesCompliancesResponse + */ + public listInstanceOSPoliciesCompliances(request: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliancesCallback): void; + + /** + * Calls ListInstanceOSPoliciesCompliances. + * @param request ListInstanceOSPoliciesCompliancesRequest message or plain object + * @returns Promise + */ + public listInstanceOSPoliciesCompliances(request: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest): Promise; + + /** + * Calls GetInventory. + * @param request GetInventoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Inventory + */ + public getInventory(request: google.cloud.osconfig.v1alpha.IGetInventoryRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventoryCallback): void; + + /** + * Calls GetInventory. + * @param request GetInventoryRequest message or plain object + * @returns Promise + */ + public getInventory(request: google.cloud.osconfig.v1alpha.IGetInventoryRequest): Promise; + + /** + * Calls ListInventories. + * @param request ListInventoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListInventoriesResponse + */ + public listInventories(request: google.cloud.osconfig.v1alpha.IListInventoriesRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventoriesCallback): void; + + /** + * Calls ListInventories. + * @param request ListInventoriesRequest message or plain object + * @returns Promise + */ + public listInventories(request: google.cloud.osconfig.v1alpha.IListInventoriesRequest): Promise; + + /** + * Calls GetVulnerabilityReport. + * @param request GetVulnerabilityReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VulnerabilityReport + */ + public getVulnerabilityReport(request: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReportCallback): void; + + /** + * Calls GetVulnerabilityReport. + * @param request GetVulnerabilityReportRequest message or plain object + * @returns Promise + */ + public getVulnerabilityReport(request: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest): Promise; + + /** + * Calls ListVulnerabilityReports. + * @param request ListVulnerabilityReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVulnerabilityReportsResponse + */ + public listVulnerabilityReports(request: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReportsCallback): void; + + /** + * Calls ListVulnerabilityReports. + * @param request ListVulnerabilityReportsRequest message or plain object + * @returns Promise + */ + public listVulnerabilityReports(request: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest): Promise; + } + + namespace OsConfigZonalService { + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#createOSPolicyAssignment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#updateOSPolicyAssignment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignment}. + * @param error Error, if any + * @param [response] OSPolicyAssignment + */ + type GetOSPolicyAssignmentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.OSPolicyAssignment) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignments}. + * @param error Error, if any + * @param [response] ListOSPolicyAssignmentsResponse + */ + type ListOSPolicyAssignmentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * @param error Error, if any + * @param [response] ListOSPolicyAssignmentRevisionsResponse + */ + type ListOSPolicyAssignmentRevisionsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#deleteOSPolicyAssignment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInstanceOSPoliciesCompliance}. + * @param error Error, if any + * @param [response] InstanceOSPoliciesCompliance + */ + type GetInstanceOSPoliciesComplianceCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInstanceOSPoliciesCompliances}. + * @param error Error, if any + * @param [response] ListInstanceOSPoliciesCompliancesResponse + */ + type ListInstanceOSPoliciesCompliancesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. + * @param error Error, if any + * @param [response] Inventory + */ + type GetInventoryCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.Inventory) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInventories}. + * @param error Error, if any + * @param [response] ListInventoriesResponse + */ + type ListInventoriesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListInventoriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getVulnerabilityReport}. + * @param error Error, if any + * @param [response] VulnerabilityReport + */ + type GetVulnerabilityReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.VulnerabilityReport) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listVulnerabilityReports}. + * @param error Error, if any + * @param [response] ListVulnerabilityReportsResponse + */ + type ListVulnerabilityReportsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) => void; + } + + /** Properties of a VulnerabilityReport. */ + interface IVulnerabilityReport { + + /** VulnerabilityReport name */ + name?: (string|null); + + /** VulnerabilityReport vulnerabilities */ + vulnerabilities?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability[]|null); + + /** VulnerabilityReport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a VulnerabilityReport. */ + class VulnerabilityReport implements IVulnerabilityReport { + + /** + * Constructs a new VulnerabilityReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IVulnerabilityReport); + + /** VulnerabilityReport name. */ + public name: string; + + /** VulnerabilityReport vulnerabilities. */ + public vulnerabilities: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability[]; + + /** VulnerabilityReport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new VulnerabilityReport instance using the specified properties. + * @param [properties] Properties to set + * @returns VulnerabilityReport instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IVulnerabilityReport): google.cloud.osconfig.v1alpha.VulnerabilityReport; + + /** + * Encodes the specified VulnerabilityReport message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. + * @param message VulnerabilityReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IVulnerabilityReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VulnerabilityReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. + * @param message VulnerabilityReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IVulnerabilityReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VulnerabilityReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VulnerabilityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport; + + /** + * Decodes a VulnerabilityReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VulnerabilityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport; + + /** + * Verifies a VulnerabilityReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VulnerabilityReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VulnerabilityReport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport; + + /** + * Creates a plain object from a VulnerabilityReport message. Also converts values to other types if specified. + * @param message VulnerabilityReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VulnerabilityReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace VulnerabilityReport { + + /** Properties of a Vulnerability. */ + interface IVulnerability { + + /** Vulnerability details */ + details?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null); + + /** Vulnerability installedInventoryItemIds */ + installedInventoryItemIds?: (string[]|null); + + /** Vulnerability availableInventoryItemIds */ + availableInventoryItemIds?: (string[]|null); + + /** Vulnerability createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Vulnerability updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Vulnerability. */ + class Vulnerability implements IVulnerability { + + /** + * Constructs a new Vulnerability. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability); + + /** Vulnerability details. */ + public details?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null); + + /** Vulnerability installedInventoryItemIds. */ + public installedInventoryItemIds: string[]; + + /** Vulnerability availableInventoryItemIds. */ + public availableInventoryItemIds: string[]; + + /** Vulnerability createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Vulnerability updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Vulnerability instance using the specified properties. + * @param [properties] Properties to set + * @returns Vulnerability instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; + + /** + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Vulnerability message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; + + /** + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; + + /** + * Verifies a Vulnerability message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Vulnerability + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; + + /** + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * @param message Vulnerability + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Vulnerability to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Vulnerability { + + /** Properties of a Details. */ + interface IDetails { + + /** Details cve */ + cve?: (string|null); + + /** Details cvssV2Score */ + cvssV2Score?: (number|null); + + /** Details cvssV3 */ + cvssV3?: (google.cloud.osconfig.v1alpha.ICVSSv3|null); + + /** Details severity */ + severity?: (string|null); + + /** Details description */ + description?: (string|null); + + /** Details references */ + references?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference[]|null); + } + + /** Represents a Details. */ + class Details implements IDetails { + + /** + * Constructs a new Details. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails); + + /** Details cve. */ + public cve: string; + + /** Details cvssV2Score. */ + public cvssV2Score: number; + + /** Details cvssV3. */ + public cvssV3?: (google.cloud.osconfig.v1alpha.ICVSSv3|null); + + /** Details severity. */ + public severity: string; + + /** Details description. */ + public description: string; + + /** Details references. */ + public references: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference[]; + + /** + * Creates a new Details instance using the specified properties. + * @param [properties] Properties to set + * @returns Details instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; + + /** + * Encodes the specified Details message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @param message Details message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @param message Details message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Details message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; + + /** + * Decodes a Details message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; + + /** + * Verifies a Details message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Details message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Details + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; + + /** + * Creates a plain object from a Details message. Also converts values to other types if specified. + * @param message Details + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Details to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Details { + + /** Properties of a Reference. */ + interface IReference { + + /** Reference url */ + url?: (string|null); + } + + /** Represents a Reference. */ + class Reference implements IReference { + + /** + * Constructs a new Reference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference); + + /** Reference url. */ + public url: string; + + /** + * Creates a new Reference instance using the specified properties. + * @param [properties] Properties to set + * @returns Reference instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; + + /** + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Reference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; + + /** + * Decodes a Reference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; + + /** + * Verifies a Reference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Reference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Reference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; + + /** + * Creates a plain object from a Reference message. Also converts values to other types if specified. + * @param message Reference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Reference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Properties of a GetVulnerabilityReportRequest. */ + interface IGetVulnerabilityReportRequest { + + /** GetVulnerabilityReportRequest name */ + name?: (string|null); + } + + /** Represents a GetVulnerabilityReportRequest. */ + class GetVulnerabilityReportRequest implements IGetVulnerabilityReportRequest { + + /** + * Constructs a new GetVulnerabilityReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest); + + /** GetVulnerabilityReportRequest name. */ + public name: string; + + /** + * Creates a new GetVulnerabilityReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVulnerabilityReportRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + + /** + * Encodes the specified GetVulnerabilityReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. + * @param message GetVulnerabilityReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVulnerabilityReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. + * @param message GetVulnerabilityReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVulnerabilityReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + + /** + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVulnerabilityReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + + /** + * Verifies a GetVulnerabilityReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVulnerabilityReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVulnerabilityReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + + /** + * Creates a plain object from a GetVulnerabilityReportRequest message. Also converts values to other types if specified. + * @param message GetVulnerabilityReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVulnerabilityReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListVulnerabilityReportsRequest. */ + interface IListVulnerabilityReportsRequest { + + /** ListVulnerabilityReportsRequest parent */ + parent?: (string|null); + + /** ListVulnerabilityReportsRequest pageSize */ + pageSize?: (number|null); + + /** ListVulnerabilityReportsRequest pageToken */ + pageToken?: (string|null); + + /** ListVulnerabilityReportsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListVulnerabilityReportsRequest. */ + class ListVulnerabilityReportsRequest implements IListVulnerabilityReportsRequest { + + /** + * Constructs a new ListVulnerabilityReportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest); + + /** ListVulnerabilityReportsRequest parent. */ + public parent: string; + + /** ListVulnerabilityReportsRequest pageSize. */ + public pageSize: number; + + /** ListVulnerabilityReportsRequest pageToken. */ + public pageToken: string; + + /** ListVulnerabilityReportsRequest filter. */ + public filter: string; + + /** + * Creates a new ListVulnerabilityReportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVulnerabilityReportsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + + /** + * Encodes the specified ListVulnerabilityReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. + * @param message ListVulnerabilityReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVulnerabilityReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. + * @param message ListVulnerabilityReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVulnerabilityReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + + /** + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVulnerabilityReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + + /** + * Verifies a ListVulnerabilityReportsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVulnerabilityReportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVulnerabilityReportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + + /** + * Creates a plain object from a ListVulnerabilityReportsRequest message. Also converts values to other types if specified. + * @param message ListVulnerabilityReportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVulnerabilityReportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListVulnerabilityReportsResponse. */ + interface IListVulnerabilityReportsResponse { + + /** ListVulnerabilityReportsResponse vulnerabilityReports */ + vulnerabilityReports?: (google.cloud.osconfig.v1alpha.IVulnerabilityReport[]|null); + + /** ListVulnerabilityReportsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListVulnerabilityReportsResponse. */ + class ListVulnerabilityReportsResponse implements IListVulnerabilityReportsResponse { + + /** + * Constructs a new ListVulnerabilityReportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse); + + /** ListVulnerabilityReportsResponse vulnerabilityReports. */ + public vulnerabilityReports: google.cloud.osconfig.v1alpha.IVulnerabilityReport[]; + + /** ListVulnerabilityReportsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListVulnerabilityReportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVulnerabilityReportsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; + + /** + * Encodes the specified ListVulnerabilityReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. + * @param message ListVulnerabilityReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVulnerabilityReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. + * @param message ListVulnerabilityReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVulnerabilityReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; + + /** + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVulnerabilityReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; + + /** + * Verifies a ListVulnerabilityReportsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVulnerabilityReportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVulnerabilityReportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; + + /** + * Creates a plain object from a ListVulnerabilityReportsResponse message. Also converts values to other types if specified. + * @param message ListVulnerabilityReportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVulnerabilityReportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CVSSv3. */ + interface ICVSSv3 { + + /** CVSSv3 baseScore */ + baseScore?: (number|null); + + /** CVSSv3 exploitabilityScore */ + exploitabilityScore?: (number|null); + + /** CVSSv3 impactScore */ + impactScore?: (number|null); + + /** CVSSv3 attackVector */ + attackVector?: (google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|null); + + /** CVSSv3 attackComplexity */ + attackComplexity?: (google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|null); + + /** CVSSv3 privilegesRequired */ + privilegesRequired?: (google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|null); + + /** CVSSv3 userInteraction */ + userInteraction?: (google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|null); + + /** CVSSv3 scope */ + scope?: (google.cloud.osconfig.v1alpha.CVSSv3.Scope|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Scope|null); + + /** CVSSv3 confidentialityImpact */ + confidentialityImpact?: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact|null); + + /** CVSSv3 integrityImpact */ + integrityImpact?: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact|null); + + /** CVSSv3 availabilityImpact */ + availabilityImpact?: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact|null); + } + + /** Represents a CVSSv3. */ + class CVSSv3 implements ICVSSv3 { + + /** + * Constructs a new CVSSv3. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.ICVSSv3); + + /** CVSSv3 baseScore. */ + public baseScore: number; + + /** CVSSv3 exploitabilityScore. */ + public exploitabilityScore: number; + + /** CVSSv3 impactScore. */ + public impactScore: number; + + /** CVSSv3 attackVector. */ + public attackVector: (google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackVector); + + /** CVSSv3 attackComplexity. */ + public attackComplexity: (google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity); + + /** CVSSv3 privilegesRequired. */ + public privilegesRequired: (google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired); + + /** CVSSv3 userInteraction. */ + public userInteraction: (google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction); + + /** CVSSv3 scope. */ + public scope: (google.cloud.osconfig.v1alpha.CVSSv3.Scope|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Scope); + + /** CVSSv3 confidentialityImpact. */ + public confidentialityImpact: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact); + + /** CVSSv3 integrityImpact. */ + public integrityImpact: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact); + + /** CVSSv3 availabilityImpact. */ + public availabilityImpact: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact); + + /** + * Creates a new CVSSv3 instance using the specified properties. + * @param [properties] Properties to set + * @returns CVSSv3 instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.ICVSSv3): google.cloud.osconfig.v1alpha.CVSSv3; + + /** + * Encodes the specified CVSSv3 message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. + * @param message CVSSv3 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. + * @param message CVSSv3 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CVSSv3 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CVSSv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.CVSSv3; + + /** + * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CVSSv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.CVSSv3; + + /** + * Verifies a CVSSv3 message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CVSSv3 + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.CVSSv3; + + /** + * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. + * @param message CVSSv3 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.CVSSv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CVSSv3 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CVSSv3 { + + /** AttackVector enum. */ + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0, + ATTACK_VECTOR_NETWORK = 1, + ATTACK_VECTOR_ADJACENT = 2, + ATTACK_VECTOR_LOCAL = 3, + ATTACK_VECTOR_PHYSICAL = 4 + } + + /** AttackComplexity enum. */ + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0, + ATTACK_COMPLEXITY_LOW = 1, + ATTACK_COMPLEXITY_HIGH = 2 + } + + /** PrivilegesRequired enum. */ + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0, + PRIVILEGES_REQUIRED_NONE = 1, + PRIVILEGES_REQUIRED_LOW = 2, + PRIVILEGES_REQUIRED_HIGH = 3 + } + + /** UserInteraction enum. */ + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0, + USER_INTERACTION_NONE = 1, + USER_INTERACTION_REQUIRED = 2 + } + + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + SCOPE_UNCHANGED = 1, + SCOPE_CHANGED = 2 + } + + /** Impact enum. */ + enum Impact { + IMPACT_UNSPECIFIED = 0, + IMPACT_HIGH = 1, + IMPACT_LOW = 2, + IMPACT_NONE = 3 + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); /** HttpRule put */ put?: (string|null); - /** HttpRule post */ - post?: (string|null); + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6 + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a DateTime. */ + interface IDateTime { + + /** DateTime year */ + year?: (number|null); + + /** DateTime month */ + month?: (number|null); + + /** DateTime day */ + day?: (number|null); + + /** DateTime hours */ + hours?: (number|null); + + /** DateTime minutes */ + minutes?: (number|null); + + /** DateTime seconds */ + seconds?: (number|null); + + /** DateTime nanos */ + nanos?: (number|null); + + /** DateTime utcOffset */ + utcOffset?: (google.protobuf.IDuration|null); + + /** DateTime timeZone */ + timeZone?: (google.type.ITimeZone|null); + } + + /** Represents a DateTime. */ + class DateTime implements IDateTime { + + /** + * Constructs a new DateTime. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDateTime); + + /** DateTime year. */ + public year: number; + + /** DateTime month. */ + public month: number; + + /** DateTime day. */ + public day: number; + + /** DateTime hours. */ + public hours: number; + + /** DateTime minutes. */ + public minutes: number; + + /** DateTime seconds. */ + public seconds: number; + + /** DateTime nanos. */ + public nanos: number; + + /** DateTime utcOffset. */ + public utcOffset?: (google.protobuf.IDuration|null); + + /** DateTime timeZone. */ + public timeZone?: (google.type.ITimeZone|null); + + /** DateTime timeOffset. */ + public timeOffset?: ("utcOffset"|"timeZone"); + + /** + * Creates a new DateTime instance using the specified properties. + * @param [properties] Properties to set + * @returns DateTime instance + */ + public static create(properties?: google.type.IDateTime): google.type.DateTime; + + /** + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateTime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.DateTime; + + /** + * Decodes a DateTime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.DateTime; + + /** + * Verifies a DateTime message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateTime + */ + public static fromObject(object: { [k: string]: any }): google.type.DateTime; + + /** + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @param message DateTime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateTime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TimeZone. */ + interface ITimeZone { + + /** TimeZone id */ + id?: (string|null); + + /** TimeZone version */ + version?: (string|null); + } + + /** Represents a TimeZone. */ + class TimeZone implements ITimeZone { + + /** + * Constructs a new TimeZone. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ITimeZone); + + /** TimeZone id. */ + public id: string; + + /** TimeZone version. */ + public version: string; + + /** + * Creates a new TimeZone instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeZone instance + */ + public static create(properties?: google.type.ITimeZone): google.type.TimeZone; + + /** + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule delete */ - "delete"?: (string|null); + /** + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeZone message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeZone; + + /** + * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeZone; + + /** + * Verifies a TimeZone message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeZone + */ + public static fromObject(object: { [k: string]: any }): google.type.TimeZone; + + /** + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @param message TimeZone + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeZone to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } + + /** Properties of a TimeOfDay. */ + interface ITimeOfDay { + + /** TimeOfDay hours */ + hours?: (number|null); + + /** TimeOfDay minutes */ + minutes?: (number|null); + + /** TimeOfDay seconds */ + seconds?: (number|null); + + /** TimeOfDay nanos */ + nanos?: (number|null); + } + + /** Represents a TimeOfDay. */ + class TimeOfDay implements ITimeOfDay { + + /** + * Constructs a new TimeOfDay. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ITimeOfDay); + + /** TimeOfDay hours. */ + public hours: number; + + /** TimeOfDay minutes. */ + public minutes: number; + + /** TimeOfDay seconds. */ + public seconds: number; + + /** TimeOfDay nanos. */ + public nanos: number; + + /** + * Creates a new TimeOfDay instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeOfDay instance + */ + public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; + + /** + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeOfDay; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeOfDay; + + /** + * Verifies a TimeOfDay message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeOfDay + */ + public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; + + /** + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. + * @param message TimeOfDay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeOfDay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); - /** HttpRule patch */ - patch?: (string|null); + /** Operation name. */ + public name: string; - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); - /** HttpRule body */ - body?: (string|null); + /** Operation done. */ + public done: boolean; - /** HttpRule responseBody */ - responseBody?: (string|null); + /** Operation error. */ + public error?: (google.rpc.IStatus|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } + /** Operation response. */ + public response?: (google.protobuf.IAny|null); - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Operation result. */ + public result?: ("error"|"response"); /** - * Constructs a new HttpRule. + * Creates a new Operation instance using the specified properties. * @param [properties] Properties to set + * @returns Operation instance */ - constructor(properties?: google.api.IHttpRule); + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - /** HttpRule selector. */ - public selector: string; + /** + * 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; - /** HttpRule get. */ - public get?: (string|null); + /** + * 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; - /** HttpRule put. */ - public put?: (string|null); + /** + * 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; - /** HttpRule post. */ - public post?: (string|null); + /** + * 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; - /** HttpRule delete. */ - public delete?: (string|null); + /** + * 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); - /** HttpRule patch. */ - public patch?: (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; - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** + * 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 }; - /** HttpRule body. */ - public body: string; + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** HttpRule responseBody. */ - public responseBody: string; + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** GetOperationRequest name */ + name?: (string|null); + } - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { /** - * Creates a new HttpRule instance using the specified properties. + * Constructs a new GetOperationRequest. * @param [properties] Properties to set - * @returns HttpRule instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * 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.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified 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.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * 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 HttpRule + * @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.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @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.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; /** - * Verifies a HttpRule message. + * 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns GetOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * 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.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this GetOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** ListOperationsRequest name */ + name?: (string|null); - /** CustomHttpPattern path */ - path?: (string|null); + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { /** - * Constructs a new CustomHttpPattern. + * Constructs a new ListOperationsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.longrunning.IListOperationsRequest); - /** CustomHttpPattern kind. */ - public kind: string; + /** ListOperationsRequest name. */ + public name: string; - /** CustomHttpPattern path. */ - public path: string; + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new ListOperationsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns ListOperationsRequest instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified 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.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified 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.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * 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 CustomHttpPattern + * @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.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; /** - * Verifies a CustomHttpPattern message. + * 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns ListOperationsRequest */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a 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.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ListOperationsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { - /** ResourceDescriptor type */ - type?: (string|null); + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; - /** ResourceDescriptor singular */ - singular?: (string|null); + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } + /** + * 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; - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** + * 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; /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set + * 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 */ - constructor(properties?: google.api.IResourceDescriptor); + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceDescriptor type. */ - public type: string; + /** + * 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; - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** + * 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; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** + * 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); - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** + * 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; - /** ResourceDescriptor plural. */ - public plural: string; + /** + * 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 }; - /** ResourceDescriptor singular. */ - public singular: string; + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Constructs a new CancelOperationRequest. * @param [properties] Properties to set - * @returns ResourceDescriptor instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * 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.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified 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.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * 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 ResourceDescriptor + * @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.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; /** - * Verifies a ResourceDescriptor message. + * 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns CancelOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * 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.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this CancelOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { - /** ResourceReference childType */ - childType?: (string|null); + /** DeleteOperationRequest name */ + name?: (string|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { /** - * Constructs a new ResourceReference. + * Constructs a new DeleteOperationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.longrunning.IDeleteOperationRequest); - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; + /** DeleteOperationRequest name. */ + public name: string; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new DeleteOperationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns DeleteOperationRequest instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified 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.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified 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.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * 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 ResourceReference + * @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.api.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @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.api.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; /** - * Verifies a ResourceReference message. + * 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns DeleteOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * Creates a plain object from a 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.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this DeleteOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6 - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a DateTime. */ - interface IDateTime { - - /** DateTime year */ - year?: (number|null); - - /** DateTime month */ - month?: (number|null); - - /** DateTime day */ - day?: (number|null); - - /** DateTime hours */ - hours?: (number|null); - - /** DateTime minutes */ - minutes?: (number|null); - - /** DateTime seconds */ - seconds?: (number|null); - - /** DateTime nanos */ - nanos?: (number|null); + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { - /** DateTime utcOffset */ - utcOffset?: (google.protobuf.IDuration|null); + /** WaitOperationRequest name */ + name?: (string|null); - /** DateTime timeZone */ - timeZone?: (google.type.ITimeZone|null); + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); } - /** Represents a DateTime. */ - class DateTime implements IDateTime { + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { /** - * Constructs a new DateTime. + * Constructs a new WaitOperationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.type.IDateTime); - - /** DateTime year. */ - public year: number; - - /** DateTime month. */ - public month: number; - - /** DateTime day. */ - public day: number; - - /** DateTime hours. */ - public hours: number; - - /** DateTime minutes. */ - public minutes: number; - - /** DateTime seconds. */ - public seconds: number; - - /** DateTime nanos. */ - public nanos: number; - - /** DateTime utcOffset. */ - public utcOffset?: (google.protobuf.IDuration|null); + constructor(properties?: google.longrunning.IWaitOperationRequest); - /** DateTime timeZone. */ - public timeZone?: (google.type.ITimeZone|null); + /** WaitOperationRequest name. */ + public name: string; - /** DateTime timeOffset. */ - public timeOffset?: ("utcOffset"|"timeZone"); + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); /** - * Creates a new DateTime instance using the specified properties. + * Creates a new WaitOperationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DateTime instance + * @returns WaitOperationRequest instance */ - public static create(properties?: google.type.IDateTime): google.type.DateTime; + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; /** - * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. - * @param message DateTime message or plain object to encode + * 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.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. - * @param message DateTime message or plain object to encode + * 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.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DateTime message from the specified reader or buffer. + * 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 DateTime + * @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.type.DateTime; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; /** - * Decodes a DateTime message from the specified reader or buffer, length delimited. + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DateTime + * @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.type.DateTime; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; /** - * Verifies a DateTime message. + * 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 DateTime message from a plain object. Also converts values to their respective internal types. + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DateTime + * @returns WaitOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.type.DateTime; + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; /** - * Creates a plain object from a DateTime message. Also converts values to other types if specified. - * @param message DateTime + * 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.type.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DateTime to JSON. + * Converts this WaitOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TimeZone. */ - interface ITimeZone { + /** Properties of an OperationInfo. */ + interface IOperationInfo { - /** TimeZone id */ - id?: (string|null); + /** OperationInfo responseType */ + responseType?: (string|null); - /** TimeZone version */ - version?: (string|null); + /** OperationInfo metadataType */ + metadataType?: (string|null); } - /** Represents a TimeZone. */ - class TimeZone implements ITimeZone { + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { /** - * Constructs a new TimeZone. + * Constructs a new OperationInfo. * @param [properties] Properties to set */ - constructor(properties?: google.type.ITimeZone); + constructor(properties?: google.longrunning.IOperationInfo); - /** TimeZone id. */ - public id: string; + /** OperationInfo responseType. */ + public responseType: string; - /** TimeZone version. */ - public version: string; + /** OperationInfo metadataType. */ + public metadataType: string; /** - * Creates a new TimeZone instance using the specified properties. + * Creates a new OperationInfo instance using the specified properties. * @param [properties] Properties to set - * @returns TimeZone instance + * @returns OperationInfo instance */ - public static create(properties?: google.type.ITimeZone): google.type.TimeZone; + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; /** - * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. - * @param message TimeZone message or plain object to encode + * 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.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. - * @param message TimeZone message or plain object to encode + * 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.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeZone message from the specified reader or buffer. + * 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 TimeZone + * @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.type.TimeZone; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; /** - * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeZone + * @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.type.TimeZone; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; /** - * Verifies a TimeZone message. + * 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 a TimeZone message from a plain object. Also converts values to their respective internal types. + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeZone + * @returns OperationInfo */ - public static fromObject(object: { [k: string]: any }): google.type.TimeZone; + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; /** - * Creates a plain object from a TimeZone message. Also converts values to other types if specified. - * @param message TimeZone + * 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.type.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeZone to JSON. + * Converts this OperationInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** DayOfWeek enum. */ - enum DayOfWeek { - DAY_OF_WEEK_UNSPECIFIED = 0, - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6, - SUNDAY = 7 - } - - /** Properties of a TimeOfDay. */ - interface ITimeOfDay { + /** Namespace rpc. */ + namespace rpc { - /** TimeOfDay hours */ - hours?: (number|null); + /** Properties of a Status. */ + interface IStatus { - /** TimeOfDay minutes */ - minutes?: (number|null); + /** Status code */ + code?: (number|null); - /** TimeOfDay seconds */ - seconds?: (number|null); + /** Status message */ + message?: (string|null); - /** TimeOfDay nanos */ - nanos?: (number|null); + /** Status details */ + details?: (google.protobuf.IAny[]|null); } - /** Represents a TimeOfDay. */ - class TimeOfDay implements ITimeOfDay { + /** Represents a Status. */ + class Status implements IStatus { /** - * Constructs a new TimeOfDay. + * Constructs a new Status. * @param [properties] Properties to set */ - constructor(properties?: google.type.ITimeOfDay); + constructor(properties?: google.rpc.IStatus); - /** TimeOfDay hours. */ - public hours: number; - - /** TimeOfDay minutes. */ - public minutes: number; + /** Status code. */ + public code: number; - /** TimeOfDay seconds. */ - public seconds: number; + /** Status message. */ + public message: string; - /** TimeOfDay nanos. */ - public nanos: number; + /** Status details. */ + public details: google.protobuf.IAny[]; /** - * Creates a new TimeOfDay instance using the specified properties. + * Creates a new Status instance using the specified properties. * @param [properties] Properties to set - * @returns TimeOfDay instance + * @returns Status instance */ - public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; + public static create(properties?: google.rpc.IStatus): google.rpc.Status; /** - * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. - * @param message TimeOfDay message or plain object to encode + * 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.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. - * @param message TimeOfDay message or plain object to encode + * 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.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeOfDay message from the specified reader or buffer. + * 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 TimeOfDay + * @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.type.TimeOfDay; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; /** - * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeOfDay + * @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.type.TimeOfDay; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; /** - * Verifies a TimeOfDay message. + * 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 TimeOfDay message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeOfDay + * @returns Status */ - public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; + public static fromObject(object: { [k: string]: any }): google.rpc.Status; /** - * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. - * @param message TimeOfDay + * 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.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeOfDay to JSON. + * Converts this Status to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index da6f5145af8..de2fd09a16e 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -6983,6 +6983,7 @@ * @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 */ /** @@ -7042,6 +7043,14 @@ */ 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 @@ -7073,6 +7082,8 @@ 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]); @@ -7131,6 +7142,9 @@ 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; @@ -7199,6 +7213,11 @@ 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; }; @@ -7252,6 +7271,11 @@ 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; }; @@ -7275,6 +7299,7 @@ if (options.defaults) { object.deprecated = false; object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; object[".google.api.http"] = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -7286,6 +7311,8 @@ 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) @@ -9336,229 +9363,651 @@ return Empty; })(); - return protobuf; - })(); + protobuf.FieldMask = (function() { - google.cloud = (function() { + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; + /** + * 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]]; + } - cloud.osconfig = (function() { + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; /** - * Namespace osconfig. - * @memberof google.cloud - * @namespace + * 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 */ - var osconfig = {}; + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; - osconfig.v1 = (function() { + /** + * 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; + }; - /** - * Namespace v1. - * @memberof google.cloud.osconfig - * @namespace - */ - var v1 = {}; + /** + * 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(); + }; - v1.Inventory = (function() { + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of an Inventory. - * @memberof google.cloud.osconfig.v1 - * @interface IInventory - * @property {google.cloud.osconfig.v1.Inventory.IOsInfo|null} [osInfo] Inventory osInfo - * @property {Object.|null} [items] Inventory items - */ + /** + * 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()); + }; - /** - * Constructs a new Inventory. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an Inventory. - * @implements IInventory - * @constructor - * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set - */ - function Inventory(properties) { - this.items = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a 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; + }; - /** - * Inventory osInfo. - * @member {google.cloud.osconfig.v1.Inventory.IOsInfo|null|undefined} osInfo - * @memberof google.cloud.osconfig.v1.Inventory - * @instance - */ - Inventory.prototype.osInfo = 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; + }; - /** - * Inventory items. - * @member {Object.} items - * @memberof google.cloud.osconfig.v1.Inventory - * @instance - */ - Inventory.prototype.items = $util.emptyObject; + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; - /** - * Creates a new Inventory instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Inventory - * @static - * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory} Inventory instance - */ - Inventory.create = function create(properties) { - return new Inventory(properties); - }; + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Inventory - * @static - * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Inventory.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osInfo != null && Object.hasOwnProperty.call(message, "osInfo")) - $root.google.cloud.osconfig.v1.Inventory.OsInfo.encode(message.osInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.items != null && Object.hasOwnProperty.call(message, "items")) - for (var keys = Object.keys(message.items), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.osconfig.v1.Inventory.Item.encode(message.items[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; + return FieldMask; + })(); - /** - * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory - * @static - * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Inventory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + protobuf.Any = (function() { - /** - * Decodes an Inventory message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Inventory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory} Inventory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Inventory.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.decode(reader, reader.uint32()); - break; - case 2: - if (message.items === $util.emptyObject) - message.items = {}; - 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.osconfig.v1.Inventory.Item.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.items[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + return protobuf; + })(); + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.osconfig = (function() { + + /** + * Namespace osconfig. + * @memberof google.cloud + * @namespace + */ + var osconfig = {}; + + osconfig.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.osconfig + * @namespace + */ + var v1 = {}; + + v1.Inventory = (function() { /** - * Decodes an Inventory message from the specified reader or buffer, length delimited. - * @function decodeDelimited + * Properties of an Inventory. + * @memberof google.cloud.osconfig.v1 + * @interface IInventory + * @property {google.cloud.osconfig.v1.Inventory.IOsInfo|null} [osInfo] Inventory osInfo + * @property {Object.|null} [items] Inventory items + */ + + /** + * Constructs a new Inventory. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an Inventory. + * @implements IInventory + * @constructor + * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set + */ + function Inventory(properties) { + this.items = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Inventory osInfo. + * @member {google.cloud.osconfig.v1.Inventory.IOsInfo|null|undefined} osInfo * @memberof google.cloud.osconfig.v1.Inventory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory} Inventory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @instance */ - Inventory.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Inventory.prototype.osInfo = null; /** - * Verifies an Inventory message. - * @function verify + * Inventory items. + * @member {Object.} items * @memberof google.cloud.osconfig.v1.Inventory - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * @instance */ - Inventory.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osInfo != null && message.hasOwnProperty("osInfo")) { - var error = $root.google.cloud.osconfig.v1.Inventory.OsInfo.verify(message.osInfo); - if (error) - return "osInfo." + error; - } - if (message.items != null && message.hasOwnProperty("items")) { - if (!$util.isObject(message.items)) - return "items: object expected"; - var key = Object.keys(message.items); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.osconfig.v1.Inventory.Item.verify(message.items[key[i]]); - if (error) - return "items." + error; - } - } - return null; - }; + Inventory.prototype.items = $util.emptyObject; /** - * Creates an Inventory message from a plain object. Also converts values to their respective internal types. - * @function fromObject + * Creates a new Inventory instance using the specified properties. + * @function create * @memberof google.cloud.osconfig.v1.Inventory * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory} Inventory - */ + * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory} Inventory instance + */ + Inventory.create = function create(properties) { + return new Inventory(properties); + }; + + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osInfo != null && Object.hasOwnProperty.call(message, "osInfo")) + $root.google.cloud.osconfig.v1.Inventory.OsInfo.encode(message.osInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.items != null && Object.hasOwnProperty.call(message, "items")) + for (var keys = Object.keys(message.items), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.osconfig.v1.Inventory.Item.encode(message.items[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Inventory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.decode(reader, reader.uint32()); + break; + case 2: + if (message.items === $util.emptyObject) + message.items = {}; + 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.osconfig.v1.Inventory.Item.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.items[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Inventory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Inventory message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Inventory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osInfo != null && message.hasOwnProperty("osInfo")) { + var error = $root.google.cloud.osconfig.v1.Inventory.OsInfo.verify(message.osInfo); + if (error) + return "osInfo." + error; + } + if (message.items != null && message.hasOwnProperty("items")) { + if (!$util.isObject(message.items)) + return "items: object expected"; + var key = Object.keys(message.items); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.osconfig.v1.Inventory.Item.verify(message.items[key[i]]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory} Inventory + */ Inventory.fromObject = function fromObject(object) { if (object instanceof $root.google.cloud.osconfig.v1.Inventory) return object; @@ -22834,44 +23283,20479 @@ return PatchRollout; })(); - return v1; - })(); + return v1; + })(); + + osconfig.v1alpha = (function() { + + /** + * Namespace v1alpha. + * @memberof google.cloud.osconfig + * @namespace + */ + var v1alpha = {}; + + v1alpha.OSPolicyResourceConfigStep = (function() { + + /** + * Properties of a OSPolicyResourceConfigStep. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyResourceConfigStep + * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|null} [type] OSPolicyResourceConfigStep type + * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|null} [outcome] OSPolicyResourceConfigStep outcome + */ + + /** + * Constructs a new OSPolicyResourceConfigStep. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyResourceConfigStep. + * @implements IOSPolicyResourceConfigStep + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep=} [properties] Properties to set + */ + function OSPolicyResourceConfigStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyResourceConfigStep type. + * @member {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type} type + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.type = 0; + + /** + * OSPolicyResourceConfigStep outcome. + * @member {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome} outcome + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.outcome = 0; + + /** + * Creates a new OSPolicyResourceConfigStep instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep instance + */ + OSPolicyResourceConfigStep.create = function create(properties) { + return new OSPolicyResourceConfigStep(properties); + }; + + /** + * Encodes the specified OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceConfigStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.outcome != null && Object.hasOwnProperty.call(message, "outcome")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.outcome); + return writer; + }; + + /** + * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceConfigStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceConfigStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.outcome = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceConfigStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyResourceConfigStep message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyResourceConfigStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.outcome != null && message.hasOwnProperty("outcome")) + switch (message.outcome) { + default: + return "outcome: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + */ + OSPolicyResourceConfigStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "VALIDATION": + case 1: + message.type = 1; + break; + case "DESIRED_STATE_CHECK": + case 2: + message.type = 2; + break; + case "DESIRED_STATE_ENFORCEMENT": + case 3: + message.type = 3; + break; + case "DESIRED_STATE_CHECK_POST_ENFORCEMENT": + case 4: + message.type = 4; + break; + } + switch (object.outcome) { + case "OUTCOME_UNSPECIFIED": + case 0: + message.outcome = 0; + break; + case "SUCCEEDED": + case 1: + message.outcome = 1; + break; + case "FAILED": + case 2: + message.outcome = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} message OSPolicyResourceConfigStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyResourceConfigStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.outcome = options.enums === String ? "OUTCOME_UNSPECIFIED" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type[message.type] : message.type; + if (message.outcome != null && message.hasOwnProperty("outcome")) + object.outcome = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome[message.outcome] : message.outcome; + return object; + }; + + /** + * Converts this OSPolicyResourceConfigStep to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @instance + * @returns {Object.} JSON object + */ + OSPolicyResourceConfigStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} VALIDATION=1 VALIDATION value + * @property {number} DESIRED_STATE_CHECK=2 DESIRED_STATE_CHECK value + * @property {number} DESIRED_STATE_ENFORCEMENT=3 DESIRED_STATE_ENFORCEMENT value + * @property {number} DESIRED_STATE_CHECK_POST_ENFORCEMENT=4 DESIRED_STATE_CHECK_POST_ENFORCEMENT value + */ + OSPolicyResourceConfigStep.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VALIDATION"] = 1; + values[valuesById[2] = "DESIRED_STATE_CHECK"] = 2; + values[valuesById[3] = "DESIRED_STATE_ENFORCEMENT"] = 3; + values[valuesById[4] = "DESIRED_STATE_CHECK_POST_ENFORCEMENT"] = 4; + return values; + })(); + + /** + * Outcome enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome + * @enum {number} + * @property {number} OUTCOME_UNSPECIFIED=0 OUTCOME_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + */ + OSPolicyResourceConfigStep.Outcome = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OUTCOME_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + return values; + })(); + + return OSPolicyResourceConfigStep; + })(); + + v1alpha.OSPolicyResourceCompliance = (function() { + + /** + * Properties of a OSPolicyResourceCompliance. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyResourceCompliance + * @property {string|null} [osPolicyResourceId] OSPolicyResourceCompliance osPolicyResourceId + * @property {Array.|null} [configSteps] OSPolicyResourceCompliance configSteps + * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] OSPolicyResourceCompliance state + */ + + /** + * Constructs a new OSPolicyResourceCompliance. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyResourceCompliance. + * @implements IOSPolicyResourceCompliance + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance=} [properties] Properties to set + */ + function OSPolicyResourceCompliance(properties) { + this.configSteps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyResourceCompliance osPolicyResourceId. + * @member {string} osPolicyResourceId + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.osPolicyResourceId = ""; + + /** + * OSPolicyResourceCompliance configSteps. + * @member {Array.} configSteps + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.configSteps = $util.emptyArray; + + /** + * OSPolicyResourceCompliance state. + * @member {google.cloud.osconfig.v1alpha.OSPolicyComplianceState} state + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.state = 0; + + /** + * Creates a new OSPolicyResourceCompliance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance instance + */ + OSPolicyResourceCompliance.create = function create(properties) { + return new OSPolicyResourceCompliance(properties); + }; + + /** + * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceCompliance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyResourceId != null && Object.hasOwnProperty.call(message, "osPolicyResourceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyResourceId); + if (message.configSteps != null && message.configSteps.length) + for (var i = 0; i < message.configSteps.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.encode(message.configSteps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + return writer; + }; + + /** + * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceCompliance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceCompliance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyResourceId = reader.string(); + break; + case 2: + if (!(message.configSteps && message.configSteps.length)) + message.configSteps = []; + message.configSteps.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); + break; + case 3: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceCompliance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyResourceCompliance message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyResourceCompliance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) + if (!$util.isString(message.osPolicyResourceId)) + return "osPolicyResourceId: string expected"; + if (message.configSteps != null && message.hasOwnProperty("configSteps")) { + if (!Array.isArray(message.configSteps)) + return "configSteps: array expected"; + for (var i = 0; i < message.configSteps.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify(message.configSteps[i]); + if (error) + return "configSteps." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance + */ + OSPolicyResourceCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance(); + if (object.osPolicyResourceId != null) + message.osPolicyResourceId = String(object.osPolicyResourceId); + if (object.configSteps) { + if (!Array.isArray(object.configSteps)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.configSteps: array expected"); + message.configSteps = []; + for (var i = 0; i < object.configSteps.length; ++i) { + if (typeof object.configSteps[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.configSteps: object expected"); + message.configSteps[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.fromObject(object.configSteps[i]); + } + } + switch (object.state) { + case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "COMPLIANT": + case 1: + message.state = 1; + break; + case "NON_COMPLIANT": + case 2: + message.state = 2; + break; + case "UNKNOWN": + case 3: + message.state = 3; + break; + case "NO_OS_POLICIES_APPLICABLE": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} message OSPolicyResourceCompliance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyResourceCompliance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.configSteps = []; + if (options.defaults) { + object.osPolicyResourceId = ""; + object.state = options.enums === String ? "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" : 0; + } + if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) + object.osPolicyResourceId = message.osPolicyResourceId; + if (message.configSteps && message.configSteps.length) { + object.configSteps = []; + for (var j = 0; j < message.configSteps.length; ++j) + object.configSteps[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.toObject(message.configSteps[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + return object; + }; + + /** + * Converts this OSPolicyResourceCompliance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @instance + * @returns {Object.} JSON object + */ + OSPolicyResourceCompliance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OSPolicyResourceCompliance; + })(); + + /** + * OSPolicyComplianceState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyComplianceState + * @enum {number} + * @property {number} OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED=0 OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED value + * @property {number} COMPLIANT=1 COMPLIANT value + * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value + * @property {number} UNKNOWN=3 UNKNOWN value + * @property {number} NO_OS_POLICIES_APPLICABLE=4 NO_OS_POLICIES_APPLICABLE value + */ + v1alpha.OSPolicyComplianceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPLIANT"] = 1; + values[valuesById[2] = "NON_COMPLIANT"] = 2; + values[valuesById[3] = "UNKNOWN"] = 3; + values[valuesById[4] = "NO_OS_POLICIES_APPLICABLE"] = 4; + return values; + })(); + + v1alpha.InstanceOSPoliciesCompliance = (function() { + + /** + * Properties of an InstanceOSPoliciesCompliance. + * @memberof google.cloud.osconfig.v1alpha + * @interface IInstanceOSPoliciesCompliance + * @property {string|null} [name] InstanceOSPoliciesCompliance name + * @property {string|null} [instance] InstanceOSPoliciesCompliance instance + * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] InstanceOSPoliciesCompliance state + * @property {string|null} [detailedState] InstanceOSPoliciesCompliance detailedState + * @property {string|null} [detailedStateReason] InstanceOSPoliciesCompliance detailedStateReason + * @property {Array.|null} [osPolicyCompliances] InstanceOSPoliciesCompliance osPolicyCompliances + * @property {google.protobuf.ITimestamp|null} [lastComplianceCheckTime] InstanceOSPoliciesCompliance lastComplianceCheckTime + * @property {string|null} [lastComplianceRunId] InstanceOSPoliciesCompliance lastComplianceRunId + */ + + /** + * Constructs a new InstanceOSPoliciesCompliance. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents an InstanceOSPoliciesCompliance. + * @implements IInstanceOSPoliciesCompliance + * @constructor + * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance=} [properties] Properties to set + */ + function InstanceOSPoliciesCompliance(properties) { + this.osPolicyCompliances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceOSPoliciesCompliance name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance + */ + InstanceOSPoliciesCompliance.prototype.name = ""; + + /** + * InstanceOSPoliciesCompliance instance. + * @member {string} instance + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance + */ + InstanceOSPoliciesCompliance.prototype.instance = ""; + + /** + * InstanceOSPoliciesCompliance state. + * @member {google.cloud.osconfig.v1alpha.OSPolicyComplianceState} state + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance + */ + InstanceOSPoliciesCompliance.prototype.state = 0; + + /** + * InstanceOSPoliciesCompliance detailedState. + * @member {string} detailedState + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance + */ + InstanceOSPoliciesCompliance.prototype.detailedState = ""; + + /** + * InstanceOSPoliciesCompliance detailedStateReason. + * @member {string} detailedStateReason + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance + */ + InstanceOSPoliciesCompliance.prototype.detailedStateReason = ""; + + /** + * InstanceOSPoliciesCompliance osPolicyCompliances. + * @member {Array.} osPolicyCompliances + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance + */ + InstanceOSPoliciesCompliance.prototype.osPolicyCompliances = $util.emptyArray; + + /** + * InstanceOSPoliciesCompliance lastComplianceCheckTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastComplianceCheckTime + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance + */ + InstanceOSPoliciesCompliance.prototype.lastComplianceCheckTime = null; + + /** + * InstanceOSPoliciesCompliance lastComplianceRunId. + * @member {string} lastComplianceRunId + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance + */ + InstanceOSPoliciesCompliance.prototype.lastComplianceRunId = ""; + + /** + * Creates a new InstanceOSPoliciesCompliance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance instance + */ + InstanceOSPoliciesCompliance.create = function create(properties) { + return new InstanceOSPoliciesCompliance(properties); + }; + + /** + * Encodes the specified InstanceOSPoliciesCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance} message InstanceOSPoliciesCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceOSPoliciesCompliance.encode = function encode(message, writer) { + 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.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instance); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.detailedState != null && Object.hasOwnProperty.call(message, "detailedState")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.detailedState); + if (message.detailedStateReason != null && Object.hasOwnProperty.call(message, "detailedStateReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.detailedStateReason); + if (message.osPolicyCompliances != null && message.osPolicyCompliances.length) + for (var i = 0; i < message.osPolicyCompliances.length; ++i) + $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.encode(message.osPolicyCompliances[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastComplianceCheckTime != null && Object.hasOwnProperty.call(message, "lastComplianceCheckTime")) + $root.google.protobuf.Timestamp.encode(message.lastComplianceCheckTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastComplianceRunId != null && Object.hasOwnProperty.call(message, "lastComplianceRunId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.lastComplianceRunId); + return writer; + }; + + /** + * Encodes the specified InstanceOSPoliciesCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance} message InstanceOSPoliciesCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceOSPoliciesCompliance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceOSPoliciesCompliance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.instance = reader.string(); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.detailedState = reader.string(); + break; + case 5: + message.detailedStateReason = reader.string(); + break; + case 6: + if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) + message.osPolicyCompliances = []; + message.osPolicyCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.decode(reader, reader.uint32())); + break; + case 7: + message.lastComplianceCheckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.lastComplianceRunId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceOSPoliciesCompliance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceOSPoliciesCompliance message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceOSPoliciesCompliance.verify = function verify(message) { + if (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.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.detailedState != null && message.hasOwnProperty("detailedState")) + if (!$util.isString(message.detailedState)) + return "detailedState: string expected"; + if (message.detailedStateReason != null && message.hasOwnProperty("detailedStateReason")) + if (!$util.isString(message.detailedStateReason)) + return "detailedStateReason: string expected"; + if (message.osPolicyCompliances != null && message.hasOwnProperty("osPolicyCompliances")) { + if (!Array.isArray(message.osPolicyCompliances)) + return "osPolicyCompliances: array expected"; + for (var i = 0; i < message.osPolicyCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify(message.osPolicyCompliances[i]); + if (error) + return "osPolicyCompliances." + error; + } + } + if (message.lastComplianceCheckTime != null && message.hasOwnProperty("lastComplianceCheckTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastComplianceCheckTime); + if (error) + return "lastComplianceCheckTime." + error; + } + if (message.lastComplianceRunId != null && message.hasOwnProperty("lastComplianceRunId")) + if (!$util.isString(message.lastComplianceRunId)) + return "lastComplianceRunId: string expected"; + return null; + }; + + /** + * Creates an InstanceOSPoliciesCompliance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance + */ + InstanceOSPoliciesCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance(); + if (object.name != null) + message.name = String(object.name); + if (object.instance != null) + message.instance = String(object.instance); + switch (object.state) { + case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "COMPLIANT": + case 1: + message.state = 1; + break; + case "NON_COMPLIANT": + case 2: + message.state = 2; + break; + case "UNKNOWN": + case 3: + message.state = 3; + break; + case "NO_OS_POLICIES_APPLICABLE": + case 4: + message.state = 4; + break; + } + if (object.detailedState != null) + message.detailedState = String(object.detailedState); + if (object.detailedStateReason != null) + message.detailedStateReason = String(object.detailedStateReason); + if (object.osPolicyCompliances) { + if (!Array.isArray(object.osPolicyCompliances)) + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.osPolicyCompliances: array expected"); + message.osPolicyCompliances = []; + for (var i = 0; i < object.osPolicyCompliances.length; ++i) { + if (typeof object.osPolicyCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.osPolicyCompliances: object expected"); + message.osPolicyCompliances[i] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.fromObject(object.osPolicyCompliances[i]); + } + } + if (object.lastComplianceCheckTime != null) { + if (typeof object.lastComplianceCheckTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.lastComplianceCheckTime: object expected"); + message.lastComplianceCheckTime = $root.google.protobuf.Timestamp.fromObject(object.lastComplianceCheckTime); + } + if (object.lastComplianceRunId != null) + message.lastComplianceRunId = String(object.lastComplianceRunId); + return message; + }; + + /** + * Creates a plain object from an InstanceOSPoliciesCompliance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} message InstanceOSPoliciesCompliance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceOSPoliciesCompliance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyCompliances = []; + if (options.defaults) { + object.name = ""; + object.instance = ""; + object.state = options.enums === String ? "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" : 0; + object.detailedState = ""; + object.detailedStateReason = ""; + object.lastComplianceCheckTime = null; + object.lastComplianceRunId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + if (message.detailedState != null && message.hasOwnProperty("detailedState")) + object.detailedState = message.detailedState; + if (message.detailedStateReason != null && message.hasOwnProperty("detailedStateReason")) + object.detailedStateReason = message.detailedStateReason; + if (message.osPolicyCompliances && message.osPolicyCompliances.length) { + object.osPolicyCompliances = []; + for (var j = 0; j < message.osPolicyCompliances.length; ++j) + object.osPolicyCompliances[j] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.toObject(message.osPolicyCompliances[j], options); + } + if (message.lastComplianceCheckTime != null && message.hasOwnProperty("lastComplianceCheckTime")) + object.lastComplianceCheckTime = $root.google.protobuf.Timestamp.toObject(message.lastComplianceCheckTime, options); + if (message.lastComplianceRunId != null && message.hasOwnProperty("lastComplianceRunId")) + object.lastComplianceRunId = message.lastComplianceRunId; + return object; + }; + + /** + * Converts this InstanceOSPoliciesCompliance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance + * @returns {Object.} JSON object + */ + InstanceOSPoliciesCompliance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + InstanceOSPoliciesCompliance.OSPolicyCompliance = (function() { + + /** + * Properties of a OSPolicyCompliance. + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @interface IOSPolicyCompliance + * @property {string|null} [osPolicyId] OSPolicyCompliance osPolicyId + * @property {string|null} [osPolicyAssignment] OSPolicyCompliance osPolicyAssignment + * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] OSPolicyCompliance state + * @property {Array.|null} [osPolicyResourceCompliances] OSPolicyCompliance osPolicyResourceCompliances + */ + + /** + * Constructs a new OSPolicyCompliance. + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @classdesc Represents a OSPolicyCompliance. + * @implements IOSPolicyCompliance + * @constructor + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance=} [properties] Properties to set + */ + function OSPolicyCompliance(properties) { + this.osPolicyResourceCompliances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyCompliance osPolicyId. + * @member {string} osPolicyId + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyId = ""; + + /** + * OSPolicyCompliance osPolicyAssignment. + * @member {string} osPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyAssignment = ""; + + /** + * OSPolicyCompliance state. + * @member {google.cloud.osconfig.v1alpha.OSPolicyComplianceState} state + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.state = 0; + + /** + * OSPolicyCompliance osPolicyResourceCompliances. + * @member {Array.} osPolicyResourceCompliances + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyResourceCompliances = $util.emptyArray; + + /** + * Creates a new OSPolicyCompliance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance instance + */ + OSPolicyCompliance.create = function create(properties) { + return new OSPolicyCompliance(properties); + }; + + /** + * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyCompliance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyId != null && Object.hasOwnProperty.call(message, "osPolicyId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyId); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osPolicyAssignment); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.osPolicyResourceCompliances != null && message.osPolicyResourceCompliances.length) + for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.encode(message.osPolicyResourceCompliances[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyCompliance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyCompliance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyId = reader.string(); + break; + case 2: + message.osPolicyAssignment = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) + message.osPolicyResourceCompliances = []; + message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyCompliance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyCompliance message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyCompliance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) + if (!$util.isString(message.osPolicyId)) + return "osPolicyId: string expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + if (!$util.isString(message.osPolicyAssignment)) + return "osPolicyAssignment: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.osPolicyResourceCompliances != null && message.hasOwnProperty("osPolicyResourceCompliances")) { + if (!Array.isArray(message.osPolicyResourceCompliances)) + return "osPolicyResourceCompliances: array expected"; + for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify(message.osPolicyResourceCompliances[i]); + if (error) + return "osPolicyResourceCompliances." + error; + } + } + return null; + }; + + /** + * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance + */ + OSPolicyCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance(); + if (object.osPolicyId != null) + message.osPolicyId = String(object.osPolicyId); + if (object.osPolicyAssignment != null) + message.osPolicyAssignment = String(object.osPolicyAssignment); + switch (object.state) { + case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "COMPLIANT": + case 1: + message.state = 1; + break; + case "NON_COMPLIANT": + case 2: + message.state = 2; + break; + case "UNKNOWN": + case 3: + message.state = 3; + break; + case "NO_OS_POLICIES_APPLICABLE": + case 4: + message.state = 4; + break; + } + if (object.osPolicyResourceCompliances) { + if (!Array.isArray(object.osPolicyResourceCompliances)) + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.osPolicyResourceCompliances: array expected"); + message.osPolicyResourceCompliances = []; + for (var i = 0; i < object.osPolicyResourceCompliances.length; ++i) { + if (typeof object.osPolicyResourceCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.osPolicyResourceCompliances: object expected"); + message.osPolicyResourceCompliances[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.fromObject(object.osPolicyResourceCompliances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} message OSPolicyCompliance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyCompliance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyResourceCompliances = []; + if (options.defaults) { + object.osPolicyId = ""; + object.osPolicyAssignment = ""; + object.state = options.enums === String ? "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" : 0; + } + if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) + object.osPolicyId = message.osPolicyId; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = message.osPolicyAssignment; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + if (message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length) { + object.osPolicyResourceCompliances = []; + for (var j = 0; j < message.osPolicyResourceCompliances.length; ++j) + object.osPolicyResourceCompliances[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.toObject(message.osPolicyResourceCompliances[j], options); + } + return object; + }; + + /** + * Converts this OSPolicyCompliance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + * @returns {Object.} JSON object + */ + OSPolicyCompliance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OSPolicyCompliance; + })(); + + return InstanceOSPoliciesCompliance; + })(); + + v1alpha.GetInstanceOSPoliciesComplianceRequest = (function() { + + /** + * Properties of a GetInstanceOSPoliciesComplianceRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IGetInstanceOSPoliciesComplianceRequest + * @property {string|null} [name] GetInstanceOSPoliciesComplianceRequest name + */ + + /** + * Constructs a new GetInstanceOSPoliciesComplianceRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a GetInstanceOSPoliciesComplianceRequest. + * @implements IGetInstanceOSPoliciesComplianceRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest=} [properties] Properties to set + */ + function GetInstanceOSPoliciesComplianceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetInstanceOSPoliciesComplianceRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @instance + */ + GetInstanceOSPoliciesComplianceRequest.prototype.name = ""; + + /** + * Creates a new GetInstanceOSPoliciesComplianceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest instance + */ + GetInstanceOSPoliciesComplianceRequest.create = function create(properties) { + return new GetInstanceOSPoliciesComplianceRequest(properties); + }; + + /** + * Encodes the specified GetInstanceOSPoliciesComplianceRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} message GetInstanceOSPoliciesComplianceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInstanceOSPoliciesComplianceRequest.encode = function encode(message, writer) { + 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 GetInstanceOSPoliciesComplianceRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} message GetInstanceOSPoliciesComplianceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInstanceOSPoliciesComplianceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInstanceOSPoliciesComplianceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInstanceOSPoliciesComplianceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetInstanceOSPoliciesComplianceRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetInstanceOSPoliciesComplianceRequest.verify = function verify(message) { + if (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 GetInstanceOSPoliciesComplianceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest + */ + GetInstanceOSPoliciesComplianceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetInstanceOSPoliciesComplianceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @static + * @param {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} message GetInstanceOSPoliciesComplianceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetInstanceOSPoliciesComplianceRequest.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 GetInstanceOSPoliciesComplianceRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @instance + * @returns {Object.} JSON object + */ + GetInstanceOSPoliciesComplianceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetInstanceOSPoliciesComplianceRequest; + })(); + + v1alpha.ListInstanceOSPoliciesCompliancesRequest = (function() { + + /** + * Properties of a ListInstanceOSPoliciesCompliancesRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListInstanceOSPoliciesCompliancesRequest + * @property {string|null} [parent] ListInstanceOSPoliciesCompliancesRequest parent + * @property {number|null} [pageSize] ListInstanceOSPoliciesCompliancesRequest pageSize + * @property {string|null} [pageToken] ListInstanceOSPoliciesCompliancesRequest pageToken + * @property {string|null} [filter] ListInstanceOSPoliciesCompliancesRequest filter + */ + + /** + * Constructs a new ListInstanceOSPoliciesCompliancesRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListInstanceOSPoliciesCompliancesRequest. + * @implements IListInstanceOSPoliciesCompliancesRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest=} [properties] Properties to set + */ + function ListInstanceOSPoliciesCompliancesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInstanceOSPoliciesCompliancesRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @instance + */ + ListInstanceOSPoliciesCompliancesRequest.prototype.parent = ""; + + /** + * ListInstanceOSPoliciesCompliancesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @instance + */ + ListInstanceOSPoliciesCompliancesRequest.prototype.pageSize = 0; + + /** + * ListInstanceOSPoliciesCompliancesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @instance + */ + ListInstanceOSPoliciesCompliancesRequest.prototype.pageToken = ""; + + /** + * ListInstanceOSPoliciesCompliancesRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @instance + */ + ListInstanceOSPoliciesCompliancesRequest.prototype.filter = ""; + + /** + * Creates a new ListInstanceOSPoliciesCompliancesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest instance + */ + ListInstanceOSPoliciesCompliancesRequest.create = function create(properties) { + return new ListInstanceOSPoliciesCompliancesRequest(properties); + }; + + /** + * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstanceOSPoliciesCompliancesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstanceOSPoliciesCompliancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstanceOSPoliciesCompliancesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstanceOSPoliciesCompliancesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInstanceOSPoliciesCompliancesRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInstanceOSPoliciesCompliancesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListInstanceOSPoliciesCompliancesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest + */ + ListInstanceOSPoliciesCompliancesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListInstanceOSPoliciesCompliancesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} message ListInstanceOSPoliciesCompliancesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInstanceOSPoliciesCompliancesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListInstanceOSPoliciesCompliancesRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @instance + * @returns {Object.} JSON object + */ + ListInstanceOSPoliciesCompliancesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListInstanceOSPoliciesCompliancesRequest; + })(); + + v1alpha.ListInstanceOSPoliciesCompliancesResponse = (function() { + + /** + * Properties of a ListInstanceOSPoliciesCompliancesResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListInstanceOSPoliciesCompliancesResponse + * @property {Array.|null} [instanceOsPoliciesCompliances] ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances + * @property {string|null} [nextPageToken] ListInstanceOSPoliciesCompliancesResponse nextPageToken + */ + + /** + * Constructs a new ListInstanceOSPoliciesCompliancesResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListInstanceOSPoliciesCompliancesResponse. + * @implements IListInstanceOSPoliciesCompliancesResponse + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse=} [properties] Properties to set + */ + function ListInstanceOSPoliciesCompliancesResponse(properties) { + this.instanceOsPoliciesCompliances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances. + * @member {Array.} instanceOsPoliciesCompliances + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @instance + */ + ListInstanceOSPoliciesCompliancesResponse.prototype.instanceOsPoliciesCompliances = $util.emptyArray; + + /** + * ListInstanceOSPoliciesCompliancesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @instance + */ + ListInstanceOSPoliciesCompliancesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListInstanceOSPoliciesCompliancesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse instance + */ + ListInstanceOSPoliciesCompliancesResponse.create = function create(properties) { + return new ListInstanceOSPoliciesCompliancesResponse(properties); + }; + + /** + * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse} message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstanceOSPoliciesCompliancesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.instanceOsPoliciesCompliances != null && message.instanceOsPoliciesCompliances.length) + for (var i = 0; i < message.instanceOsPoliciesCompliances.length; ++i) + $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.encode(message.instanceOsPoliciesCompliances[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 ListInstanceOSPoliciesCompliancesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse} message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstanceOSPoliciesCompliancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstanceOSPoliciesCompliancesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.instanceOsPoliciesCompliances && message.instanceOsPoliciesCompliances.length)) + message.instanceOsPoliciesCompliances = []; + message.instanceOsPoliciesCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstanceOSPoliciesCompliancesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInstanceOSPoliciesCompliancesResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInstanceOSPoliciesCompliancesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.instanceOsPoliciesCompliances != null && message.hasOwnProperty("instanceOsPoliciesCompliances")) { + if (!Array.isArray(message.instanceOsPoliciesCompliances)) + return "instanceOsPoliciesCompliances: array expected"; + for (var i = 0; i < message.instanceOsPoliciesCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify(message.instanceOsPoliciesCompliances[i]); + if (error) + return "instanceOsPoliciesCompliances." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListInstanceOSPoliciesCompliancesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse + */ + ListInstanceOSPoliciesCompliancesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse(); + if (object.instanceOsPoliciesCompliances) { + if (!Array.isArray(object.instanceOsPoliciesCompliances)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.instanceOsPoliciesCompliances: array expected"); + message.instanceOsPoliciesCompliances = []; + for (var i = 0; i < object.instanceOsPoliciesCompliances.length; ++i) { + if (typeof object.instanceOsPoliciesCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.instanceOsPoliciesCompliances: object expected"); + message.instanceOsPoliciesCompliances[i] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.fromObject(object.instanceOsPoliciesCompliances[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListInstanceOSPoliciesCompliancesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @static + * @param {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} message ListInstanceOSPoliciesCompliancesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInstanceOSPoliciesCompliancesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.instanceOsPoliciesCompliances = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.instanceOsPoliciesCompliances && message.instanceOsPoliciesCompliances.length) { + object.instanceOsPoliciesCompliances = []; + for (var j = 0; j < message.instanceOsPoliciesCompliances.length; ++j) + object.instanceOsPoliciesCompliances[j] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.toObject(message.instanceOsPoliciesCompliances[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListInstanceOSPoliciesCompliancesResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @instance + * @returns {Object.} JSON object + */ + ListInstanceOSPoliciesCompliancesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListInstanceOSPoliciesCompliancesResponse; + })(); + + v1alpha.Inventory = (function() { + + /** + * Properties of an Inventory. + * @memberof google.cloud.osconfig.v1alpha + * @interface IInventory + * @property {string|null} [name] Inventory name + * @property {google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null} [osInfo] Inventory osInfo + * @property {Object.|null} [items] Inventory items + * @property {google.protobuf.ITimestamp|null} [updateTime] Inventory updateTime + */ + + /** + * Constructs a new Inventory. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents an Inventory. + * @implements IInventory + * @constructor + * @param {google.cloud.osconfig.v1alpha.IInventory=} [properties] Properties to set + */ + function Inventory(properties) { + this.items = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Inventory name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @instance + */ + Inventory.prototype.name = ""; + + /** + * Inventory osInfo. + * @member {google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null|undefined} osInfo + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @instance + */ + Inventory.prototype.osInfo = null; + + /** + * Inventory items. + * @member {Object.} items + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @instance + */ + Inventory.prototype.items = $util.emptyObject; + + /** + * Inventory updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @instance + */ + Inventory.prototype.updateTime = null; + + /** + * Creates a new Inventory instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @static + * @param {google.cloud.osconfig.v1alpha.IInventory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory instance + */ + Inventory.create = function create(properties) { + return new Inventory(properties); + }; + + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @static + * @param {google.cloud.osconfig.v1alpha.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osInfo != null && Object.hasOwnProperty.call(message, "osInfo")) + $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.encode(message.osInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.items != null && Object.hasOwnProperty.call(message, "items")) + for (var keys = Object.keys(message.items), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.osconfig.v1alpha.Inventory.Item.encode(message.items[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @static + * @param {google.cloud.osconfig.v1alpha.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Inventory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 1: + message.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.decode(reader, reader.uint32()); + break; + case 2: + if (message.items === $util.emptyObject) + message.items = {}; + 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.osconfig.v1alpha.Inventory.Item.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.items[key] = value; + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Inventory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Inventory message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Inventory.verify = function verify(message) { + if (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.osInfo != null && message.hasOwnProperty("osInfo")) { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify(message.osInfo); + if (error) + return "osInfo." + error; + } + if (message.items != null && message.hasOwnProperty("items")) { + if (!$util.isObject(message.items)) + return "items: object expected"; + var key = Object.keys(message.items); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.Item.verify(message.items[key[i]]); + if (error) + return "items." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory + */ + Inventory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory(); + if (object.name != null) + message.name = String(object.name); + if (object.osInfo != null) { + if (typeof object.osInfo !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.osInfo: object expected"); + message.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.fromObject(object.osInfo); + } + if (object.items) { + if (typeof object.items !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.items: object expected"); + message.items = {}; + for (var keys = Object.keys(object.items), i = 0; i < keys.length; ++i) { + if (typeof object.items[keys[i]] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.items: object expected"); + message.items[keys[i]] = $root.google.cloud.osconfig.v1alpha.Inventory.Item.fromObject(object.items[keys[i]]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory} message Inventory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Inventory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.items = {}; + if (options.defaults) { + object.osInfo = null; + object.name = ""; + object.updateTime = null; + } + if (message.osInfo != null && message.hasOwnProperty("osInfo")) + object.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.toObject(message.osInfo, options); + var keys2; + if (message.items && (keys2 = Object.keys(message.items)).length) { + object.items = {}; + for (var j = 0; j < keys2.length; ++j) + object.items[keys2[j]] = $root.google.cloud.osconfig.v1alpha.Inventory.Item.toObject(message.items[keys2[j]], options); + } + 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); + return object; + }; + + /** + * Converts this Inventory to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @instance + * @returns {Object.} JSON object + */ + Inventory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Inventory.OsInfo = (function() { + + /** + * Properties of an OsInfo. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IOsInfo + * @property {string|null} [hostname] OsInfo hostname + * @property {string|null} [longName] OsInfo longName + * @property {string|null} [shortName] OsInfo shortName + * @property {string|null} [version] OsInfo version + * @property {string|null} [architecture] OsInfo architecture + * @property {string|null} [kernelVersion] OsInfo kernelVersion + * @property {string|null} [kernelRelease] OsInfo kernelRelease + * @property {string|null} [osconfigAgentVersion] OsInfo osconfigAgentVersion + */ + + /** + * Constructs a new OsInfo. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents an OsInfo. + * @implements IOsInfo + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo=} [properties] Properties to set + */ + function OsInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OsInfo hostname. + * @member {string} hostname + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.hostname = ""; + + /** + * OsInfo longName. + * @member {string} longName + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.longName = ""; + + /** + * OsInfo shortName. + * @member {string} shortName + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.shortName = ""; + + /** + * OsInfo version. + * @member {string} version + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.version = ""; + + /** + * OsInfo architecture. + * @member {string} architecture + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.architecture = ""; + + /** + * OsInfo kernelVersion. + * @member {string} kernelVersion + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.kernelVersion = ""; + + /** + * OsInfo kernelRelease. + * @member {string} kernelRelease + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.kernelRelease = ""; + + /** + * OsInfo osconfigAgentVersion. + * @member {string} osconfigAgentVersion + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.osconfigAgentVersion = ""; + + /** + * Creates a new OsInfo instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo instance + */ + OsInfo.create = function create(properties) { + return new OsInfo(properties); + }; + + /** + * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.longName != null && Object.hasOwnProperty.call(message, "longName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.longName); + if (message.shortName != null && Object.hasOwnProperty.call(message, "shortName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shortName); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.architecture); + if (message.kernelVersion != null && Object.hasOwnProperty.call(message, "kernelVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.kernelVersion); + if (message.kernelRelease != null && Object.hasOwnProperty.call(message, "kernelRelease")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.kernelRelease); + if (message.osconfigAgentVersion != null && Object.hasOwnProperty.call(message, "osconfigAgentVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.osconfigAgentVersion); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.hostname); + return writer; + }; + + /** + * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OsInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 9: + message.hostname = reader.string(); + break; + case 2: + message.longName = reader.string(); + break; + case 3: + message.shortName = reader.string(); + break; + case 4: + message.version = reader.string(); + break; + case 5: + message.architecture = reader.string(); + break; + case 6: + message.kernelVersion = reader.string(); + break; + case 7: + message.kernelRelease = reader.string(); + break; + case 8: + message.osconfigAgentVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OsInfo message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OsInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.longName != null && message.hasOwnProperty("longName")) + if (!$util.isString(message.longName)) + return "longName: string expected"; + if (message.shortName != null && message.hasOwnProperty("shortName")) + if (!$util.isString(message.shortName)) + return "shortName: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) + if (!$util.isString(message.kernelVersion)) + return "kernelVersion: string expected"; + if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) + if (!$util.isString(message.kernelRelease)) + return "kernelRelease: string expected"; + if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) + if (!$util.isString(message.osconfigAgentVersion)) + return "osconfigAgentVersion: string expected"; + return null; + }; + + /** + * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo + */ + OsInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.longName != null) + message.longName = String(object.longName); + if (object.shortName != null) + message.shortName = String(object.shortName); + if (object.version != null) + message.version = String(object.version); + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.kernelVersion != null) + message.kernelVersion = String(object.kernelVersion); + if (object.kernelRelease != null) + message.kernelRelease = String(object.kernelRelease); + if (object.osconfigAgentVersion != null) + message.osconfigAgentVersion = String(object.osconfigAgentVersion); + return message; + }; + + /** + * Creates a plain object from an OsInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.OsInfo} message OsInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OsInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.longName = ""; + object.shortName = ""; + object.version = ""; + object.architecture = ""; + object.kernelVersion = ""; + object.kernelRelease = ""; + object.osconfigAgentVersion = ""; + object.hostname = ""; + } + if (message.longName != null && message.hasOwnProperty("longName")) + object.longName = message.longName; + if (message.shortName != null && message.hasOwnProperty("shortName")) + object.shortName = message.shortName; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) + object.kernelVersion = message.kernelVersion; + if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) + object.kernelRelease = message.kernelRelease; + if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) + object.osconfigAgentVersion = message.osconfigAgentVersion; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + return object; + }; + + /** + * Converts this OsInfo to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + * @returns {Object.} JSON object + */ + OsInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OsInfo; + })(); + + Inventory.Item = (function() { + + /** + * Properties of an Item. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IItem + * @property {string|null} [id] Item id + * @property {google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|null} [originType] Item originType + * @property {google.protobuf.ITimestamp|null} [createTime] Item createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Item updateTime + * @property {google.cloud.osconfig.v1alpha.Inventory.Item.Type|null} [type] Item type + * @property {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null} [installedPackage] Item installedPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null} [availablePackage] Item availablePackage + */ + + /** + * Constructs a new Item. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents an Item. + * @implements IItem + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IItem=} [properties] Properties to set + */ + function Item(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Item id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.id = ""; + + /** + * Item originType. + * @member {google.cloud.osconfig.v1alpha.Inventory.Item.OriginType} originType + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.originType = 0; + + /** + * Item createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.createTime = null; + + /** + * Item updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.updateTime = null; + + /** + * Item type. + * @member {google.cloud.osconfig.v1alpha.Inventory.Item.Type} type + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.type = 0; + + /** + * Item installedPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null|undefined} installedPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.installedPackage = null; + + /** + * Item availablePackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null|undefined} availablePackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.availablePackage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Item details. + * @member {"installedPackage"|"availablePackage"|undefined} details + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Object.defineProperty(Item.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["installedPackage", "availablePackage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Item instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IItem=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item instance + */ + Item.create = function create(properties) { + return new Item(properties); + }; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.originType != null && Object.hasOwnProperty.call(message, "originType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.originType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.installedPackage != null && Object.hasOwnProperty.call(message, "installedPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.encode(message.installedPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.availablePackage != null && Object.hasOwnProperty.call(message, "availablePackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.encode(message.availablePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Item message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.Item(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.originType = reader.int32(); + break; + case 8: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + case 7: + message.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Item message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Item.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.originType != null && message.hasOwnProperty("originType")) + switch (message.originType) { + default: + return "originType: enum value expected"; + case 0: + case 1: + break; + } + 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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify(message.installedPackage); + if (error) + return "installedPackage." + error; + } + } + if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify(message.availablePackage); + if (error) + return "availablePackage." + error; + } + } + return null; + }; + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item + */ + Item.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.Item) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.Item(); + if (object.id != null) + message.id = String(object.id); + switch (object.originType) { + case "ORIGIN_TYPE_UNSPECIFIED": + case 0: + message.originType = 0; + break; + case "INVENTORY_REPORT": + case 1: + message.originType = 1; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.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.osconfig.v1alpha.Inventory.Item.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INSTALLED_PACKAGE": + case 1: + message.type = 1; + break; + case "AVAILABLE_PACKAGE": + case 2: + message.type = 2; + break; + } + if (object.installedPackage != null) { + if (typeof object.installedPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.installedPackage: object expected"); + message.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.fromObject(object.installedPackage); + } + if (object.availablePackage != null) { + if (typeof object.availablePackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.availablePackage: object expected"); + message.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.fromObject(object.availablePackage); + } + return message; + }; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.Item} message Item + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Item.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.originType = options.enums === String ? "ORIGIN_TYPE_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.originType != null && message.hasOwnProperty("originType")) + object.originType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType[message.originType] : message.originType; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.Type[message.type] : message.type; + if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { + object.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.toObject(message.installedPackage, options); + if (options.oneofs) + object.details = "installedPackage"; + } + if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { + object.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.toObject(message.availablePackage, options); + if (options.oneofs) + object.details = "availablePackage"; + } + 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); + return object; + }; + + /** + * Converts this Item to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + * @returns {Object.} JSON object + */ + Item.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OriginType enum. + * @name google.cloud.osconfig.v1alpha.Inventory.Item.OriginType + * @enum {number} + * @property {number} ORIGIN_TYPE_UNSPECIFIED=0 ORIGIN_TYPE_UNSPECIFIED value + * @property {number} INVENTORY_REPORT=1 INVENTORY_REPORT value + */ + Item.OriginType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORIGIN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INVENTORY_REPORT"] = 1; + return values; + })(); + + /** + * Type enum. + * @name google.cloud.osconfig.v1alpha.Inventory.Item.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INSTALLED_PACKAGE=1 INSTALLED_PACKAGE value + * @property {number} AVAILABLE_PACKAGE=2 AVAILABLE_PACKAGE value + */ + Item.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLED_PACKAGE"] = 1; + values[valuesById[2] = "AVAILABLE_PACKAGE"] = 2; + return values; + })(); + + return Item; + })(); + + Inventory.SoftwarePackage = (function() { + + /** + * Properties of a SoftwarePackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface ISoftwarePackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [yumPackage] SoftwarePackage yumPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [aptPackage] SoftwarePackage aptPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [zypperPackage] SoftwarePackage zypperPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [googetPackage] SoftwarePackage googetPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null} [zypperPatch] SoftwarePackage zypperPatch + * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null} [wuaPackage] SoftwarePackage wuaPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null} [qfePackage] SoftwarePackage qfePackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [cosPackage] SoftwarePackage cosPackage + */ + + /** + * Constructs a new SoftwarePackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a SoftwarePackage. + * @implements ISoftwarePackage + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage=} [properties] Properties to set + */ + function SoftwarePackage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoftwarePackage yumPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} yumPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.yumPackage = null; + + /** + * SoftwarePackage aptPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} aptPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.aptPackage = null; + + /** + * SoftwarePackage zypperPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} zypperPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.zypperPackage = null; + + /** + * SoftwarePackage googetPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} googetPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.googetPackage = null; + + /** + * SoftwarePackage zypperPatch. + * @member {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null|undefined} zypperPatch + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.zypperPatch = null; + + /** + * SoftwarePackage wuaPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null|undefined} wuaPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.wuaPackage = null; + + /** + * SoftwarePackage qfePackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null|undefined} qfePackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.qfePackage = null; + + /** + * SoftwarePackage cosPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} cosPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.cosPackage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SoftwarePackage details. + * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|undefined} details + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + Object.defineProperty(SoftwarePackage.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SoftwarePackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage instance + */ + SoftwarePackage.create = function create(properties) { + return new SoftwarePackage(properties); + }; + + /** + * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwarePackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yumPackage != null && Object.hasOwnProperty.call(message, "yumPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.yumPackage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.aptPackage != null && Object.hasOwnProperty.call(message, "aptPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.aptPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zypperPackage != null && Object.hasOwnProperty.call(message, "zypperPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.zypperPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.googetPackage != null && Object.hasOwnProperty.call(message, "googetPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.googetPackage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.zypperPatch != null && Object.hasOwnProperty.call(message, "zypperPatch")) + $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.encode(message.zypperPatch, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.wuaPackage != null && Object.hasOwnProperty.call(message, "wuaPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.encode(message.wuaPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.qfePackage != null && Object.hasOwnProperty.call(message, "qfePackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.encode(message.qfePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.cosPackage != null && Object.hasOwnProperty.call(message, "cosPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.cosPackage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwarePackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoftwarePackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwarePackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 2: + message.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 3: + message.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 4: + message.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 5: + message.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.decode(reader, reader.uint32()); + break; + case 6: + message.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); + break; + case 7: + message.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); + break; + case 8: + message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwarePackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoftwarePackage message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwarePackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.yumPackage); + if (error) + return "yumPackage." + error; + } + } + if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.aptPackage); + if (error) + return "aptPackage." + error; + } + } + if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.zypperPackage); + if (error) + return "zypperPackage." + error; + } + } + if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.googetPackage); + if (error) + return "googetPackage." + error; + } + } + if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify(message.zypperPatch); + if (error) + return "zypperPatch." + error; + } + } + if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify(message.wuaPackage); + if (error) + return "wuaPackage." + error; + } + } + if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify(message.qfePackage); + if (error) + return "qfePackage." + error; + } + } + if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.cosPackage); + if (error) + return "cosPackage." + error; + } + } + return null; + }; + + /** + * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage + */ + SoftwarePackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage(); + if (object.yumPackage != null) { + if (typeof object.yumPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.yumPackage: object expected"); + message.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.yumPackage); + } + if (object.aptPackage != null) { + if (typeof object.aptPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.aptPackage: object expected"); + message.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.aptPackage); + } + if (object.zypperPackage != null) { + if (typeof object.zypperPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.zypperPackage: object expected"); + message.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.zypperPackage); + } + if (object.googetPackage != null) { + if (typeof object.googetPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.googetPackage: object expected"); + message.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.googetPackage); + } + if (object.zypperPatch != null) { + if (typeof object.zypperPatch !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.zypperPatch: object expected"); + message.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.fromObject(object.zypperPatch); + } + if (object.wuaPackage != null) { + if (typeof object.wuaPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.wuaPackage: object expected"); + message.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.fromObject(object.wuaPackage); + } + if (object.qfePackage != null) { + if (typeof object.qfePackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.qfePackage: object expected"); + message.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.fromObject(object.qfePackage); + } + if (object.cosPackage != null) { + if (typeof object.cosPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.cosPackage: object expected"); + message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.cosPackage); + } + return message; + }; + + /** + * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} message SoftwarePackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwarePackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { + object.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.yumPackage, options); + if (options.oneofs) + object.details = "yumPackage"; + } + if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { + object.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.aptPackage, options); + if (options.oneofs) + object.details = "aptPackage"; + } + if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { + object.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.zypperPackage, options); + if (options.oneofs) + object.details = "zypperPackage"; + } + if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { + object.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.googetPackage, options); + if (options.oneofs) + object.details = "googetPackage"; + } + if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { + object.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.toObject(message.zypperPatch, options); + if (options.oneofs) + object.details = "zypperPatch"; + } + if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { + object.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.toObject(message.wuaPackage, options); + if (options.oneofs) + object.details = "wuaPackage"; + } + if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { + object.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.toObject(message.qfePackage, options); + if (options.oneofs) + object.details = "qfePackage"; + } + if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { + object.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.cosPackage, options); + if (options.oneofs) + object.details = "cosPackage"; + } + return object; + }; + + /** + * Converts this SoftwarePackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + * @returns {Object.} JSON object + */ + SoftwarePackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SoftwarePackage; + })(); + + Inventory.VersionedPackage = (function() { + + /** + * Properties of a VersionedPackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IVersionedPackage + * @property {string|null} [packageName] VersionedPackage packageName + * @property {string|null} [architecture] VersionedPackage architecture + * @property {string|null} [version] VersionedPackage version + */ + + /** + * Constructs a new VersionedPackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a VersionedPackage. + * @implements IVersionedPackage + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage=} [properties] Properties to set + */ + function VersionedPackage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersionedPackage packageName. + * @member {string} packageName + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.packageName = ""; + + /** + * VersionedPackage architecture. + * @member {string} architecture + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.architecture = ""; + + /** + * VersionedPackage version. + * @member {string} version + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.version = ""; + + /** + * Creates a new VersionedPackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage instance + */ + VersionedPackage.create = function create(properties) { + return new VersionedPackage(properties); + }; + + /** + * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionedPackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.architecture); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageName); + return writer; + }; + + /** + * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionedPackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionedPackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionedPackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.packageName = reader.string(); + break; + case 2: + message.architecture = reader.string(); + break; + case 3: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionedPackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionedPackage message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionedPackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage + */ + VersionedPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage(); + if (object.packageName != null) + message.packageName = String(object.packageName); + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} message VersionedPackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionedPackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.architecture = ""; + object.version = ""; + object.packageName = ""; + } + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + return object; + }; + + /** + * Converts this VersionedPackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @instance + * @returns {Object.} JSON object + */ + VersionedPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VersionedPackage; + })(); + + Inventory.ZypperPatch = (function() { + + /** + * Properties of a ZypperPatch. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IZypperPatch + * @property {string|null} [patchName] ZypperPatch patchName + * @property {string|null} [category] ZypperPatch category + * @property {string|null} [severity] ZypperPatch severity + * @property {string|null} [summary] ZypperPatch summary + */ + + /** + * Constructs a new ZypperPatch. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a ZypperPatch. + * @implements IZypperPatch + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch=} [properties] Properties to set + */ + function ZypperPatch(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ZypperPatch patchName. + * @member {string} patchName + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.patchName = ""; + + /** + * ZypperPatch category. + * @member {string} category + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.category = ""; + + /** + * ZypperPatch severity. + * @member {string} severity + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.severity = ""; + + /** + * ZypperPatch summary. + * @member {string} summary + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.summary = ""; + + /** + * Creates a new ZypperPatch instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch instance + */ + ZypperPatch.create = function create(properties) { + return new ZypperPatch(properties); + }; + + /** + * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperPatch.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.category); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.severity); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.summary); + if (message.patchName != null && Object.hasOwnProperty.call(message, "patchName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.patchName); + return writer; + }; + + /** + * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperPatch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ZypperPatch message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperPatch.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.patchName = reader.string(); + break; + case 2: + message.category = reader.string(); + break; + case 3: + message.severity = reader.string(); + break; + case 4: + message.summary = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperPatch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ZypperPatch message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ZypperPatch.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchName != null && message.hasOwnProperty("patchName")) + if (!$util.isString(message.patchName)) + return "patchName: string expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + return null; + }; + + /** + * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch + */ + ZypperPatch.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch(); + if (object.patchName != null) + message.patchName = String(object.patchName); + if (object.category != null) + message.category = String(object.category); + if (object.severity != null) + message.severity = String(object.severity); + if (object.summary != null) + message.summary = String(object.summary); + return message; + }; + + /** + * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} message ZypperPatch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ZypperPatch.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.category = ""; + object.severity = ""; + object.summary = ""; + object.patchName = ""; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + if (message.patchName != null && message.hasOwnProperty("patchName")) + object.patchName = message.patchName; + return object; + }; + + /** + * Converts this ZypperPatch to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + * @returns {Object.} JSON object + */ + ZypperPatch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ZypperPatch; + })(); + + Inventory.WindowsUpdatePackage = (function() { + + /** + * Properties of a WindowsUpdatePackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IWindowsUpdatePackage + * @property {string|null} [title] WindowsUpdatePackage title + * @property {string|null} [description] WindowsUpdatePackage description + * @property {Array.|null} [categories] WindowsUpdatePackage categories + * @property {Array.|null} [kbArticleIds] WindowsUpdatePackage kbArticleIds + * @property {string|null} [supportUrl] WindowsUpdatePackage supportUrl + * @property {Array.|null} [moreInfoUrls] WindowsUpdatePackage moreInfoUrls + * @property {string|null} [updateId] WindowsUpdatePackage updateId + * @property {number|null} [revisionNumber] WindowsUpdatePackage revisionNumber + * @property {google.protobuf.ITimestamp|null} [lastDeploymentChangeTime] WindowsUpdatePackage lastDeploymentChangeTime + */ + + /** + * Constructs a new WindowsUpdatePackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a WindowsUpdatePackage. + * @implements IWindowsUpdatePackage + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage=} [properties] Properties to set + */ + function WindowsUpdatePackage(properties) { + this.categories = []; + this.kbArticleIds = []; + this.moreInfoUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsUpdatePackage title. + * @member {string} title + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.title = ""; + + /** + * WindowsUpdatePackage description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.description = ""; + + /** + * WindowsUpdatePackage categories. + * @member {Array.} categories + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.categories = $util.emptyArray; + + /** + * WindowsUpdatePackage kbArticleIds. + * @member {Array.} kbArticleIds + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.kbArticleIds = $util.emptyArray; + + /** + * WindowsUpdatePackage supportUrl. + * @member {string} supportUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.supportUrl = ""; + + /** + * WindowsUpdatePackage moreInfoUrls. + * @member {Array.} moreInfoUrls + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.moreInfoUrls = $util.emptyArray; + + /** + * WindowsUpdatePackage updateId. + * @member {string} updateId + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.updateId = ""; + + /** + * WindowsUpdatePackage revisionNumber. + * @member {number} revisionNumber + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.revisionNumber = 0; + + /** + * WindowsUpdatePackage lastDeploymentChangeTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastDeploymentChangeTime + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.lastDeploymentChangeTime = null; + + /** + * Creates a new WindowsUpdatePackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage instance + */ + WindowsUpdatePackage.create = function create(properties) { + return new WindowsUpdatePackage(properties); + }; + + /** + * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdatePackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.encode(message.categories[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.kbArticleIds != null && message.kbArticleIds.length) + for (var i = 0; i < message.kbArticleIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kbArticleIds[i]); + if (message.moreInfoUrls != null && message.moreInfoUrls.length) + for (var i = 0; i < message.moreInfoUrls.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.moreInfoUrls[i]); + if (message.updateId != null && Object.hasOwnProperty.call(message, "updateId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.updateId); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.revisionNumber); + if (message.lastDeploymentChangeTime != null && Object.hasOwnProperty.call(message, "lastDeploymentChangeTime")) + $root.google.protobuf.Timestamp.encode(message.lastDeploymentChangeTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.supportUrl != null && Object.hasOwnProperty.call(message, "supportUrl")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.supportUrl); + return writer; + }; + + /** + * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdatePackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdatePackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.kbArticleIds && message.kbArticleIds.length)) + message.kbArticleIds = []; + message.kbArticleIds.push(reader.string()); + break; + case 11: + message.supportUrl = reader.string(); + break; + case 5: + if (!(message.moreInfoUrls && message.moreInfoUrls.length)) + message.moreInfoUrls = []; + message.moreInfoUrls.push(reader.string()); + break; + case 6: + message.updateId = reader.string(); + break; + case 7: + message.revisionNumber = reader.int32(); + break; + case 10: + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdatePackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsUpdatePackage message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdatePackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } + if (message.kbArticleIds != null && message.hasOwnProperty("kbArticleIds")) { + if (!Array.isArray(message.kbArticleIds)) + return "kbArticleIds: array expected"; + for (var i = 0; i < message.kbArticleIds.length; ++i) + if (!$util.isString(message.kbArticleIds[i])) + return "kbArticleIds: string[] expected"; + } + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + if (!$util.isString(message.supportUrl)) + return "supportUrl: string expected"; + if (message.moreInfoUrls != null && message.hasOwnProperty("moreInfoUrls")) { + if (!Array.isArray(message.moreInfoUrls)) + return "moreInfoUrls: array expected"; + for (var i = 0; i < message.moreInfoUrls.length; ++i) + if (!$util.isString(message.moreInfoUrls[i])) + return "moreInfoUrls: string[] expected"; + } + if (message.updateId != null && message.hasOwnProperty("updateId")) + if (!$util.isString(message.updateId)) + return "updateId: string expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber)) + return "revisionNumber: integer expected"; + if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastDeploymentChangeTime); + if (error) + return "lastDeploymentChangeTime." + error; + } + return null; + }; + + /** + * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + */ + WindowsUpdatePackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.categories: object expected"); + message.categories[i] = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.fromObject(object.categories[i]); + } + } + if (object.kbArticleIds) { + if (!Array.isArray(object.kbArticleIds)) + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.kbArticleIds: array expected"); + message.kbArticleIds = []; + for (var i = 0; i < object.kbArticleIds.length; ++i) + message.kbArticleIds[i] = String(object.kbArticleIds[i]); + } + if (object.supportUrl != null) + message.supportUrl = String(object.supportUrl); + if (object.moreInfoUrls) { + if (!Array.isArray(object.moreInfoUrls)) + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.moreInfoUrls: array expected"); + message.moreInfoUrls = []; + for (var i = 0; i < object.moreInfoUrls.length; ++i) + message.moreInfoUrls[i] = String(object.moreInfoUrls[i]); + } + if (object.updateId != null) + message.updateId = String(object.updateId); + if (object.revisionNumber != null) + message.revisionNumber = object.revisionNumber | 0; + if (object.lastDeploymentChangeTime != null) { + if (typeof object.lastDeploymentChangeTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.lastDeploymentChangeTime: object expected"); + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.fromObject(object.lastDeploymentChangeTime); + } + return message; + }; + + /** + * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} message WindowsUpdatePackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdatePackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.categories = []; + object.kbArticleIds = []; + object.moreInfoUrls = []; + } + if (options.defaults) { + object.title = ""; + object.description = ""; + object.updateId = ""; + object.revisionNumber = 0; + object.lastDeploymentChangeTime = null; + object.supportUrl = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.toObject(message.categories[j], options); + } + if (message.kbArticleIds && message.kbArticleIds.length) { + object.kbArticleIds = []; + for (var j = 0; j < message.kbArticleIds.length; ++j) + object.kbArticleIds[j] = message.kbArticleIds[j]; + } + if (message.moreInfoUrls && message.moreInfoUrls.length) { + object.moreInfoUrls = []; + for (var j = 0; j < message.moreInfoUrls.length; ++j) + object.moreInfoUrls[j] = message.moreInfoUrls[j]; + } + if (message.updateId != null && message.hasOwnProperty("updateId")) + object.updateId = message.updateId; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + object.revisionNumber = message.revisionNumber; + if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) + object.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.toObject(message.lastDeploymentChangeTime, options); + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + object.supportUrl = message.supportUrl; + return object; + }; + + /** + * Converts this WindowsUpdatePackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdatePackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + WindowsUpdatePackage.WindowsUpdateCategory = (function() { + + /** + * Properties of a WindowsUpdateCategory. + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @interface IWindowsUpdateCategory + * @property {string|null} [id] WindowsUpdateCategory id + * @property {string|null} [name] WindowsUpdateCategory name + */ + + /** + * Constructs a new WindowsUpdateCategory. + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @classdesc Represents a WindowsUpdateCategory. + * @implements IWindowsUpdateCategory + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set + */ + function WindowsUpdateCategory(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsUpdateCategory id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + */ + WindowsUpdateCategory.prototype.id = ""; + + /** + * WindowsUpdateCategory name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + */ + WindowsUpdateCategory.prototype.name = ""; + + /** + * Creates a new WindowsUpdateCategory instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory instance + */ + WindowsUpdateCategory.create = function create(properties) { + return new WindowsUpdateCategory(properties); + }; + + /** + * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateCategory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateCategory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateCategory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateCategory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsUpdateCategory message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdateCategory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + */ + WindowsUpdateCategory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} message WindowsUpdateCategory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdateCategory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this WindowsUpdateCategory to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdateCategory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WindowsUpdateCategory; + })(); + + return WindowsUpdatePackage; + })(); + + Inventory.WindowsQuickFixEngineeringPackage = (function() { + + /** + * Properties of a WindowsQuickFixEngineeringPackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IWindowsQuickFixEngineeringPackage + * @property {string|null} [caption] WindowsQuickFixEngineeringPackage caption + * @property {string|null} [description] WindowsQuickFixEngineeringPackage description + * @property {string|null} [hotFixId] WindowsQuickFixEngineeringPackage hotFixId + * @property {google.protobuf.ITimestamp|null} [installTime] WindowsQuickFixEngineeringPackage installTime + */ + + /** + * Constructs a new WindowsQuickFixEngineeringPackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a WindowsQuickFixEngineeringPackage. + * @implements IWindowsQuickFixEngineeringPackage + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set + */ + function WindowsQuickFixEngineeringPackage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsQuickFixEngineeringPackage caption. + * @member {string} caption + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.caption = ""; + + /** + * WindowsQuickFixEngineeringPackage description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.description = ""; + + /** + * WindowsQuickFixEngineeringPackage hotFixId. + * @member {string} hotFixId + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.hotFixId = ""; + + /** + * WindowsQuickFixEngineeringPackage installTime. + * @member {google.protobuf.ITimestamp|null|undefined} installTime + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.installTime = null; + + /** + * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage instance + */ + WindowsQuickFixEngineeringPackage.create = function create(properties) { + return new WindowsQuickFixEngineeringPackage(properties); + }; + + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsQuickFixEngineeringPackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caption); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.hotFixId != null && Object.hasOwnProperty.call(message, "hotFixId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.hotFixId); + if (message.installTime != null && Object.hasOwnProperty.call(message, "installTime")) + $root.google.protobuf.Timestamp.encode(message.installTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsQuickFixEngineeringPackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsQuickFixEngineeringPackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.caption = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.hotFixId = reader.string(); + break; + case 5: + message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsQuickFixEngineeringPackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsQuickFixEngineeringPackage message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsQuickFixEngineeringPackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) + if (!$util.isString(message.hotFixId)) + return "hotFixId: string expected"; + if (message.installTime != null && message.hasOwnProperty("installTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.installTime); + if (error) + return "installTime." + error; + } + return null; + }; + + /** + * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage + */ + WindowsQuickFixEngineeringPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage(); + if (object.caption != null) + message.caption = String(object.caption); + if (object.description != null) + message.description = String(object.description); + if (object.hotFixId != null) + message.hotFixId = String(object.hotFixId); + if (object.installTime != null) { + if (typeof object.installTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.installTime: object expected"); + message.installTime = $root.google.protobuf.Timestamp.fromObject(object.installTime); + } + return message; + }; + + /** + * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsQuickFixEngineeringPackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.caption = ""; + object.description = ""; + object.hotFixId = ""; + object.installTime = null; + } + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) + object.hotFixId = message.hotFixId; + if (message.installTime != null && message.hasOwnProperty("installTime")) + object.installTime = $root.google.protobuf.Timestamp.toObject(message.installTime, options); + return object; + }; + + /** + * Converts this WindowsQuickFixEngineeringPackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @instance + * @returns {Object.} JSON object + */ + WindowsQuickFixEngineeringPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WindowsQuickFixEngineeringPackage; + })(); + + return Inventory; + })(); + + v1alpha.GetInventoryRequest = (function() { + + /** + * Properties of a GetInventoryRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IGetInventoryRequest + * @property {string|null} [name] GetInventoryRequest name + * @property {google.cloud.osconfig.v1alpha.InventoryView|null} [view] GetInventoryRequest view + */ + + /** + * Constructs a new GetInventoryRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a GetInventoryRequest. + * @implements IGetInventoryRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest=} [properties] Properties to set + */ + function GetInventoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetInventoryRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @instance + */ + GetInventoryRequest.prototype.name = ""; + + /** + * GetInventoryRequest view. + * @member {google.cloud.osconfig.v1alpha.InventoryView} view + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @instance + */ + GetInventoryRequest.prototype.view = 0; + + /** + * Creates a new GetInventoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest instance + */ + GetInventoryRequest.create = function create(properties) { + return new GetInventoryRequest(properties); + }; + + /** + * Encodes the specified GetInventoryRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} message GetInventoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInventoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetInventoryRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} message GetInventoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInventoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetInventoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInventoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetInventoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetInventoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInventoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetInventoryRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetInventoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetInventoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest + */ + GetInventoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.GetInventoryRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.GetInventoryRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "INVENTORY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetInventoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @static + * @param {google.cloud.osconfig.v1alpha.GetInventoryRequest} message GetInventoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetInventoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "INVENTORY_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetInventoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetInventoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetInventoryRequest; + })(); + + v1alpha.ListInventoriesRequest = (function() { + + /** + * Properties of a ListInventoriesRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListInventoriesRequest + * @property {string|null} [parent] ListInventoriesRequest parent + * @property {google.cloud.osconfig.v1alpha.InventoryView|null} [view] ListInventoriesRequest view + * @property {number|null} [pageSize] ListInventoriesRequest pageSize + * @property {string|null} [pageToken] ListInventoriesRequest pageToken + * @property {string|null} [filter] ListInventoriesRequest filter + */ + + /** + * Constructs a new ListInventoriesRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListInventoriesRequest. + * @implements IListInventoriesRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest=} [properties] Properties to set + */ + function ListInventoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInventoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.parent = ""; + + /** + * ListInventoriesRequest view. + * @member {google.cloud.osconfig.v1alpha.InventoryView} view + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.view = 0; + + /** + * ListInventoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.pageSize = 0; + + /** + * ListInventoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.pageToken = ""; + + /** + * ListInventoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.filter = ""; + + /** + * Creates a new ListInventoriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest instance + */ + ListInventoriesRequest.create = function create(properties) { + return new ListInventoriesRequest(properties); + }; + + /** + * Encodes the specified ListInventoriesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} message ListInventoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInventoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListInventoriesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} message ListInventoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInventoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInventoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInventoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListInventoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInventoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInventoriesRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInventoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListInventoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest + */ + ListInventoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.view) { + case "INVENTORY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListInventoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ListInventoriesRequest} message ListInventoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInventoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = options.enums === String ? "INVENTORY_VIEW_UNSPECIFIED" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListInventoriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListInventoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListInventoriesRequest; + })(); + + v1alpha.ListInventoriesResponse = (function() { + + /** + * Properties of a ListInventoriesResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListInventoriesResponse + * @property {Array.|null} [inventories] ListInventoriesResponse inventories + * @property {string|null} [nextPageToken] ListInventoriesResponse nextPageToken + */ + + /** + * Constructs a new ListInventoriesResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListInventoriesResponse. + * @implements IListInventoriesResponse + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse=} [properties] Properties to set + */ + function ListInventoriesResponse(properties) { + this.inventories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInventoriesResponse inventories. + * @member {Array.} inventories + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @instance + */ + ListInventoriesResponse.prototype.inventories = $util.emptyArray; + + /** + * ListInventoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @instance + */ + ListInventoriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListInventoriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse instance + */ + ListInventoriesResponse.create = function create(properties) { + return new ListInventoriesResponse(properties); + }; + + /** + * Encodes the specified ListInventoriesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse} message ListInventoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInventoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inventories != null && message.inventories.length) + for (var i = 0; i < message.inventories.length; ++i) + $root.google.cloud.osconfig.v1alpha.Inventory.encode(message.inventories[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 ListInventoriesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse} message ListInventoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInventoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInventoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInventoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inventories && message.inventories.length)) + message.inventories = []; + message.inventories.push($root.google.cloud.osconfig.v1alpha.Inventory.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListInventoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInventoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInventoriesResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInventoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inventories != null && message.hasOwnProperty("inventories")) { + if (!Array.isArray(message.inventories)) + return "inventories: array expected"; + for (var i = 0; i < message.inventories.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.verify(message.inventories[i]); + if (error) + return "inventories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListInventoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse + */ + ListInventoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse(); + if (object.inventories) { + if (!Array.isArray(object.inventories)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListInventoriesResponse.inventories: array expected"); + message.inventories = []; + for (var i = 0; i < object.inventories.length; ++i) { + if (typeof object.inventories[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListInventoriesResponse.inventories: object expected"); + message.inventories[i] = $root.google.cloud.osconfig.v1alpha.Inventory.fromObject(object.inventories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListInventoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @static + * @param {google.cloud.osconfig.v1alpha.ListInventoriesResponse} message ListInventoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInventoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.inventories = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.inventories && message.inventories.length) { + object.inventories = []; + for (var j = 0; j < message.inventories.length; ++j) + object.inventories[j] = $root.google.cloud.osconfig.v1alpha.Inventory.toObject(message.inventories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListInventoriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListInventoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListInventoriesResponse; + })(); + + /** + * InventoryView enum. + * @name google.cloud.osconfig.v1alpha.InventoryView + * @enum {number} + * @property {number} INVENTORY_VIEW_UNSPECIFIED=0 INVENTORY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + v1alpha.InventoryView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INVENTORY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + v1alpha.OSPolicy = (function() { + + /** + * Properties of a OSPolicy. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicy + * @property {string|null} [id] OSPolicy id + * @property {string|null} [description] OSPolicy description + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Mode|null} [mode] OSPolicy mode + * @property {Array.|null} [resourceGroups] OSPolicy resourceGroups + * @property {boolean|null} [allowNoResourceGroupMatch] OSPolicy allowNoResourceGroupMatch + */ + + /** + * Constructs a new OSPolicy. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicy. + * @implements IOSPolicy + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicy=} [properties] Properties to set + */ + function OSPolicy(properties) { + this.resourceGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicy id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @instance + */ + OSPolicy.prototype.id = ""; + + /** + * OSPolicy description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @instance + */ + OSPolicy.prototype.description = ""; + + /** + * OSPolicy mode. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Mode} mode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @instance + */ + OSPolicy.prototype.mode = 0; + + /** + * OSPolicy resourceGroups. + * @member {Array.} resourceGroups + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @instance + */ + OSPolicy.prototype.resourceGroups = $util.emptyArray; + + /** + * OSPolicy allowNoResourceGroupMatch. + * @member {boolean} allowNoResourceGroupMatch + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @instance + */ + OSPolicy.prototype.allowNoResourceGroupMatch = false; + + /** + * Creates a new OSPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicy=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy instance + */ + OSPolicy.create = function create(properties) { + return new OSPolicy(properties); + }; + + /** + * Encodes the specified OSPolicy message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicy} message OSPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mode); + if (message.resourceGroups != null && message.resourceGroups.length) + for (var i = 0; i < message.resourceGroups.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.encode(message.resourceGroups[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.allowNoResourceGroupMatch != null && Object.hasOwnProperty.call(message, "allowNoResourceGroupMatch")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowNoResourceGroupMatch); + return writer; + }; + + /** + * Encodes the specified OSPolicy message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicy} message OSPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.mode = reader.int32(); + break; + case 4: + if (!(message.resourceGroups && message.resourceGroups.length)) + message.resourceGroups = []; + message.resourceGroups.push($root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.decode(reader, reader.uint32())); + break; + case 5: + message.allowNoResourceGroupMatch = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicy message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.resourceGroups != null && message.hasOwnProperty("resourceGroups")) { + if (!Array.isArray(message.resourceGroups)) + return "resourceGroups: array expected"; + for (var i = 0; i < message.resourceGroups.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify(message.resourceGroups[i]); + if (error) + return "resourceGroups." + error; + } + } + if (message.allowNoResourceGroupMatch != null && message.hasOwnProperty("allowNoResourceGroupMatch")) + if (typeof message.allowNoResourceGroupMatch !== "boolean") + return "allowNoResourceGroupMatch: boolean expected"; + return null; + }; + + /** + * Creates a OSPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy + */ + OSPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy(); + if (object.id != null) + message.id = String(object.id); + if (object.description != null) + message.description = String(object.description); + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "VALIDATION": + case 1: + message.mode = 1; + break; + case "ENFORCEMENT": + case 2: + message.mode = 2; + break; + } + if (object.resourceGroups) { + if (!Array.isArray(object.resourceGroups)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.resourceGroups: array expected"); + message.resourceGroups = []; + for (var i = 0; i < object.resourceGroups.length; ++i) { + if (typeof object.resourceGroups[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.resourceGroups: object expected"); + message.resourceGroups[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.fromObject(object.resourceGroups[i]); + } + } + if (object.allowNoResourceGroupMatch != null) + message.allowNoResourceGroupMatch = Boolean(object.allowNoResourceGroupMatch); + return message; + }; + + /** + * Creates a plain object from a OSPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy} message OSPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceGroups = []; + if (options.defaults) { + object.id = ""; + object.description = ""; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.allowNoResourceGroupMatch = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Mode[message.mode] : message.mode; + if (message.resourceGroups && message.resourceGroups.length) { + object.resourceGroups = []; + for (var j = 0; j < message.resourceGroups.length; ++j) + object.resourceGroups[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.toObject(message.resourceGroups[j], options); + } + if (message.allowNoResourceGroupMatch != null && message.hasOwnProperty("allowNoResourceGroupMatch")) + object.allowNoResourceGroupMatch = message.allowNoResourceGroupMatch; + return object; + }; + + /** + * Converts this OSPolicy to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @instance + * @returns {Object.} JSON object + */ + OSPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicy.OSFilter = (function() { + + /** + * Properties of a OSFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @interface IOSFilter + * @property {string|null} [osShortName] OSFilter osShortName + * @property {string|null} [osVersion] OSFilter osVersion + */ + + /** + * Constructs a new OSFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @classdesc Represents a OSFilter. + * @implements IOSFilter + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter=} [properties] Properties to set + */ + function OSFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSFilter osShortName. + * @member {string} osShortName + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @instance + */ + OSFilter.prototype.osShortName = ""; + + /** + * OSFilter osVersion. + * @member {string} osVersion + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @instance + */ + OSFilter.prototype.osVersion = ""; + + /** + * Creates a new OSFilter instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter instance + */ + OSFilter.create = function create(properties) { + return new OSFilter(properties); + }; + + /** + * Encodes the specified OSFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter} message OSFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osShortName != null && Object.hasOwnProperty.call(message, "osShortName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osShortName); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osVersion); + return writer; + }; + + /** + * Encodes the specified OSFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter} message OSFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osShortName = reader.string(); + break; + case 2: + message.osVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSFilter message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + if (!$util.isString(message.osShortName)) + return "osShortName: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; + return null; + }; + + /** + * Creates a OSFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter + */ + OSFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter(); + if (object.osShortName != null) + message.osShortName = String(object.osShortName); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); + return message; + }; + + /** + * Creates a plain object from a OSFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} message OSFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osShortName = ""; + object.osVersion = ""; + } + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + object.osShortName = message.osShortName; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; + return object; + }; + + /** + * Converts this OSFilter to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @instance + * @returns {Object.} JSON object + */ + OSFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OSFilter; + })(); + + OSPolicy.Resource = (function() { + + /** + * Properties of a Resource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @interface IResource + * @property {string|null} [id] Resource id + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null} [pkg] Resource pkg + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null} [repository] Resource repository + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null} [exec] Resource exec + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null} [file] Resource file + */ + + /** + * Constructs a new Resource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResource=} [properties] Properties to set + */ + function Resource(properties) { + if (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 id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @instance + */ + Resource.prototype.id = ""; + + /** + * Resource pkg. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null|undefined} pkg + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @instance + */ + Resource.prototype.pkg = null; + + /** + * Resource repository. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null|undefined} repository + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @instance + */ + Resource.prototype.repository = null; + + /** + * Resource exec. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null|undefined} exec + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @instance + */ + Resource.prototype.exec = null; + + /** + * Resource file. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null|undefined} file + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @instance + */ + Resource.prototype.file = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Resource resourceType. + * @member {"pkg"|"repository"|"exec"|"file"|undefined} resourceType + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @instance + */ + Object.defineProperty(Resource.prototype, "resourceType", { + get: $util.oneOfGetter($oneOfFields = ["pkg", "repository", "exec", "file"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Resource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.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.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.pkg != null && Object.hasOwnProperty.call(message, "pkg")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.encode(message.pkg, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.encode(message.repository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.exec != null && Object.hasOwnProperty.call(message, "exec")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.encode(message.exec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.encode(message.file, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.decode(reader, reader.uint32()); + break; + case 3: + message.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.decode(reader, reader.uint32()); + break; + case 4: + message.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.decode(reader, reader.uint32()); + break; + case 5: + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.decode(reader, reader.uint32()); + 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.osconfig.v1alpha.OSPolicy.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.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"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.pkg != null && message.hasOwnProperty("pkg")) { + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify(message.pkg); + if (error) + return "pkg." + error; + } + } + if (message.repository != null && message.hasOwnProperty("repository")) { + if (properties.resourceType === 1) + return "resourceType: multiple values"; + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify(message.repository); + if (error) + return "repository." + error; + } + } + if (message.exec != null && message.hasOwnProperty("exec")) { + if (properties.resourceType === 1) + return "resourceType: multiple values"; + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify(message.exec); + if (error) + return "exec." + error; + } + } + if (message.file != null && message.hasOwnProperty("file")) { + if (properties.resourceType === 1) + return "resourceType: multiple values"; + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify(message.file); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource(); + if (object.id != null) + message.id = String(object.id); + if (object.pkg != null) { + if (typeof object.pkg !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.pkg: object expected"); + message.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.fromObject(object.pkg); + } + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.repository: object expected"); + message.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.fromObject(object.repository); + } + if (object.exec != null) { + if (typeof object.exec !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.exec: object expected"); + message.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.fromObject(object.exec); + } + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.file: object expected"); + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.fromObject(object.file); + } + return message; + }; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.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.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.pkg != null && message.hasOwnProperty("pkg")) { + object.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.toObject(message.pkg, options); + if (options.oneofs) + object.resourceType = "pkg"; + } + if (message.repository != null && message.hasOwnProperty("repository")) { + object.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.toObject(message.repository, options); + if (options.oneofs) + object.resourceType = "repository"; + } + if (message.exec != null && message.hasOwnProperty("exec")) { + object.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.toObject(message.exec, options); + if (options.oneofs) + object.resourceType = "exec"; + } + if (message.file != null && message.hasOwnProperty("file")) { + object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.toObject(message.file, options); + if (options.oneofs) + object.resourceType = "file"; + } + return object; + }; + + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Resource.File = (function() { + + /** + * Properties of a File. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @interface IFile + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null} [remote] File remote + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null} [gcs] File gcs + * @property {string|null} [localPath] File localPath + * @property {boolean|null} [allowInsecure] File allowInsecure + */ + + /** + * Constructs a new File. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @classdesc Represents a File. + * @implements IFile + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile=} [properties] Properties to set + */ + function File(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * File remote. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null|undefined} remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + File.prototype.remote = null; + + /** + * File gcs. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null|undefined} gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + File.prototype.gcs = null; + + /** + * File localPath. + * @member {string|null|undefined} localPath + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + File.prototype.localPath = null; + + /** + * File allowInsecure. + * @member {boolean} allowInsecure + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + File.prototype.allowInsecure = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * File type. + * @member {"remote"|"gcs"|"localPath"|undefined} type + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + Object.defineProperty(File.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["remote", "gcs", "localPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new File instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File instance + */ + File.create = function create(properties) { + return new File(properties); + }; + + /** + * Encodes the specified File message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.remote != null && Object.hasOwnProperty.call(message, "remote")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.encode(message.remote, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gcs != null && Object.hasOwnProperty.call(message, "gcs")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.encode(message.gcs, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.localPath); + if (message.allowInsecure != null && Object.hasOwnProperty.call(message, "allowInsecure")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowInsecure); + return writer; + }; + + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a File message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.decode(reader, reader.uint32()); + break; + case 2: + message.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.decode(reader, reader.uint32()); + break; + case 3: + message.localPath = reader.string(); + break; + case 4: + message.allowInsecure = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a File message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + File.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.remote != null && message.hasOwnProperty("remote")) { + properties.type = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify(message.remote); + if (error) + return "remote." + error; + } + } + if (message.gcs != null && message.hasOwnProperty("gcs")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify(message.gcs); + if (error) + return "gcs." + error; + } + } + if (message.localPath != null && message.hasOwnProperty("localPath")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + if (!$util.isString(message.localPath)) + return "localPath: string expected"; + } + if (message.allowInsecure != null && message.hasOwnProperty("allowInsecure")) + if (typeof message.allowInsecure !== "boolean") + return "allowInsecure: boolean expected"; + return null; + }; + + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File + */ + File.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File(); + if (object.remote != null) { + if (typeof object.remote !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.remote: object expected"); + message.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.fromObject(object.remote); + } + if (object.gcs != null) { + if (typeof object.gcs !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.gcs: object expected"); + message.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.fromObject(object.gcs); + } + if (object.localPath != null) + message.localPath = String(object.localPath); + if (object.allowInsecure != null) + message.allowInsecure = Boolean(object.allowInsecure); + return message; + }; + + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} message File + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + File.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.allowInsecure = false; + if (message.remote != null && message.hasOwnProperty("remote")) { + object.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.toObject(message.remote, options); + if (options.oneofs) + object.type = "remote"; + } + if (message.gcs != null && message.hasOwnProperty("gcs")) { + object.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.toObject(message.gcs, options); + if (options.oneofs) + object.type = "gcs"; + } + if (message.localPath != null && message.hasOwnProperty("localPath")) { + object.localPath = message.localPath; + if (options.oneofs) + object.type = "localPath"; + } + if (message.allowInsecure != null && message.hasOwnProperty("allowInsecure")) + object.allowInsecure = message.allowInsecure; + return object; + }; + + /** + * Converts this File to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + * @returns {Object.} JSON object + */ + File.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + File.Remote = (function() { + + /** + * Properties of a Remote. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @interface IRemote + * @property {string|null} [uri] Remote uri + * @property {string|null} [sha256Checksum] Remote sha256Checksum + */ + + /** + * Constructs a new Remote. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @classdesc Represents a Remote. + * @implements IRemote + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote=} [properties] Properties to set + */ + function Remote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Remote uri. + * @member {string} uri + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @instance + */ + Remote.prototype.uri = ""; + + /** + * Remote sha256Checksum. + * @member {string} sha256Checksum + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @instance + */ + Remote.prototype.sha256Checksum = ""; + + /** + * Creates a new Remote instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote instance + */ + Remote.create = function create(properties) { + return new Remote(properties); + }; + + /** + * Encodes the specified Remote message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote} message Remote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Remote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.sha256Checksum != null && Object.hasOwnProperty.call(message, "sha256Checksum")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sha256Checksum); + return writer; + }; + + /** + * Encodes the specified Remote message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote} message Remote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Remote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Remote message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Remote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + message.sha256Checksum = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Remote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Remote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Remote message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Remote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.sha256Checksum != null && message.hasOwnProperty("sha256Checksum")) + if (!$util.isString(message.sha256Checksum)) + return "sha256Checksum: string expected"; + return null; + }; + + /** + * Creates a Remote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote + */ + Remote.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.sha256Checksum != null) + message.sha256Checksum = String(object.sha256Checksum); + return message; + }; + + /** + * Creates a plain object from a Remote message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} message Remote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Remote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.sha256Checksum = ""; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.sha256Checksum != null && message.hasOwnProperty("sha256Checksum")) + object.sha256Checksum = message.sha256Checksum; + return object; + }; + + /** + * Converts this Remote to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @instance + * @returns {Object.} JSON object + */ + Remote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Remote; + })(); + + File.Gcs = (function() { + + /** + * Properties of a Gcs. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @interface IGcs + * @property {string|null} [bucket] Gcs bucket + * @property {string|null} [object] Gcs object + * @property {number|Long|null} [generation] Gcs generation + */ + + /** + * Constructs a new Gcs. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @classdesc Represents a Gcs. + * @implements IGcs + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs=} [properties] Properties to set + */ + function Gcs(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Gcs bucket. + * @member {string} bucket + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @instance + */ + Gcs.prototype.bucket = ""; + + /** + * Gcs object. + * @member {string} object + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @instance + */ + Gcs.prototype.object = ""; + + /** + * Gcs generation. + * @member {number|Long} generation + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @instance + */ + Gcs.prototype.generation = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Gcs instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs instance + */ + Gcs.create = function create(properties) { + return new Gcs(properties); + }; + + /** + * Encodes the specified Gcs message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs} message Gcs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gcs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.object != null && Object.hasOwnProperty.call(message, "object")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); + if (message.generation != null && Object.hasOwnProperty.call(message, "generation")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generation); + return writer; + }; + + /** + * Encodes the specified Gcs message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs} message Gcs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gcs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Gcs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gcs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bucket = reader.string(); + break; + case 2: + message.object = reader.string(); + break; + case 3: + message.generation = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Gcs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gcs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Gcs message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Gcs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.object != null && message.hasOwnProperty("object")) + if (!$util.isString(message.object)) + return "object: string expected"; + if (message.generation != null && message.hasOwnProperty("generation")) + if (!$util.isInteger(message.generation) && !(message.generation && $util.isInteger(message.generation.low) && $util.isInteger(message.generation.high))) + return "generation: integer|Long expected"; + return null; + }; + + /** + * Creates a Gcs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs + */ + Gcs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.object != null) + message.object = String(object.object); + if (object.generation != null) + if ($util.Long) + (message.generation = $util.Long.fromValue(object.generation)).unsigned = false; + else if (typeof object.generation === "string") + message.generation = parseInt(object.generation, 10); + else if (typeof object.generation === "number") + message.generation = object.generation; + else if (typeof object.generation === "object") + message.generation = new $util.LongBits(object.generation.low >>> 0, object.generation.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Gcs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} message Gcs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Gcs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.object = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.generation = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.generation = options.longs === String ? "0" : 0; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.object != null && message.hasOwnProperty("object")) + object.object = message.object; + if (message.generation != null && message.hasOwnProperty("generation")) + if (typeof message.generation === "number") + object.generation = options.longs === String ? String(message.generation) : message.generation; + else + object.generation = options.longs === String ? $util.Long.prototype.toString.call(message.generation) : options.longs === Number ? new $util.LongBits(message.generation.low >>> 0, message.generation.high >>> 0).toNumber() : message.generation; + return object; + }; + + /** + * Converts this Gcs to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @instance + * @returns {Object.} JSON object + */ + Gcs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Gcs; + })(); + + return File; + })(); + + Resource.PackageResource = (function() { + + /** + * Properties of a PackageResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @interface IPackageResource + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|null} [desiredState] PackageResource desiredState + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null} [apt] PackageResource apt + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null} [deb] PackageResource deb + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null} [yum] PackageResource yum + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null} [zypper] PackageResource zypper + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null} [rpm] PackageResource rpm + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null} [googet] PackageResource googet + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null} [msi] PackageResource msi + */ + + /** + * Constructs a new PackageResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @classdesc Represents a PackageResource. + * @implements IPackageResource + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource=} [properties] Properties to set + */ + function PackageResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PackageResource desiredState. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState} desiredState + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.desiredState = 0; + + /** + * PackageResource apt. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null|undefined} apt + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.apt = null; + + /** + * PackageResource deb. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null|undefined} deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.deb = null; + + /** + * PackageResource yum. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null|undefined} yum + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.yum = null; + + /** + * PackageResource zypper. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null|undefined} zypper + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.zypper = null; + + /** + * PackageResource rpm. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null|undefined} rpm + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.rpm = null; + + /** + * PackageResource googet. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null|undefined} googet + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.googet = null; + + /** + * PackageResource msi. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null|undefined} msi + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.msi = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PackageResource systemPackage. + * @member {"apt"|"deb"|"yum"|"zypper"|"rpm"|"googet"|"msi"|undefined} systemPackage + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + Object.defineProperty(PackageResource.prototype, "systemPackage", { + get: $util.oneOfGetter($oneOfFields = ["apt", "deb", "yum", "zypper", "rpm", "googet", "msi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PackageResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource instance + */ + PackageResource.create = function create(properties) { + return new PackageResource(properties); + }; + + /** + * Encodes the specified PackageResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource} message PackageResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.desiredState != null && Object.hasOwnProperty.call(message, "desiredState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.desiredState); + if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.encode(message.apt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.deb != null && Object.hasOwnProperty.call(message, "deb")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.encode(message.deb, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.encode(message.yum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.encode(message.zypper, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.rpm != null && Object.hasOwnProperty.call(message, "rpm")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.encode(message.rpm, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.googet != null && Object.hasOwnProperty.call(message, "googet")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.encode(message.googet, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.msi != null && Object.hasOwnProperty.call(message, "msi")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.encode(message.msi, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PackageResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource} message PackageResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PackageResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.desiredState = reader.int32(); + break; + case 2: + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.decode(reader, reader.uint32()); + break; + case 3: + message.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.decode(reader, reader.uint32()); + break; + case 4: + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.decode(reader, reader.uint32()); + break; + case 5: + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.decode(reader, reader.uint32()); + break; + case 6: + message.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.decode(reader, reader.uint32()); + break; + case 7: + message.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.decode(reader, reader.uint32()); + break; + case 8: + message.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PackageResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PackageResource message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PackageResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.desiredState != null && message.hasOwnProperty("desiredState")) + switch (message.desiredState) { + default: + return "desiredState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.apt != null && message.hasOwnProperty("apt")) { + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify(message.apt); + if (error) + return "apt." + error; + } + } + if (message.deb != null && message.hasOwnProperty("deb")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify(message.deb); + if (error) + return "deb." + error; + } + } + if (message.yum != null && message.hasOwnProperty("yum")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify(message.yum); + if (error) + return "yum." + error; + } + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify(message.zypper); + if (error) + return "zypper." + error; + } + } + if (message.rpm != null && message.hasOwnProperty("rpm")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify(message.rpm); + if (error) + return "rpm." + error; + } + } + if (message.googet != null && message.hasOwnProperty("googet")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify(message.googet); + if (error) + return "googet." + error; + } + } + if (message.msi != null && message.hasOwnProperty("msi")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify(message.msi); + if (error) + return "msi." + error; + } + } + return null; + }; + + /** + * Creates a PackageResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource + */ + PackageResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource(); + switch (object.desiredState) { + case "DESIRED_STATE_UNSPECIFIED": + case 0: + message.desiredState = 0; + break; + case "INSTALLED": + case 1: + message.desiredState = 1; + break; + case "REMOVED": + case 2: + message.desiredState = 2; + break; + } + if (object.apt != null) { + if (typeof object.apt !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.apt: object expected"); + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.fromObject(object.apt); + } + if (object.deb != null) { + if (typeof object.deb !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.deb: object expected"); + message.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.fromObject(object.deb); + } + if (object.yum != null) { + if (typeof object.yum !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.yum: object expected"); + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.fromObject(object.yum); + } + if (object.zypper != null) { + if (typeof object.zypper !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.zypper: object expected"); + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.fromObject(object.zypper); + } + if (object.rpm != null) { + if (typeof object.rpm !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.rpm: object expected"); + message.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.fromObject(object.rpm); + } + if (object.googet != null) { + if (typeof object.googet !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.googet: object expected"); + message.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.fromObject(object.googet); + } + if (object.msi != null) { + if (typeof object.msi !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.msi: object expected"); + message.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.fromObject(object.msi); + } + return message; + }; + + /** + * Creates a plain object from a PackageResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} message PackageResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PackageResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desiredState = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; + if (message.desiredState != null && message.hasOwnProperty("desiredState")) + object.desiredState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] : message.desiredState; + if (message.apt != null && message.hasOwnProperty("apt")) { + object.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.toObject(message.apt, options); + if (options.oneofs) + object.systemPackage = "apt"; + } + if (message.deb != null && message.hasOwnProperty("deb")) { + object.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.toObject(message.deb, options); + if (options.oneofs) + object.systemPackage = "deb"; + } + if (message.yum != null && message.hasOwnProperty("yum")) { + object.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.toObject(message.yum, options); + if (options.oneofs) + object.systemPackage = "yum"; + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + object.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.toObject(message.zypper, options); + if (options.oneofs) + object.systemPackage = "zypper"; + } + if (message.rpm != null && message.hasOwnProperty("rpm")) { + object.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.toObject(message.rpm, options); + if (options.oneofs) + object.systemPackage = "rpm"; + } + if (message.googet != null && message.hasOwnProperty("googet")) { + object.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.toObject(message.googet, options); + if (options.oneofs) + object.systemPackage = "googet"; + } + if (message.msi != null && message.hasOwnProperty("msi")) { + object.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.toObject(message.msi, options); + if (options.oneofs) + object.systemPackage = "msi"; + } + return object; + }; + + /** + * Converts this PackageResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + * @returns {Object.} JSON object + */ + PackageResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PackageResource.Deb = (function() { + + /** + * Properties of a Deb. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IDeb + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [source] Deb source + * @property {boolean|null} [pullDeps] Deb pullDeps + */ + + /** + * Constructs a new Deb. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a Deb. + * @implements IDeb + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb=} [properties] Properties to set + */ + function Deb(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deb source. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @instance + */ + Deb.prototype.source = null; + + /** + * Deb pullDeps. + * @member {boolean} pullDeps + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @instance + */ + Deb.prototype.pullDeps = false; + + /** + * Creates a new Deb instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb instance + */ + Deb.create = function create(properties) { + return new Deb(properties); + }; + + /** + * Encodes the specified Deb message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb} message Deb message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deb.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pullDeps != null && Object.hasOwnProperty.call(message, "pullDeps")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.pullDeps); + return writer; + }; + + /** + * Encodes the specified Deb message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb} message Deb message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deb.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deb message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deb.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.pullDeps = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deb message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deb.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deb message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deb.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.source); + if (error) + return "source." + error; + } + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + if (typeof message.pullDeps !== "boolean") + return "pullDeps: boolean expected"; + return null; + }; + + /** + * Creates a Deb message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb + */ + Deb.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.source: object expected"); + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.source); + } + if (object.pullDeps != null) + message.pullDeps = Boolean(object.pullDeps); + return message; + }; + + /** + * Creates a plain object from a Deb message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} message Deb + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deb.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.pullDeps = false; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.source, options); + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + object.pullDeps = message.pullDeps; + return object; + }; + + /** + * Converts this Deb to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @instance + * @returns {Object.} JSON object + */ + Deb.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Deb; + })(); + + PackageResource.APT = (function() { + + /** + * Properties of a APT. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IAPT + * @property {string|null} [name] APT name + */ + + /** + * Constructs a new APT. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a APT. + * @implements IAPT + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT=} [properties] Properties to set + */ + function APT(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * APT name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @instance + */ + APT.prototype.name = ""; + + /** + * Creates a new APT instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT instance + */ + APT.create = function create(properties) { + return new APT(properties); + }; + + /** + * Encodes the specified APT message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT} message APT message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + APT.encode = function encode(message, writer) { + 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 APT message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT} message APT message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + APT.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a APT message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + APT.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a APT message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + APT.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a APT message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + APT.verify = function verify(message) { + if (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 APT message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT + */ + APT.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a APT message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} message APT + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + APT.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 APT to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @instance + * @returns {Object.} JSON object + */ + APT.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return APT; + })(); + + PackageResource.RPM = (function() { + + /** + * Properties of a RPM. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IRPM + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [source] RPM source + * @property {boolean|null} [pullDeps] RPM pullDeps + */ + + /** + * Constructs a new RPM. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a RPM. + * @implements IRPM + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM=} [properties] Properties to set + */ + function RPM(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RPM source. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @instance + */ + RPM.prototype.source = null; + + /** + * RPM pullDeps. + * @member {boolean} pullDeps + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @instance + */ + RPM.prototype.pullDeps = false; + + /** + * Creates a new RPM instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM instance + */ + RPM.create = function create(properties) { + return new RPM(properties); + }; + + /** + * Encodes the specified RPM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM} message RPM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RPM.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pullDeps != null && Object.hasOwnProperty.call(message, "pullDeps")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.pullDeps); + return writer; + }; + + /** + * Encodes the specified RPM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM} message RPM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RPM.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RPM message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RPM.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.pullDeps = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RPM message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RPM.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RPM message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RPM.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.source); + if (error) + return "source." + error; + } + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + if (typeof message.pullDeps !== "boolean") + return "pullDeps: boolean expected"; + return null; + }; + + /** + * Creates a RPM message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM + */ + RPM.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.source: object expected"); + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.source); + } + if (object.pullDeps != null) + message.pullDeps = Boolean(object.pullDeps); + return message; + }; + + /** + * Creates a plain object from a RPM message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} message RPM + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RPM.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.pullDeps = false; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.source, options); + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + object.pullDeps = message.pullDeps; + return object; + }; + + /** + * Converts this RPM to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @instance + * @returns {Object.} JSON object + */ + RPM.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RPM; + })(); + + PackageResource.YUM = (function() { + + /** + * Properties of a YUM. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IYUM + * @property {string|null} [name] YUM name + */ + + /** + * Constructs a new YUM. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a YUM. + * @implements IYUM + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM=} [properties] Properties to set + */ + function YUM(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * YUM name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @instance + */ + YUM.prototype.name = ""; + + /** + * Creates a new YUM instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM instance + */ + YUM.create = function create(properties) { + return new YUM(properties); + }; + + /** + * Encodes the specified YUM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM} message YUM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YUM.encode = function encode(message, writer) { + 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 YUM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM} message YUM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YUM.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YUM message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YUM.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a YUM message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YUM.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a YUM message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YUM.verify = function verify(message) { + if (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 YUM message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM + */ + YUM.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a YUM message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} message YUM + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YUM.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 YUM to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @instance + * @returns {Object.} JSON object + */ + YUM.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return YUM; + })(); + + PackageResource.Zypper = (function() { + + /** + * Properties of a Zypper. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IZypper + * @property {string|null} [name] Zypper name + */ + + /** + * Constructs a new Zypper. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a Zypper. + * @implements IZypper + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper=} [properties] Properties to set + */ + function Zypper(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Zypper name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @instance + */ + Zypper.prototype.name = ""; + + /** + * Creates a new Zypper instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper instance + */ + Zypper.create = function create(properties) { + return new Zypper(properties); + }; + + /** + * Encodes the specified Zypper message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper} message Zypper message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zypper.encode = function encode(message, writer) { + 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 Zypper message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper} message Zypper message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zypper.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Zypper message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zypper.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Zypper message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zypper.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Zypper message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Zypper.verify = function verify(message) { + if (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 Zypper message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper + */ + Zypper.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Zypper message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} message Zypper + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Zypper.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 Zypper to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @instance + * @returns {Object.} JSON object + */ + Zypper.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Zypper; + })(); + + PackageResource.GooGet = (function() { + + /** + * Properties of a GooGet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IGooGet + * @property {string|null} [name] GooGet name + */ + + /** + * Constructs a new GooGet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a GooGet. + * @implements IGooGet + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet=} [properties] Properties to set + */ + function GooGet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GooGet name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @instance + */ + GooGet.prototype.name = ""; + + /** + * Creates a new GooGet instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet instance + */ + GooGet.create = function create(properties) { + return new GooGet(properties); + }; + + /** + * Encodes the specified GooGet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet} message GooGet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooGet.encode = function encode(message, writer) { + 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 GooGet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet} message GooGet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooGet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GooGet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooGet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GooGet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooGet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GooGet message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GooGet.verify = function verify(message) { + if (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 GooGet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet + */ + GooGet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GooGet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} message GooGet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GooGet.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 GooGet to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @instance + * @returns {Object.} JSON object + */ + GooGet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GooGet; + })(); + + PackageResource.MSI = (function() { + + /** + * Properties of a MSI. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IMSI + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [source] MSI source + * @property {Array.|null} [properties] MSI properties + */ + + /** + * Constructs a new MSI. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a MSI. + * @implements IMSI + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI=} [properties] Properties to set + */ + function MSI(properties) { + this.properties = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MSI source. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @instance + */ + MSI.prototype.source = null; + + /** + * MSI properties. + * @member {Array.} properties + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @instance + */ + MSI.prototype.properties = $util.emptyArray; + + /** + * Creates a new MSI instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI instance + */ + MSI.create = function create(properties) { + return new MSI(properties); + }; + + /** + * Encodes the specified MSI message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI} message MSI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MSI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.properties != null && message.properties.length) + for (var i = 0; i < message.properties.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.properties[i]); + return writer; + }; + + /** + * Encodes the specified MSI message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI} message MSI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MSI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MSI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MSI.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MSI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MSI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MSI message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MSI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.source); + if (error) + return "source." + error; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!Array.isArray(message.properties)) + return "properties: array expected"; + for (var i = 0; i < message.properties.length; ++i) + if (!$util.isString(message.properties[i])) + return "properties: string[] expected"; + } + return null; + }; + + /** + * Creates a MSI message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI + */ + MSI.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.source: object expected"); + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.source); + } + if (object.properties) { + if (!Array.isArray(object.properties)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.properties: array expected"); + message.properties = []; + for (var i = 0; i < object.properties.length; ++i) + message.properties[i] = String(object.properties[i]); + } + return message; + }; + + /** + * Creates a plain object from a MSI message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} message MSI + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MSI.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.properties = []; + if (options.defaults) + object.source = null; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.source, options); + if (message.properties && message.properties.length) { + object.properties = []; + for (var j = 0; j < message.properties.length; ++j) + object.properties[j] = message.properties[j]; + } + return object; + }; + + /** + * Converts this MSI to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @instance + * @returns {Object.} JSON object + */ + MSI.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MSI; + })(); + + /** + * DesiredState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + * @enum {number} + * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value + * @property {number} INSTALLED=1 INSTALLED value + * @property {number} REMOVED=2 REMOVED value + */ + PackageResource.DesiredState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLED"] = 1; + values[valuesById[2] = "REMOVED"] = 2; + return values; + })(); + + return PackageResource; + })(); + + Resource.RepositoryResource = (function() { + + /** + * Properties of a RepositoryResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @interface IRepositoryResource + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null} [apt] RepositoryResource apt + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null} [yum] RepositoryResource yum + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null} [zypper] RepositoryResource zypper + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null} [goo] RepositoryResource goo + */ + + /** + * Constructs a new RepositoryResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @classdesc Represents a RepositoryResource. + * @implements IRepositoryResource + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource=} [properties] Properties to set + */ + function RepositoryResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RepositoryResource apt. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null|undefined} apt + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.apt = null; + + /** + * RepositoryResource yum. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null|undefined} yum + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.yum = null; + + /** + * RepositoryResource zypper. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null|undefined} zypper + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.zypper = null; + + /** + * RepositoryResource goo. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null|undefined} goo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.goo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RepositoryResource repository. + * @member {"apt"|"yum"|"zypper"|"goo"|undefined} repository + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + Object.defineProperty(RepositoryResource.prototype, "repository", { + get: $util.oneOfGetter($oneOfFields = ["apt", "yum", "zypper", "goo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RepositoryResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource instance + */ + RepositoryResource.create = function create(properties) { + return new RepositoryResource(properties); + }; + + /** + * Encodes the specified RepositoryResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource} message RepositoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepositoryResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.encode(message.apt, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.encode(message.yum, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.encode(message.zypper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.goo != null && Object.hasOwnProperty.call(message, "goo")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.encode(message.goo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RepositoryResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource} message RepositoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepositoryResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepositoryResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.decode(reader, reader.uint32()); + break; + case 2: + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.decode(reader, reader.uint32()); + break; + case 3: + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.decode(reader, reader.uint32()); + break; + case 4: + message.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepositoryResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RepositoryResource message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RepositoryResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.apt != null && message.hasOwnProperty("apt")) { + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify(message.apt); + if (error) + return "apt." + error; + } + } + if (message.yum != null && message.hasOwnProperty("yum")) { + if (properties.repository === 1) + return "repository: multiple values"; + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify(message.yum); + if (error) + return "yum." + error; + } + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + if (properties.repository === 1) + return "repository: multiple values"; + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify(message.zypper); + if (error) + return "zypper." + error; + } + } + if (message.goo != null && message.hasOwnProperty("goo")) { + if (properties.repository === 1) + return "repository: multiple values"; + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify(message.goo); + if (error) + return "goo." + error; + } + } + return null; + }; + + /** + * Creates a RepositoryResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource + */ + RepositoryResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource(); + if (object.apt != null) { + if (typeof object.apt !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.apt: object expected"); + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.fromObject(object.apt); + } + if (object.yum != null) { + if (typeof object.yum !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.yum: object expected"); + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.fromObject(object.yum); + } + if (object.zypper != null) { + if (typeof object.zypper !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.zypper: object expected"); + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.fromObject(object.zypper); + } + if (object.goo != null) { + if (typeof object.goo !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.goo: object expected"); + message.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.fromObject(object.goo); + } + return message; + }; + + /** + * Creates a plain object from a RepositoryResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} message RepositoryResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RepositoryResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.apt != null && message.hasOwnProperty("apt")) { + object.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.toObject(message.apt, options); + if (options.oneofs) + object.repository = "apt"; + } + if (message.yum != null && message.hasOwnProperty("yum")) { + object.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.toObject(message.yum, options); + if (options.oneofs) + object.repository = "yum"; + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + object.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.toObject(message.zypper, options); + if (options.oneofs) + object.repository = "zypper"; + } + if (message.goo != null && message.hasOwnProperty("goo")) { + object.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.toObject(message.goo, options); + if (options.oneofs) + object.repository = "goo"; + } + return object; + }; + + /** + * Converts this RepositoryResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + * @returns {Object.} JSON object + */ + RepositoryResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + RepositoryResource.AptRepository = (function() { + + /** + * Properties of an AptRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @interface IAptRepository + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|null} [archiveType] AptRepository archiveType + * @property {string|null} [uri] AptRepository uri + * @property {string|null} [distribution] AptRepository distribution + * @property {Array.|null} [components] AptRepository components + * @property {string|null} [gpgKey] AptRepository gpgKey + */ + + /** + * Constructs a new AptRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @classdesc Represents an AptRepository. + * @implements IAptRepository + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository=} [properties] Properties to set + */ + function AptRepository(properties) { + this.components = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AptRepository archiveType. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType} archiveType + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.archiveType = 0; + + /** + * AptRepository uri. + * @member {string} uri + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.uri = ""; + + /** + * AptRepository distribution. + * @member {string} distribution + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.distribution = ""; + + /** + * AptRepository components. + * @member {Array.} components + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.components = $util.emptyArray; + + /** + * AptRepository gpgKey. + * @member {string} gpgKey + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.gpgKey = ""; + + /** + * Creates a new AptRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository instance + */ + AptRepository.create = function create(properties) { + return new AptRepository(properties); + }; + + /** + * Encodes the specified AptRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository} message AptRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.archiveType != null && Object.hasOwnProperty.call(message, "archiveType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.archiveType); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.distribution != null && Object.hasOwnProperty.call(message, "distribution")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.distribution); + if (message.components != null && message.components.length) + for (var i = 0; i < message.components.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.components[i]); + if (message.gpgKey != null && Object.hasOwnProperty.call(message, "gpgKey")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.gpgKey); + return writer; + }; + + /** + * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository} message AptRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AptRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.archiveType = reader.int32(); + break; + case 2: + message.uri = reader.string(); + break; + case 3: + message.distribution = reader.string(); + break; + case 4: + if (!(message.components && message.components.length)) + message.components = []; + message.components.push(reader.string()); + break; + case 5: + message.gpgKey = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AptRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AptRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AptRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.archiveType != null && message.hasOwnProperty("archiveType")) + switch (message.archiveType) { + default: + return "archiveType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.distribution != null && message.hasOwnProperty("distribution")) + if (!$util.isString(message.distribution)) + return "distribution: string expected"; + if (message.components != null && message.hasOwnProperty("components")) { + if (!Array.isArray(message.components)) + return "components: array expected"; + for (var i = 0; i < message.components.length; ++i) + if (!$util.isString(message.components[i])) + return "components: string[] expected"; + } + if (message.gpgKey != null && message.hasOwnProperty("gpgKey")) + if (!$util.isString(message.gpgKey)) + return "gpgKey: string expected"; + return null; + }; + + /** + * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository + */ + AptRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository(); + switch (object.archiveType) { + case "ARCHIVE_TYPE_UNSPECIFIED": + case 0: + message.archiveType = 0; + break; + case "DEB": + case 1: + message.archiveType = 1; + break; + case "DEB_SRC": + case 2: + message.archiveType = 2; + break; + } + if (object.uri != null) + message.uri = String(object.uri); + if (object.distribution != null) + message.distribution = String(object.distribution); + if (object.components) { + if (!Array.isArray(object.components)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.components: array expected"); + message.components = []; + for (var i = 0; i < object.components.length; ++i) + message.components[i] = String(object.components[i]); + } + if (object.gpgKey != null) + message.gpgKey = String(object.gpgKey); + return message; + }; + + /** + * Creates a plain object from an AptRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} message AptRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AptRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.components = []; + if (options.defaults) { + object.archiveType = options.enums === String ? "ARCHIVE_TYPE_UNSPECIFIED" : 0; + object.uri = ""; + object.distribution = ""; + object.gpgKey = ""; + } + if (message.archiveType != null && message.hasOwnProperty("archiveType")) + object.archiveType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] : message.archiveType; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.distribution != null && message.hasOwnProperty("distribution")) + object.distribution = message.distribution; + if (message.components && message.components.length) { + object.components = []; + for (var j = 0; j < message.components.length; ++j) + object.components[j] = message.components[j]; + } + if (message.gpgKey != null && message.hasOwnProperty("gpgKey")) + object.gpgKey = message.gpgKey; + return object; + }; + + /** + * Converts this AptRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + * @returns {Object.} JSON object + */ + AptRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ArchiveType enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType + * @enum {number} + * @property {number} ARCHIVE_TYPE_UNSPECIFIED=0 ARCHIVE_TYPE_UNSPECIFIED value + * @property {number} DEB=1 DEB value + * @property {number} DEB_SRC=2 DEB_SRC value + */ + AptRepository.ArchiveType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ARCHIVE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEB"] = 1; + values[valuesById[2] = "DEB_SRC"] = 2; + return values; + })(); + + return AptRepository; + })(); + + RepositoryResource.YumRepository = (function() { + + /** + * Properties of a YumRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @interface IYumRepository + * @property {string|null} [id] YumRepository id + * @property {string|null} [displayName] YumRepository displayName + * @property {string|null} [baseUrl] YumRepository baseUrl + * @property {Array.|null} [gpgKeys] YumRepository gpgKeys + */ + + /** + * Constructs a new YumRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @classdesc Represents a YumRepository. + * @implements IYumRepository + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository=} [properties] Properties to set + */ + function YumRepository(properties) { + this.gpgKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * YumRepository id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + */ + YumRepository.prototype.id = ""; + + /** + * YumRepository displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + */ + YumRepository.prototype.displayName = ""; + + /** + * YumRepository baseUrl. + * @member {string} baseUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + */ + YumRepository.prototype.baseUrl = ""; + + /** + * YumRepository gpgKeys. + * @member {Array.} gpgKeys + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + */ + YumRepository.prototype.gpgKeys = $util.emptyArray; + + /** + * Creates a new YumRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository instance + */ + YumRepository.create = function create(properties) { + return new YumRepository(properties); + }; + + /** + * Encodes the specified YumRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository} message YumRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.baseUrl != null && Object.hasOwnProperty.call(message, "baseUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.baseUrl); + if (message.gpgKeys != null && message.gpgKeys.length) + for (var i = 0; i < message.gpgKeys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gpgKeys[i]); + return writer; + }; + + /** + * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository} message YumRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YumRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.baseUrl = reader.string(); + break; + case 4: + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a YumRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a YumRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YumRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + if (!$util.isString(message.baseUrl)) + return "baseUrl: string expected"; + if (message.gpgKeys != null && message.hasOwnProperty("gpgKeys")) { + if (!Array.isArray(message.gpgKeys)) + return "gpgKeys: array expected"; + for (var i = 0; i < message.gpgKeys.length; ++i) + if (!$util.isString(message.gpgKeys[i])) + return "gpgKeys: string[] expected"; + } + return null; + }; + + /** + * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository + */ + YumRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.baseUrl != null) + message.baseUrl = String(object.baseUrl); + if (object.gpgKeys) { + if (!Array.isArray(object.gpgKeys)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.gpgKeys: array expected"); + message.gpgKeys = []; + for (var i = 0; i < object.gpgKeys.length; ++i) + message.gpgKeys[i] = String(object.gpgKeys[i]); + } + return message; + }; + + /** + * Creates a plain object from a YumRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} message YumRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YumRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.gpgKeys = []; + if (options.defaults) { + object.id = ""; + object.displayName = ""; + object.baseUrl = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + object.baseUrl = message.baseUrl; + if (message.gpgKeys && message.gpgKeys.length) { + object.gpgKeys = []; + for (var j = 0; j < message.gpgKeys.length; ++j) + object.gpgKeys[j] = message.gpgKeys[j]; + } + return object; + }; + + /** + * Converts this YumRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + * @returns {Object.} JSON object + */ + YumRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return YumRepository; + })(); + + RepositoryResource.ZypperRepository = (function() { + + /** + * Properties of a ZypperRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @interface IZypperRepository + * @property {string|null} [id] ZypperRepository id + * @property {string|null} [displayName] ZypperRepository displayName + * @property {string|null} [baseUrl] ZypperRepository baseUrl + * @property {Array.|null} [gpgKeys] ZypperRepository gpgKeys + */ + + /** + * Constructs a new ZypperRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @classdesc Represents a ZypperRepository. + * @implements IZypperRepository + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository=} [properties] Properties to set + */ + function ZypperRepository(properties) { + this.gpgKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ZypperRepository id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + */ + ZypperRepository.prototype.id = ""; + + /** + * ZypperRepository displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + */ + ZypperRepository.prototype.displayName = ""; + + /** + * ZypperRepository baseUrl. + * @member {string} baseUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + */ + ZypperRepository.prototype.baseUrl = ""; + + /** + * ZypperRepository gpgKeys. + * @member {Array.} gpgKeys + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + */ + ZypperRepository.prototype.gpgKeys = $util.emptyArray; + + /** + * Creates a new ZypperRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository instance + */ + ZypperRepository.create = function create(properties) { + return new ZypperRepository(properties); + }; + + /** + * Encodes the specified ZypperRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository} message ZypperRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.baseUrl != null && Object.hasOwnProperty.call(message, "baseUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.baseUrl); + if (message.gpgKeys != null && message.gpgKeys.length) + for (var i = 0; i < message.gpgKeys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gpgKeys[i]); + return writer; + }; + + /** + * Encodes the specified ZypperRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository} message ZypperRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ZypperRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.baseUrl = reader.string(); + break; + case 4: + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ZypperRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ZypperRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ZypperRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + if (!$util.isString(message.baseUrl)) + return "baseUrl: string expected"; + if (message.gpgKeys != null && message.hasOwnProperty("gpgKeys")) { + if (!Array.isArray(message.gpgKeys)) + return "gpgKeys: array expected"; + for (var i = 0; i < message.gpgKeys.length; ++i) + if (!$util.isString(message.gpgKeys[i])) + return "gpgKeys: string[] expected"; + } + return null; + }; + + /** + * Creates a ZypperRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository + */ + ZypperRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.baseUrl != null) + message.baseUrl = String(object.baseUrl); + if (object.gpgKeys) { + if (!Array.isArray(object.gpgKeys)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.gpgKeys: array expected"); + message.gpgKeys = []; + for (var i = 0; i < object.gpgKeys.length; ++i) + message.gpgKeys[i] = String(object.gpgKeys[i]); + } + return message; + }; + + /** + * Creates a plain object from a ZypperRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} message ZypperRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ZypperRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.gpgKeys = []; + if (options.defaults) { + object.id = ""; + object.displayName = ""; + object.baseUrl = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + object.baseUrl = message.baseUrl; + if (message.gpgKeys && message.gpgKeys.length) { + object.gpgKeys = []; + for (var j = 0; j < message.gpgKeys.length; ++j) + object.gpgKeys[j] = message.gpgKeys[j]; + } + return object; + }; + + /** + * Converts this ZypperRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + * @returns {Object.} JSON object + */ + ZypperRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ZypperRepository; + })(); + + RepositoryResource.GooRepository = (function() { + + /** + * Properties of a GooRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @interface IGooRepository + * @property {string|null} [name] GooRepository name + * @property {string|null} [url] GooRepository url + */ + + /** + * Constructs a new GooRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @classdesc Represents a GooRepository. + * @implements IGooRepository + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository=} [properties] Properties to set + */ + function GooRepository(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GooRepository name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @instance + */ + GooRepository.prototype.name = ""; + + /** + * GooRepository url. + * @member {string} url + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @instance + */ + GooRepository.prototype.url = ""; + + /** + * Creates a new GooRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository instance + */ + GooRepository.create = function create(properties) { + return new GooRepository(properties); + }; + + /** + * Encodes the specified GooRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository} message GooRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooRepository.encode = function encode(message, writer) { + 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.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + return writer; + }; + + /** + * Encodes the specified GooRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository} message GooRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GooRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.url = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GooRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GooRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GooRepository.verify = function verify(message) { + if (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.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates a GooRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository + */ + GooRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository(); + if (object.name != null) + message.name = String(object.name); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from a GooRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} message GooRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GooRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.url = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; + + /** + * Converts this GooRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @instance + * @returns {Object.} JSON object + */ + GooRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GooRepository; + })(); + + return RepositoryResource; + })(); + + Resource.ExecResource = (function() { + + /** + * Properties of an ExecResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @interface IExecResource + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null} [validate] ExecResource validate + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null} [enforce] ExecResource enforce + */ + + /** + * Constructs a new ExecResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @classdesc Represents an ExecResource. + * @implements IExecResource + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource=} [properties] Properties to set + */ + function ExecResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecResource validate. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null|undefined} validate + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @instance + */ + ExecResource.prototype.validate = null; + + /** + * ExecResource enforce. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null|undefined} enforce + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @instance + */ + ExecResource.prototype.enforce = null; + + /** + * Creates a new ExecResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource instance + */ + ExecResource.create = function create(properties) { + return new ExecResource(properties); + }; + + /** + * Encodes the specified ExecResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource} message ExecResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validate != null && Object.hasOwnProperty.call(message, "validate")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.encode(message.validate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.enforce != null && Object.hasOwnProperty.call(message, "enforce")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.encode(message.enforce, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource} message ExecResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); + break; + case 2: + message.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecResource message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validate != null && message.hasOwnProperty("validate")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify(message.validate); + if (error) + return "validate." + error; + } + if (message.enforce != null && message.hasOwnProperty("enforce")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify(message.enforce); + if (error) + return "enforce." + error; + } + return null; + }; + + /** + * Creates an ExecResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource + */ + ExecResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource(); + if (object.validate != null) { + if (typeof object.validate !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.validate: object expected"); + message.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.fromObject(object.validate); + } + if (object.enforce != null) { + if (typeof object.enforce !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.enforce: object expected"); + message.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.fromObject(object.enforce); + } + return message; + }; + + /** + * Creates a plain object from an ExecResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} message ExecResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.validate = null; + object.enforce = null; + } + if (message.validate != null && message.hasOwnProperty("validate")) + object.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.toObject(message.validate, options); + if (message.enforce != null && message.hasOwnProperty("enforce")) + object.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.toObject(message.enforce, options); + return object; + }; + + /** + * Converts this ExecResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @instance + * @returns {Object.} JSON object + */ + ExecResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ExecResource.Exec = (function() { + + /** + * Properties of an Exec. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @interface IExec + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [file] Exec file + * @property {string|null} [script] Exec script + * @property {Array.|null} [args] Exec args + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|null} [interpreter] Exec interpreter + */ + + /** + * Constructs a new Exec. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @classdesc Represents an Exec. + * @implements IExec + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec=} [properties] Properties to set + */ + function Exec(properties) { + this.args = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Exec file. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} file + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.file = null; + + /** + * Exec script. + * @member {string|null|undefined} script + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.script = null; + + /** + * Exec args. + * @member {Array.} args + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.args = $util.emptyArray; + + /** + * Exec interpreter. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter} interpreter + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.interpreter = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Exec source. + * @member {"file"|"script"|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Object.defineProperty(Exec.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["file", "script"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Exec instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec instance + */ + Exec.create = function create(properties) { + return new Exec(properties); + }; + + /** + * Encodes the specified Exec message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec} message Exec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.file, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.script != null && Object.hasOwnProperty.call(message, "script")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.script); + if (message.args != null && message.args.length) + for (var i = 0; i < message.args.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); + if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); + return writer; + }; + + /** + * Encodes the specified Exec message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec} message Exec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.script = reader.string(); + break; + case 3: + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); + break; + case 4: + message.interpreter = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Exec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Exec message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.source = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.file); + if (error) + return "file." + error; + } + } + if (message.script != null && message.hasOwnProperty("script")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.script)) + return "script: string expected"; + } + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + switch (message.interpreter) { + default: + return "interpreter: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an Exec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec + */ + Exec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec(); + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.file: object expected"); + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.file); + } + if (object.script != null) + message.script = String(object.script); + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); + } + switch (object.interpreter) { + case "INTERPRETER_UNSPECIFIED": + case 0: + message.interpreter = 0; + break; + case "NONE": + case 1: + message.interpreter = 1; + break; + case "SHELL": + case 2: + message.interpreter = 2; + break; + case "POWERSHELL": + case 3: + message.interpreter = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an Exec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} message Exec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.args = []; + if (options.defaults) + object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; + if (message.file != null && message.hasOwnProperty("file")) { + object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.file, options); + if (options.oneofs) + object.source = "file"; + } + if (message.script != null && message.hasOwnProperty("script")) { + object.script = message.script; + if (options.oneofs) + object.source = "script"; + } + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] : message.interpreter; + return object; + }; + + /** + * Converts this Exec to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + * @returns {Object.} JSON object + */ + Exec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Interpreter enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + * @enum {number} + * @property {number} INTERPRETER_UNSPECIFIED=0 INTERPRETER_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} SHELL=2 SHELL value + * @property {number} POWERSHELL=3 POWERSHELL value + */ + Exec.Interpreter = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTERPRETER_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "SHELL"] = 2; + values[valuesById[3] = "POWERSHELL"] = 3; + return values; + })(); + + return Exec; + })(); + + return ExecResource; + })(); + + Resource.FileResource = (function() { + + /** + * Properties of a FileResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @interface IFileResource + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [file] FileResource file + * @property {string|null} [content] FileResource content + * @property {string|null} [path] FileResource path + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|null} [state] FileResource state + * @property {string|null} [permissions] FileResource permissions + */ + + /** + * Constructs a new FileResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @classdesc Represents a FileResource. + * @implements IFileResource + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource=} [properties] Properties to set + */ + function FileResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileResource file. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} file + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.file = null; + + /** + * FileResource content. + * @member {string|null|undefined} content + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.content = null; + + /** + * FileResource path. + * @member {string} path + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.path = ""; + + /** + * FileResource state. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState} state + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.state = 0; + + /** + * FileResource permissions. + * @member {string} permissions + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.permissions = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FileResource source. + * @member {"file"|"content"|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + Object.defineProperty(FileResource.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["file", "content"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FileResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource instance + */ + FileResource.create = function create(properties) { + return new FileResource(properties); + }; + + /** + * Encodes the specified FileResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource} message FileResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.file, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.permissions); + return writer; + }; + + /** + * Encodes the specified FileResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource} message FileResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.content = reader.string(); + break; + case 3: + message.path = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.permissions = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileResource message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.source = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.file); + if (error) + return "file." + error; + } + } + if (message.content != null && message.hasOwnProperty("content")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.content)) + return "content: string expected"; + } + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: 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.permissions != null && message.hasOwnProperty("permissions")) + if (!$util.isString(message.permissions)) + return "permissions: string expected"; + return null; + }; + + /** + * Creates a FileResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource + */ + FileResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource(); + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.file: object expected"); + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.file); + } + if (object.content != null) + message.content = String(object.content); + if (object.path != null) + message.path = String(object.path); + switch (object.state) { + case "DESIRED_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PRESENT": + case 1: + message.state = 1; + break; + case "ABSENT": + case 2: + message.state = 2; + break; + case "CONTENTS_MATCH": + case 3: + message.state = 3; + break; + } + if (object.permissions != null) + message.permissions = String(object.permissions); + return message; + }; + + /** + * Creates a plain object from a FileResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} message FileResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.state = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; + object.permissions = ""; + } + if (message.file != null && message.hasOwnProperty("file")) { + object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.file, options); + if (options.oneofs) + object.source = "file"; + } + if (message.content != null && message.hasOwnProperty("content")) { + object.content = message.content; + if (options.oneofs) + object.source = "content"; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState[message.state] : message.state; + if (message.permissions != null && message.hasOwnProperty("permissions")) + object.permissions = message.permissions; + return object; + }; + + /** + * Converts this FileResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + * @returns {Object.} JSON object + */ + FileResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * DesiredState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState + * @enum {number} + * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value + * @property {number} PRESENT=1 PRESENT value + * @property {number} ABSENT=2 ABSENT value + * @property {number} CONTENTS_MATCH=3 CONTENTS_MATCH value + */ + FileResource.DesiredState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRESENT"] = 1; + values[valuesById[2] = "ABSENT"] = 2; + values[valuesById[3] = "CONTENTS_MATCH"] = 3; + return values; + })(); + + return FileResource; + })(); + + return Resource; + })(); + + OSPolicy.ResourceGroup = (function() { + + /** + * Properties of a ResourceGroup. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @interface IResourceGroup + * @property {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null} [osFilter] ResourceGroup osFilter + * @property {Array.|null} [resources] ResourceGroup resources + */ + + /** + * Constructs a new ResourceGroup. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @classdesc Represents a ResourceGroup. + * @implements IResourceGroup + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup=} [properties] Properties to set + */ + function ResourceGroup(properties) { + this.resources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceGroup osFilter. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null|undefined} osFilter + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @instance + */ + ResourceGroup.prototype.osFilter = null; + + /** + * ResourceGroup resources. + * @member {Array.} resources + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @instance + */ + ResourceGroup.prototype.resources = $util.emptyArray; + + /** + * Creates a new ResourceGroup instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup instance + */ + ResourceGroup.create = function create(properties) { + return new ResourceGroup(properties); + }; + + /** + * Encodes the specified ResourceGroup message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup} message ResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osFilter != null && Object.hasOwnProperty.call(message, "osFilter")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.encode(message.osFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.encode(message.resources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup} message ResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceGroup.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceGroup message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osFilter != null && message.hasOwnProperty("osFilter")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify(message.osFilter); + if (error) + return "osFilter." + error; + } + 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.osconfig.v1alpha.OSPolicy.Resource.verify(message.resources[i]); + if (error) + return "resources." + error; + } + } + return null; + }; + + /** + * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup + */ + ResourceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(); + if (object.osFilter != null) { + if (typeof object.osFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.osFilter: object expected"); + message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.fromObject(object.osFilter); + } + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.resources: object expected"); + message.resources[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.fromObject(object.resources[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} message ResourceGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resources = []; + if (options.defaults) + object.osFilter = null; + if (message.osFilter != null && message.hasOwnProperty("osFilter")) + object.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.toObject(message.osFilter, options); + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.toObject(message.resources[j], options); + } + return object; + }; + + /** + * Converts this ResourceGroup to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @instance + * @returns {Object.} JSON object + */ + ResourceGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceGroup; + })(); + + /** + * Mode enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} VALIDATION=1 VALIDATION value + * @property {number} ENFORCEMENT=2 ENFORCEMENT value + */ + OSPolicy.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VALIDATION"] = 1; + values[valuesById[2] = "ENFORCEMENT"] = 2; + return values; + })(); + + return OSPolicy; + })(); + + v1alpha.OSPolicyAssignment = (function() { + + /** + * Properties of a OSPolicyAssignment. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyAssignment + * @property {string|null} [name] OSPolicyAssignment name + * @property {string|null} [description] OSPolicyAssignment description + * @property {Array.|null} [osPolicies] OSPolicyAssignment osPolicies + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null} [instanceFilter] OSPolicyAssignment instanceFilter + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null} [rollout] OSPolicyAssignment rollout + * @property {string|null} [revisionId] OSPolicyAssignment revisionId + * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] OSPolicyAssignment revisionCreateTime + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null} [rolloutState] OSPolicyAssignment rolloutState + * @property {boolean|null} [baseline] OSPolicyAssignment baseline + * @property {boolean|null} [deleted] OSPolicyAssignment deleted + * @property {boolean|null} [reconciling] OSPolicyAssignment reconciling + * @property {string|null} [uid] OSPolicyAssignment uid + */ + + /** + * Constructs a new OSPolicyAssignment. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyAssignment. + * @implements IOSPolicyAssignment + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set + */ + function OSPolicyAssignment(properties) { + this.osPolicies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyAssignment name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.name = ""; + + /** + * OSPolicyAssignment description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.description = ""; + + /** + * OSPolicyAssignment osPolicies. + * @member {Array.} osPolicies + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.osPolicies = $util.emptyArray; + + /** + * OSPolicyAssignment instanceFilter. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.instanceFilter = null; + + /** + * OSPolicyAssignment rollout. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.rollout = null; + + /** + * OSPolicyAssignment revisionId. + * @member {string} revisionId + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.revisionId = ""; + + /** + * OSPolicyAssignment revisionCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.revisionCreateTime = null; + + /** + * OSPolicyAssignment rolloutState. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState} rolloutState + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.rolloutState = 0; + + /** + * OSPolicyAssignment baseline. + * @member {boolean} baseline + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.baseline = false; + + /** + * OSPolicyAssignment deleted. + * @member {boolean} deleted + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.deleted = false; + + /** + * OSPolicyAssignment reconciling. + * @member {boolean} reconciling + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.reconciling = false; + + /** + * OSPolicyAssignment uid. + * @member {string} uid + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.uid = ""; + + /** + * Creates a new OSPolicyAssignment instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment instance + */ + OSPolicyAssignment.create = function create(properties) { + return new OSPolicyAssignment(properties); + }; + + /** + * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.osPolicies != null && message.osPolicies.length) + for (var i = 0; i < message.osPolicies.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicy.encode(message.osPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.encode(message.rollout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.revisionId); + if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rolloutState); + if (message.baseline != null && Object.hasOwnProperty.call(message, "baseline")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.baseline); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deleted); + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.reconciling); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.uid); + return writer; + }; + + /** + * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.osPolicies && message.osPolicies.length)) + message.osPolicies = []; + message.osPolicies.push($root.google.cloud.osconfig.v1alpha.OSPolicy.decode(reader, reader.uint32())); + break; + case 4: + message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); + break; + case 5: + message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); + break; + case 6: + message.revisionId = reader.string(); + break; + case 7: + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.rolloutState = reader.int32(); + break; + case 10: + message.baseline = reader.bool(); + break; + case 11: + message.deleted = reader.bool(); + break; + case 12: + message.reconciling = reader.bool(); + break; + case 13: + message.uid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyAssignment message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyAssignment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.osPolicies != null && message.hasOwnProperty("osPolicies")) { + if (!Array.isArray(message.osPolicies)) + return "osPolicies: array expected"; + for (var i = 0; i < message.osPolicies.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.verify(message.osPolicies[i]); + if (error) + return "osPolicies." + error; + } + } + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); + if (error) + return "revisionCreateTime." + error; + } + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + switch (message.rolloutState) { + default: + return "rolloutState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.baseline != null && message.hasOwnProperty("baseline")) + if (typeof message.baseline !== "boolean") + return "baseline: boolean expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (typeof message.reconciling !== "boolean") + return "reconciling: boolean expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + return null; + }; + + /** + * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + */ + OSPolicyAssignment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.osPolicies) { + if (!Array.isArray(object.osPolicies)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: array expected"); + message.osPolicies = []; + for (var i = 0; i < object.osPolicies.length; ++i) { + if (typeof object.osPolicies[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: object expected"); + message.osPolicies[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.fromObject(object.osPolicies[i]); + } + } + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.fromObject(object.instanceFilter); + } + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.fromObject(object.rollout); + } + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.revisionCreateTime != null) { + if (typeof object.revisionCreateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.revisionCreateTime: object expected"); + message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + } + switch (object.rolloutState) { + case "ROLLOUT_STATE_UNSPECIFIED": + case 0: + message.rolloutState = 0; + break; + case "IN_PROGRESS": + case 1: + message.rolloutState = 1; + break; + case "CANCELLING": + case 2: + message.rolloutState = 2; + break; + case "CANCELLED": + case 3: + message.rolloutState = 3; + break; + case "SUCCEEDED": + case 4: + message.rolloutState = 4; + break; + } + if (object.baseline != null) + message.baseline = Boolean(object.baseline); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + if (object.reconciling != null) + message.reconciling = Boolean(object.reconciling); + if (object.uid != null) + message.uid = String(object.uid); + return message; + }; + + /** + * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} message OSPolicyAssignment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyAssignment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicies = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.instanceFilter = null; + object.rollout = null; + object.revisionId = ""; + object.revisionCreateTime = null; + object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; + object.baseline = false; + object.deleted = false; + object.reconciling = false; + object.uid = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.osPolicies && message.osPolicies.length) { + object.osPolicies = []; + for (var j = 0; j < message.osPolicies.length; ++j) + object.osPolicies[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.toObject(message.osPolicies[j], options); + } + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.toObject(message.instanceFilter, options); + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.toObject(message.rollout, options); + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) + object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; + if (message.baseline != null && message.hasOwnProperty("baseline")) + object.baseline = message.baseline; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + object.reconciling = message.reconciling; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + return object; + }; + + /** + * Converts this OSPolicyAssignment to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + * @returns {Object.} JSON object + */ + OSPolicyAssignment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicyAssignment.LabelSet = (function() { + + /** + * Properties of a LabelSet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @interface ILabelSet + * @property {Object.|null} [labels] LabelSet labels + */ + + /** + * Constructs a new LabelSet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @classdesc Represents a LabelSet. + * @implements ILabelSet + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set + */ + function LabelSet(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelSet labels. + * @member {Object.} labels + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @instance + */ + LabelSet.prototype.labels = $util.emptyObject; + + /** + * Creates a new LabelSet instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet instance + */ + LabelSet.create = function create(properties) { + return new LabelSet(properties); + }; + + /** + * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified LabelSet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelSet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelSet message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a LabelSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet + */ + LabelSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a LabelSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} message LabelSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this LabelSet to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @instance + * @returns {Object.} JSON object + */ + LabelSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LabelSet; + })(); + + OSPolicyAssignment.InstanceFilter = (function() { + + /** + * Properties of an InstanceFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @interface IInstanceFilter + * @property {boolean|null} [all] InstanceFilter all + * @property {Array.|null} [osShortNames] InstanceFilter osShortNames + * @property {Array.|null} [inclusionLabels] InstanceFilter inclusionLabels + * @property {Array.|null} [exclusionLabels] InstanceFilter exclusionLabels + */ + + /** + * Constructs a new InstanceFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @classdesc Represents an InstanceFilter. + * @implements IInstanceFilter + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter=} [properties] Properties to set + */ + function InstanceFilter(properties) { + this.osShortNames = []; + this.inclusionLabels = []; + this.exclusionLabels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceFilter all. + * @member {boolean} all + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.all = false; + + /** + * InstanceFilter osShortNames. + * @member {Array.} osShortNames + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.osShortNames = $util.emptyArray; + + /** + * InstanceFilter inclusionLabels. + * @member {Array.} inclusionLabels + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.inclusionLabels = $util.emptyArray; + + /** + * InstanceFilter exclusionLabels. + * @member {Array.} exclusionLabels + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.exclusionLabels = $util.emptyArray; + + /** + * Creates a new InstanceFilter instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter instance + */ + InstanceFilter.create = function create(properties) { + return new InstanceFilter(properties); + }; + + /** + * Encodes the specified InstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter} message InstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.all != null && Object.hasOwnProperty.call(message, "all")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all); + if (message.osShortNames != null && message.osShortNames.length) + for (var i = 0; i < message.osShortNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osShortNames[i]); + if (message.inclusionLabels != null && message.inclusionLabels.length) + for (var i = 0; i < message.inclusionLabels.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.encode(message.inclusionLabels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.exclusionLabels != null && message.exclusionLabels.length) + for (var i = 0; i < message.exclusionLabels.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.encode(message.exclusionLabels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter} message InstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.all = reader.bool(); + break; + case 2: + if (!(message.osShortNames && message.osShortNames.length)) + message.osShortNames = []; + message.osShortNames.push(reader.string()); + break; + case 3: + if (!(message.inclusionLabels && message.inclusionLabels.length)) + message.inclusionLabels = []; + message.inclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.exclusionLabels && message.exclusionLabels.length)) + message.exclusionLabels = []; + message.exclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceFilter message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.all != null && message.hasOwnProperty("all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; + if (message.osShortNames != null && message.hasOwnProperty("osShortNames")) { + if (!Array.isArray(message.osShortNames)) + return "osShortNames: array expected"; + for (var i = 0; i < message.osShortNames.length; ++i) + if (!$util.isString(message.osShortNames[i])) + return "osShortNames: string[] expected"; + } + if (message.inclusionLabels != null && message.hasOwnProperty("inclusionLabels")) { + if (!Array.isArray(message.inclusionLabels)) + return "inclusionLabels: array expected"; + for (var i = 0; i < message.inclusionLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.inclusionLabels[i]); + if (error) + return "inclusionLabels." + error; + } + } + if (message.exclusionLabels != null && message.hasOwnProperty("exclusionLabels")) { + if (!Array.isArray(message.exclusionLabels)) + return "exclusionLabels: array expected"; + for (var i = 0; i < message.exclusionLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.exclusionLabels[i]); + if (error) + return "exclusionLabels." + error; + } + } + return null; + }; + + /** + * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter + */ + InstanceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); + if (object.all != null) + message.all = Boolean(object.all); + if (object.osShortNames) { + if (!Array.isArray(object.osShortNames)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.osShortNames: array expected"); + message.osShortNames = []; + for (var i = 0; i < object.osShortNames.length; ++i) + message.osShortNames[i] = String(object.osShortNames[i]); + } + if (object.inclusionLabels) { + if (!Array.isArray(object.inclusionLabels)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: array expected"); + message.inclusionLabels = []; + for (var i = 0; i < object.inclusionLabels.length; ++i) { + if (typeof object.inclusionLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: object expected"); + message.inclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.inclusionLabels[i]); + } + } + if (object.exclusionLabels) { + if (!Array.isArray(object.exclusionLabels)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: array expected"); + message.exclusionLabels = []; + for (var i = 0; i < object.exclusionLabels.length; ++i) { + if (typeof object.exclusionLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: object expected"); + message.exclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.exclusionLabels[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} message InstanceFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.osShortNames = []; + object.inclusionLabels = []; + object.exclusionLabels = []; + } + if (options.defaults) + object.all = false; + if (message.all != null && message.hasOwnProperty("all")) + object.all = message.all; + if (message.osShortNames && message.osShortNames.length) { + object.osShortNames = []; + for (var j = 0; j < message.osShortNames.length; ++j) + object.osShortNames[j] = message.osShortNames[j]; + } + if (message.inclusionLabels && message.inclusionLabels.length) { + object.inclusionLabels = []; + for (var j = 0; j < message.inclusionLabels.length; ++j) + object.inclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.inclusionLabels[j], options); + } + if (message.exclusionLabels && message.exclusionLabels.length) { + object.exclusionLabels = []; + for (var j = 0; j < message.exclusionLabels.length; ++j) + object.exclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.exclusionLabels[j], options); + } + return object; + }; + + /** + * Converts this InstanceFilter to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + * @returns {Object.} JSON object + */ + InstanceFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InstanceFilter; + })(); + + OSPolicyAssignment.Rollout = (function() { + + /** + * Properties of a Rollout. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @interface IRollout + * @property {google.cloud.osconfig.v1alpha.IFixedOrPercent|null} [disruptionBudget] Rollout disruptionBudget + * @property {google.protobuf.IDuration|null} [minWaitDuration] Rollout minWaitDuration + */ + + /** + * Constructs a new Rollout. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @classdesc Represents a Rollout. + * @implements IRollout + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout=} [properties] Properties to set + */ + function Rollout(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rollout disruptionBudget. + * @member {google.cloud.osconfig.v1alpha.IFixedOrPercent|null|undefined} disruptionBudget + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @instance + */ + Rollout.prototype.disruptionBudget = null; + + /** + * Rollout minWaitDuration. + * @member {google.protobuf.IDuration|null|undefined} minWaitDuration + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @instance + */ + Rollout.prototype.minWaitDuration = null; + + /** + * Creates a new Rollout instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout instance + */ + Rollout.create = function create(properties) { + return new Rollout(properties); + }; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disruptionBudget != null && Object.hasOwnProperty.call(message, "disruptionBudget")) + $root.google.cloud.osconfig.v1alpha.FixedOrPercent.encode(message.disruptionBudget, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minWaitDuration != null && Object.hasOwnProperty.call(message, "minWaitDuration")) + $root.google.protobuf.Duration.encode(message.minWaitDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.decode(reader, reader.uint32()); + break; + case 2: + message.minWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rollout message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rollout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) { + var error = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.verify(message.disruptionBudget); + if (error) + return "disruptionBudget." + error; + } + if (message.minWaitDuration != null && message.hasOwnProperty("minWaitDuration")) { + var error = $root.google.protobuf.Duration.verify(message.minWaitDuration); + if (error) + return "minWaitDuration." + error; + } + return null; + }; + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout + */ + Rollout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout(); + if (object.disruptionBudget != null) { + if (typeof object.disruptionBudget !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.disruptionBudget: object expected"); + message.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.fromObject(object.disruptionBudget); + } + if (object.minWaitDuration != null) { + if (typeof object.minWaitDuration !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.minWaitDuration: object expected"); + message.minWaitDuration = $root.google.protobuf.Duration.fromObject(object.minWaitDuration); + } + return message; + }; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} message Rollout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rollout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disruptionBudget = null; + object.minWaitDuration = null; + } + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) + object.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.toObject(message.disruptionBudget, options); + if (message.minWaitDuration != null && message.hasOwnProperty("minWaitDuration")) + object.minWaitDuration = $root.google.protobuf.Duration.toObject(message.minWaitDuration, options); + return object; + }; + + /** + * Converts this Rollout to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @instance + * @returns {Object.} JSON object + */ + Rollout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Rollout; + })(); + + /** + * RolloutState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState + * @enum {number} + * @property {number} ROLLOUT_STATE_UNSPECIFIED=0 ROLLOUT_STATE_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + */ + OSPolicyAssignment.RolloutState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLLOUT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + return values; + })(); + + return OSPolicyAssignment; + })(); + + v1alpha.OSPolicyAssignmentOperationMetadata = (function() { + + /** + * Properties of a OSPolicyAssignmentOperationMetadata. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyAssignmentOperationMetadata + * @property {string|null} [osPolicyAssignment] OSPolicyAssignmentOperationMetadata osPolicyAssignment + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|null} [apiMethod] OSPolicyAssignmentOperationMetadata apiMethod + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|null} [rolloutState] OSPolicyAssignmentOperationMetadata rolloutState + * @property {google.protobuf.ITimestamp|null} [rolloutStartTime] OSPolicyAssignmentOperationMetadata rolloutStartTime + * @property {google.protobuf.ITimestamp|null} [rolloutUpdateTime] OSPolicyAssignmentOperationMetadata rolloutUpdateTime + */ + + /** + * Constructs a new OSPolicyAssignmentOperationMetadata. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyAssignmentOperationMetadata. + * @implements IOSPolicyAssignmentOperationMetadata + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata=} [properties] Properties to set + */ + function OSPolicyAssignmentOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyAssignmentOperationMetadata osPolicyAssignment. + * @member {string} osPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.osPolicyAssignment = ""; + + /** + * OSPolicyAssignmentOperationMetadata apiMethod. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod} apiMethod + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.apiMethod = 0; + + /** + * OSPolicyAssignmentOperationMetadata rolloutState. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState} rolloutState + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.rolloutState = 0; + + /** + * OSPolicyAssignmentOperationMetadata rolloutStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} rolloutStartTime + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.rolloutStartTime = null; + + /** + * OSPolicyAssignmentOperationMetadata rolloutUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} rolloutUpdateTime + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.rolloutUpdateTime = null; + + /** + * Creates a new OSPolicyAssignmentOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata instance + */ + OSPolicyAssignmentOperationMetadata.create = function create(properties) { + return new OSPolicyAssignmentOperationMetadata(properties); + }; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyAssignment); + if (message.apiMethod != null && Object.hasOwnProperty.call(message, "apiMethod")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.apiMethod); + if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rolloutState); + if (message.rolloutStartTime != null && Object.hasOwnProperty.call(message, "rolloutStartTime")) + $root.google.protobuf.Timestamp.encode(message.rolloutStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rolloutUpdateTime != null && Object.hasOwnProperty.call(message, "rolloutUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.rolloutUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyAssignment = reader.string(); + break; + case 2: + message.apiMethod = reader.int32(); + break; + case 3: + message.rolloutState = reader.int32(); + break; + case 4: + message.rolloutStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.rolloutUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyAssignmentOperationMetadata message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyAssignmentOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + if (!$util.isString(message.osPolicyAssignment)) + return "osPolicyAssignment: string expected"; + if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) + switch (message.apiMethod) { + default: + return "apiMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + switch (message.rolloutState) { + default: + return "rolloutState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.rolloutStartTime); + if (error) + return "rolloutStartTime." + error; + } + if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.rolloutUpdateTime); + if (error) + return "rolloutUpdateTime." + error; + } + return null; + }; + + /** + * Creates a OSPolicyAssignmentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata + */ + OSPolicyAssignmentOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata(); + if (object.osPolicyAssignment != null) + message.osPolicyAssignment = String(object.osPolicyAssignment); + switch (object.apiMethod) { + case "API_METHOD_UNSPECIFIED": + case 0: + message.apiMethod = 0; + break; + case "CREATE": + case 1: + message.apiMethod = 1; + break; + case "UPDATE": + case 2: + message.apiMethod = 2; + break; + case "DELETE": + case 3: + message.apiMethod = 3; + break; + } + switch (object.rolloutState) { + case "ROLLOUT_STATE_UNSPECIFIED": + case 0: + message.rolloutState = 0; + break; + case "IN_PROGRESS": + case 1: + message.rolloutState = 1; + break; + case "CANCELLING": + case 2: + message.rolloutState = 2; + break; + case "CANCELLED": + case 3: + message.rolloutState = 3; + break; + case "SUCCEEDED": + case 4: + message.rolloutState = 4; + break; + } + if (object.rolloutStartTime != null) { + if (typeof object.rolloutStartTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.rolloutStartTime: object expected"); + message.rolloutStartTime = $root.google.protobuf.Timestamp.fromObject(object.rolloutStartTime); + } + if (object.rolloutUpdateTime != null) { + if (typeof object.rolloutUpdateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.rolloutUpdateTime: object expected"); + message.rolloutUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.rolloutUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyAssignmentOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyAssignmentOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osPolicyAssignment = ""; + object.apiMethod = options.enums === String ? "API_METHOD_UNSPECIFIED" : 0; + object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; + object.rolloutStartTime = null; + object.rolloutUpdateTime = null; + } + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = message.osPolicyAssignment; + if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) + object.apiMethod = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] : message.apiMethod; + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] : message.rolloutState; + if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) + object.rolloutStartTime = $root.google.protobuf.Timestamp.toObject(message.rolloutStartTime, options); + if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) + object.rolloutUpdateTime = $root.google.protobuf.Timestamp.toObject(message.rolloutUpdateTime, options); + return object; + }; + + /** + * Converts this OSPolicyAssignmentOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OSPolicyAssignmentOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * APIMethod enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod + * @enum {number} + * @property {number} API_METHOD_UNSPECIFIED=0 API_METHOD_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} UPDATE=2 UPDATE value + * @property {number} DELETE=3 DELETE value + */ + OSPolicyAssignmentOperationMetadata.APIMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "API_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "UPDATE"] = 2; + values[valuesById[3] = "DELETE"] = 3; + return values; + })(); + + /** + * RolloutState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + * @enum {number} + * @property {number} ROLLOUT_STATE_UNSPECIFIED=0 ROLLOUT_STATE_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + */ + OSPolicyAssignmentOperationMetadata.RolloutState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLLOUT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + return values; + })(); + + return OSPolicyAssignmentOperationMetadata; + })(); + + v1alpha.CreateOSPolicyAssignmentRequest = (function() { + + /** + * Properties of a CreateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface ICreateOSPolicyAssignmentRequest + * @property {string|null} [parent] CreateOSPolicyAssignmentRequest parent + * @property {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null} [osPolicyAssignment] CreateOSPolicyAssignmentRequest osPolicyAssignment + * @property {string|null} [osPolicyAssignmentId] CreateOSPolicyAssignmentRequest osPolicyAssignmentId + */ + + /** + * Constructs a new CreateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a CreateOSPolicyAssignmentRequest. + * @implements ICreateOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function CreateOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateOSPolicyAssignmentRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @instance + */ + CreateOSPolicyAssignmentRequest.prototype.parent = ""; + + /** + * CreateOSPolicyAssignmentRequest osPolicyAssignment. + * @member {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null|undefined} osPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @instance + */ + CreateOSPolicyAssignmentRequest.prototype.osPolicyAssignment = null; + + /** + * CreateOSPolicyAssignmentRequest osPolicyAssignmentId. + * @member {string} osPolicyAssignmentId + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @instance + */ + CreateOSPolicyAssignmentRequest.prototype.osPolicyAssignmentId = ""; + + /** + * Creates a new CreateOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest instance + */ + CreateOSPolicyAssignmentRequest.create = function create(properties) { + return new CreateOSPolicyAssignmentRequest(properties); + }; + + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateOSPolicyAssignmentRequest.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.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.osPolicyAssignmentId != null && Object.hasOwnProperty.call(message, "osPolicyAssignmentId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.osPolicyAssignmentId); + return writer; + }; + + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + case 3: + message.osPolicyAssignmentId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateOSPolicyAssignmentRequest.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.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignment); + if (error) + return "osPolicyAssignment." + error; + } + if (message.osPolicyAssignmentId != null && message.hasOwnProperty("osPolicyAssignmentId")) + if (!$util.isString(message.osPolicyAssignmentId)) + return "osPolicyAssignmentId: string expected"; + return null; + }; + + /** + * Creates a CreateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest + */ + CreateOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.osPolicyAssignment != null) { + if (typeof object.osPolicyAssignment !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.osPolicyAssignment: object expected"); + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignment); + } + if (object.osPolicyAssignmentId != null) + message.osPolicyAssignmentId = String(object.osPolicyAssignmentId); + return message; + }; + + /** + * Creates a plain object from a CreateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateOSPolicyAssignmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.osPolicyAssignment = null; + object.osPolicyAssignmentId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignment, options); + if (message.osPolicyAssignmentId != null && message.hasOwnProperty("osPolicyAssignmentId")) + object.osPolicyAssignmentId = message.osPolicyAssignmentId; + return object; + }; + + /** + * Converts this CreateOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateOSPolicyAssignmentRequest; + })(); + + v1alpha.UpdateOSPolicyAssignmentRequest = (function() { + + /** + * Properties of an UpdateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IUpdateOSPolicyAssignmentRequest + * @property {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null} [osPolicyAssignment] UpdateOSPolicyAssignmentRequest osPolicyAssignment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOSPolicyAssignmentRequest updateMask + */ + + /** + * Constructs a new UpdateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents an UpdateOSPolicyAssignmentRequest. + * @implements IUpdateOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function UpdateOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateOSPolicyAssignmentRequest osPolicyAssignment. + * @member {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null|undefined} osPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @instance + */ + UpdateOSPolicyAssignmentRequest.prototype.osPolicyAssignment = null; + + /** + * UpdateOSPolicyAssignmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @instance + */ + UpdateOSPolicyAssignmentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest instance + */ + UpdateOSPolicyAssignmentRequest.create = function create(properties) { + return new UpdateOSPolicyAssignmentRequest(properties); + }; + + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateOSPolicyAssignmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateOSPolicyAssignmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignment); + if (error) + return "osPolicyAssignment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest + */ + UpdateOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest(); + if (object.osPolicyAssignment != null) { + if (typeof object.osPolicyAssignment !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.osPolicyAssignment: object expected"); + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateOSPolicyAssignmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osPolicyAssignment = null; + object.updateMask = null; + } + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateOSPolicyAssignmentRequest; + })(); + + v1alpha.GetOSPolicyAssignmentRequest = (function() { + + /** + * Properties of a GetOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IGetOSPolicyAssignmentRequest + * @property {string|null} [name] GetOSPolicyAssignmentRequest name + */ + + /** + * Constructs a new GetOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a GetOSPolicyAssignmentRequest. + * @implements IGetOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function GetOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOSPolicyAssignmentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @instance + */ + GetOSPolicyAssignmentRequest.prototype.name = ""; + + /** + * Creates a new GetOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest instance + */ + GetOSPolicyAssignmentRequest.create = function create(properties) { + return new GetOSPolicyAssignmentRequest(properties); + }; + + /** + * Encodes the specified GetOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOSPolicyAssignmentRequest.encode = function encode(message, writer) { + 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 GetOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOSPolicyAssignmentRequest.verify = function verify(message) { + if (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 GetOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest + */ + GetOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOSPolicyAssignmentRequest.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 GetOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOSPolicyAssignmentRequest; + })(); + + v1alpha.ListOSPolicyAssignmentsRequest = (function() { + + /** + * Properties of a ListOSPolicyAssignmentsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentsRequest + * @property {string|null} [parent] ListOSPolicyAssignmentsRequest parent + * @property {number|null} [pageSize] ListOSPolicyAssignmentsRequest pageSize + * @property {string|null} [pageToken] ListOSPolicyAssignmentsRequest pageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentsRequest. + * @implements IListOSPolicyAssignmentsRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest=} [properties] Properties to set + */ + function ListOSPolicyAssignmentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @instance + */ + ListOSPolicyAssignmentsRequest.prototype.parent = ""; + + /** + * ListOSPolicyAssignmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @instance + */ + ListOSPolicyAssignmentsRequest.prototype.pageSize = 0; + + /** + * ListOSPolicyAssignmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @instance + */ + ListOSPolicyAssignmentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest instance + */ + ListOSPolicyAssignmentsRequest.create = function create(properties) { + return new ListOSPolicyAssignmentsRequest(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest + */ + ListOSPolicyAssignmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentsRequest; + })(); + + v1alpha.ListOSPolicyAssignmentsResponse = (function() { + + /** + * Properties of a ListOSPolicyAssignmentsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentsResponse + * @property {Array.|null} [osPolicyAssignments] ListOSPolicyAssignmentsResponse osPolicyAssignments + * @property {string|null} [nextPageToken] ListOSPolicyAssignmentsResponse nextPageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentsResponse. + * @implements IListOSPolicyAssignmentsResponse + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse=} [properties] Properties to set + */ + function ListOSPolicyAssignmentsResponse(properties) { + this.osPolicyAssignments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentsResponse osPolicyAssignments. + * @member {Array.} osPolicyAssignments + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @instance + */ + ListOSPolicyAssignmentsResponse.prototype.osPolicyAssignments = $util.emptyArray; + + /** + * ListOSPolicyAssignmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @instance + */ + ListOSPolicyAssignmentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse instance + */ + ListOSPolicyAssignmentsResponse.create = function create(properties) { + return new ListOSPolicyAssignmentsResponse(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignments != null && message.osPolicyAssignments.length) + for (var i = 0; i < message.osPolicyAssignments.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignments[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 ListOSPolicyAssignmentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignments != null && message.hasOwnProperty("osPolicyAssignments")) { + if (!Array.isArray(message.osPolicyAssignments)) + return "osPolicyAssignments: array expected"; + for (var i = 0; i < message.osPolicyAssignments.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignments[i]); + if (error) + return "osPolicyAssignments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse + */ + ListOSPolicyAssignmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse(); + if (object.osPolicyAssignments) { + if (!Array.isArray(object.osPolicyAssignments)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.osPolicyAssignments: array expected"); + message.osPolicyAssignments = []; + for (var i = 0; i < object.osPolicyAssignments.length; ++i) { + if (typeof object.osPolicyAssignments[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.osPolicyAssignments: object expected"); + message.osPolicyAssignments[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyAssignments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.osPolicyAssignments && message.osPolicyAssignments.length) { + object.osPolicyAssignments = []; + for (var j = 0; j < message.osPolicyAssignments.length; ++j) + object.osPolicyAssignments[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentsResponse; + })(); + + v1alpha.ListOSPolicyAssignmentRevisionsRequest = (function() { + + /** + * Properties of a ListOSPolicyAssignmentRevisionsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentRevisionsRequest + * @property {string|null} [name] ListOSPolicyAssignmentRevisionsRequest name + * @property {number|null} [pageSize] ListOSPolicyAssignmentRevisionsRequest pageSize + * @property {string|null} [pageToken] ListOSPolicyAssignmentRevisionsRequest pageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentRevisionsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentRevisionsRequest. + * @implements IListOSPolicyAssignmentRevisionsRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest=} [properties] Properties to set + */ + function ListOSPolicyAssignmentRevisionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentRevisionsRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @instance + */ + ListOSPolicyAssignmentRevisionsRequest.prototype.name = ""; + + /** + * ListOSPolicyAssignmentRevisionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @instance + */ + ListOSPolicyAssignmentRevisionsRequest.prototype.pageSize = 0; + + /** + * ListOSPolicyAssignmentRevisionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @instance + */ + ListOSPolicyAssignmentRevisionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentRevisionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest instance + */ + ListOSPolicyAssignmentRevisionsRequest.create = function create(properties) { + return new ListOSPolicyAssignmentRevisionsRequest(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentRevisionsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentRevisionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest + */ + ListOSPolicyAssignmentRevisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentRevisionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentRevisionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentRevisionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentRevisionsRequest; + })(); + + v1alpha.ListOSPolicyAssignmentRevisionsResponse = (function() { + + /** + * Properties of a ListOSPolicyAssignmentRevisionsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentRevisionsResponse + * @property {Array.|null} [osPolicyAssignments] ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments + * @property {string|null} [nextPageToken] ListOSPolicyAssignmentRevisionsResponse nextPageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentRevisionsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentRevisionsResponse. + * @implements IListOSPolicyAssignmentRevisionsResponse + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse=} [properties] Properties to set + */ + function ListOSPolicyAssignmentRevisionsResponse(properties) { + this.osPolicyAssignments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments. + * @member {Array.} osPolicyAssignments + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @instance + */ + ListOSPolicyAssignmentRevisionsResponse.prototype.osPolicyAssignments = $util.emptyArray; + + /** + * ListOSPolicyAssignmentRevisionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @instance + */ + ListOSPolicyAssignmentRevisionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentRevisionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse instance + */ + ListOSPolicyAssignmentRevisionsResponse.create = function create(properties) { + return new ListOSPolicyAssignmentRevisionsResponse(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignments != null && message.osPolicyAssignments.length) + for (var i = 0; i < message.osPolicyAssignments.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignments[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 ListOSPolicyAssignmentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentRevisionsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentRevisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignments != null && message.hasOwnProperty("osPolicyAssignments")) { + if (!Array.isArray(message.osPolicyAssignments)) + return "osPolicyAssignments: array expected"; + for (var i = 0; i < message.osPolicyAssignments.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignments[i]); + if (error) + return "osPolicyAssignments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse + */ + ListOSPolicyAssignmentRevisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse(); + if (object.osPolicyAssignments) { + if (!Array.isArray(object.osPolicyAssignments)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.osPolicyAssignments: array expected"); + message.osPolicyAssignments = []; + for (var i = 0; i < object.osPolicyAssignments.length; ++i) { + if (typeof object.osPolicyAssignments[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.osPolicyAssignments: object expected"); + message.osPolicyAssignments[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentRevisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyAssignments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.osPolicyAssignments && message.osPolicyAssignments.length) { + object.osPolicyAssignments = []; + for (var j = 0; j < message.osPolicyAssignments.length; ++j) + object.osPolicyAssignments[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentRevisionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentRevisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentRevisionsResponse; + })(); + + v1alpha.DeleteOSPolicyAssignmentRequest = (function() { + + /** + * Properties of a DeleteOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IDeleteOSPolicyAssignmentRequest + * @property {string|null} [name] DeleteOSPolicyAssignmentRequest name + */ + + /** + * Constructs a new DeleteOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a DeleteOSPolicyAssignmentRequest. + * @implements IDeleteOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function DeleteOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOSPolicyAssignmentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @instance + */ + DeleteOSPolicyAssignmentRequest.prototype.name = ""; + + /** + * Creates a new DeleteOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest instance + */ + DeleteOSPolicyAssignmentRequest.create = function create(properties) { + return new DeleteOSPolicyAssignmentRequest(properties); + }; + + /** + * Encodes the specified DeleteOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOSPolicyAssignmentRequest.encode = function encode(message, writer) { + 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 DeleteOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOSPolicyAssignmentRequest.verify = function verify(message) { + if (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 DeleteOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest + */ + DeleteOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOSPolicyAssignmentRequest.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 DeleteOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOSPolicyAssignmentRequest; + })(); + + v1alpha.FixedOrPercent = (function() { + + /** + * Properties of a FixedOrPercent. + * @memberof google.cloud.osconfig.v1alpha + * @interface IFixedOrPercent + * @property {number|null} [fixed] FixedOrPercent fixed + * @property {number|null} [percent] FixedOrPercent percent + */ + + /** + * Constructs a new FixedOrPercent. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a FixedOrPercent. + * @implements IFixedOrPercent + * @constructor + * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent=} [properties] Properties to set + */ + function FixedOrPercent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FixedOrPercent fixed. + * @member {number|null|undefined} fixed + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @instance + */ + FixedOrPercent.prototype.fixed = null; + + /** + * FixedOrPercent percent. + * @member {number|null|undefined} percent + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @instance + */ + FixedOrPercent.prototype.percent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FixedOrPercent mode. + * @member {"fixed"|"percent"|undefined} mode + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @instance + */ + Object.defineProperty(FixedOrPercent.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["fixed", "percent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FixedOrPercent instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent instance + */ + FixedOrPercent.create = function create(properties) { + return new FixedOrPercent(properties); + }; + + /** + * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedOrPercent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fixed != null && Object.hasOwnProperty.call(message, "fixed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fixed); + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.percent); + return writer; + }; + + /** + * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedOrPercent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FixedOrPercent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedOrPercent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.FixedOrPercent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fixed = reader.int32(); + break; + case 2: + message.percent = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedOrPercent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FixedOrPercent message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FixedOrPercent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + properties.mode = 1; + if (!$util.isInteger(message.fixed)) + return "fixed: integer expected"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + if (!$util.isInteger(message.percent)) + return "percent: integer expected"; + } + return null; + }; + + /** + * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent + */ + FixedOrPercent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.FixedOrPercent) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.FixedOrPercent(); + if (object.fixed != null) + message.fixed = object.fixed | 0; + if (object.percent != null) + message.percent = object.percent | 0; + return message; + }; + + /** + * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1alpha.FixedOrPercent} message FixedOrPercent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FixedOrPercent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + object.fixed = message.fixed; + if (options.oneofs) + object.mode = "fixed"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + object.percent = message.percent; + if (options.oneofs) + object.mode = "percent"; + } + return object; + }; + + /** + * Converts this FixedOrPercent to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @instance + * @returns {Object.} JSON object + */ + FixedOrPercent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FixedOrPercent; + })(); + + v1alpha.OsConfigZonalService = (function() { + + /** + * Constructs a new OsConfigZonalService service. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents an OsConfigZonalService + * @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 OsConfigZonalService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (OsConfigZonalService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsConfigZonalService; + + /** + * Creates new OsConfigZonalService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @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 {OsConfigZonalService} RPC service. Useful where requests and/or responses are streamed. + */ + OsConfigZonalService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#createOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef CreateOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateOSPolicyAssignment. + * @function createOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} request CreateOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.createOSPolicyAssignment = function createOSPolicyAssignment(request, callback) { + return this.rpcCall(createOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateOSPolicyAssignment" }); + + /** + * Calls CreateOSPolicyAssignment. + * @function createOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} request CreateOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#updateOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef UpdateOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateOSPolicyAssignment. + * @function updateOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} request UpdateOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.updateOSPolicyAssignment = function updateOSPolicyAssignment(request, callback) { + return this.rpcCall(updateOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateOSPolicyAssignment" }); + + /** + * Calls UpdateOSPolicyAssignment. + * @function updateOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} request UpdateOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef GetOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} [response] OSPolicyAssignment + */ + + /** + * Calls GetOSPolicyAssignment. + * @function getOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} request GetOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and OSPolicyAssignment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getOSPolicyAssignment = function getOSPolicyAssignment(request, callback) { + return this.rpcCall(getOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment, request, callback); + }, "name", { value: "GetOSPolicyAssignment" }); + + /** + * Calls GetOSPolicyAssignment. + * @function getOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} request GetOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignments}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListOSPolicyAssignmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} [response] ListOSPolicyAssignmentsResponse + */ + + /** + * Calls ListOSPolicyAssignments. + * @function listOSPolicyAssignments + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} request ListOSPolicyAssignmentsRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignments = function listOSPolicyAssignments(request, callback) { + return this.rpcCall(listOSPolicyAssignments, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse, request, callback); + }, "name", { value: "ListOSPolicyAssignments" }); + + /** + * Calls ListOSPolicyAssignments. + * @function listOSPolicyAssignments + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} request ListOSPolicyAssignmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListOSPolicyAssignmentRevisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} [response] ListOSPolicyAssignmentRevisionsResponse + */ + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @function listOSPolicyAssignmentRevisions + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisionsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentRevisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignmentRevisions = function listOSPolicyAssignmentRevisions(request, callback) { + return this.rpcCall(listOSPolicyAssignmentRevisions, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse, request, callback); + }, "name", { value: "ListOSPolicyAssignmentRevisions" }); + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @function listOSPolicyAssignmentRevisions + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#deleteOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef DeleteOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteOSPolicyAssignment. + * @function deleteOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} request DeleteOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.deleteOSPolicyAssignment = function deleteOSPolicyAssignment(request, callback) { + return this.rpcCall(deleteOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteOSPolicyAssignment" }); + + /** + * Calls DeleteOSPolicyAssignment. + * @function deleteOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} request DeleteOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInstanceOSPoliciesCompliance}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef GetInstanceOSPoliciesComplianceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} [response] InstanceOSPoliciesCompliance + */ + + /** + * Calls GetInstanceOSPoliciesCompliance. + * @function getInstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} request GetInstanceOSPoliciesComplianceRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesComplianceCallback} callback Node-style callback called with the error, if any, and InstanceOSPoliciesCompliance + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getInstanceOSPoliciesCompliance = function getInstanceOSPoliciesCompliance(request, callback) { + return this.rpcCall(getInstanceOSPoliciesCompliance, $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance, request, callback); + }, "name", { value: "GetInstanceOSPoliciesCompliance" }); + + /** + * Calls GetInstanceOSPoliciesCompliance. + * @function getInstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} request GetInstanceOSPoliciesComplianceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInstanceOSPoliciesCompliances}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListInstanceOSPoliciesCompliancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} [response] ListInstanceOSPoliciesCompliancesResponse + */ + + /** + * Calls ListInstanceOSPoliciesCompliances. + * @function listInstanceOSPoliciesCompliances + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} request ListInstanceOSPoliciesCompliancesRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliancesCallback} callback Node-style callback called with the error, if any, and ListInstanceOSPoliciesCompliancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listInstanceOSPoliciesCompliances = function listInstanceOSPoliciesCompliances(request, callback) { + return this.rpcCall(listInstanceOSPoliciesCompliances, $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse, request, callback); + }, "name", { value: "ListInstanceOSPoliciesCompliances" }); + + /** + * Calls ListInstanceOSPoliciesCompliances. + * @function listInstanceOSPoliciesCompliances + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} request ListInstanceOSPoliciesCompliancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef GetInventoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.Inventory} [response] Inventory + */ + + /** + * Calls GetInventory. + * @function getInventory + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} request GetInventoryRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventoryCallback} callback Node-style callback called with the error, if any, and Inventory + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getInventory = function getInventory(request, callback) { + return this.rpcCall(getInventory, $root.google.cloud.osconfig.v1alpha.GetInventoryRequest, $root.google.cloud.osconfig.v1alpha.Inventory, request, callback); + }, "name", { value: "GetInventory" }); + + /** + * Calls GetInventory. + * @function getInventory + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} request GetInventoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInventories}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListInventoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListInventoriesResponse} [response] ListInventoriesResponse + */ + + /** + * Calls ListInventories. + * @function listInventories + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} request ListInventoriesRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventoriesCallback} callback Node-style callback called with the error, if any, and ListInventoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listInventories = function listInventories(request, callback) { + return this.rpcCall(listInventories, $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest, $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse, request, callback); + }, "name", { value: "ListInventories" }); + + /** + * Calls ListInventories. + * @function listInventories + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} request ListInventoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getVulnerabilityReport}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef GetVulnerabilityReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport} [response] VulnerabilityReport + */ + + /** + * Calls GetVulnerabilityReport. + * @function getVulnerabilityReport + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} request GetVulnerabilityReportRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReportCallback} callback Node-style callback called with the error, if any, and VulnerabilityReport + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getVulnerabilityReport = function getVulnerabilityReport(request, callback) { + return this.rpcCall(getVulnerabilityReport, $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, $root.google.cloud.osconfig.v1alpha.VulnerabilityReport, request, callback); + }, "name", { value: "GetVulnerabilityReport" }); + + /** + * Calls GetVulnerabilityReport. + * @function getVulnerabilityReport + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} request GetVulnerabilityReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listVulnerabilityReports}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListVulnerabilityReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} [response] ListVulnerabilityReportsResponse + */ + + /** + * Calls ListVulnerabilityReports. + * @function listVulnerabilityReports + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} request ListVulnerabilityReportsRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReportsCallback} callback Node-style callback called with the error, if any, and ListVulnerabilityReportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listVulnerabilityReports = function listVulnerabilityReports(request, callback) { + return this.rpcCall(listVulnerabilityReports, $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse, request, callback); + }, "name", { value: "ListVulnerabilityReports" }); + + /** + * Calls ListVulnerabilityReports. + * @function listVulnerabilityReports + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} request ListVulnerabilityReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return OsConfigZonalService; + })(); + + v1alpha.VulnerabilityReport = (function() { + + /** + * Properties of a VulnerabilityReport. + * @memberof google.cloud.osconfig.v1alpha + * @interface IVulnerabilityReport + * @property {string|null} [name] VulnerabilityReport name + * @property {Array.|null} [vulnerabilities] VulnerabilityReport vulnerabilities + * @property {google.protobuf.ITimestamp|null} [updateTime] VulnerabilityReport updateTime + */ + + /** + * Constructs a new VulnerabilityReport. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a VulnerabilityReport. + * @implements IVulnerabilityReport + * @constructor + * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport=} [properties] Properties to set + */ + function VulnerabilityReport(properties) { + this.vulnerabilities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VulnerabilityReport name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @instance + */ + VulnerabilityReport.prototype.name = ""; + + /** + * VulnerabilityReport vulnerabilities. + * @member {Array.} vulnerabilities + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @instance + */ + VulnerabilityReport.prototype.vulnerabilities = $util.emptyArray; + + /** + * VulnerabilityReport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @instance + */ + VulnerabilityReport.prototype.updateTime = null; + + /** + * Creates a new VulnerabilityReport instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport instance + */ + VulnerabilityReport.create = function create(properties) { + return new VulnerabilityReport(properties); + }; + + /** + * Encodes the specified VulnerabilityReport message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport} message VulnerabilityReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VulnerabilityReport.encode = function encode(message, writer) { + 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.vulnerabilities != null && message.vulnerabilities.length) + for (var i = 0; i < message.vulnerabilities.length; ++i) + $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.encode(message.vulnerabilities[i], 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(); + return writer; + }; + + /** + * Encodes the specified VulnerabilityReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport} message VulnerabilityReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VulnerabilityReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VulnerabilityReport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VulnerabilityReport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.vulnerabilities && message.vulnerabilities.length)) + message.vulnerabilities = []; + message.vulnerabilities.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.decode(reader, reader.uint32())); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VulnerabilityReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VulnerabilityReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VulnerabilityReport message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VulnerabilityReport.verify = function verify(message) { + if (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.vulnerabilities != null && message.hasOwnProperty("vulnerabilities")) { + if (!Array.isArray(message.vulnerabilities)) + return "vulnerabilities: array expected"; + for (var i = 0; i < message.vulnerabilities.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify(message.vulnerabilities[i]); + if (error) + return "vulnerabilities." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a VulnerabilityReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport + */ + VulnerabilityReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport(); + if (object.name != null) + message.name = String(object.name); + if (object.vulnerabilities) { + if (!Array.isArray(object.vulnerabilities)) + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.vulnerabilities: array expected"); + message.vulnerabilities = []; + for (var i = 0; i < object.vulnerabilities.length; ++i) { + if (typeof object.vulnerabilities[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.vulnerabilities: object expected"); + message.vulnerabilities[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.fromObject(object.vulnerabilities[i]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a VulnerabilityReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport} message VulnerabilityReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VulnerabilityReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.vulnerabilities = []; + if (options.defaults) { + object.name = ""; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.vulnerabilities && message.vulnerabilities.length) { + object.vulnerabilities = []; + for (var j = 0; j < message.vulnerabilities.length; ++j) + object.vulnerabilities[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.toObject(message.vulnerabilities[j], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this VulnerabilityReport to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @instance + * @returns {Object.} JSON object + */ + VulnerabilityReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + VulnerabilityReport.Vulnerability = (function() { + + /** + * Properties of a Vulnerability. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @interface IVulnerability + * @property {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null} [details] Vulnerability details + * @property {Array.|null} [installedInventoryItemIds] Vulnerability installedInventoryItemIds + * @property {Array.|null} [availableInventoryItemIds] Vulnerability availableInventoryItemIds + * @property {google.protobuf.ITimestamp|null} [createTime] Vulnerability createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Vulnerability updateTime + */ + + /** + * Constructs a new Vulnerability. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @classdesc Represents a Vulnerability. + * @implements IVulnerability + * @constructor + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability=} [properties] Properties to set + */ + function Vulnerability(properties) { + this.installedInventoryItemIds = []; + this.availableInventoryItemIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vulnerability details. + * @member {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null|undefined} details + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.details = null; + + /** + * Vulnerability installedInventoryItemIds. + * @member {Array.} installedInventoryItemIds + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.installedInventoryItemIds = $util.emptyArray; + + /** + * Vulnerability availableInventoryItemIds. + * @member {Array.} availableInventoryItemIds + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.availableInventoryItemIds = $util.emptyArray; + + /** + * Vulnerability createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.createTime = null; + + /** + * Vulnerability updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.updateTime = null; + + /** + * Creates a new Vulnerability instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability instance + */ + Vulnerability.create = function create(properties) { + return new Vulnerability(properties); + }; + + /** + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability} message Vulnerability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vulnerability.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.encode(message.details, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.installedInventoryItemIds != null && message.installedInventoryItemIds.length) + for (var i = 0; i < message.installedInventoryItemIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.installedInventoryItemIds[i]); + if (message.availableInventoryItemIds != null && message.availableInventoryItemIds.length) + for (var i = 0; i < message.availableInventoryItemIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.availableInventoryItemIds[i]); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability} message Vulnerability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vulnerability.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vulnerability message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vulnerability.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.installedInventoryItemIds && message.installedInventoryItemIds.length)) + message.installedInventoryItemIds = []; + message.installedInventoryItemIds.push(reader.string()); + break; + case 3: + if (!(message.availableInventoryItemIds && message.availableInventoryItemIds.length)) + message.availableInventoryItemIds = []; + message.availableInventoryItemIds.push(reader.string()); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vulnerability.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vulnerability message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vulnerability.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.details != null && message.hasOwnProperty("details")) { + var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify(message.details); + if (error) + return "details." + error; + } + if (message.installedInventoryItemIds != null && message.hasOwnProperty("installedInventoryItemIds")) { + if (!Array.isArray(message.installedInventoryItemIds)) + return "installedInventoryItemIds: array expected"; + for (var i = 0; i < message.installedInventoryItemIds.length; ++i) + if (!$util.isString(message.installedInventoryItemIds[i])) + return "installedInventoryItemIds: string[] expected"; + } + if (message.availableInventoryItemIds != null && message.hasOwnProperty("availableInventoryItemIds")) { + if (!Array.isArray(message.availableInventoryItemIds)) + return "availableInventoryItemIds: array expected"; + for (var i = 0; i < message.availableInventoryItemIds.length; ++i) + if (!$util.isString(message.availableInventoryItemIds[i])) + return "availableInventoryItemIds: 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; + } + return null; + }; + + /** + * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability + */ + Vulnerability.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability(); + if (object.details != null) { + if (typeof object.details !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.details: object expected"); + message.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.fromObject(object.details); + } + if (object.installedInventoryItemIds) { + if (!Array.isArray(object.installedInventoryItemIds)) + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.installedInventoryItemIds: array expected"); + message.installedInventoryItemIds = []; + for (var i = 0; i < object.installedInventoryItemIds.length; ++i) + message.installedInventoryItemIds[i] = String(object.installedInventoryItemIds[i]); + } + if (object.availableInventoryItemIds) { + if (!Array.isArray(object.availableInventoryItemIds)) + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.availableInventoryItemIds: array expected"); + message.availableInventoryItemIds = []; + for (var i = 0; i < object.availableInventoryItemIds.length; ++i) + message.availableInventoryItemIds[i] = String(object.availableInventoryItemIds[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.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.osconfig.v1alpha.VulnerabilityReport.Vulnerability.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} message Vulnerability + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vulnerability.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.installedInventoryItemIds = []; + object.availableInventoryItemIds = []; + } + if (options.defaults) { + object.details = null; + object.createTime = null; + object.updateTime = null; + } + if (message.details != null && message.hasOwnProperty("details")) + object.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.toObject(message.details, options); + if (message.installedInventoryItemIds && message.installedInventoryItemIds.length) { + object.installedInventoryItemIds = []; + for (var j = 0; j < message.installedInventoryItemIds.length; ++j) + object.installedInventoryItemIds[j] = message.installedInventoryItemIds[j]; + } + if (message.availableInventoryItemIds && message.availableInventoryItemIds.length) { + object.availableInventoryItemIds = []; + for (var j = 0; j < message.availableInventoryItemIds.length; ++j) + object.availableInventoryItemIds[j] = message.availableInventoryItemIds[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this Vulnerability to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + * @returns {Object.} JSON object + */ + Vulnerability.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Vulnerability.Details = (function() { + + /** + * Properties of a Details. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @interface IDetails + * @property {string|null} [cve] Details cve + * @property {number|null} [cvssV2Score] Details cvssV2Score + * @property {google.cloud.osconfig.v1alpha.ICVSSv3|null} [cvssV3] Details cvssV3 + * @property {string|null} [severity] Details severity + * @property {string|null} [description] Details description + * @property {Array.|null} [references] Details references + */ + + /** + * Constructs a new Details. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @classdesc Represents a Details. + * @implements IDetails + * @constructor + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails=} [properties] Properties to set + */ + function Details(properties) { + this.references = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Details cve. + * @member {string} cve + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.cve = ""; + + /** + * Details cvssV2Score. + * @member {number} cvssV2Score + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.cvssV2Score = 0; + + /** + * Details cvssV3. + * @member {google.cloud.osconfig.v1alpha.ICVSSv3|null|undefined} cvssV3 + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.cvssV3 = null; + + /** + * Details severity. + * @member {string} severity + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.severity = ""; + + /** + * Details description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.description = ""; + + /** + * Details references. + * @member {Array.} references + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.references = $util.emptyArray; + + /** + * Creates a new Details instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details instance + */ + Details.create = function create(properties) { + return new Details(properties); + }; + + /** + * Encodes the specified Details message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails} message Details message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Details.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cve != null && Object.hasOwnProperty.call(message, "cve")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cve); + if (message.cvssV2Score != null && Object.hasOwnProperty.call(message, "cvssV2Score")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.cvssV2Score); + if (message.cvssV3 != null && Object.hasOwnProperty.call(message, "cvssV3")) + $root.google.cloud.osconfig.v1alpha.CVSSv3.encode(message.cvssV3, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.severity); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.encode(message.references[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails} message Details message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Details.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Details message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Details.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cve = reader.string(); + break; + case 2: + message.cvssV2Score = reader.float(); + break; + case 3: + message.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.decode(reader, reader.uint32()); + break; + case 4: + message.severity = reader.string(); + break; + case 5: + message.description = reader.string(); + break; + case 6: + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Details message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Details.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Details message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Details.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cve != null && message.hasOwnProperty("cve")) + if (!$util.isString(message.cve)) + return "cve: string expected"; + if (message.cvssV2Score != null && message.hasOwnProperty("cvssV2Score")) + if (typeof message.cvssV2Score !== "number") + return "cvssV2Score: number expected"; + if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) { + var error = $root.google.cloud.osconfig.v1alpha.CVSSv3.verify(message.cvssV3); + if (error) + return "cvssV3." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify(message.references[i]); + if (error) + return "references." + error; + } + } + return null; + }; + + /** + * Creates a Details message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details + */ + Details.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details(); + if (object.cve != null) + message.cve = String(object.cve); + if (object.cvssV2Score != null) + message.cvssV2Score = Number(object.cvssV2Score); + if (object.cvssV3 != null) { + if (typeof object.cvssV3 !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.cvssV3: object expected"); + message.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.fromObject(object.cvssV3); + } + if (object.severity != null) + message.severity = String(object.severity); + if (object.description != null) + message.description = String(object.description); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.references: object expected"); + message.references[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.fromObject(object.references[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Details message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} message Details + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Details.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.references = []; + if (options.defaults) { + object.cve = ""; + object.cvssV2Score = 0; + object.cvssV3 = null; + object.severity = ""; + object.description = ""; + } + if (message.cve != null && message.hasOwnProperty("cve")) + object.cve = message.cve; + if (message.cvssV2Score != null && message.hasOwnProperty("cvssV2Score")) + object.cvssV2Score = options.json && !isFinite(message.cvssV2Score) ? String(message.cvssV2Score) : message.cvssV2Score; + if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) + object.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.toObject(message.cvssV3, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.toObject(message.references[j], options); + } + return object; + }; + + /** + * Converts this Details to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + * @returns {Object.} JSON object + */ + Details.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Details.Reference = (function() { + + /** + * Properties of a Reference. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @interface IReference + * @property {string|null} [url] Reference url + */ + + /** + * Constructs a new Reference. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @classdesc Represents a Reference. + * @implements IReference + * @constructor + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference=} [properties] Properties to set + */ + function Reference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Reference url. + * @member {string} url + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @instance + */ + Reference.prototype.url = ""; + + /** + * Creates a new Reference instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference instance + */ + Reference.create = function create(properties) { + return new Reference(properties); + }; + + /** + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference} message Reference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + return writer; + }; + + /** + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference} message Reference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Reference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.url = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Reference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Reference message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Reference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates a Reference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference + */ + Reference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference(); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from a Reference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} message Reference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Reference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.url = ""; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; + + /** + * Converts this Reference to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @instance + * @returns {Object.} JSON object + */ + Reference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Reference; + })(); + + return Details; + })(); + + return Vulnerability; + })(); + + return VulnerabilityReport; + })(); + + v1alpha.GetVulnerabilityReportRequest = (function() { + + /** + * Properties of a GetVulnerabilityReportRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IGetVulnerabilityReportRequest + * @property {string|null} [name] GetVulnerabilityReportRequest name + */ + + /** + * Constructs a new GetVulnerabilityReportRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a GetVulnerabilityReportRequest. + * @implements IGetVulnerabilityReportRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest=} [properties] Properties to set + */ + function GetVulnerabilityReportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVulnerabilityReportRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @instance + */ + GetVulnerabilityReportRequest.prototype.name = ""; + + /** + * Creates a new GetVulnerabilityReportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest instance + */ + GetVulnerabilityReportRequest.create = function create(properties) { + return new GetVulnerabilityReportRequest(properties); + }; + + /** + * Encodes the specified GetVulnerabilityReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} message GetVulnerabilityReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVulnerabilityReportRequest.encode = function encode(message, writer) { + 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 GetVulnerabilityReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} message GetVulnerabilityReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVulnerabilityReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVulnerabilityReportRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVulnerabilityReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVulnerabilityReportRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVulnerabilityReportRequest.verify = function verify(message) { + if (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 GetVulnerabilityReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest + */ + GetVulnerabilityReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVulnerabilityReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} message GetVulnerabilityReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVulnerabilityReportRequest.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 GetVulnerabilityReportRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @instance + * @returns {Object.} JSON object + */ + GetVulnerabilityReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetVulnerabilityReportRequest; + })(); + + v1alpha.ListVulnerabilityReportsRequest = (function() { + + /** + * Properties of a ListVulnerabilityReportsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListVulnerabilityReportsRequest + * @property {string|null} [parent] ListVulnerabilityReportsRequest parent + * @property {number|null} [pageSize] ListVulnerabilityReportsRequest pageSize + * @property {string|null} [pageToken] ListVulnerabilityReportsRequest pageToken + * @property {string|null} [filter] ListVulnerabilityReportsRequest filter + */ + + /** + * Constructs a new ListVulnerabilityReportsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListVulnerabilityReportsRequest. + * @implements IListVulnerabilityReportsRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest=} [properties] Properties to set + */ + function ListVulnerabilityReportsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVulnerabilityReportsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + */ + ListVulnerabilityReportsRequest.prototype.parent = ""; + + /** + * ListVulnerabilityReportsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + */ + ListVulnerabilityReportsRequest.prototype.pageSize = 0; + + /** + * ListVulnerabilityReportsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + */ + ListVulnerabilityReportsRequest.prototype.pageToken = ""; + + /** + * ListVulnerabilityReportsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + */ + ListVulnerabilityReportsRequest.prototype.filter = ""; + + /** + * Creates a new ListVulnerabilityReportsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest instance + */ + ListVulnerabilityReportsRequest.create = function create(properties) { + return new ListVulnerabilityReportsRequest(properties); + }; + + /** + * Encodes the specified ListVulnerabilityReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVulnerabilityReportsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListVulnerabilityReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVulnerabilityReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVulnerabilityReportsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVulnerabilityReportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVulnerabilityReportsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVulnerabilityReportsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListVulnerabilityReportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest + */ + ListVulnerabilityReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListVulnerabilityReportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVulnerabilityReportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListVulnerabilityReportsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVulnerabilityReportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListVulnerabilityReportsRequest; + })(); + + v1alpha.ListVulnerabilityReportsResponse = (function() { + + /** + * Properties of a ListVulnerabilityReportsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListVulnerabilityReportsResponse + * @property {Array.|null} [vulnerabilityReports] ListVulnerabilityReportsResponse vulnerabilityReports + * @property {string|null} [nextPageToken] ListVulnerabilityReportsResponse nextPageToken + */ + + /** + * Constructs a new ListVulnerabilityReportsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListVulnerabilityReportsResponse. + * @implements IListVulnerabilityReportsResponse + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse=} [properties] Properties to set + */ + function ListVulnerabilityReportsResponse(properties) { + this.vulnerabilityReports = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVulnerabilityReportsResponse vulnerabilityReports. + * @member {Array.} vulnerabilityReports + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @instance + */ + ListVulnerabilityReportsResponse.prototype.vulnerabilityReports = $util.emptyArray; + + /** + * ListVulnerabilityReportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @instance + */ + ListVulnerabilityReportsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListVulnerabilityReportsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse instance + */ + ListVulnerabilityReportsResponse.create = function create(properties) { + return new ListVulnerabilityReportsResponse(properties); + }; + + /** + * Encodes the specified ListVulnerabilityReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVulnerabilityReportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vulnerabilityReports != null && message.vulnerabilityReports.length) + for (var i = 0; i < message.vulnerabilityReports.length; ++i) + $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.encode(message.vulnerabilityReports[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 ListVulnerabilityReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVulnerabilityReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVulnerabilityReportsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.vulnerabilityReports && message.vulnerabilityReports.length)) + message.vulnerabilityReports = []; + message.vulnerabilityReports.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVulnerabilityReportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVulnerabilityReportsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVulnerabilityReportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vulnerabilityReports != null && message.hasOwnProperty("vulnerabilityReports")) { + if (!Array.isArray(message.vulnerabilityReports)) + return "vulnerabilityReports: array expected"; + for (var i = 0; i < message.vulnerabilityReports.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.verify(message.vulnerabilityReports[i]); + if (error) + return "vulnerabilityReports." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListVulnerabilityReportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse + */ + ListVulnerabilityReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse(); + if (object.vulnerabilityReports) { + if (!Array.isArray(object.vulnerabilityReports)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.vulnerabilityReports: array expected"); + message.vulnerabilityReports = []; + for (var i = 0; i < object.vulnerabilityReports.length; ++i) { + if (typeof object.vulnerabilityReports[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.vulnerabilityReports: object expected"); + message.vulnerabilityReports[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.fromObject(object.vulnerabilityReports[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListVulnerabilityReportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVulnerabilityReportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.vulnerabilityReports = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.vulnerabilityReports && message.vulnerabilityReports.length) { + object.vulnerabilityReports = []; + for (var j = 0; j < message.vulnerabilityReports.length; ++j) + object.vulnerabilityReports[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.toObject(message.vulnerabilityReports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListVulnerabilityReportsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVulnerabilityReportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListVulnerabilityReportsResponse; + })(); + + v1alpha.CVSSv3 = (function() { + + /** + * Properties of a CVSSv3. + * @memberof google.cloud.osconfig.v1alpha + * @interface ICVSSv3 + * @property {number|null} [baseScore] CVSSv3 baseScore + * @property {number|null} [exploitabilityScore] CVSSv3 exploitabilityScore + * @property {number|null} [impactScore] CVSSv3 impactScore + * @property {google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|null} [attackVector] CVSSv3 attackVector + * @property {google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|null} [attackComplexity] CVSSv3 attackComplexity + * @property {google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|null} [privilegesRequired] CVSSv3 privilegesRequired + * @property {google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|null} [userInteraction] CVSSv3 userInteraction + * @property {google.cloud.osconfig.v1alpha.CVSSv3.Scope|null} [scope] CVSSv3 scope + * @property {google.cloud.osconfig.v1alpha.CVSSv3.Impact|null} [confidentialityImpact] CVSSv3 confidentialityImpact + * @property {google.cloud.osconfig.v1alpha.CVSSv3.Impact|null} [integrityImpact] CVSSv3 integrityImpact + * @property {google.cloud.osconfig.v1alpha.CVSSv3.Impact|null} [availabilityImpact] CVSSv3 availabilityImpact + */ + + /** + * Constructs a new CVSSv3. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a CVSSv3. + * @implements ICVSSv3 + * @constructor + * @param {google.cloud.osconfig.v1alpha.ICVSSv3=} [properties] Properties to set + */ + function CVSSv3(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CVSSv3 baseScore. + * @member {number} baseScore + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.baseScore = 0; + + /** + * CVSSv3 exploitabilityScore. + * @member {number} exploitabilityScore + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.exploitabilityScore = 0; + + /** + * CVSSv3 impactScore. + * @member {number} impactScore + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.impactScore = 0; + + /** + * CVSSv3 attackVector. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.AttackVector} attackVector + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.attackVector = 0; + + /** + * CVSSv3 attackComplexity. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity} attackComplexity + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.attackComplexity = 0; + + /** + * CVSSv3 privilegesRequired. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired} privilegesRequired + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.privilegesRequired = 0; + + /** + * CVSSv3 userInteraction. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction} userInteraction + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.userInteraction = 0; + + /** + * CVSSv3 scope. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.Scope} scope + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.scope = 0; + + /** + * CVSSv3 confidentialityImpact. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.Impact} confidentialityImpact + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.confidentialityImpact = 0; + + /** + * CVSSv3 integrityImpact. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.Impact} integrityImpact + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.integrityImpact = 0; + + /** + * CVSSv3 availabilityImpact. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.Impact} availabilityImpact + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.availabilityImpact = 0; + + /** + * Creates a new CVSSv3 instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {google.cloud.osconfig.v1alpha.ICVSSv3=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 instance + */ + CVSSv3.create = function create(properties) { + return new CVSSv3(properties); + }; + + /** + * Encodes the specified CVSSv3 message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {google.cloud.osconfig.v1alpha.ICVSSv3} message CVSSv3 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CVSSv3.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.baseScore); + if (message.exploitabilityScore != null && Object.hasOwnProperty.call(message, "exploitabilityScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.exploitabilityScore); + if (message.impactScore != null && Object.hasOwnProperty.call(message, "impactScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.impactScore); + if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attackVector); + if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.attackComplexity); + if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.privilegesRequired); + if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userInteraction); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scope); + if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.confidentialityImpact); + if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.integrityImpact); + if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.availabilityImpact); + return writer; + }; + + /** + * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {google.cloud.osconfig.v1alpha.ICVSSv3} message CVSSv3 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CVSSv3.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CVSSv3 message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CVSSv3.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.CVSSv3(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseScore = reader.float(); + break; + case 2: + message.exploitabilityScore = reader.float(); + break; + case 3: + message.impactScore = reader.float(); + break; + case 5: + message.attackVector = reader.int32(); + break; + case 6: + message.attackComplexity = reader.int32(); + break; + case 7: + message.privilegesRequired = reader.int32(); + break; + case 8: + message.userInteraction = reader.int32(); + break; + case 9: + message.scope = reader.int32(); + break; + case 10: + message.confidentialityImpact = reader.int32(); + break; + case 11: + message.integrityImpact = reader.int32(); + break; + case 12: + message.availabilityImpact = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CVSSv3.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CVSSv3 message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CVSSv3.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + if (typeof message.baseScore !== "number") + return "baseScore: number expected"; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + if (typeof message.exploitabilityScore !== "number") + return "exploitabilityScore: number expected"; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + if (typeof message.impactScore !== "number") + return "impactScore: number expected"; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + switch (message.attackVector) { + default: + return "attackVector: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + switch (message.attackComplexity) { + default: + return "attackComplexity: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + switch (message.privilegesRequired) { + default: + return "privilegesRequired: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + switch (message.userInteraction) { + default: + return "userInteraction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + switch (message.confidentialityImpact) { + default: + return "confidentialityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + switch (message.integrityImpact) { + default: + return "integrityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + switch (message.availabilityImpact) { + default: + return "availabilityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 + */ + CVSSv3.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.CVSSv3) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.CVSSv3(); + if (object.baseScore != null) + message.baseScore = Number(object.baseScore); + if (object.exploitabilityScore != null) + message.exploitabilityScore = Number(object.exploitabilityScore); + if (object.impactScore != null) + message.impactScore = Number(object.impactScore); + switch (object.attackVector) { + case "ATTACK_VECTOR_UNSPECIFIED": + case 0: + message.attackVector = 0; + break; + case "ATTACK_VECTOR_NETWORK": + case 1: + message.attackVector = 1; + break; + case "ATTACK_VECTOR_ADJACENT": + case 2: + message.attackVector = 2; + break; + case "ATTACK_VECTOR_LOCAL": + case 3: + message.attackVector = 3; + break; + case "ATTACK_VECTOR_PHYSICAL": + case 4: + message.attackVector = 4; + break; + } + switch (object.attackComplexity) { + case "ATTACK_COMPLEXITY_UNSPECIFIED": + case 0: + message.attackComplexity = 0; + break; + case "ATTACK_COMPLEXITY_LOW": + case 1: + message.attackComplexity = 1; + break; + case "ATTACK_COMPLEXITY_HIGH": + case 2: + message.attackComplexity = 2; + break; + } + switch (object.privilegesRequired) { + case "PRIVILEGES_REQUIRED_UNSPECIFIED": + case 0: + message.privilegesRequired = 0; + break; + case "PRIVILEGES_REQUIRED_NONE": + case 1: + message.privilegesRequired = 1; + break; + case "PRIVILEGES_REQUIRED_LOW": + case 2: + message.privilegesRequired = 2; + break; + case "PRIVILEGES_REQUIRED_HIGH": + case 3: + message.privilegesRequired = 3; + break; + } + switch (object.userInteraction) { + case "USER_INTERACTION_UNSPECIFIED": + case 0: + message.userInteraction = 0; + break; + case "USER_INTERACTION_NONE": + case 1: + message.userInteraction = 1; + break; + case "USER_INTERACTION_REQUIRED": + case 2: + message.userInteraction = 2; + break; + } + switch (object.scope) { + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "SCOPE_UNCHANGED": + case 1: + message.scope = 1; + break; + case "SCOPE_CHANGED": + case 2: + message.scope = 2; + break; + } + switch (object.confidentialityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.confidentialityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.confidentialityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.confidentialityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.confidentialityImpact = 3; + break; + } + switch (object.integrityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.integrityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.integrityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.integrityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.integrityImpact = 3; + break; + } + switch (object.availabilityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.availabilityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.availabilityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.availabilityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.availabilityImpact = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {google.cloud.osconfig.v1alpha.CVSSv3} message CVSSv3 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CVSSv3.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.baseScore = 0; + object.exploitabilityScore = 0; + object.impactScore = 0; + object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; + object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; + object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; + object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; + object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + } + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + object.exploitabilityScore = options.json && !isFinite(message.exploitabilityScore) ? String(message.exploitabilityScore) : message.exploitabilityScore; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + object.impactScore = options.json && !isFinite(message.impactScore) ? String(message.impactScore) : message.impactScore; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + object.attackVector = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector[message.attackVector] : message.attackVector; + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + object.attackComplexity = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + object.privilegesRequired = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + object.userInteraction = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Scope[message.scope] : message.scope; + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + object.confidentialityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + object.integrityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + object.availabilityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; + return object; + }; + + /** + * Converts this CVSSv3 to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + * @returns {Object.} JSON object + */ + CVSSv3.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * AttackVector enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.AttackVector + * @enum {number} + * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value + * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value + * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value + * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value + * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value + */ + CVSSv3.AttackVector = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; + values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; + values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; + values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; + return values; + })(); + + /** + * AttackComplexity enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity + * @enum {number} + * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value + * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value + * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value + */ + CVSSv3.AttackComplexity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; + values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; + return values; + })(); + + /** + * PrivilegesRequired enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired + * @enum {number} + * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value + * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value + * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value + * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value + */ + CVSSv3.PrivilegesRequired = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; + values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; + values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; + return values; + })(); + + /** + * UserInteraction enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction + * @enum {number} + * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value + * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value + * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value + */ + CVSSv3.UserInteraction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; + values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; + return values; + })(); + + /** + * Scope enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value + * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value + */ + CVSSv3.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; + values[valuesById[2] = "SCOPE_CHANGED"] = 2; + return values; + })(); + + /** + * Impact enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.Impact + * @enum {number} + * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value + * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value + * @property {number} IMPACT_LOW=2 IMPACT_LOW value + * @property {number} IMPACT_NONE=3 IMPACT_NONE value + */ + CVSSv3.Impact = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPACT_HIGH"] = 1; + values[valuesById[2] = "IMPACT_LOW"] = 2; + values[valuesById[3] = "IMPACT_NONE"] = 3; + return values; + })(); + + return CVSSv3; + })(); + + return v1alpha; + })(); + + return osconfig; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + return values; + })(); + + return api; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.DateTime = (function() { + + /** + * Properties of a DateTime. + * @memberof google.type + * @interface IDateTime + * @property {number|null} [year] DateTime year + * @property {number|null} [month] DateTime month + * @property {number|null} [day] DateTime day + * @property {number|null} [hours] DateTime hours + * @property {number|null} [minutes] DateTime minutes + * @property {number|null} [seconds] DateTime seconds + * @property {number|null} [nanos] DateTime nanos + * @property {google.protobuf.IDuration|null} [utcOffset] DateTime utcOffset + * @property {google.type.ITimeZone|null} [timeZone] DateTime timeZone + */ + + /** + * Constructs a new DateTime. + * @memberof google.type + * @classdesc Represents a DateTime. + * @implements IDateTime + * @constructor + * @param {google.type.IDateTime=} [properties] Properties to set + */ + function DateTime(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DateTime year. + * @member {number} year + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.year = 0; + + /** + * DateTime month. + * @member {number} month + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.month = 0; + + /** + * DateTime day. + * @member {number} day + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.day = 0; + + /** + * DateTime hours. + * @member {number} hours + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.hours = 0; + + /** + * DateTime minutes. + * @member {number} minutes + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.minutes = 0; + + /** + * DateTime seconds. + * @member {number} seconds + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.seconds = 0; + + /** + * DateTime nanos. + * @member {number} nanos + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.nanos = 0; + + /** + * DateTime utcOffset. + * @member {google.protobuf.IDuration|null|undefined} utcOffset + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.utcOffset = null; + + /** + * DateTime timeZone. + * @member {google.type.ITimeZone|null|undefined} timeZone + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.timeZone = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DateTime timeOffset. + * @member {"utcOffset"|"timeZone"|undefined} timeOffset + * @memberof google.type.DateTime + * @instance + */ + Object.defineProperty(DateTime.prototype, "timeOffset", { + get: $util.oneOfGetter($oneOfFields = ["utcOffset", "timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DateTime instance using the specified properties. + * @function create + * @memberof google.type.DateTime + * @static + * @param {google.type.IDateTime=} [properties] Properties to set + * @returns {google.type.DateTime} DateTime instance + */ + DateTime.create = function create(properties) { + return new DateTime(properties); + }; + + /** + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @function encode + * @memberof google.type.DateTime + * @static + * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateTime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.nanos); + if (message.utcOffset != null && Object.hasOwnProperty.call(message, "utcOffset")) + $root.google.protobuf.Duration.encode(message.utcOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.DateTime + * @static + * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateTime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateTime message from the specified reader or buffer. + * @function decode + * @memberof google.type.DateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.DateTime} DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateTime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.DateTime(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.year = reader.int32(); + break; + case 2: + message.month = reader.int32(); + break; + case 3: + message.day = reader.int32(); + break; + case 4: + message.hours = reader.int32(); + break; + case 5: + message.minutes = reader.int32(); + break; + case 6: + message.seconds = reader.int32(); + break; + case 7: + message.nanos = reader.int32(); + break; + case 8: + message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 9: + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DateTime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.DateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.DateTime} DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateTime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateTime message. + * @function verify + * @memberof google.type.DateTime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateTime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + properties.timeOffset = 1; + { + var error = $root.google.protobuf.Duration.verify(message.utcOffset); + if (error) + return "utcOffset." + error; + } + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + if (properties.timeOffset === 1) + return "timeOffset: multiple values"; + properties.timeOffset = 1; + { + var error = $root.google.type.TimeZone.verify(message.timeZone); + if (error) + return "timeZone." + error; + } + } + return null; + }; + + /** + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.DateTime + * @static + * @param {Object.} object Plain object + * @returns {google.type.DateTime} DateTime + */ + DateTime.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.DateTime) + return object; + var message = new $root.google.type.DateTime(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; + if (object.utcOffset != null) { + if (typeof object.utcOffset !== "object") + throw TypeError(".google.type.DateTime.utcOffset: object expected"); + message.utcOffset = $root.google.protobuf.Duration.fromObject(object.utcOffset); + } + if (object.timeZone != null) { + if (typeof object.timeZone !== "object") + throw TypeError(".google.type.DateTime.timeZone: object expected"); + message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); + } + return message; + }; + + /** + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.DateTime + * @static + * @param {google.type.DateTime} message DateTime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateTime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + object.utcOffset = $root.google.protobuf.Duration.toObject(message.utcOffset, options); + if (options.oneofs) + object.timeOffset = "utcOffset"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); + if (options.oneofs) + object.timeOffset = "timeZone"; + } + return object; + }; + + /** + * Converts this DateTime to JSON. + * @function toJSON + * @memberof google.type.DateTime + * @instance + * @returns {Object.} JSON object + */ + DateTime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DateTime; + })(); + + type.TimeZone = (function() { + + /** + * Properties of a TimeZone. + * @memberof google.type + * @interface ITimeZone + * @property {string|null} [id] TimeZone id + * @property {string|null} [version] TimeZone version + */ + + /** + * Constructs a new TimeZone. + * @memberof google.type + * @classdesc Represents a TimeZone. + * @implements ITimeZone + * @constructor + * @param {google.type.ITimeZone=} [properties] Properties to set + */ + function TimeZone(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeZone id. + * @member {string} id + * @memberof google.type.TimeZone + * @instance + */ + TimeZone.prototype.id = ""; + + /** + * TimeZone version. + * @member {string} version + * @memberof google.type.TimeZone + * @instance + */ + TimeZone.prototype.version = ""; + + /** + * Creates a new TimeZone instance using the specified properties. + * @function create + * @memberof google.type.TimeZone + * @static + * @param {google.type.ITimeZone=} [properties] Properties to set + * @returns {google.type.TimeZone} TimeZone instance + */ + TimeZone.create = function create(properties) { + return new TimeZone(properties); + }; + + /** + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @function encode + * @memberof google.type.TimeZone + * @static + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeZone.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + return writer; + }; + + /** + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.TimeZone + * @static + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeZone.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeZone message from the specified reader or buffer. + * @function decode + * @memberof google.type.TimeZone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.TimeZone} TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeZone.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeZone(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.TimeZone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.TimeZone} TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeZone.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeZone message. + * @function verify + * @memberof google.type.TimeZone + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeZone.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.TimeZone + * @static + * @param {Object.} object Plain object + * @returns {google.type.TimeZone} TimeZone + */ + TimeZone.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeZone) + return object; + var message = new $root.google.type.TimeZone(); + if (object.id != null) + message.id = String(object.id); + if (object.version != null) + message.version = String(object.version); + return message; + }; - return osconfig; - })(); + /** + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.TimeZone + * @static + * @param {google.type.TimeZone} message TimeZone + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeZone.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.version = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; - return cloud; - })(); + /** + * Converts this TimeZone to JSON. + * @function toJSON + * @memberof google.type.TimeZone + * @instance + * @returns {Object.} JSON object + */ + TimeZone.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - google.api = (function() { + return TimeZone; + })(); /** - * Namespace api. - * @memberof google - * @namespace + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value */ - var api = {}; + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); - api.Http = (function() { + type.TimeOfDay = (function() { /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * Properties of a TimeOfDay. + * @memberof google.type + * @interface ITimeOfDay + * @property {number|null} [hours] TimeOfDay hours + * @property {number|null} [minutes] TimeOfDay minutes + * @property {number|null} [seconds] TimeOfDay seconds + * @property {number|null} [nanos] TimeOfDay nanos */ /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * Constructs a new TimeOfDay. + * @memberof google.type + * @classdesc Represents a TimeOfDay. + * @implements ITimeOfDay * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.type.ITimeOfDay=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function TimeOfDay(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22879,91 +43763,114 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * TimeOfDay hours. + * @member {number} hours + * @memberof google.type.TimeOfDay * @instance */ - Http.prototype.rules = $util.emptyArray; + TimeOfDay.prototype.hours = 0; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * TimeOfDay minutes. + * @member {number} minutes + * @memberof google.type.TimeOfDay * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + TimeOfDay.prototype.minutes = 0; /** - * Creates a new Http instance using the specified properties. + * TimeOfDay seconds. + * @member {number} seconds + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.seconds = 0; + + /** + * TimeOfDay nanos. + * @member {number} nanos + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.nanos = 0; + + /** + * Creates a new TimeOfDay instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.type.TimeOfDay * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @returns {google.type.TimeOfDay} TimeOfDay instance */ - Http.create = function create(properties) { - return new Http(properties); + TimeOfDay.create = function create(properties) { + return new TimeOfDay(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.type.TimeOfDay * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + TimeOfDay.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.type.TimeOfDay * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a TimeOfDay message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.type.TimeOfDay * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.type.TimeOfDay} TimeOfDay * @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) { + TimeOfDay.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.hours = reader.int32(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.minutes = reader.int32(); + break; + case 3: + message.seconds = reader.int32(); + break; + case 4: + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -22974,353 +43881,490 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.type.TimeOfDay * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.type.TimeOfDay} TimeOfDay * @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) { + TimeOfDay.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a TimeOfDay message. * @function verify - * @memberof google.api.Http + * @memberof google.type.TimeOfDay * @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) { + TimeOfDay.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.type.TimeOfDay * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.type.TimeOfDay} TimeOfDay */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + TimeOfDay.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeOfDay) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + var message = new $root.google.type.TimeOfDay(); + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.type.TimeOfDay * @static - * @param {google.api.Http} message Http + * @param {google.type.TimeOfDay} message TimeOfDay * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + TimeOfDay.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.defaults) { + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this Http to JSON. + * Converts this TimeOfDay to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.type.TimeOfDay * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + TimeOfDay.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return TimeOfDay; })(); - api.HttpRule = (function() { + return type; + })(); - /** - * 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 - */ + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @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 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]]; + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule + * 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 */ - HttpRule.prototype.selector = ""; + 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" }); /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - HttpRule.prototype.get = null; /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule + * 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 */ - HttpRule.prototype.put = null; + 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" }); /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - HttpRule.prototype.post = null; /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule + * 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 */ - HttpRule.prototype["delete"] = null; + 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" }); /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - HttpRule.prototype.patch = null; /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule + * 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 */ - HttpRule.prototype.custom = null; + 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" }); /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - HttpRule.prototype.body = ""; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule + * 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 */ - HttpRule.prototype.responseBody = ""; + 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" }); /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return Operations; + })(); + + longrunning.Operation = (function() { /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * 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 */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + Operation.prototype.name = ""; /** - * 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 + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; + Operation.prototype.metadata = null; /** - * 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 + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance */ - 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); + 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 HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.longrunning.Operation * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.longrunning.IOperation} message Operation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + Operation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an Operation message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.api.HttpRule} HttpRule + * @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 */ - HttpRule.decode = function decode(reader, length) { + Operation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.name = reader.string(); break; case 2: - message.get = reader.string(); + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); break; case 3: - message.put = reader.string(); + message.done = reader.bool(); break; case 4: - message.post = reader.string(); + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); break; case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -23331,240 +44375,358 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an Operation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.longrunning.Operation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @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 */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + Operation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies an Operation message. * @function verify - * @memberof google.api.HttpRule + * @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 */ - HttpRule.verify = function verify(message) { + Operation.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.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.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; + 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.api.CustomHttpPattern.verify(message.custom); + var error = $root.google.rpc.Status.verify(message.error); if (error) - return "custom." + error; + return "error." + 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 (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 "additionalBindings." + error; + return "response." + error; } } return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates an Operation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.longrunning.Operation * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.longrunning.Operation} Operation */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) 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); + 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.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]); + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * 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.api.HttpRule + * @memberof google.longrunning.GetOperationRequest * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + GetOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this GetOperationRequest to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.longrunning.GetOperationRequest * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + GetOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return GetOperationRequest; })(); - api.CustomHttpPattern = (function() { + longrunning.ListOperationsRequest = (function() { /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * Properties of a 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 CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function ListOperationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23572,88 +44734,114 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest * @instance */ - CustomHttpPattern.prototype.kind = ""; + ListOperationsRequest.prototype.name = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest * @instance */ - CustomHttpPattern.prototype.path = ""; + ListOperationsRequest.prototype.filter = ""; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * 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.api.CustomHttpPattern + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + ListOperationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.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 CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a ListOperationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @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.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decode = function decode(reader, length) { + ListOperationsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; case 1: - message.kind = reader.string(); + message.filter = reader.string(); break; case 2: - message.path = reader.string(); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -23664,292 +44852,226 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.longrunning.ListOperationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a ListOperationsRequest message. * @function verify - * @memberof google.api.CustomHttpPattern + * @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 */ - CustomHttpPattern.verify = function verify(message) { + ListOperationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.longrunning.ListOperationsRequest * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.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 CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + ListOperationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + 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 CustomHttpPattern to JSON. + * Converts this ListOperationsRequest to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.longrunning.ListOperationsRequest * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + ListOperationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + return ListOperationsRequest; })(); - 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 + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken */ - ResourceDescriptor.prototype.history = 0; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set */ - ResourceDescriptor.prototype.plural = ""; + 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]]; + } /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse * @instance */ - ResourceDescriptor.prototype.singular = ""; + ListOperationsResponse.prototype.operations = $util.emptyArray; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + ListOperationsResponse.prototype.nextPageToken = ""; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new ListOperationsResponse instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.longrunning.ListOperationsResponse * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.longrunning.ListOperationsResponse * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + ListOperationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } + if (message.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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.longrunning.ListOperationsResponse * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a ListOperationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decode = function decode(reader, length) { + ListOperationsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -23960,246 +45082,133 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.longrunning.ListOperationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a ListOperationsResponse message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + ListOperationsResponse.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.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.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.longrunning.ListOperationsResponse * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } + var message = new $root.google.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 ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.longrunning.ListOperationsResponse * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + ListOperationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + 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 ResourceDescriptor to JSON. + * Converts this ListOperationsResponse to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.longrunning.ListOperationsResponse * @instance * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ResourceDescriptor; + return ListOperationsResponse; })(); - api.ResourceReference = (function() { + longrunning.CancelOperationRequest = (function() { /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name */ /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set */ - function ResourceReference(properties) { + function CancelOperationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24207,88 +45216,75 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest * @instance */ - ResourceReference.prototype.childType = ""; + CancelOperationRequest.prototype.name = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CancelOperationRequest instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CancelOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CancelOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decode = function decode(reader, length) { + CancelOperationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -24299,160 +45295,107 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.longrunning.CancelOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CancelOperationRequest message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.verify = function verify(message) { + CancelOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.longrunning.CancelOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CancelOperationRequest.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; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CancelOperationRequest to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.longrunning.CancelOperationRequest * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CancelOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - return values; + return CancelOperationRequest; })(); - return api; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.DateTime = (function() { + longrunning.DeleteOperationRequest = (function() { /** - * Properties of a DateTime. - * @memberof google.type - * @interface IDateTime - * @property {number|null} [year] DateTime year - * @property {number|null} [month] DateTime month - * @property {number|null} [day] DateTime day - * @property {number|null} [hours] DateTime hours - * @property {number|null} [minutes] DateTime minutes - * @property {number|null} [seconds] DateTime seconds - * @property {number|null} [nanos] DateTime nanos - * @property {google.protobuf.IDuration|null} [utcOffset] DateTime utcOffset - * @property {google.type.ITimeZone|null} [timeZone] DateTime timeZone + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name */ /** - * Constructs a new DateTime. - * @memberof google.type - * @classdesc Represents a DateTime. - * @implements IDateTime + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest * @constructor - * @param {google.type.IDateTime=} [properties] Properties to set + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set */ - function DateTime(properties) { + function DeleteOperationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24460,193 +45403,276 @@ } /** - * DateTime year. - * @member {number} year - * @memberof google.type.DateTime + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest * @instance */ - DateTime.prototype.year = 0; + DeleteOperationRequest.prototype.name = ""; /** - * DateTime month. - * @member {number} month - * @memberof google.type.DateTime - * @instance + * 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 */ - DateTime.prototype.month = 0; + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; /** - * DateTime day. - * @member {number} day - * @memberof google.type.DateTime - * @instance + * 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 */ - DateTime.prototype.day = 0; + 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; + }; /** - * DateTime hours. - * @member {number} hours - * @memberof google.type.DateTime - * @instance + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest */ - DateTime.prototype.hours = 0; + 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; + }; /** - * DateTime minutes. - * @member {number} minutes - * @memberof google.type.DateTime - * @instance + * 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 */ - DateTime.prototype.minutes = 0; + 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; + }; /** - * DateTime seconds. - * @member {number} seconds - * @memberof google.type.DateTime + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest * @instance + * @returns {Object.} JSON object */ - DateTime.prototype.seconds = 0; + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { /** - * DateTime nanos. - * @member {number} nanos - * @memberof google.type.DateTime - * @instance + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout */ - DateTime.prototype.nanos = 0; /** - * DateTime utcOffset. - * @member {google.protobuf.IDuration|null|undefined} utcOffset - * @memberof google.type.DateTime - * @instance + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set */ - DateTime.prototype.utcOffset = null; + 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]]; + } /** - * DateTime timeZone. - * @member {google.type.ITimeZone|null|undefined} timeZone - * @memberof google.type.DateTime + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest * @instance */ - DateTime.prototype.timeZone = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + WaitOperationRequest.prototype.name = ""; /** - * DateTime timeOffset. - * @member {"utcOffset"|"timeZone"|undefined} timeOffset - * @memberof google.type.DateTime + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest * @instance */ - Object.defineProperty(DateTime.prototype, "timeOffset", { - get: $util.oneOfGetter($oneOfFields = ["utcOffset", "timeZone"]), - set: $util.oneOfSetter($oneOfFields) - }); + WaitOperationRequest.prototype.timeout = null; /** - * Creates a new DateTime instance using the specified properties. + * Creates a new WaitOperationRequest instance using the specified properties. * @function create - * @memberof google.type.DateTime + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.type.IDateTime=} [properties] Properties to set - * @returns {google.type.DateTime} DateTime instance + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance */ - DateTime.create = function create(properties) { - return new DateTime(properties); + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); }; /** - * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. * @function encode - * @memberof google.type.DateTime + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DateTime.encode = function encode(message, writer) { + WaitOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); - if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hours); - if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minutes); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.nanos); - if (message.utcOffset != null && Object.hasOwnProperty.call(message, "utcOffset")) - $root.google.protobuf.Duration.encode(message.utcOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + 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 DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.DateTime + * @memberof google.longrunning.WaitOperationRequest * @static - * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DateTime.encodeDelimited = function encodeDelimited(message, writer) { + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DateTime message from the specified reader or buffer. + * Decodes a WaitOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.type.DateTime + * @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.type.DateTime} DateTime + * @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 */ - DateTime.decode = function decode(reader, length) { + WaitOperationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.DateTime(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.year = reader.int32(); + message.name = reader.string(); break; case 2: - message.month = reader.int32(); - break; - case 3: - message.day = reader.int32(); - break; - case 4: - message.hours = reader.int32(); - break; - case 5: - message.minutes = reader.int32(); - break; - case 6: - message.seconds = reader.int32(); - break; - case 7: - message.nanos = reader.int32(); - break; - case 8: - message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 9: - message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -24657,196 +45683,122 @@ }; /** - * Decodes a DateTime message from the specified reader or buffer, length delimited. + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.DateTime + * @memberof google.longrunning.WaitOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.DateTime} DateTime + * @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 */ - DateTime.decodeDelimited = function decodeDelimited(reader) { + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DateTime message. + * Verifies a WaitOperationRequest message. * @function verify - * @memberof google.type.DateTime + * @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 */ - DateTime.verify = function verify(message) { + WaitOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; - if (message.hours != null && message.hasOwnProperty("hours")) - if (!$util.isInteger(message.hours)) - return "hours: integer expected"; - if (message.minutes != null && message.hasOwnProperty("minutes")) - if (!$util.isInteger(message.minutes)) - return "minutes: integer expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds)) - return "seconds: integer expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { - properties.timeOffset = 1; - { - var error = $root.google.protobuf.Duration.verify(message.utcOffset); - if (error) - return "utcOffset." + error; - } - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - if (properties.timeOffset === 1) - return "timeOffset: multiple values"; - properties.timeOffset = 1; - { - var error = $root.google.type.TimeZone.verify(message.timeZone); - if (error) - return "timeZone." + error; - } + 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 DateTime message from a plain object. Also converts values to their respective internal types. + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.DateTime + * @memberof google.longrunning.WaitOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.type.DateTime} DateTime + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest */ - DateTime.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.DateTime) + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) return object; - var message = new $root.google.type.DateTime(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; - if (object.hours != null) - message.hours = object.hours | 0; - if (object.minutes != null) - message.minutes = object.minutes | 0; - if (object.seconds != null) - message.seconds = object.seconds | 0; - if (object.nanos != null) - message.nanos = object.nanos | 0; - if (object.utcOffset != null) { - if (typeof object.utcOffset !== "object") - throw TypeError(".google.type.DateTime.utcOffset: object expected"); - message.utcOffset = $root.google.protobuf.Duration.fromObject(object.utcOffset); - } - if (object.timeZone != null) { - if (typeof object.timeZone !== "object") - throw TypeError(".google.type.DateTime.timeZone: object expected"); - message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); + 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 DateTime message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.DateTime - * @static - * @param {google.type.DateTime} message DateTime - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DateTime.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - object.hours = 0; - object.minutes = 0; - object.seconds = 0; - object.nanos = 0; - } - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; - if (message.hours != null && message.hasOwnProperty("hours")) - object.hours = message.hours; - if (message.minutes != null && message.hasOwnProperty("minutes")) - object.minutes = message.minutes; - if (message.seconds != null && message.hasOwnProperty("seconds")) - object.seconds = message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { - object.utcOffset = $root.google.protobuf.Duration.toObject(message.utcOffset, options); - if (options.oneofs) - object.timeOffset = "utcOffset"; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); - if (options.oneofs) - object.timeOffset = "timeZone"; + + /** + * 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 DateTime to JSON. + * Converts this WaitOperationRequest to JSON. * @function toJSON - * @memberof google.type.DateTime + * @memberof google.longrunning.WaitOperationRequest * @instance * @returns {Object.} JSON object */ - DateTime.prototype.toJSON = function toJSON() { + WaitOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DateTime; + return WaitOperationRequest; })(); - type.TimeZone = (function() { + longrunning.OperationInfo = (function() { /** - * Properties of a TimeZone. - * @memberof google.type - * @interface ITimeZone - * @property {string|null} [id] TimeZone id - * @property {string|null} [version] TimeZone version + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType */ /** - * Constructs a new TimeZone. - * @memberof google.type - * @classdesc Represents a TimeZone. - * @implements ITimeZone + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo * @constructor - * @param {google.type.ITimeZone=} [properties] Properties to set + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set */ - function TimeZone(properties) { + function OperationInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24854,88 +45806,88 @@ } /** - * TimeZone id. - * @member {string} id - * @memberof google.type.TimeZone + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo * @instance */ - TimeZone.prototype.id = ""; + OperationInfo.prototype.responseType = ""; /** - * TimeZone version. - * @member {string} version - * @memberof google.type.TimeZone + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo * @instance */ - TimeZone.prototype.version = ""; + OperationInfo.prototype.metadataType = ""; /** - * Creates a new TimeZone instance using the specified properties. + * Creates a new OperationInfo instance using the specified properties. * @function create - * @memberof google.type.TimeZone + * @memberof google.longrunning.OperationInfo * @static - * @param {google.type.ITimeZone=} [properties] Properties to set - * @returns {google.type.TimeZone} TimeZone instance + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance */ - TimeZone.create = function create(properties) { - return new TimeZone(properties); + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); }; /** - * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. * @function encode - * @memberof google.type.TimeZone + * @memberof google.longrunning.OperationInfo * @static - * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeZone.encode = function encode(message, writer) { + OperationInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + 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 TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.TimeZone + * @memberof google.longrunning.OperationInfo * @static - * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeZone.encodeDelimited = function encodeDelimited(message, writer) { + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeZone message from the specified reader or buffer. + * Decodes an OperationInfo message from the specified reader or buffer. * @function decode - * @memberof google.type.TimeZone + * @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.type.TimeZone} TimeZone + * @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 */ - TimeZone.decode = function decode(reader, length) { + OperationInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeZone(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.responseType = reader.string(); break; case 2: - message.version = reader.string(); + message.metadataType = reader.string(); break; default: reader.skipType(tag & 7); @@ -24946,145 +45898,131 @@ }; /** - * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.TimeZone + * @memberof google.longrunning.OperationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.TimeZone} TimeZone + * @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 */ - TimeZone.decodeDelimited = function decodeDelimited(reader) { + OperationInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeZone message. + * Verifies an OperationInfo message. * @function verify - * @memberof google.type.TimeZone + * @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 */ - TimeZone.verify = function verify(message) { + OperationInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string 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 a TimeZone message from a plain object. Also converts values to their respective internal types. + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.TimeZone + * @memberof google.longrunning.OperationInfo * @static * @param {Object.} object Plain object - * @returns {google.type.TimeZone} TimeZone + * @returns {google.longrunning.OperationInfo} OperationInfo */ - TimeZone.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.TimeZone) + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) return object; - var message = new $root.google.type.TimeZone(); - if (object.id != null) - message.id = String(object.id); - if (object.version != null) - message.version = String(object.version); + 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 a TimeZone message. Also converts values to other types if specified. + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.TimeZone + * @memberof google.longrunning.OperationInfo * @static - * @param {google.type.TimeZone} message TimeZone + * @param {google.longrunning.OperationInfo} message OperationInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeZone.toObject = function toObject(message, options) { + OperationInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.id = ""; - object.version = ""; + object.responseType = ""; + object.metadataType = ""; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; + 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 TimeZone to JSON. + * Converts this OperationInfo to JSON. * @function toJSON - * @memberof google.type.TimeZone + * @memberof google.longrunning.OperationInfo * @instance * @returns {Object.} JSON object */ - TimeZone.prototype.toJSON = function toJSON() { + OperationInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeZone; + return OperationInfo; })(); + return longrunning; + })(); + + google.rpc = (function() { + /** - * DayOfWeek enum. - * @name google.type.DayOfWeek - * @enum {number} - * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value - * @property {number} MONDAY=1 MONDAY value - * @property {number} TUESDAY=2 TUESDAY value - * @property {number} WEDNESDAY=3 WEDNESDAY value - * @property {number} THURSDAY=4 THURSDAY value - * @property {number} FRIDAY=5 FRIDAY value - * @property {number} SATURDAY=6 SATURDAY value - * @property {number} SUNDAY=7 SUNDAY value + * Namespace rpc. + * @memberof google + * @namespace */ - type.DayOfWeek = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; - values[valuesById[1] = "MONDAY"] = 1; - values[valuesById[2] = "TUESDAY"] = 2; - values[valuesById[3] = "WEDNESDAY"] = 3; - values[valuesById[4] = "THURSDAY"] = 4; - values[valuesById[5] = "FRIDAY"] = 5; - values[valuesById[6] = "SATURDAY"] = 6; - values[valuesById[7] = "SUNDAY"] = 7; - return values; - })(); + var rpc = {}; - type.TimeOfDay = (function() { + rpc.Status = (function() { /** - * Properties of a TimeOfDay. - * @memberof google.type - * @interface ITimeOfDay - * @property {number|null} [hours] TimeOfDay hours - * @property {number|null} [minutes] TimeOfDay minutes - * @property {number|null} [seconds] TimeOfDay seconds - * @property {number|null} [nanos] TimeOfDay nanos + * 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 TimeOfDay. - * @memberof google.type - * @classdesc Represents a TimeOfDay. - * @implements ITimeOfDay + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function TimeOfDay(properties) { + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25092,114 +46030,104 @@ } /** - * TimeOfDay hours. - * @member {number} hours - * @memberof google.type.TimeOfDay - * @instance - */ - TimeOfDay.prototype.hours = 0; - - /** - * TimeOfDay minutes. - * @member {number} minutes - * @memberof google.type.TimeOfDay + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - TimeOfDay.prototype.minutes = 0; + Status.prototype.code = 0; /** - * TimeOfDay seconds. - * @member {number} seconds - * @memberof google.type.TimeOfDay + * Status message. + * @member {string} message + * @memberof google.rpc.Status * @instance */ - TimeOfDay.prototype.seconds = 0; + Status.prototype.message = ""; /** - * TimeOfDay nanos. - * @member {number} nanos - * @memberof google.type.TimeOfDay + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status * @instance */ - TimeOfDay.prototype.nanos = 0; + Status.prototype.details = $util.emptyArray; /** - * Creates a new TimeOfDay instance using the specified properties. + * Creates a new Status instance using the specified properties. * @function create - * @memberof google.type.TimeOfDay + * @memberof google.rpc.Status * @static - * @param {google.type.ITimeOfDay=} [properties] Properties to set - * @returns {google.type.TimeOfDay} TimeOfDay instance + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance */ - TimeOfDay.create = function create(properties) { - return new TimeOfDay(properties); + Status.create = function create(properties) { + return new Status(properties); }; /** - * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encode - * @memberof google.type.TimeOfDay + * @memberof google.rpc.Status * @static - * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeOfDay.encode = function encode(message, writer) { + Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); - if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); + 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 TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.TimeOfDay + * @memberof google.rpc.Status * @static - * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { + Status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeOfDay message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @function decode - * @memberof google.type.TimeOfDay + * @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.type.TimeOfDay} TimeOfDay + * @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 */ - TimeOfDay.decode = function decode(reader, length) { + Status.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.hours = reader.int32(); + message.code = reader.int32(); break; case 2: - message.minutes = reader.int32(); + message.message = reader.string(); break; case 3: - message.seconds = reader.int32(); - break; - case 4: - message.nanos = reader.int32(); + 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); @@ -25210,115 +46138,125 @@ }; /** - * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.TimeOfDay + * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.TimeOfDay} TimeOfDay + * @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 */ - TimeOfDay.decodeDelimited = function decodeDelimited(reader) { + Status.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeOfDay message. + * Verifies a Status message. * @function verify - * @memberof google.type.TimeOfDay + * @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 */ - TimeOfDay.verify = function verify(message) { + Status.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hours != null && message.hasOwnProperty("hours")) - if (!$util.isInteger(message.hours)) - return "hours: integer expected"; - if (message.minutes != null && message.hasOwnProperty("minutes")) - if (!$util.isInteger(message.minutes)) - return "minutes: integer expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds)) - return "seconds: integer expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer 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 TimeOfDay message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.TimeOfDay + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.type.TimeOfDay} TimeOfDay + * @returns {google.rpc.Status} Status */ - TimeOfDay.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.TimeOfDay) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) return object; - var message = new $root.google.type.TimeOfDay(); - if (object.hours != null) - message.hours = object.hours | 0; - if (object.minutes != null) - message.minutes = object.minutes | 0; - if (object.seconds != null) - message.seconds = object.seconds | 0; - if (object.nanos != null) - message.nanos = object.nanos | 0; + 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 TimeOfDay message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.TimeOfDay + * @memberof google.rpc.Status * @static - * @param {google.type.TimeOfDay} message TimeOfDay + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeOfDay.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.details = []; if (options.defaults) { - object.hours = 0; - object.minutes = 0; - object.seconds = 0; - object.nanos = 0; + 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); } - if (message.hours != null && message.hasOwnProperty("hours")) - object.hours = message.hours; - if (message.minutes != null && message.hasOwnProperty("minutes")) - object.minutes = message.minutes; - if (message.seconds != null && message.hasOwnProperty("seconds")) - object.seconds = message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this TimeOfDay to JSON. + * Converts this Status to JSON. * @function toJSON - * @memberof google.type.TimeOfDay + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - TimeOfDay.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeOfDay; + return Status; })(); - return type; + return rpc; })(); return google; diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index ed59e27b73a..a3ac126651e 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -923,6 +923,27 @@ }, "Empty": { "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } } } }, @@ -2373,246 +2394,2244 @@ } } } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "FieldBehaviorProto", - "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" - }, - "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 - } - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6 - } - } - } - }, - "type": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/type/timeofday;timeofday", - "java_multiple_files": true, - "java_outer_classname": "TimeOfDayProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "DateTime": { - "oneofs": { - "timeOffset": { - "oneof": [ - "utcOffset", - "timeZone" - ] - } - }, - "fields": { - "year": { - "type": "int32", - "id": 1 }, - "month": { - "type": "int32", + "v1alpha": { + "options": { + "csharp_namespace": "Google.Cloud.OsConfig.V1Alpha", + "go_package": "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig", + "java_outer_classname": "VulnerabilityProto", + "java_package": "com.google.cloud.osconfig.v1alpha", + "java_multiple_files": true, + "php_namespace": "Google\\Cloud\\OsConfig\\V1alpha", + "ruby_package": "Google::Cloud::OsConfig::V1alpha", + "(google.api.resource_definition).type": "compute.googleapis.com/Instance", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/instances/{instance}" + }, + "nested": { + "OSPolicyResourceConfigStep": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "outcome": { + "type": "Outcome", + "id": 2 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "VALIDATION": 1, + "DESIRED_STATE_CHECK": 2, + "DESIRED_STATE_ENFORCEMENT": 3, + "DESIRED_STATE_CHECK_POST_ENFORCEMENT": 4 + } + }, + "Outcome": { + "values": { + "OUTCOME_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2 + } + } + } + }, + "OSPolicyResourceCompliance": { + "fields": { + "osPolicyResourceId": { + "type": "string", + "id": 1 + }, + "configSteps": { + "rule": "repeated", + "type": "OSPolicyResourceConfigStep", + "id": 2 + }, + "state": { + "type": "OSPolicyComplianceState", + "id": 3 + } + } + }, + "OSPolicyComplianceState": { + "values": { + "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": 0, + "COMPLIANT": 1, + "NON_COMPLIANT": 2, + "UNKNOWN": 3, + "NO_OS_POLICIES_APPLICABLE": 4 + } + }, + "InstanceOSPoliciesCompliance": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/InstanceOSPoliciesCompliance", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instance": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "OSPolicyComplianceState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "detailedState": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "detailedStateReason": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "osPolicyCompliances": { + "rule": "repeated", + "type": "OSPolicyCompliance", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastComplianceCheckTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastComplianceRunId": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "OSPolicyCompliance": { + "fields": { + "osPolicyId": { + "type": "string", + "id": 1 + }, + "osPolicyAssignment": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + }, + "state": { + "type": "OSPolicyComplianceState", + "id": 4 + }, + "osPolicyResourceCompliances": { + "rule": "repeated", + "type": "OSPolicyResourceCompliance", + "id": 5 + } + } + } + } + }, + "GetInstanceOSPoliciesComplianceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/InstanceOSPoliciesCompliance" + } + } + } + }, + "ListInstanceOSPoliciesCompliancesRequest": { + "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 + } + } + }, + "ListInstanceOSPoliciesCompliancesResponse": { + "fields": { + "instanceOsPoliciesCompliances": { + "rule": "repeated", + "type": "InstanceOSPoliciesCompliance", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "Inventory": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/Inventory", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/inventory" + }, + "fields": { + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "osInfo": { + "type": "OsInfo", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "items": { + "keyType": "string", + "type": "Item", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "OsInfo": { + "fields": { + "hostname": { + "type": "string", + "id": 9 + }, + "longName": { + "type": "string", + "id": 2 + }, + "shortName": { + "type": "string", + "id": 3 + }, + "version": { + "type": "string", + "id": 4 + }, + "architecture": { + "type": "string", + "id": 5 + }, + "kernelVersion": { + "type": "string", + "id": 6 + }, + "kernelRelease": { + "type": "string", + "id": 7 + }, + "osconfigAgentVersion": { + "type": "string", + "id": 8 + } + } + }, + "Item": { + "oneofs": { + "details": { + "oneof": [ + "installedPackage", + "availablePackage" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "originType": { + "type": "OriginType", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "type": { + "type": "Type", + "id": 5 + }, + "installedPackage": { + "type": "SoftwarePackage", + "id": 6 + }, + "availablePackage": { + "type": "SoftwarePackage", + "id": 7 + } + }, + "nested": { + "OriginType": { + "values": { + "ORIGIN_TYPE_UNSPECIFIED": 0, + "INVENTORY_REPORT": 1 + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "INSTALLED_PACKAGE": 1, + "AVAILABLE_PACKAGE": 2 + } + } + } + }, + "SoftwarePackage": { + "oneofs": { + "details": { + "oneof": [ + "yumPackage", + "aptPackage", + "zypperPackage", + "googetPackage", + "zypperPatch", + "wuaPackage", + "qfePackage", + "cosPackage" + ] + } + }, + "fields": { + "yumPackage": { + "type": "VersionedPackage", + "id": 1 + }, + "aptPackage": { + "type": "VersionedPackage", + "id": 2 + }, + "zypperPackage": { + "type": "VersionedPackage", + "id": 3 + }, + "googetPackage": { + "type": "VersionedPackage", + "id": 4 + }, + "zypperPatch": { + "type": "ZypperPatch", + "id": 5 + }, + "wuaPackage": { + "type": "WindowsUpdatePackage", + "id": 6 + }, + "qfePackage": { + "type": "WindowsQuickFixEngineeringPackage", + "id": 7 + }, + "cosPackage": { + "type": "VersionedPackage", + "id": 8 + } + } + }, + "VersionedPackage": { + "fields": { + "packageName": { + "type": "string", + "id": 4 + }, + "architecture": { + "type": "string", + "id": 2 + }, + "version": { + "type": "string", + "id": 3 + } + } + }, + "ZypperPatch": { + "fields": { + "patchName": { + "type": "string", + "id": 5 + }, + "category": { + "type": "string", + "id": 2 + }, + "severity": { + "type": "string", + "id": 3 + }, + "summary": { + "type": "string", + "id": 4 + } + } + }, + "WindowsUpdatePackage": { + "fields": { + "title": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "categories": { + "rule": "repeated", + "type": "WindowsUpdateCategory", + "id": 3 + }, + "kbArticleIds": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "supportUrl": { + "type": "string", + "id": 11 + }, + "moreInfoUrls": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "updateId": { + "type": "string", + "id": 6 + }, + "revisionNumber": { + "type": "int32", + "id": 7 + }, + "lastDeploymentChangeTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + } + }, + "nested": { + "WindowsUpdateCategory": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + } + } + } + } + }, + "WindowsQuickFixEngineeringPackage": { + "fields": { + "caption": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "hotFixId": { + "type": "string", + "id": 3 + }, + "installTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + } + } + } + }, + "GetInventoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/Inventory" + } + }, + "view": { + "type": "InventoryView", + "id": 2 + } + } + }, + "ListInventoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/Instance" + } + }, + "view": { + "type": "InventoryView", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListInventoriesResponse": { + "fields": { + "inventories": { + "rule": "repeated", + "type": "Inventory", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "InventoryView": { + "values": { + "INVENTORY_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2 + } + }, + "OSPolicy": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2 + }, + "mode": { + "type": "Mode", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resourceGroups": { + "rule": "repeated", + "type": "ResourceGroup", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "allowNoResourceGroupMatch": { + "type": "bool", + "id": 5 + } + }, + "nested": { + "OSFilter": { + "fields": { + "osShortName": { + "type": "string", + "id": 1 + }, + "osVersion": { + "type": "string", + "id": 2 + } + } + }, + "Resource": { + "oneofs": { + "resourceType": { + "oneof": [ + "pkg", + "repository", + "exec", + "file" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pkg": { + "type": "PackageResource", + "id": 2 + }, + "repository": { + "type": "RepositoryResource", + "id": 3 + }, + "exec": { + "type": "ExecResource", + "id": 4 + }, + "file": { + "type": "FileResource", + "id": 5 + } + }, + "nested": { + "File": { + "oneofs": { + "type": { + "oneof": [ + "remote", + "gcs", + "localPath" + ] + } + }, + "fields": { + "remote": { + "type": "Remote", + "id": 1 + }, + "gcs": { + "type": "Gcs", + "id": 2 + }, + "localPath": { + "type": "string", + "id": 3 + }, + "allowInsecure": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "Remote": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sha256Checksum": { + "type": "string", + "id": 2 + } + } + }, + "Gcs": { + "fields": { + "bucket": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "object": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "generation": { + "type": "int64", + "id": 3 + } + } + } + } + }, + "PackageResource": { + "oneofs": { + "systemPackage": { + "oneof": [ + "apt", + "deb", + "yum", + "zypper", + "rpm", + "googet", + "msi" + ] + } + }, + "fields": { + "desiredState": { + "type": "DesiredState", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "apt": { + "type": "APT", + "id": 2 + }, + "deb": { + "type": "Deb", + "id": 3 + }, + "yum": { + "type": "YUM", + "id": 4 + }, + "zypper": { + "type": "Zypper", + "id": 5 + }, + "rpm": { + "type": "RPM", + "id": 6 + }, + "googet": { + "type": "GooGet", + "id": 7 + }, + "msi": { + "type": "MSI", + "id": 8 + } + }, + "nested": { + "Deb": { + "fields": { + "source": { + "type": "File", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pullDeps": { + "type": "bool", + "id": 2 + } + } + }, + "APT": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RPM": { + "fields": { + "source": { + "type": "File", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pullDeps": { + "type": "bool", + "id": 2 + } + } + }, + "YUM": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Zypper": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GooGet": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MSI": { + "fields": { + "source": { + "type": "File", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "properties": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "DesiredState": { + "values": { + "DESIRED_STATE_UNSPECIFIED": 0, + "INSTALLED": 1, + "REMOVED": 2 + } + } + } + }, + "RepositoryResource": { + "oneofs": { + "repository": { + "oneof": [ + "apt", + "yum", + "zypper", + "goo" + ] + } + }, + "fields": { + "apt": { + "type": "AptRepository", + "id": 1 + }, + "yum": { + "type": "YumRepository", + "id": 2 + }, + "zypper": { + "type": "ZypperRepository", + "id": 3 + }, + "goo": { + "type": "GooRepository", + "id": 4 + } + }, + "nested": { + "AptRepository": { + "fields": { + "archiveType": { + "type": "ArchiveType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "uri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "distribution": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "components": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gpgKey": { + "type": "string", + "id": 5 + } + }, + "nested": { + "ArchiveType": { + "values": { + "ARCHIVE_TYPE_UNSPECIFIED": 0, + "DEB": 1, + "DEB_SRC": 2 + } + } + } + }, + "YumRepository": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "baseUrl": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gpgKeys": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "ZypperRepository": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "baseUrl": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gpgKeys": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "GooRepository": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "url": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "ExecResource": { + "fields": { + "validate": { + "type": "Exec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "enforce": { + "type": "Exec", + "id": 2 + } + }, + "nested": { + "Exec": { + "oneofs": { + "source": { + "oneof": [ + "file", + "script" + ] + } + }, + "fields": { + "file": { + "type": "File", + "id": 1 + }, + "script": { + "type": "string", + "id": 2 + }, + "args": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "interpreter": { + "type": "Interpreter", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Interpreter": { + "values": { + "INTERPRETER_UNSPECIFIED": 0, + "NONE": 1, + "SHELL": 2, + "POWERSHELL": 3 + } + } + } + } + } + }, + "FileResource": { + "oneofs": { + "source": { + "oneof": [ + "file", + "content" + ] + } + }, + "fields": { + "file": { + "type": "File", + "id": 1 + }, + "content": { + "type": "string", + "id": 2 + }, + "path": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "DesiredState", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "permissions": { + "type": "string", + "id": 5 + } + }, + "nested": { + "DesiredState": { + "values": { + "DESIRED_STATE_UNSPECIFIED": 0, + "PRESENT": 1, + "ABSENT": 2, + "CONTENTS_MATCH": 3 + } + } + } + } + } + }, + "ResourceGroup": { + "fields": { + "osFilter": { + "type": "OSFilter", + "id": 1 + }, + "resources": { + "rule": "repeated", + "type": "Resource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "VALIDATION": 1, + "ENFORCEMENT": 2 + } + } + } + }, + "OSPolicyAssignment": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/OSPolicyAssignment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "osPolicies": { + "rule": "repeated", + "type": "OSPolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instanceFilter": { + "type": "InstanceFilter", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rollout": { + "type": "Rollout", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "revisionId": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revisionCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rolloutState": { + "type": "RolloutState", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "baseline": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleted": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reconciling": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LabelSet": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "InstanceFilter": { + "fields": { + "all": { + "type": "bool", + "id": 1 + }, + "osShortNames": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "inclusionLabels": { + "rule": "repeated", + "type": "LabelSet", + "id": 3 + }, + "exclusionLabels": { + "rule": "repeated", + "type": "LabelSet", + "id": 4 + } + } + }, + "Rollout": { + "fields": { + "disruptionBudget": { + "type": "FixedOrPercent", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "minWaitDuration": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RolloutState": { + "values": { + "ROLLOUT_STATE_UNSPECIFIED": 0, + "IN_PROGRESS": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4 + } + } + } + }, + "OSPolicyAssignmentOperationMetadata": { + "fields": { + "osPolicyAssignment": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + }, + "apiMethod": { + "type": "APIMethod", + "id": 2 + }, + "rolloutState": { + "type": "RolloutState", + "id": 3 + }, + "rolloutStartTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "rolloutUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + }, + "nested": { + "APIMethod": { + "values": { + "API_METHOD_UNSPECIFIED": 0, + "CREATE": 1, + "UPDATE": 2, + "DELETE": 3 + } + }, + "RolloutState": { + "values": { + "ROLLOUT_STATE_UNSPECIFIED": 0, + "IN_PROGRESS": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4 + } + } + } + }, + "CreateOSPolicyAssignmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "osPolicyAssignment": { + "type": "OSPolicyAssignment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "osPolicyAssignmentId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateOSPolicyAssignmentRequest": { + "fields": { + "osPolicyAssignment": { + "type": "OSPolicyAssignment", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetOSPolicyAssignmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + } + } + }, + "ListOSPolicyAssignmentsRequest": { + "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 + } + } + }, + "ListOSPolicyAssignmentsResponse": { + "fields": { + "osPolicyAssignments": { + "rule": "repeated", + "type": "OSPolicyAssignment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListOSPolicyAssignmentRevisionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOSPolicyAssignmentRevisionsResponse": { + "fields": { + "osPolicyAssignments": { + "rule": "repeated", + "type": "OSPolicyAssignment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteOSPolicyAssignmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + } + } + }, + "FixedOrPercent": { + "oneofs": { + "mode": { + "oneof": [ + "fixed", + "percent" + ] + } + }, + "fields": { + "fixed": { + "type": "int32", + "id": 1 + }, + "percent": { + "type": "int32", + "id": 2 + } + } + }, + "OsConfigZonalService": { + "options": { + "(google.api.default_host)": "osconfig.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateOSPolicyAssignment": { + "requestType": "CreateOSPolicyAssignmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments", + "(google.api.http).body": "os_policy_assignment", + "(google.api.method_signature)": "parent,os_policy_assignment,os_policy_assignment_id", + "(google.longrunning.operation_info).response_type": "OSPolicyAssignment", + "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments", + "body": "os_policy_assignment" + } + }, + { + "(google.api.method_signature)": "parent,os_policy_assignment,os_policy_assignment_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "OSPolicyAssignment", + "metadata_type": "OSPolicyAssignmentOperationMetadata" + } + } + ] + }, + "UpdateOSPolicyAssignment": { + "requestType": "UpdateOSPolicyAssignmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1alpha/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}", + "(google.api.http).body": "os_policy_assignment", + "(google.api.method_signature)": "os_policy_assignment,update_mask", + "(google.longrunning.operation_info).response_type": "OSPolicyAssignment", + "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}", + "body": "os_policy_assignment" + } + }, + { + "(google.api.method_signature)": "os_policy_assignment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "OSPolicyAssignment", + "metadata_type": "OSPolicyAssignmentOperationMetadata" + } + } + ] + }, + "GetOSPolicyAssignment": { + "requestType": "GetOSPolicyAssignmentRequest", + "responseType": "OSPolicyAssignment", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListOSPolicyAssignments": { + "requestType": "ListOSPolicyAssignmentsRequest", + "responseType": "ListOSPolicyAssignmentsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListOSPolicyAssignmentRevisions": { + "requestType": "ListOSPolicyAssignmentRevisionsRequest", + "responseType": "ListOSPolicyAssignmentRevisionsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOSPolicyAssignment": { + "requestType": "DeleteOSPolicyAssignmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OSPolicyAssignmentOperationMetadata" + } + } + ] + }, + "GetInstanceOSPoliciesCompliance": { + "requestType": "GetInstanceOSPoliciesComplianceRequest", + "responseType": "InstanceOSPoliciesCompliance", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListInstanceOSPoliciesCompliances": { + "requestType": "ListInstanceOSPoliciesCompliancesRequest", + "responseType": "ListInstanceOSPoliciesCompliancesResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetInventory": { + "requestType": "GetInventoryRequest", + "responseType": "Inventory", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instances/*/inventory}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/instances/*/inventory}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListInventories": { + "requestType": "ListInventoriesRequest", + "responseType": "ListInventoriesResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/inventories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/inventories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVulnerabilityReport": { + "requestType": "GetVulnerabilityReportRequest", + "responseType": "VulnerabilityReport", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instances/*/vulnerabilityReport}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/instances/*/vulnerabilityReport}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListVulnerabilityReports": { + "requestType": "ListVulnerabilityReportsRequest", + "responseType": "ListVulnerabilityReportsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "VulnerabilityReport": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/VulnerabilityReport", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "vulnerabilities": { + "rule": "repeated", + "type": "Vulnerability", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Vulnerability": { + "fields": { + "details": { + "type": "Details", + "id": 1 + }, + "installedInventoryItemIds": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "availableInventoryItemIds": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + }, + "nested": { + "Details": { + "fields": { + "cve": { + "type": "string", + "id": 1 + }, + "cvssV2Score": { + "type": "float", + "id": 2 + }, + "cvssV3": { + "type": "CVSSv3", + "id": 3 + }, + "severity": { + "type": "string", + "id": 4 + }, + "description": { + "type": "string", + "id": 5 + }, + "references": { + "rule": "repeated", + "type": "Reference", + "id": 6 + } + }, + "nested": { + "Reference": { + "fields": { + "url": { + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } + }, + "GetVulnerabilityReportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/VulnerabilityReport" + } + } + } + }, + "ListVulnerabilityReportsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/Instance" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListVulnerabilityReportsResponse": { + "fields": { + "vulnerabilityReports": { + "rule": "repeated", + "type": "VulnerabilityReport", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CVSSv3": { + "fields": { + "baseScore": { + "type": "float", + "id": 1 + }, + "exploitabilityScore": { + "type": "float", + "id": 2 + }, + "impactScore": { + "type": "float", + "id": 3 + }, + "attackVector": { + "type": "AttackVector", + "id": 5 + }, + "attackComplexity": { + "type": "AttackComplexity", + "id": 6 + }, + "privilegesRequired": { + "type": "PrivilegesRequired", + "id": 7 + }, + "userInteraction": { + "type": "UserInteraction", + "id": 8 + }, + "scope": { + "type": "Scope", + "id": 9 + }, + "confidentialityImpact": { + "type": "Impact", + "id": 10 + }, + "integrityImpact": { + "type": "Impact", + "id": 11 + }, + "availabilityImpact": { + "type": "Impact", + "id": 12 + } + }, + "nested": { + "AttackVector": { + "values": { + "ATTACK_VECTOR_UNSPECIFIED": 0, + "ATTACK_VECTOR_NETWORK": 1, + "ATTACK_VECTOR_ADJACENT": 2, + "ATTACK_VECTOR_LOCAL": 3, + "ATTACK_VECTOR_PHYSICAL": 4 + } + }, + "AttackComplexity": { + "values": { + "ATTACK_COMPLEXITY_UNSPECIFIED": 0, + "ATTACK_COMPLEXITY_LOW": 1, + "ATTACK_COMPLEXITY_HIGH": 2 + } + }, + "PrivilegesRequired": { + "values": { + "PRIVILEGES_REQUIRED_UNSPECIFIED": 0, + "PRIVILEGES_REQUIRED_NONE": 1, + "PRIVILEGES_REQUIRED_LOW": 2, + "PRIVILEGES_REQUIRED_HIGH": 3 + } + }, + "UserInteraction": { + "values": { + "USER_INTERACTION_UNSPECIFIED": 0, + "USER_INTERACTION_NONE": 1, + "USER_INTERACTION_REQUIRED": 2 + } + }, + "Scope": { + "values": { + "SCOPE_UNSPECIFIED": 0, + "SCOPE_UNCHANGED": 1, + "SCOPE_CHANGED": 2 + } + }, + "Impact": { + "values": { + "IMPACT_UNSPECIFIED": 0, + "IMPACT_HIGH": 1, + "IMPACT_LOW": 2, + "IMPACT_NONE": 3 + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "FieldBehaviorProto", + "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" + }, + "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 + } + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/timeofday;timeofday", + "java_multiple_files": true, + "java_outer_classname": "TimeOfDayProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "DateTime": { + "oneofs": { + "timeOffset": { + "oneof": [ + "utcOffset", + "timeZone" + ] + } + }, + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", "id": 2 }, "day": { @@ -2690,6 +4709,251 @@ } } } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } } } } diff --git a/packages/google-cloud-osconfig/src/index.ts b/packages/google-cloud-osconfig/src/index.ts index d16eee7ef0a..2f5b7e6c190 100644 --- a/packages/google-cloud-osconfig/src/index.ts +++ b/packages/google-cloud-osconfig/src/index.ts @@ -16,12 +16,13 @@ // ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** +import * as v1alpha from './v1alpha'; import * as v1 from './v1'; const OsConfigServiceClient = v1.OsConfigServiceClient; type OsConfigServiceClient = v1.OsConfigServiceClient; -export {v1, OsConfigServiceClient}; -export default {v1, OsConfigServiceClient}; +export {v1alpha, v1, OsConfigServiceClient}; +export default {v1alpha, v1, OsConfigServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json b/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json new file mode 100644 index 00000000000..e96d954fe16 --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json @@ -0,0 +1,163 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.osconfig.v1alpha", + "libraryPackage": "@google-cloud/osconfig", + "services": { + "OsConfigZonalService": { + "clients": { + "grpc": { + "libraryClient": "OsConfigZonalServiceClient", + "rpcs": { + "GetOSPolicyAssignment": { + "methods": [ + "getOSPolicyAssignment" + ] + }, + "GetInstanceOSPoliciesCompliance": { + "methods": [ + "getInstanceOSPoliciesCompliance" + ] + }, + "GetInventory": { + "methods": [ + "getInventory" + ] + }, + "GetVulnerabilityReport": { + "methods": [ + "getVulnerabilityReport" + ] + }, + "CreateOSPolicyAssignment": { + "methods": [ + "createOSPolicyAssignment" + ] + }, + "UpdateOSPolicyAssignment": { + "methods": [ + "updateOSPolicyAssignment" + ] + }, + "DeleteOSPolicyAssignment": { + "methods": [ + "deleteOSPolicyAssignment" + ] + }, + "ListOSPolicyAssignments": { + "methods": [ + "listOSPolicyAssignments", + "listOSPolicyAssignmentsStream", + "listOSPolicyAssignmentsAsync" + ] + }, + "ListOSPolicyAssignmentRevisions": { + "methods": [ + "listOSPolicyAssignmentRevisions", + "listOSPolicyAssignmentRevisionsStream", + "listOSPolicyAssignmentRevisionsAsync" + ] + }, + "ListInstanceOSPoliciesCompliances": { + "methods": [ + "listInstanceOSPoliciesCompliances", + "listInstanceOSPoliciesCompliancesStream", + "listInstanceOSPoliciesCompliancesAsync" + ] + }, + "ListInventories": { + "methods": [ + "listInventories", + "listInventoriesStream", + "listInventoriesAsync" + ] + }, + "ListVulnerabilityReports": { + "methods": [ + "listVulnerabilityReports", + "listVulnerabilityReportsStream", + "listVulnerabilityReportsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "OsConfigZonalServiceClient", + "rpcs": { + "GetOSPolicyAssignment": { + "methods": [ + "getOSPolicyAssignment" + ] + }, + "GetInstanceOSPoliciesCompliance": { + "methods": [ + "getInstanceOSPoliciesCompliance" + ] + }, + "GetInventory": { + "methods": [ + "getInventory" + ] + }, + "GetVulnerabilityReport": { + "methods": [ + "getVulnerabilityReport" + ] + }, + "CreateOSPolicyAssignment": { + "methods": [ + "createOSPolicyAssignment" + ] + }, + "UpdateOSPolicyAssignment": { + "methods": [ + "updateOSPolicyAssignment" + ] + }, + "DeleteOSPolicyAssignment": { + "methods": [ + "deleteOSPolicyAssignment" + ] + }, + "ListOSPolicyAssignments": { + "methods": [ + "listOSPolicyAssignments", + "listOSPolicyAssignmentsStream", + "listOSPolicyAssignmentsAsync" + ] + }, + "ListOSPolicyAssignmentRevisions": { + "methods": [ + "listOSPolicyAssignmentRevisions", + "listOSPolicyAssignmentRevisionsStream", + "listOSPolicyAssignmentRevisionsAsync" + ] + }, + "ListInstanceOSPoliciesCompliances": { + "methods": [ + "listInstanceOSPoliciesCompliances", + "listInstanceOSPoliciesCompliancesStream", + "listInstanceOSPoliciesCompliancesAsync" + ] + }, + "ListInventories": { + "methods": [ + "listInventories", + "listInventoriesStream", + "listInventoriesAsync" + ] + }, + "ListVulnerabilityReports": { + "methods": [ + "listVulnerabilityReports", + "listVulnerabilityReportsStream", + "listVulnerabilityReportsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-osconfig/src/v1alpha/index.ts b/packages/google-cloud-osconfig/src/v1alpha/index.ts new file mode 100644 index 00000000000..41dad750e6a --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1alpha/index.ts @@ -0,0 +1,19 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {OsConfigZonalServiceClient} from './os_config_zonal_service_client'; diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts new file mode 100644 index 00000000000..e5ac69528d1 --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -0,0 +1,2657 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1alpha/os_config_zonal_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './os_config_zonal_service_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * Zonal OS Config API + * + * The OS Config service is the server-side component that allows users to + * manage package installations and patch jobs for Compute Engine VM instances. + * @class + * @memberof v1alpha + */ +export class OsConfigZonalServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + osConfigZonalServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of OsConfigZonalServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof OsConfigZonalServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + 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 = { + instanceOSPoliciesCompliancePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}' + ), + inventoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/inventory' + ), + oSPolicyAssignmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}' + ), + vulnerabilityReportPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport' + ), + }; + + // 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 = { + listOSPolicyAssignments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'osPolicyAssignments' + ), + listOSPolicyAssignmentRevisions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'osPolicyAssignments' + ), + listInstanceOSPoliciesCompliances: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'instanceOsPoliciesCompliances' + ), + listInventories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'inventories' + ), + listVulnerabilityReports: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'vulnerabilityReports' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createOSPolicyAssignmentResponse = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1alpha.OSPolicyAssignment' + ) as gax.protobuf.Type; + const createOSPolicyAssignmentMetadata = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata' + ) as gax.protobuf.Type; + const updateOSPolicyAssignmentResponse = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1alpha.OSPolicyAssignment' + ) as gax.protobuf.Type; + const updateOSPolicyAssignmentMetadata = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata' + ) as gax.protobuf.Type; + const deleteOSPolicyAssignmentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteOSPolicyAssignmentMetadata = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createOSPolicyAssignment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createOSPolicyAssignmentResponse.decode.bind( + createOSPolicyAssignmentResponse + ), + createOSPolicyAssignmentMetadata.decode.bind( + createOSPolicyAssignmentMetadata + ) + ), + updateOSPolicyAssignment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateOSPolicyAssignmentResponse.decode.bind( + updateOSPolicyAssignmentResponse + ), + updateOSPolicyAssignmentMetadata.decode.bind( + updateOSPolicyAssignmentMetadata + ) + ), + deleteOSPolicyAssignment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteOSPolicyAssignmentResponse.decode.bind( + deleteOSPolicyAssignmentResponse + ), + deleteOSPolicyAssignmentMetadata.decode.bind( + deleteOSPolicyAssignmentMetadata + ) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.osconfig.v1alpha.OsConfigZonalService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.osConfigZonalServiceStub) { + return this.osConfigZonalServiceStub; + } + + // Put together the "service stub" for + // google.cloud.osconfig.v1alpha.OsConfigZonalService. + this.osConfigZonalServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.osconfig.v1alpha.OsConfigZonalService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.osconfig.v1alpha + .OsConfigZonalService, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const osConfigZonalServiceStubMethods = [ + 'createOSPolicyAssignment', + 'updateOSPolicyAssignment', + 'getOSPolicyAssignment', + 'listOSPolicyAssignments', + 'listOSPolicyAssignmentRevisions', + 'deleteOSPolicyAssignment', + 'getInstanceOSPoliciesCompliance', + 'listInstanceOSPoliciesCompliances', + 'getInventory', + 'listInventories', + 'getVulnerabilityReport', + 'listVulnerabilityReports', + ]; + for (const methodName of osConfigZonalServiceStubMethods) { + const callPromise = this.osConfigZonalServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.osConfigZonalServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'osconfig.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'osconfig.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + ( + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest + | undefined + ), + {} | undefined + ] + >; + getOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Retrieve an existing OS policy assignment. + * + * This method always returns the latest revision. In order to retrieve a + * previous revision of the assignment, also provide the revision ID in the + * `name` parameter. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of OS policy assignment. + * + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getOSPolicyAssignment(request); + */ + getOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + ( + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getOSPolicyAssignment(request, options, callback); + } + getInstanceOSPoliciesCompliance( + request: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, + ( + | protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest + | undefined + ), + {} | undefined + ] + >; + getInstanceOSPoliciesCompliance( + request: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, + | protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getInstanceOSPoliciesCompliance( + request: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, + | protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Get OS policies compliance data for the specified Compute Engine VM + * instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for instance OS policies compliance resource. + * + * Format: + * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` + * + * For `{project}`, either Compute Engine project-number or project-id can be + * provided. + * For `{instance}`, either Compute Engine VM instance-id or instance-name can + * be provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [InstanceOSPoliciesCompliance]{@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getInstanceOSPoliciesCompliance(request); + */ + getInstanceOSPoliciesCompliance( + request: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, + | protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, + | protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, + ( + | protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getInstanceOSPoliciesCompliance( + request, + options, + callback + ); + } + getInventory( + request: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInventory, + protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest | undefined, + {} | undefined + ] + >; + getInventory( + request: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IInventory, + | protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getInventory( + request: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IInventory, + | protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Get inventory data for the specified VM instance. If the VM has no + * associated inventory, the message `NOT_FOUND` is returned. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for inventory resource. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * @param {google.cloud.osconfig.v1alpha.InventoryView} request.view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Inventory]{@link google.cloud.osconfig.v1alpha.Inventory}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getInventory(request); + */ + getInventory( + request: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1alpha.IInventory, + | protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1alpha.IInventory, + | protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInventory, + protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getInventory(request, options, callback); + } + getVulnerabilityReport( + request: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport, + ( + | protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest + | undefined + ), + {} | undefined + ] + >; + getVulnerabilityReport( + request: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport, + | protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVulnerabilityReport( + request: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport, + | protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Gets the vulnerability report for the specified VM instance. Only VMs with + * inventory data have vulnerability reports associated with them. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for vulnerability resource. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [VulnerabilityReport]{@link google.cloud.osconfig.v1alpha.VulnerabilityReport}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getVulnerabilityReport(request); + */ + getVulnerabilityReport( + request: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport, + | protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport, + | protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport, + ( + | protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getVulnerabilityReport( + request, + options, + callback + ); + } + + createOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Create an OS policy assignment. + * + * This method also creates the first revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name in the form: + * projects/{project}/locations/{location} + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} request.osPolicyAssignment + * Required. The OS policy assignment to be created. + * @param {string} request.osPolicyAssignmentId + * Required. The logical name of the OS policy assignment in the project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createOSPolicyAssignment(request); + * const [response] = await operation.promise(); + */ + createOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createOSPolicyAssignment( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createOSPolicyAssignment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateOSPolicyAssignmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateOSPolicyAssignmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createOSPolicyAssignment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + >; + } + updateOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update an existing OS policy assignment. + * + * This method creates a new revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} request.osPolicyAssignment + * Required. The updated OS policy assignment. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask that controls which fields of the assignment should be + * updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateOSPolicyAssignment(request); + * const [response] = await operation.promise(); + */ + updateOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'os_policy_assignment.name': request.osPolicyAssignment!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateOSPolicyAssignment( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateOSPolicyAssignment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateOSPolicyAssignmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUpdateOSPolicyAssignmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateOSPolicyAssignment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + >; + } + deleteOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Delete the OS policy assignment. + * + * This method creates a new revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * If the LRO completes and is not cancelled, all revisions associated with + * the OS policy assignment are deleted. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to be deleted + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.deleteOSPolicyAssignment(request); + * const [response] = await operation.promise(); + */ + deleteOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteOSPolicyAssignment( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteOSPolicyAssignment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDeleteOSPolicyAssignmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDeleteOSPolicyAssignmentProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteOSPolicyAssignment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + >; + } + listOSPolicyAssignments( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[], + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse + ] + >; + listOSPolicyAssignments( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + > + ): void; + listOSPolicyAssignments( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + > + ): void; + /** + * List the OS policy assignments under the parent resource. + * + * For each OS policy assignment, the latest revision is returned. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * @param {number} request.pageSize + * The maximum number of assignments to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment}. + * 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 `listOSPolicyAssignmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignments( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[], + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listOSPolicyAssignments( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * @param {number} request.pageSize + * The maximum number of assignments to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * @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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment} 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 `listOSPolicyAssignmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentsStream( + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignments.createStream( + this.innerApiCalls.listOSPolicyAssignments as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listOSPolicyAssignments`, 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 resource name. + * @param {number} request.pageSize + * The maximum number of assignments to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listOSPolicyAssignmentsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listOSPolicyAssignmentsAsync( + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignments.asyncIterate( + this.innerApiCalls['listOSPolicyAssignments'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + listOSPolicyAssignmentRevisions( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[], + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse + ] + >; + listOSPolicyAssignmentRevisions( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + > + ): void; + listOSPolicyAssignmentRevisions( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + > + ): void; + /** + * List the OS policy assignment revisions for a given OS policy assignment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment}. + * 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 `listOSPolicyAssignmentRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentRevisions( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[], + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.listOSPolicyAssignmentRevisions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * @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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment} 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 `listOSPolicyAssignmentRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentRevisionsStream( + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignmentRevisions.createStream( + this.innerApiCalls.listOSPolicyAssignmentRevisions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listOSPolicyAssignmentRevisions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listOSPolicyAssignmentRevisionsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listOSPolicyAssignmentRevisionsAsync( + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate( + this.innerApiCalls['listOSPolicyAssignmentRevisions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + listInstanceOSPoliciesCompliances( + request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[], + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest | null, + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse + ] + >; + listInstanceOSPoliciesCompliances( + request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance + > + ): void; + listInstanceOSPoliciesCompliances( + request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance + > + ): void; + /** + * List OS policies compliance data for all Compute Engine VM instances in the + * specified zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}` + * + * For `{project}`, either Compute Engine project-number or project-id can be + * provided. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListInstanceOSPoliciesCompliances` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `InstanceOSPoliciesCompliance` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [InstanceOSPoliciesCompliance]{@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance}. + * 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 `listInstanceOSPoliciesCompliancesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listInstanceOSPoliciesCompliances( + request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[], + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest | null, + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listInstanceOSPoliciesCompliances( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}` + * + * For `{project}`, either Compute Engine project-number or project-id can be + * provided. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListInstanceOSPoliciesCompliances` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `InstanceOSPoliciesCompliance` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [InstanceOSPoliciesCompliance]{@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} 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 `listInstanceOSPoliciesCompliancesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listInstanceOSPoliciesCompliancesStream( + request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listInstanceOSPoliciesCompliances.createStream( + this.innerApiCalls.listInstanceOSPoliciesCompliances as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listInstanceOSPoliciesCompliances`, 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 resource name. + * + * Format: `projects/{project}/locations/{location}` + * + * For `{project}`, either Compute Engine project-number or project-id can be + * provided. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListInstanceOSPoliciesCompliances` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `InstanceOSPoliciesCompliance` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [InstanceOSPoliciesCompliance]{@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listInstanceOSPoliciesCompliancesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listInstanceOSPoliciesCompliancesAsync( + request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listInstanceOSPoliciesCompliances.asyncIterate( + this.innerApiCalls['listInstanceOSPoliciesCompliances'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + listInventories( + request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInventory[], + protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest | null, + protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse + ] + >; + listInventories( + request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInventory + > + ): void; + listInventories( + request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInventory + > + ): void; + /** + * List inventory data for all VM instances in the specified zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * For `{project}`, either `project-number` or `project-id` can be + * provided. For `{instance}`, only hyphen or dash character is supported to + * list inventories across VMs. + * @param {google.cloud.osconfig.v1alpha.InventoryView} request.view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Inventory]{@link google.cloud.osconfig.v1alpha.Inventory}. + * 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 `listInventoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listInventories( + request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInventory + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInventory + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInventory[], + protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest | null, + protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listInventories(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * For `{project}`, either `project-number` or `project-id` can be + * provided. For `{instance}`, only hyphen or dash character is supported to + * list inventories across VMs. + * @param {google.cloud.osconfig.v1alpha.InventoryView} request.view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Inventory]{@link google.cloud.osconfig.v1alpha.Inventory} 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 `listInventoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listInventoriesStream( + request?: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listInventories.createStream( + this.innerApiCalls.listInventories as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listInventories`, 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 resource name. + * + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * For `{project}`, either `project-number` or `project-id` can be + * provided. For `{instance}`, only hyphen or dash character is supported to + * list inventories across VMs. + * @param {google.cloud.osconfig.v1alpha.InventoryView} request.view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Inventory]{@link google.cloud.osconfig.v1alpha.Inventory}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listInventoriesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listInventoriesAsync( + request?: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listInventories.asyncIterate( + this.innerApiCalls['listInventories'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport[], + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse + ] + >; + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport + > + ): void; + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport + > + ): void; + /** + * List vulnerability reports for all VM instances in the specified zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, only `-` character is supported to list vulnerability + * reports across VMs. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [VulnerabilityReport]{@link google.cloud.osconfig.v1alpha.VulnerabilityReport}. + * 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 `listVulnerabilityReportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport[], + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listVulnerabilityReports( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, only `-` character is supported to list vulnerability + * reports across VMs. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [VulnerabilityReport]{@link google.cloud.osconfig.v1alpha.VulnerabilityReport} 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 `listVulnerabilityReportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listVulnerabilityReportsStream( + request?: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listVulnerabilityReports.createStream( + this.innerApiCalls.listVulnerabilityReports as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listVulnerabilityReports`, 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 resource name. + * + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, only `-` character is supported to list vulnerability + * reports across VMs. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [VulnerabilityReport]{@link google.cloud.osconfig.v1alpha.VulnerabilityReport}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listVulnerabilityReportsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listVulnerabilityReportsAsync( + request?: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listVulnerabilityReports.asyncIterate( + this.innerApiCalls['listVulnerabilityReports'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified instanceOSPoliciesCompliance resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + instanceOSPoliciesCompliancePath( + project: string, + location: string, + instance: string + ) { + return this.pathTemplates.instanceOSPoliciesCompliancePathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from InstanceOSPoliciesCompliance resource. + * + * @param {string} instanceOSPoliciesComplianceName + * A fully-qualified path representing InstanceOSPoliciesCompliance resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInstanceOSPoliciesComplianceName( + instanceOSPoliciesComplianceName: string + ) { + return this.pathTemplates.instanceOSPoliciesCompliancePathTemplate.match( + instanceOSPoliciesComplianceName + ).project; + } + + /** + * Parse the location from InstanceOSPoliciesCompliance resource. + * + * @param {string} instanceOSPoliciesComplianceName + * A fully-qualified path representing InstanceOSPoliciesCompliance resource. + * @returns {string} A string representing the location. + */ + matchLocationFromInstanceOSPoliciesComplianceName( + instanceOSPoliciesComplianceName: string + ) { + return this.pathTemplates.instanceOSPoliciesCompliancePathTemplate.match( + instanceOSPoliciesComplianceName + ).location; + } + + /** + * Parse the instance from InstanceOSPoliciesCompliance resource. + * + * @param {string} instanceOSPoliciesComplianceName + * A fully-qualified path representing InstanceOSPoliciesCompliance resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInstanceOSPoliciesComplianceName( + instanceOSPoliciesComplianceName: string + ) { + return this.pathTemplates.instanceOSPoliciesCompliancePathTemplate.match( + instanceOSPoliciesComplianceName + ).instance; + } + + /** + * Return a fully-qualified inventory resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + inventoryPath(project: string, location: string, instance: string) { + return this.pathTemplates.inventoryPathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from Inventory resource. + * + * @param {string} inventoryName + * A fully-qualified path representing Inventory resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInventoryName(inventoryName: string) { + return this.pathTemplates.inventoryPathTemplate.match(inventoryName) + .project; + } + + /** + * Parse the location from Inventory resource. + * + * @param {string} inventoryName + * A fully-qualified path representing Inventory resource. + * @returns {string} A string representing the location. + */ + matchLocationFromInventoryName(inventoryName: string) { + return this.pathTemplates.inventoryPathTemplate.match(inventoryName) + .location; + } + + /** + * Parse the instance from Inventory resource. + * + * @param {string} inventoryName + * A fully-qualified path representing Inventory resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInventoryName(inventoryName: string) { + return this.pathTemplates.inventoryPathTemplate.match(inventoryName) + .instance; + } + + /** + * Return a fully-qualified oSPolicyAssignment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} os_policy_assignment + * @returns {string} Resource name string. + */ + oSPolicyAssignmentPath( + project: string, + location: string, + osPolicyAssignment: string + ) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.render({ + project: project, + location: location, + os_policy_assignment: osPolicyAssignment, + }); + } + + /** + * Parse the project from OSPolicyAssignment resource. + * + * @param {string} oSPolicyAssignmentName + * A fully-qualified path representing OSPolicyAssignment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromOSPolicyAssignmentName(oSPolicyAssignmentName: string) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.match( + oSPolicyAssignmentName + ).project; + } + + /** + * Parse the location from OSPolicyAssignment resource. + * + * @param {string} oSPolicyAssignmentName + * A fully-qualified path representing OSPolicyAssignment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOSPolicyAssignmentName(oSPolicyAssignmentName: string) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.match( + oSPolicyAssignmentName + ).location; + } + + /** + * Parse the os_policy_assignment from OSPolicyAssignment resource. + * + * @param {string} oSPolicyAssignmentName + * A fully-qualified path representing OSPolicyAssignment resource. + * @returns {string} A string representing the os_policy_assignment. + */ + matchOsPolicyAssignmentFromOSPolicyAssignmentName( + oSPolicyAssignmentName: string + ) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.match( + oSPolicyAssignmentName + ).os_policy_assignment; + } + + /** + * Return a fully-qualified vulnerabilityReport resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + vulnerabilityReportPath(project: string, location: string, instance: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from VulnerabilityReport resource. + * + * @param {string} vulnerabilityReportName + * A fully-qualified path representing VulnerabilityReport resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVulnerabilityReportName(vulnerabilityReportName: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.match( + vulnerabilityReportName + ).project; + } + + /** + * Parse the location from VulnerabilityReport resource. + * + * @param {string} vulnerabilityReportName + * A fully-qualified path representing VulnerabilityReport resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVulnerabilityReportName(vulnerabilityReportName: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.match( + vulnerabilityReportName + ).location; + } + + /** + * Parse the instance from VulnerabilityReport resource. + * + * @param {string} vulnerabilityReportName + * A fully-qualified path representing VulnerabilityReport resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromVulnerabilityReportName(vulnerabilityReportName: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.match( + vulnerabilityReportName + ).instance; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.osConfigZonalServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client_config.json b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client_config.json new file mode 100644 index 00000000000..b4c397687ac --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client_config.json @@ -0,0 +1,98 @@ +{ + "interfaces": { + "google.cloud.osconfig.v1alpha.OsConfigZonalService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListOSPolicyAssignments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListOSPolicyAssignmentRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetInstanceOSPoliciesCompliance": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListInstanceOSPoliciesCompliances": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetInventory": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListInventories": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetVulnerabilityReport": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListVulnerabilityReports": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_proto_list.json b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_proto_list.json new file mode 100644 index 00000000000..fbfb90ffb5c --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_proto_list.json @@ -0,0 +1,10 @@ +[ + "../../protos/google/cloud/osconfig/v1alpha/config_common.proto", + "../../protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto", + "../../protos/google/cloud/osconfig/v1alpha/inventory.proto", + "../../protos/google/cloud/osconfig/v1alpha/os_policy.proto", + "../../protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto", + "../../protos/google/cloud/osconfig/v1alpha/osconfig_common.proto", + "../../protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto", + "../../protos/google/cloud/osconfig/v1alpha/vulnerability.proto" +] diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts new file mode 100644 index 00000000000..b1a4ac21bf3 --- /dev/null +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -0,0 +1,3300 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as osconfigzonalserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha.OsConfigZonalServiceClient', () => { + it('has servicePath', () => { + const servicePath = + osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigZonalServiceStub, undefined); + await client.initialize(); + assert(client.osConfigZonalServiceStub); + }); + + it('has close method', () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + 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 osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + 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('getOSPolicyAssignment', () => { + it('invokes getOSPolicyAssignment without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ); + client.innerApiCalls.getOSPolicyAssignment = + stubSimpleCall(expectedResponse); + const [response] = await client.getOSPolicyAssignment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getOSPolicyAssignment without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ); + client.innerApiCalls.getOSPolicyAssignment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getOSPolicyAssignment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getOSPolicyAssignment with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getOSPolicyAssignment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getOSPolicyAssignment(request), + expectedError + ); + assert( + (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getInstanceOSPoliciesCompliance', () => { + it('invokes getInstanceOSPoliciesCompliance without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ); + client.innerApiCalls.getInstanceOSPoliciesCompliance = + stubSimpleCall(expectedResponse); + const [response] = await client.getInstanceOSPoliciesCompliance(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getInstanceOSPoliciesCompliance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getInstanceOSPoliciesCompliance without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ); + client.innerApiCalls.getInstanceOSPoliciesCompliance = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getInstanceOSPoliciesCompliance( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getInstanceOSPoliciesCompliance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getInstanceOSPoliciesCompliance with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getInstanceOSPoliciesCompliance = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getInstanceOSPoliciesCompliance(request), + expectedError + ); + assert( + (client.innerApiCalls.getInstanceOSPoliciesCompliance as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getInventory', () => { + it('invokes getInventory without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ); + client.innerApiCalls.getInventory = stubSimpleCall(expectedResponse); + const [response] = await client.getInventory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getInventory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getInventory without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ); + client.innerApiCalls.getInventory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getInventory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1alpha.IInventory | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getInventory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getInventory with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getInventory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getInventory(request), expectedError); + assert( + (client.innerApiCalls.getInventory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getVulnerabilityReport', () => { + it('invokes getVulnerabilityReport without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ); + client.innerApiCalls.getVulnerabilityReport = + stubSimpleCall(expectedResponse); + const [response] = await client.getVulnerabilityReport(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getVulnerabilityReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getVulnerabilityReport without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ); + client.innerApiCalls.getVulnerabilityReport = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVulnerabilityReport( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getVulnerabilityReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getVulnerabilityReport with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getVulnerabilityReport = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getVulnerabilityReport(request), + expectedError + ); + assert( + (client.innerApiCalls.getVulnerabilityReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createOSPolicyAssignment', () => { + it('invokes createOSPolicyAssignment without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createOSPolicyAssignment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createOSPolicyAssignment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createOSPolicyAssignment without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createOSPolicyAssignment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createOSPolicyAssignment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createOSPolicyAssignment with call error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createOSPolicyAssignment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createOSPolicyAssignment(request), + expectedError + ); + assert( + (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createOSPolicyAssignment with LRO error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createOSPolicyAssignment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createOSPolicyAssignment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateOSPolicyAssignmentProgress without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkCreateOSPolicyAssignmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateOSPolicyAssignmentProgress with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateOSPolicyAssignmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateOSPolicyAssignment', () => { + it('invokes updateOSPolicyAssignment without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() + ); + request.osPolicyAssignment = {}; + request.osPolicyAssignment.name = ''; + const expectedHeaderRequestParams = 'os_policy_assignment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateOSPolicyAssignment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateOSPolicyAssignment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateOSPolicyAssignment without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() + ); + request.osPolicyAssignment = {}; + request.osPolicyAssignment.name = ''; + const expectedHeaderRequestParams = 'os_policy_assignment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateOSPolicyAssignment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateOSPolicyAssignment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateOSPolicyAssignment with call error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() + ); + request.osPolicyAssignment = {}; + request.osPolicyAssignment.name = ''; + const expectedHeaderRequestParams = 'os_policy_assignment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateOSPolicyAssignment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateOSPolicyAssignment(request), + expectedError + ); + assert( + (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateOSPolicyAssignment with LRO error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() + ); + request.osPolicyAssignment = {}; + request.osPolicyAssignment.name = ''; + const expectedHeaderRequestParams = 'os_policy_assignment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateOSPolicyAssignment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateOSPolicyAssignment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateOSPolicyAssignmentProgress without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkUpdateOSPolicyAssignmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateOSPolicyAssignmentProgress with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateOSPolicyAssignmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteOSPolicyAssignment', () => { + it('invokes deleteOSPolicyAssignment without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteOSPolicyAssignment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteOSPolicyAssignment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteOSPolicyAssignment without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteOSPolicyAssignment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteOSPolicyAssignment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteOSPolicyAssignment with call error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteOSPolicyAssignment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteOSPolicyAssignment(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteOSPolicyAssignment with LRO error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteOSPolicyAssignment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteOSPolicyAssignment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteOSPolicyAssignmentProgress without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkDeleteOSPolicyAssignmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteOSPolicyAssignmentProgress with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteOSPolicyAssignmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listOSPolicyAssignments', () => { + it('invokes listOSPolicyAssignments without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + ]; + client.innerApiCalls.listOSPolicyAssignments = + stubSimpleCall(expectedResponse); + const [response] = await client.listOSPolicyAssignments(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignments without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + ]; + client.innerApiCalls.listOSPolicyAssignments = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listOSPolicyAssignments( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listOSPolicyAssignments with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listOSPolicyAssignments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listOSPolicyAssignments(request), + expectedError + ); + assert( + (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentsStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + ]; + client.descriptors.page.listOSPolicyAssignments.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listOSPolicyAssignmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment + ) => { + 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.listOSPolicyAssignments + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listOSPolicyAssignments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listOSPolicyAssignmentsStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignments.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listOSPolicyAssignmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listOSPolicyAssignments + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listOSPolicyAssignments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignments without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + ]; + client.descriptors.page.listOSPolicyAssignments.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[] = + []; + const iterable = client.listOSPolicyAssignmentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignments with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignments.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listOSPolicyAssignmentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listOSPolicyAssignmentRevisions', () => { + it('invokes listOSPolicyAssignmentRevisions without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + ]; + client.innerApiCalls.listOSPolicyAssignmentRevisions = + stubSimpleCall(expectedResponse); + const [response] = await client.listOSPolicyAssignmentRevisions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentRevisions without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + ]; + client.innerApiCalls.listOSPolicyAssignmentRevisions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listOSPolicyAssignmentRevisions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listOSPolicyAssignmentRevisions with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listOSPolicyAssignmentRevisions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listOSPolicyAssignmentRevisions(request), + expectedError + ); + assert( + (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentRevisionsStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + ]; + client.descriptors.page.listOSPolicyAssignmentRevisions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listOSPolicyAssignmentRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment + ) => { + 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.listOSPolicyAssignmentRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listOSPolicyAssignmentRevisions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listOSPolicyAssignmentRevisionsStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignmentRevisions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listOSPolicyAssignmentRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listOSPolicyAssignmentRevisions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignmentRevisions without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() + ), + ]; + client.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[] = + []; + const iterable = client.listOSPolicyAssignmentRevisionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignmentRevisions with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listOSPolicyAssignmentRevisionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listInstanceOSPoliciesCompliances', () => { + it('invokes listInstanceOSPoliciesCompliances without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + ]; + client.innerApiCalls.listInstanceOSPoliciesCompliances = + stubSimpleCall(expectedResponse); + const [response] = await client.listInstanceOSPoliciesCompliances( + request + ); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listInstanceOSPoliciesCompliances as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listInstanceOSPoliciesCompliances without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + ]; + client.innerApiCalls.listInstanceOSPoliciesCompliances = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listInstanceOSPoliciesCompliances( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listInstanceOSPoliciesCompliances as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listInstanceOSPoliciesCompliances with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listInstanceOSPoliciesCompliances = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listInstanceOSPoliciesCompliances(request), + expectedError + ); + assert( + (client.innerApiCalls.listInstanceOSPoliciesCompliances as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listInstanceOSPoliciesCompliancesStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + ]; + client.descriptors.page.listInstanceOSPoliciesCompliances.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listInstanceOSPoliciesCompliancesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + ) => { + 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.listInstanceOSPoliciesCompliances + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listInstanceOSPoliciesCompliances, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listInstanceOSPoliciesCompliances + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listInstanceOSPoliciesCompliancesStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listInstanceOSPoliciesCompliances.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listInstanceOSPoliciesCompliancesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listInstanceOSPoliciesCompliances + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listInstanceOSPoliciesCompliances, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listInstanceOSPoliciesCompliances + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listInstanceOSPoliciesCompliances without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() + ), + ]; + client.descriptors.page.listInstanceOSPoliciesCompliances.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[] = + []; + const iterable = client.listInstanceOSPoliciesCompliancesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listInstanceOSPoliciesCompliances + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listInstanceOSPoliciesCompliances + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listInstanceOSPoliciesCompliances with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listInstanceOSPoliciesCompliances.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listInstanceOSPoliciesCompliancesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listInstanceOSPoliciesCompliances + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listInstanceOSPoliciesCompliances + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listInventories', () => { + it('invokes listInventories without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + ]; + client.innerApiCalls.listInventories = stubSimpleCall(expectedResponse); + const [response] = await client.listInventories(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listInventories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listInventories without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + ]; + client.innerApiCalls.listInventories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listInventories( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1alpha.IInventory[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listInventories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listInventories with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listInventories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listInventories(request), expectedError); + assert( + (client.innerApiCalls.listInventories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listInventoriesStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + ]; + client.descriptors.page.listInventories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listInventoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.Inventory[] = []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1alpha.Inventory) => { + 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.listInventories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listInventories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listInventories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listInventoriesStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listInventories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listInventoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.Inventory[] = []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1alpha.Inventory) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listInventories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listInventories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listInventories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listInventories without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.Inventory() + ), + ]; + client.descriptors.page.listInventories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1alpha.IInventory[] = []; + const iterable = client.listInventoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listInventories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listInventories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listInventories with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listInventories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listInventoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1alpha.IInventory[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listInventories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listInventories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listVulnerabilityReports', () => { + it('invokes listVulnerabilityReports without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + ]; + client.innerApiCalls.listVulnerabilityReports = + stubSimpleCall(expectedResponse); + const [response] = await client.listVulnerabilityReports(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listVulnerabilityReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listVulnerabilityReports without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + ]; + client.innerApiCalls.listVulnerabilityReports = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVulnerabilityReports( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listVulnerabilityReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listVulnerabilityReports with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listVulnerabilityReports = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listVulnerabilityReports(request), + expectedError + ); + assert( + (client.innerApiCalls.listVulnerabilityReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listVulnerabilityReportsStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + ]; + client.descriptors.page.listVulnerabilityReports.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listVulnerabilityReportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.VulnerabilityReport[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.VulnerabilityReport + ) => { + 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.listVulnerabilityReports + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listVulnerabilityReports, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listVulnerabilityReportsStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listVulnerabilityReports.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listVulnerabilityReportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.VulnerabilityReport[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.VulnerabilityReport + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listVulnerabilityReports + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listVulnerabilityReports, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listVulnerabilityReports without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() + ), + ]; + client.descriptors.page.listVulnerabilityReports.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport[] = + []; + const iterable = client.listVulnerabilityReportsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listVulnerabilityReports with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listVulnerabilityReports.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVulnerabilityReportsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('instanceOSPoliciesCompliance', () => { + const fakePath = '/rendered/path/instanceOSPoliciesCompliance'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + }; + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.instanceOSPoliciesCompliancePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.instanceOSPoliciesCompliancePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('instanceOSPoliciesCompliancePath', () => { + const result = client.instanceOSPoliciesCompliancePath( + 'projectValue', + 'locationValue', + 'instanceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.instanceOSPoliciesCompliancePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromInstanceOSPoliciesComplianceName', () => { + const result = + client.matchProjectFromInstanceOSPoliciesComplianceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.instanceOSPoliciesCompliancePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromInstanceOSPoliciesComplianceName', () => { + const result = + client.matchLocationFromInstanceOSPoliciesComplianceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.instanceOSPoliciesCompliancePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromInstanceOSPoliciesComplianceName', () => { + const result = + client.matchInstanceFromInstanceOSPoliciesComplianceName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + ( + client.pathTemplates.instanceOSPoliciesCompliancePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('inventory', () => { + const fakePath = '/rendered/path/inventory'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + }; + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.inventoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.inventoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('inventoryPath', () => { + const result = client.inventoryPath( + 'projectValue', + 'locationValue', + 'instanceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.inventoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromInventoryName', () => { + const result = client.matchProjectFromInventoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.inventoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromInventoryName', () => { + const result = client.matchLocationFromInventoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.inventoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromInventoryName', () => { + const result = client.matchInstanceFromInventoryName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.inventoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('oSPolicyAssignment', () => { + const fakePath = '/rendered/path/oSPolicyAssignment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + os_policy_assignment: 'osPolicyAssignmentValue', + }; + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.oSPolicyAssignmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.oSPolicyAssignmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('oSPolicyAssignmentPath', () => { + const result = client.oSPolicyAssignmentPath( + 'projectValue', + 'locationValue', + 'osPolicyAssignmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromOSPolicyAssignmentName', () => { + const result = client.matchProjectFromOSPolicyAssignmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOSPolicyAssignmentName', () => { + const result = client.matchLocationFromOSPolicyAssignmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchOsPolicyAssignmentFromOSPolicyAssignmentName', () => { + const result = + client.matchOsPolicyAssignmentFromOSPolicyAssignmentName(fakePath); + assert.strictEqual(result, 'osPolicyAssignmentValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('vulnerabilityReport', () => { + const fakePath = '/rendered/path/vulnerabilityReport'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + }; + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vulnerabilityReportPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.vulnerabilityReportPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('vulnerabilityReportPath', () => { + const result = client.vulnerabilityReportPath( + 'projectValue', + 'locationValue', + 'instanceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVulnerabilityReportName', () => { + const result = client.matchProjectFromVulnerabilityReportName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVulnerabilityReportName', () => { + const result = + client.matchLocationFromVulnerabilityReportName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromVulnerabilityReportName', () => { + const result = + client.matchInstanceFromVulnerabilityReportName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); From eda8fd7fb64caf031393f4a02ad0508b6419697d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 May 2021 10:32:52 -0700 Subject: [PATCH 074/154] chore: release 1.5.0 (#102) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index b374c485d24..4b3a9c84baf 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.5.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.4.0...v1.5.0) (2021-05-12) + + +### Features + +* add OSConfig v1alpha api ([#100](https://www.github.com/googleapis/nodejs-os-config/issues/100)) ([aa51617](https://www.github.com/googleapis/nodejs-os-config/commit/aa51617e8d473a1b2b08f878d3c9609b58274341)) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#95](https://www.github.com/googleapis/nodejs-os-config/issues/95)) ([1aae782](https://www.github.com/googleapis/nodejs-os-config/commit/1aae7821fe5d4606da2e04c05e383b43b698067e)) +* use require() to load JSON protos ([#98](https://www.github.com/googleapis/nodejs-os-config/issues/98)) ([d9e466b](https://www.github.com/googleapis/nodejs-os-config/commit/d9e466b9e54bd6ec667a0dfd324a47ec5593d7e1)) + ## [1.4.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.3.1...v1.4.0) (2021-01-09) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index a2ee581e5ea..921be7354fb 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.4.0", + "version": "1.5.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 73ebc29c617..1d6bea92281 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.4.0" + "@google-cloud/os-config": "^1.5.0" }, "devDependencies": { "c8": "^7.1.0", From 1eafa8a144a6c73c3cbffcbe85a14c053edddcf2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 May 2021 19:06:26 +0200 Subject: [PATCH 075/154] chore(deps): update dependency @types/node to v14 (#104) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^12.12.37` -> `^14.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/12.20.13/14.17.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/compatibility-slim/12.20.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/confidence-slim/12.20.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 921be7354fb..00e571cbc4f 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.0", - "@types/node": "^12.12.37", + "@types/node": "^14.0.0", "@types/sinon": "^10.0.0", "c8": "^7.1.2", "gts": "^3.0.0", From 722e8b3c3c42d1da119f4bce922174741455d638 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 12:17:14 -0700 Subject: [PATCH 076/154] feat: OSConfig: add ExecResourceOutput and per step error message. (#105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: OSConfig: add ExecResourceOutput and per step error message. Committer: @adjackura PiperOrigin-RevId: 375488160 Source-Link: https://github.com/googleapis/googleapis/commit/82668866992e047531dfc57bd9301c77c6d8c950 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2702087ebae732b3f9e003e880a2d0c1ba531cf6 * 🦉 Updates from OwlBot Co-authored-by: Owl Bot --- .../osconfig/v1alpha/config_common.proto | 19 +- .../instance_os_policies_compliance.proto | 12 +- .../cloud/osconfig/v1alpha/inventory.proto | 13 +- .../cloud/osconfig/v1alpha/os_policy.proto | 37 ++- .../v1alpha/os_policy_assignments.proto | 38 +-- .../osconfig/v1alpha/osconfig_common.proto | 2 +- .../v1alpha/osconfig_zonal_service.proto | 45 +-- .../osconfig/v1alpha/vulnerability.proto | 11 +- .../google-cloud-osconfig/protos/protos.d.ts | 114 +++++++ .../google-cloud-osconfig/protos/protos.js | 290 +++++++++++++++++- .../google-cloud-osconfig/protos/protos.json | 31 +- .../v1alpha/os_config_zonal_service_client.ts | 3 +- 12 files changed, 521 insertions(+), 94 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto index d684ecaca6c..fa60feafd4e 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto @@ -18,9 +18,9 @@ package google.cloud.osconfig.v1alpha; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; option java_outer_classname = "ConfigCommonProto"; option java_package = "com.google.cloud.osconfig.v1alpha"; -option java_multiple_files = true; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; @@ -68,10 +68,21 @@ message OSPolicyResourceConfigStep { // Outcome of the configuration step. Outcome outcome = 2; + + // An error message recorded during the execution of this step. + // Only populated when outcome is FAILED. + string error_message = 3; } // Compliance data for an OS policy resource. message OSPolicyResourceCompliance { + // ExecResource specific output. + message ExecResourceOutput { + // Output from Enforcement phase output file (if run). + // Output size is limited to 100K bytes. + bytes enforcement_output = 2; + } + // The id of the OS policy resource. string os_policy_resource_id = 1; @@ -81,6 +92,12 @@ message OSPolicyResourceCompliance { // Compliance state of the OS policy resource. OSPolicyComplianceState state = 3; + + // Resource specific output. + oneof output { + // ExecResource specific output. + ExecResourceOutput exec_resource_output = 4; + } } // Supported OSPolicy compliance states. diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto index f56738f5537..65c3f682f95 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto @@ -23,9 +23,9 @@ import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; option java_outer_classname = "InstanceOSPoliciesComplianceProto"; option java_package = "com.google.cloud.osconfig.v1alpha"; -option java_multiple_files = true; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; @@ -58,8 +58,8 @@ message InstanceOSPoliciesCompliance { // Format: // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` string os_policy_assignment = 2 [(google.api.resource_reference) = { - type: "osconfig.googleapis.com/OSPolicyAssignment" - }]; + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; // Compliance state of the OS policy. OSPolicyComplianceState state = 4; @@ -101,12 +101,10 @@ message InstanceOSPoliciesCompliance { string detailed_state_reason = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Compliance data for each `OSPolicy` that is applied to the VM. - repeated OSPolicyCompliance os_policy_compliances = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated OSPolicyCompliance os_policy_compliances = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp of the last compliance check for the VM. - google.protobuf.Timestamp last_compliance_check_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp last_compliance_check_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Unique identifier for the last compliance run. // This id will be logged by the OS config agent during a compliance run and diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto index 303fde11127..38e12f945b8 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto @@ -22,9 +22,9 @@ import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; option java_outer_classname = "Inventories"; option java_package = "com.google.cloud.osconfig.v1alpha"; -option java_multiple_files = true; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; @@ -269,15 +269,14 @@ message Inventory { // Output only. Base level operating system information for the VM. OsInfo os_info = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Inventory items related to the VM keyed by an opaque unique - // identifier for each inventory item. The identifier is unique to each - // distinct and addressable inventory item and will change, when there is a - // new package version. + // Output only. Inventory items related to the VM keyed by an opaque unique identifier for + // each inventory item. The identifier is unique to each distinct and + // addressable inventory item and will change, when there is a new package + // version. map items = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp of the last reported inventory for the VM. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request message for getting inventory data for the specified VM. diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto index f3dd6338707..5b004145cbe 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto @@ -20,9 +20,9 @@ import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; option java_outer_classname = "OSPolicyProto"; option java_package = "com.google.cloud.osconfig.v1alpha"; -option java_multiple_files = true; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; @@ -54,8 +54,8 @@ message OSPolicy { message File { // Specifies a file available via some URI. message Remote { - // Required. URI from which to fetch the object. It should contain both - // the protocol and path following the format `{protocol}://{location}`. + // Required. URI from which to fetch the object. It should contain both the + // protocol and path following the format `{protocol}://{location}`. string uri = 1 [(google.api.field_behavior) = REQUIRED]; // SHA256 checksum of the remote file. @@ -232,8 +232,8 @@ message OSPolicy { // Required. Distribution of this repository. string distribution = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. List of components for this repository. Must contain at - // least one item. + // Required. List of components for this repository. Must contain at least one + // item. repeated string components = 4 [(google.api.field_behavior) = REQUIRED]; // URI of the key file for this repository. The agent maintains a @@ -245,8 +245,8 @@ message OSPolicy { // repo file that is managed at // `/etc/yum.repos.d/google_osconfig.repo`. message YumRepository { - // Required. A one word, unique name for this repository. This is the - // `repo id` in the yum config file and also the `display_name` if + // Required. A one word, unique name for this repository. This is the `repo + // id` in the yum config file and also the `display_name` if // `display_name` is omitted. This id is also used as the unique // identifier when checking for resource conflicts. string id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -265,8 +265,8 @@ message OSPolicy { // repo file that is managed at // `/etc/zypp/repos.d/google_osconfig.repo`. message ZypperRepository { - // Required. A one word, unique name for this repository. This is the - // `repo id` in the zypper config file and also the `display_name` if + // Required. A one word, unique name for this repository. This is the `repo + // id` in the zypper config file and also the `display_name` if // `display_name` is omitted. This id is also used as the unique // identifier when checking for GuestPolicy conflicts. string id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -372,12 +372,20 @@ message OSPolicy { // Required. The script interpreter to use. Interpreter interpreter = 4 [(google.api.field_behavior) = REQUIRED]; + + // Only recorded for enforce Exec. + // Path to an output file (that is created by this Exec) whose + // content will be recorded in OSPolicyResourceCompliance after a + // successful run. Absence or failure to read this file will result in + // this ExecResource being non-compliant. Output file size is limited to + // 100K bytes. + string output_file_path = 5; } - // Required. What to run to validate this resource is in the desired - // state. An exit code of 100 indicates "in desired state", and exit code - // of 101 indicates "not in desired state". Any other exit code indicates - // a failure running validate. + // Required. What to run to validate this resource is in the desired state. + // An exit code of 100 indicates "in desired state", and exit code of 101 + // indicates "not in desired state". Any other exit code indicates a + // failure running validate. Exec validate = 1 [(google.api.field_behavior) = REQUIRED]; // What to run to bring this resource into the desired state. @@ -517,8 +525,7 @@ message OSPolicy { // If none of the resource groups are applicable for a VM, the VM is // considered to be non-compliant w.r.t this policy. This behavior can be // toggled by the flag `allow_no_resource_group_match` - repeated ResourceGroup resource_groups = 4 - [(google.api.field_behavior) = REQUIRED]; + repeated ResourceGroup resource_groups = 4 [(google.api.field_behavior) = REQUIRED]; // This flag determines the OS policy compliance status when none of the // resource groups within the policy are applicable for a VM. Set this value diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto index 43c9cfe6c07..4b9943aa438 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto @@ -26,9 +26,9 @@ import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; option java_outer_classname = "OSPolicyAssignments"; option java_package = "com.google.cloud.osconfig.v1alpha"; -option java_multiple_files = true; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; @@ -95,18 +95,16 @@ message OSPolicyAssignment { // Message to configure the rollout at the zonal level for the OS policy // assignment. message Rollout { - // Required. The maximum number (or percentage) of VMs per zone to disrupt - // at any given moment. - FixedOrPercent disruption_budget = 1 - [(google.api.field_behavior) = REQUIRED]; + // Required. The maximum number (or percentage) of VMs per zone to disrupt at + // any given moment. + FixedOrPercent disruption_budget = 1 [(google.api.field_behavior) = REQUIRED]; // Required. This determines the minimum duration of time to wait after the // configuration changes are applied through the current rollout. A // VM continues to count towards the `disruption_budget` at least // until this duration of time has passed after configuration changes are // applied. - google.protobuf.Duration min_wait_duration = 2 - [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration min_wait_duration = 2 [(google.api.field_behavior) = REQUIRED]; } // OS policy assignment rollout state @@ -161,14 +159,13 @@ message OSPolicyAssignment { string revision_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The timestamp that the revision was created. - google.protobuf.Timestamp revision_create_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp revision_create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. OS policy assignment rollout state RolloutState rollout_state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Indicates that this revision has been successfully rolled out - // in this zone and new VMs will be assigned OS policies from this revision. + // Output only. Indicates that this revision has been successfully rolled out in this zone + // and new VMs will be assigned OS policies from this revision. // // For a given OS policy assignment, there is only one revision with a value // of `true` for this field. @@ -183,8 +180,7 @@ message OSPolicyAssignment { // * CANCELLING bool reconciling = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Server generated unique id for the OS policy assignment - // resource. + // Output only. Server generated unique id for the OS policy assignment resource. string uid = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -229,8 +225,8 @@ message OSPolicyAssignmentOperationMetadata { // Format: // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` string os_policy_assignment = 1 [(google.api.resource_reference) = { - type: "osconfig.googleapis.com/OSPolicyAssignment" - }]; + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; // The OS policy assignment API method. APIMethod api_method = 2; @@ -257,8 +253,7 @@ message CreateOSPolicyAssignmentRequest { ]; // Required. The OS policy assignment to be created. - OSPolicyAssignment os_policy_assignment = 2 - [(google.api.field_behavior) = REQUIRED]; + OSPolicyAssignment os_policy_assignment = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The logical name of the OS policy assignment in the project // with the following restrictions: @@ -274,13 +269,10 @@ message CreateOSPolicyAssignmentRequest { // A request message to update an OS policy assignment message UpdateOSPolicyAssignmentRequest { // Required. The updated OS policy assignment. - OSPolicyAssignment os_policy_assignment = 1 - [(google.api.field_behavior) = REQUIRED]; + OSPolicyAssignment os_policy_assignment = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Field mask that controls which fields of the assignment should be - // updated. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = OPTIONAL]; + // Optional. Field mask that controls which fields of the assignment should be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; } // A request message to get an OS policy assignment diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto index 2b99a97cbfa..9cd376c5fe8 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto @@ -18,9 +18,9 @@ package google.cloud.osconfig.v1alpha; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; option java_outer_classname = "Common"; option java_package = "com.google.cloud.osconfig.v1alpha"; -option java_multiple_files = true; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto index 3e7d847921d..8d979fd5f21 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto @@ -27,14 +27,11 @@ import "google/longrunning/operations.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; option java_outer_classname = "OsConfigZonalServiceProto"; option java_package = "com.google.cloud.osconfig.v1alpha"; -option java_multiple_files = true; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; - -// Some messages refer to Compute API resources; the resource names -// need to be defined so that client library generators know how to handle them. option (google.api.resource_definition) = { type: "compute.googleapis.com/Instance" pattern: "projects/{project}/locations/{location}/instances/{instance}" @@ -46,8 +43,7 @@ option (google.api.resource_definition) = { // manage package installations and patch jobs for Compute Engine VM instances. service OsConfigZonalService { option (google.api.default_host) = "osconfig.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Create an OS policy assignment. // @@ -58,14 +54,12 @@ service OsConfigZonalService { // // For more information, see [Method: // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). - rpc CreateOSPolicyAssignment(CreateOSPolicyAssignmentRequest) - returns (google.longrunning.Operation) { + rpc CreateOSPolicyAssignment(CreateOSPolicyAssignmentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments" body: "os_policy_assignment" }; - option (google.api.method_signature) = - "parent,os_policy_assignment,os_policy_assignment_id"; + option (google.api.method_signature) = "parent,os_policy_assignment,os_policy_assignment_id"; option (google.longrunning.operation_info) = { response_type: "OSPolicyAssignment" metadata_type: "OSPolicyAssignmentOperationMetadata" @@ -81,8 +75,7 @@ service OsConfigZonalService { // // For more information, see [Method: // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). - rpc UpdateOSPolicyAssignment(UpdateOSPolicyAssignmentRequest) - returns (google.longrunning.Operation) { + rpc UpdateOSPolicyAssignment(UpdateOSPolicyAssignmentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1alpha/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}" body: "os_policy_assignment" @@ -99,8 +92,7 @@ service OsConfigZonalService { // This method always returns the latest revision. In order to retrieve a // previous revision of the assignment, also provide the revision ID in the // `name` parameter. - rpc GetOSPolicyAssignment(GetOSPolicyAssignmentRequest) - returns (OSPolicyAssignment) { + rpc GetOSPolicyAssignment(GetOSPolicyAssignmentRequest) returns (OSPolicyAssignment) { option (google.api.http) = { get: "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" }; @@ -110,8 +102,7 @@ service OsConfigZonalService { // List the OS policy assignments under the parent resource. // // For each OS policy assignment, the latest revision is returned. - rpc ListOSPolicyAssignments(ListOSPolicyAssignmentsRequest) - returns (ListOSPolicyAssignmentsResponse) { + rpc ListOSPolicyAssignments(ListOSPolicyAssignmentsRequest) returns (ListOSPolicyAssignmentsResponse) { option (google.api.http) = { get: "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments" }; @@ -119,8 +110,7 @@ service OsConfigZonalService { } // List the OS policy assignment revisions for a given OS policy assignment. - rpc ListOSPolicyAssignmentRevisions(ListOSPolicyAssignmentRevisionsRequest) - returns (ListOSPolicyAssignmentRevisionsResponse) { + rpc ListOSPolicyAssignmentRevisions(ListOSPolicyAssignmentRevisionsRequest) returns (ListOSPolicyAssignmentRevisionsResponse) { option (google.api.http) = { get: "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions" }; @@ -139,8 +129,7 @@ service OsConfigZonalService { // // For more information, see [Method: // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). - rpc DeleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest) - returns (google.longrunning.Operation) { + rpc DeleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" }; @@ -153,8 +142,7 @@ service OsConfigZonalService { // Get OS policies compliance data for the specified Compute Engine VM // instance. - rpc GetInstanceOSPoliciesCompliance(GetInstanceOSPoliciesComplianceRequest) - returns (InstanceOSPoliciesCompliance) { + rpc GetInstanceOSPoliciesCompliance(GetInstanceOSPoliciesComplianceRequest) returns (InstanceOSPoliciesCompliance) { option (google.api.http) = { get: "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}" }; @@ -163,9 +151,7 @@ service OsConfigZonalService { // List OS policies compliance data for all Compute Engine VM instances in the // specified zone. - rpc ListInstanceOSPoliciesCompliances( - ListInstanceOSPoliciesCompliancesRequest) - returns (ListInstanceOSPoliciesCompliancesResponse) { + rpc ListInstanceOSPoliciesCompliances(ListInstanceOSPoliciesCompliancesRequest) returns (ListInstanceOSPoliciesCompliancesResponse) { option (google.api.http) = { get: "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances" }; @@ -182,8 +168,7 @@ service OsConfigZonalService { } // List inventory data for all VM instances in the specified zone. - rpc ListInventories(ListInventoriesRequest) - returns (ListInventoriesResponse) { + rpc ListInventories(ListInventoriesRequest) returns (ListInventoriesResponse) { option (google.api.http) = { get: "/v1alpha/{parent=projects/*/locations/*/instances/*}/inventories" }; @@ -192,8 +177,7 @@ service OsConfigZonalService { // Gets the vulnerability report for the specified VM instance. Only VMs with // inventory data have vulnerability reports associated with them. - rpc GetVulnerabilityReport(GetVulnerabilityReportRequest) - returns (VulnerabilityReport) { + rpc GetVulnerabilityReport(GetVulnerabilityReportRequest) returns (VulnerabilityReport) { option (google.api.http) = { get: "/v1alpha/{name=projects/*/locations/*/instances/*/vulnerabilityReport}" }; @@ -201,8 +185,7 @@ service OsConfigZonalService { } // List vulnerability reports for all VM instances in the specified zone. - rpc ListVulnerabilityReports(ListVulnerabilityReportsRequest) - returns (ListVulnerabilityReportsResponse) { + rpc ListVulnerabilityReports(ListVulnerabilityReportsRequest) returns (ListVulnerabilityReportsResponse) { option (google.api.http) = { get: "/v1alpha/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports" }; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto index 8dcfb327597..6b9a5eb1056 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto @@ -22,9 +22,9 @@ import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; option java_outer_classname = "VulnerabilityProto"; option java_package = "com.google.cloud.osconfig.v1alpha"; -option java_multiple_files = true; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; @@ -59,20 +59,21 @@ message VulnerabilityReport { // 0 - 10 where 0 indicates low severity and 10 indicates high severity. float cvss_v2_score = 2; - // The full description of the CVSSv3 for this vulnerability. + // The full description of the CVSSv3 for this vulnerability from NVD. CVSSv3 cvss_v3 = 3; - // Assigned severity/impact ranking. + // Assigned severity/impact ranking from the distro. string severity = 4; - // The note or description describing the vulnerability. + // The note or description describing the vulnerability from the distro. string description = 5; // Corresponds to the references attached to the `VulnerabilityDetails`. repeated Reference references = 6; } - // Contains metadata as per the upstream feed of the operating system. + // Contains metadata as per the upstream feed of the operating system and + // NVD. Details details = 1; // Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index e62e94bc58b..f6251764e71 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -8792,6 +8792,9 @@ export namespace google { /** OSPolicyResourceConfigStep outcome */ outcome?: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|null); + + /** OSPolicyResourceConfigStep errorMessage */ + errorMessage?: (string|null); } /** Represents a OSPolicyResourceConfigStep. */ @@ -8809,6 +8812,9 @@ export namespace google { /** OSPolicyResourceConfigStep outcome. */ public outcome: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome); + /** OSPolicyResourceConfigStep errorMessage. */ + public errorMessage: string; + /** * Creates a new OSPolicyResourceConfigStep instance using the specified properties. * @param [properties] Properties to set @@ -8910,6 +8916,9 @@ export namespace google { /** OSPolicyResourceCompliance state */ state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); + + /** OSPolicyResourceCompliance execResourceOutput */ + execResourceOutput?: (google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null); } /** Represents a OSPolicyResourceCompliance. */ @@ -8930,6 +8939,12 @@ export namespace google { /** OSPolicyResourceCompliance state. */ public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); + /** OSPolicyResourceCompliance execResourceOutput. */ + public execResourceOutput?: (google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null); + + /** OSPolicyResourceCompliance output. */ + public output?: "execResourceOutput"; + /** * Creates a new OSPolicyResourceCompliance instance using the specified properties. * @param [properties] Properties to set @@ -9001,6 +9016,99 @@ export namespace google { public toJSON(): { [k: string]: any }; } + namespace OSPolicyResourceCompliance { + + /** Properties of an ExecResourceOutput. */ + interface IExecResourceOutput { + + /** ExecResourceOutput enforcementOutput */ + enforcementOutput?: (Uint8Array|string|null); + } + + /** Represents an ExecResourceOutput. */ + class ExecResourceOutput implements IExecResourceOutput { + + /** + * Constructs a new ExecResourceOutput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput); + + /** ExecResourceOutput enforcementOutput. */ + public enforcementOutput: (Uint8Array|string); + + /** + * Creates a new ExecResourceOutput instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecResourceOutput instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @param message ExecResourceOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @param message ExecResourceOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Verifies an ExecResourceOutput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecResourceOutput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. + * @param message ExecResourceOutput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecResourceOutput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + /** OSPolicyComplianceState enum. */ enum OSPolicyComplianceState { OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0, @@ -13036,6 +13144,9 @@ export namespace google { /** Exec interpreter */ interpreter?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|null); + + /** Exec outputFilePath */ + outputFilePath?: (string|null); } /** Represents an Exec. */ @@ -13059,6 +13170,9 @@ export namespace google { /** Exec interpreter. */ public interpreter: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter); + /** Exec outputFilePath. */ + public outputFilePath: string; + /** Exec source. */ public source?: ("file"|"script"); diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index de2fd09a16e..ffe0f2f4fbc 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -23303,6 +23303,7 @@ * @interface IOSPolicyResourceConfigStep * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|null} [type] OSPolicyResourceConfigStep type * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|null} [outcome] OSPolicyResourceConfigStep outcome + * @property {string|null} [errorMessage] OSPolicyResourceConfigStep errorMessage */ /** @@ -23336,6 +23337,14 @@ */ OSPolicyResourceConfigStep.prototype.outcome = 0; + /** + * OSPolicyResourceConfigStep errorMessage. + * @member {string} errorMessage + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.errorMessage = ""; + /** * Creates a new OSPolicyResourceConfigStep instance using the specified properties. * @function create @@ -23364,6 +23373,8 @@ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); if (message.outcome != null && Object.hasOwnProperty.call(message, "outcome")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.outcome); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage); return writer; }; @@ -23404,6 +23415,9 @@ case 2: message.outcome = reader.int32(); break; + case 3: + message.errorMessage = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -23459,6 +23473,9 @@ case 2: break; } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; return null; }; @@ -23510,6 +23527,8 @@ message.outcome = 2; break; } + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); return message; }; @@ -23529,11 +23548,14 @@ if (options.defaults) { object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; object.outcome = options.enums === String ? "OUTCOME_UNSPECIFIED" : 0; + object.errorMessage = ""; } if (message.type != null && message.hasOwnProperty("type")) object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type[message.type] : message.type; if (message.outcome != null && message.hasOwnProperty("outcome")) object.outcome = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome[message.outcome] : message.outcome; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; return object; }; @@ -23596,6 +23618,7 @@ * @property {string|null} [osPolicyResourceId] OSPolicyResourceCompliance osPolicyResourceId * @property {Array.|null} [configSteps] OSPolicyResourceCompliance configSteps * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] OSPolicyResourceCompliance state + * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null} [execResourceOutput] OSPolicyResourceCompliance execResourceOutput */ /** @@ -23638,6 +23661,28 @@ */ OSPolicyResourceCompliance.prototype.state = 0; + /** + * OSPolicyResourceCompliance execResourceOutput. + * @member {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null|undefined} execResourceOutput + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.execResourceOutput = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OSPolicyResourceCompliance output. + * @member {"execResourceOutput"|undefined} output + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @instance + */ + Object.defineProperty(OSPolicyResourceCompliance.prototype, "output", { + get: $util.oneOfGetter($oneOfFields = ["execResourceOutput"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new OSPolicyResourceCompliance instance using the specified properties. * @function create @@ -23669,6 +23714,8 @@ $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.encode(message.configSteps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.execResourceOutput != null && Object.hasOwnProperty.call(message, "execResourceOutput")) + $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.encode(message.execResourceOutput, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -23714,6 +23761,9 @@ case 3: message.state = reader.int32(); break; + case 4: + message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -23749,6 +23799,7 @@ OSPolicyResourceCompliance.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) if (!$util.isString(message.osPolicyResourceId)) return "osPolicyResourceId: string expected"; @@ -23772,6 +23823,14 @@ case 4: break; } + if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { + properties.output = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify(message.execResourceOutput); + if (error) + return "execResourceOutput." + error; + } + } return null; }; @@ -23821,6 +23880,11 @@ message.state = 4; break; } + if (object.execResourceOutput != null) { + if (typeof object.execResourceOutput !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.execResourceOutput: object expected"); + message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.fromObject(object.execResourceOutput); + } return message; }; @@ -23852,6 +23916,11 @@ } if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { + object.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.toObject(message.execResourceOutput, options); + if (options.oneofs) + object.output = "execResourceOutput"; + } return object; }; @@ -23866,6 +23935,202 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + OSPolicyResourceCompliance.ExecResourceOutput = (function() { + + /** + * Properties of an ExecResourceOutput. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @interface IExecResourceOutput + * @property {Uint8Array|null} [enforcementOutput] ExecResourceOutput enforcementOutput + */ + + /** + * Constructs a new ExecResourceOutput. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @classdesc Represents an ExecResourceOutput. + * @implements IExecResourceOutput + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set + */ + function ExecResourceOutput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecResourceOutput enforcementOutput. + * @member {Uint8Array} enforcementOutput + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @instance + */ + ExecResourceOutput.prototype.enforcementOutput = $util.newBuffer([]); + + /** + * Creates a new ExecResourceOutput instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput instance + */ + ExecResourceOutput.create = function create(properties) { + return new ExecResourceOutput(properties); + }; + + /** + * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResourceOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enforcementOutput != null && Object.hasOwnProperty.call(message, "enforcementOutput")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.enforcementOutput); + return writer; + }; + + /** + * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResourceOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResourceOutput.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.enforcementOutput = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResourceOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecResourceOutput message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecResourceOutput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) + if (!(message.enforcementOutput && typeof message.enforcementOutput.length === "number" || $util.isString(message.enforcementOutput))) + return "enforcementOutput: buffer expected"; + return null; + }; + + /** + * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + */ + ExecResourceOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput(); + if (object.enforcementOutput != null) + if (typeof object.enforcementOutput === "string") + $util.base64.decode(object.enforcementOutput, message.enforcementOutput = $util.newBuffer($util.base64.length(object.enforcementOutput)), 0); + else if (object.enforcementOutput.length) + message.enforcementOutput = object.enforcementOutput; + return message; + }; + + /** + * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} message ExecResourceOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecResourceOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.enforcementOutput = ""; + else { + object.enforcementOutput = []; + if (options.bytes !== Array) + object.enforcementOutput = $util.newBuffer(object.enforcementOutput); + } + if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) + object.enforcementOutput = options.bytes === String ? $util.base64.encode(message.enforcementOutput, 0, message.enforcementOutput.length) : options.bytes === Array ? Array.prototype.slice.call(message.enforcementOutput) : message.enforcementOutput; + return object; + }; + + /** + * Converts this ExecResourceOutput to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @instance + * @returns {Object.} JSON object + */ + ExecResourceOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExecResourceOutput; + })(); + return OSPolicyResourceCompliance; })(); @@ -34044,6 +34309,7 @@ * @property {string|null} [script] Exec script * @property {Array.|null} [args] Exec args * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|null} [interpreter] Exec interpreter + * @property {string|null} [outputFilePath] Exec outputFilePath */ /** @@ -34094,6 +34360,14 @@ */ Exec.prototype.interpreter = 0; + /** + * Exec outputFilePath. + * @member {string} outputFilePath + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.outputFilePath = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -34141,6 +34415,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); + if (message.outputFilePath != null && Object.hasOwnProperty.call(message, "outputFilePath")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.outputFilePath); return writer; }; @@ -34189,6 +34465,9 @@ case 4: message.interpreter = reader.int32(); break; + case 5: + message.outputFilePath = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -34257,6 +34536,9 @@ case 3: break; } + if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) + if (!$util.isString(message.outputFilePath)) + return "outputFilePath: string expected"; return null; }; @@ -34304,6 +34586,8 @@ message.interpreter = 3; break; } + if (object.outputFilePath != null) + message.outputFilePath = String(object.outputFilePath); return message; }; @@ -34322,8 +34606,10 @@ var object = {}; if (options.arrays || options.defaults) object.args = []; - if (options.defaults) + if (options.defaults) { object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; + object.outputFilePath = ""; + } if (message.file != null && message.hasOwnProperty("file")) { object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.file, options); if (options.oneofs) @@ -34341,6 +34627,8 @@ } if (message.interpreter != null && message.hasOwnProperty("interpreter")) object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] : message.interpreter; + if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) + object.outputFilePath = message.outputFilePath; return object; }; diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index a3ac126651e..5c54f648eb8 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -2399,9 +2399,9 @@ "options": { "csharp_namespace": "Google.Cloud.OsConfig.V1Alpha", "go_package": "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig", + "java_multiple_files": true, "java_outer_classname": "VulnerabilityProto", "java_package": "com.google.cloud.osconfig.v1alpha", - "java_multiple_files": true, "php_namespace": "Google\\Cloud\\OsConfig\\V1alpha", "ruby_package": "Google::Cloud::OsConfig::V1alpha", "(google.api.resource_definition).type": "compute.googleapis.com/Instance", @@ -2417,6 +2417,10 @@ "outcome": { "type": "Outcome", "id": 2 + }, + "errorMessage": { + "type": "string", + "id": 3 } }, "nested": { @@ -2439,6 +2443,13 @@ } }, "OSPolicyResourceCompliance": { + "oneofs": { + "output": { + "oneof": [ + "execResourceOutput" + ] + } + }, "fields": { "osPolicyResourceId": { "type": "string", @@ -2452,6 +2463,20 @@ "state": { "type": "OSPolicyComplianceState", "id": 3 + }, + "execResourceOutput": { + "type": "ExecResourceOutput", + "id": 4 + } + }, + "nested": { + "ExecResourceOutput": { + "fields": { + "enforcementOutput": { + "type": "bytes", + "id": 2 + } + } } } }, @@ -3457,6 +3482,10 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "outputFilePath": { + "type": "string", + "id": 5 } }, "nested": { diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index e5ac69528d1..36b67cac6ae 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -1050,8 +1050,7 @@ export class OsConfigZonalServiceClient { * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} request.osPolicyAssignment * Required. The updated OS policy assignment. * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Field mask that controls which fields of the assignment should be - * updated. + * Optional. Field mask that controls which fields of the assignment should be updated. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. From 20684119f340720c6cb1bdc30169a7f8c9d234de Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 19:24:03 +0000 Subject: [PATCH 077/154] chore: release 1.6.0 (#106) :robot: I have created a release \*beep\* \*boop\* --- ## [1.6.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.5.0...v1.6.0) (2021-05-24) ### Features * OSConfig: add ExecResourceOutput and per step error message. ([#105](https://www.github.com/googleapis/nodejs-os-config/issues/105)) ([3d9dbe9](https://www.github.com/googleapis/nodejs-os-config/commit/3d9dbe9f619798e691df9e04a65f8e42a2c2b0bc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 4b3a9c84baf..d0478cf399b 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.6.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.5.0...v1.6.0) (2021-05-24) + + +### Features + +* OSConfig: add ExecResourceOutput and per step error message. ([#105](https://www.github.com/googleapis/nodejs-os-config/issues/105)) ([3d9dbe9](https://www.github.com/googleapis/nodejs-os-config/commit/3d9dbe9f619798e691df9e04a65f8e42a2c2b0bc)) + ## [1.5.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.4.0...v1.5.0) (2021-05-12) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 00e571cbc4f..d6b001445e3 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.5.0", + "version": "1.6.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 1d6bea92281..dad2fe8ca11 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.5.0" + "@google-cloud/os-config": "^1.6.0" }, "devDependencies": { "c8": "^7.1.0", From 7a2a5c668c6e682c2a6cdeba3dfe2ca674c0dac4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 18:00:19 +0200 Subject: [PATCH 078/154] chore(deps): update dependency sinon to v11 (#107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^10.0.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/sinon/10.0.0/11.1.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/compatibility-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/confidence-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v11.1.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1110--2021-05-25) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.0.0...31be9a5d5a4762ef01cb195f29024616dfee9ce8) \================== - Add sinon.promise() implementation ([#​2369](https://togithub.com/sinonjs/sinon/issues/2369)) - Set wrappedMethod on getters/setters ([#​2378](https://togithub.com/sinonjs/sinon/issues/2378)) - \[Docs] Update fake-server usage & descriptions ([#​2365](https://togithub.com/sinonjs/sinon/issues/2365)) - Fake docs improvement ([#​2360](https://togithub.com/sinonjs/sinon/issues/2360)) - Update nise to 5.1.0 (fixed [#​2318](https://togithub.com/sinonjs/sinon/issues/2318)) ### [`v11.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1100--2021-05-24) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.1...v11.0.0) \================== - Explicitly use samsam 6.0.2 with fix for [#​2345](https://togithub.com/sinonjs/sinon/issues/2345) - Update most packages ([#​2371](https://togithub.com/sinonjs/sinon/issues/2371)) - Update compatibility docs ([#​2366](https://togithub.com/sinonjs/sinon/issues/2366)) - Update packages (includes breaking fake-timers change, see [#​2352](https://togithub.com/sinonjs/sinon/issues/2352)) - Warn of potential memory leaks ([#​2357](https://togithub.com/sinonjs/sinon/issues/2357)) - Fix clock test errors ### [`v10.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1001--2021-04-08) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.0...v10.0.1) \================== - Upgrade sinon components (bumps y18n to 4.0.1) - Bump y18n from 4.0.0 to 4.0.1
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index d6b001445e3..1da312e9c6a 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -44,7 +44,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.0.0", "typescript": "~3.8.3", "@microsoft/api-documenter": "^7.8.10", From d40873aa6b7951be4ad9665dba5c75e378b565f3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 20:48:56 +0000 Subject: [PATCH 079/154] fix: GoogleAdsError missing using generator version after 1.3.0 (#108) [PR](https://github.com/googleapis/gapic-generator-typescript/pull/878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: https://github.com/googleapis/googleapis/commit/95fa72fdd0d69b02d72c33b37d1e4cc66d4b1446 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46 --- .../google-cloud-osconfig/src/v1/os_config_service_client.ts | 2 ++ .../src/v1alpha/os_config_zonal_service_client.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 6dbce1323e0..1d5a58f9afc 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -143,6 +143,8 @@ export class OsConfigServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index 36b67cac6ae..e8320626683 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -145,6 +145,8 @@ export class OsConfigZonalServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); From 3d9c826963800e9228a70c524f9da8f5ce2e0a4b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 18:26:00 -0400 Subject: [PATCH 080/154] chore: release 1.6.1 (#109) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index d0478cf399b..7000d20b7fc 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.6.1](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.0...v1.6.1) (2021-05-25) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#108](https://www.github.com/googleapis/nodejs-os-config/issues/108)) ([3d61a36](https://www.github.com/googleapis/nodejs-os-config/commit/3d61a36652465fa948595a18a99e0ebb3ecd0eac)) + ## [1.6.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.5.0...v1.6.0) (2021-05-24) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 1da312e9c6a..3cef615aeea 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.6.0", + "version": "1.6.1", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index dad2fe8ca11..9844a2c3df9 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.6.0" + "@google-cloud/os-config": "^1.6.1" }, "devDependencies": { "c8": "^7.1.0", From 4e6f1e802046a3fbea5d84415015a73e4e4e4f6f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 29 May 2021 20:52:09 +0000 Subject: [PATCH 081/154] chore: make generate_index_ts() deterministic (#110) Fixes https://github.com/googleapis/synthtool/issues/1103 Source-Link: https://github.com/googleapis/synthtool/commit/c3e41da0fa256ad7f6b4bc76b9d069dedecdfef4 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:e37a815333a6f3e14d8532efe90cba8aa0d34210f8c0fdbdd9e6a34dcbe51e96 --- packages/google-cloud-osconfig/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-osconfig/src/index.ts b/packages/google-cloud-osconfig/src/index.ts index 2f5b7e6c190..0035f7ef758 100644 --- a/packages/google-cloud-osconfig/src/index.ts +++ b/packages/google-cloud-osconfig/src/index.ts @@ -16,13 +16,13 @@ // ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** -import * as v1alpha from './v1alpha'; import * as v1 from './v1'; +import * as v1alpha from './v1alpha'; const OsConfigServiceClient = v1.OsConfigServiceClient; type OsConfigServiceClient = v1.OsConfigServiceClient; -export {v1alpha, v1, OsConfigServiceClient}; -export default {v1alpha, v1, OsConfigServiceClient}; +export {v1, v1alpha, OsConfigServiceClient}; +export default {v1, v1alpha, OsConfigServiceClient}; import * as protos from '../protos/protos'; export {protos}; From a42b557bb67c7833279bab012d98fc66d9640cd4 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 10 Jun 2021 23:02:22 +0200 Subject: [PATCH 082/154] chore(nodejs): remove api-extractor dependencies (#115) --- packages/google-cloud-osconfig/package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 3cef615aeea..10dc55008dc 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -24,9 +24,7 @@ "prepare": "npm run compile-protos && npm run compile", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test", - "api-extractor": "api-extractor run --local", - "api-documenter": "api-documenter yaml --input-folder=temp" + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^2.12.0" @@ -46,9 +44,7 @@ "pack-n-play": "^1.0.0-2", "sinon": "^11.0.0", "ts-loader": "^9.0.0", - "typescript": "~3.8.3", - "@microsoft/api-documenter": "^7.8.10", - "@microsoft/api-extractor": "^7.8.10" + "typescript": "~3.8.3" }, "engines": { "node": ">=10.0.0" From 6da80f854bcd38d59ab24899146466f250f7af53 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:22:43 +0000 Subject: [PATCH 083/154] fix: make request optional in all cases (#117) ... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0 Committer: @miraleung PiperOrigin-RevId: 380641501 Source-Link: https://github.com/googleapis/googleapis/commit/076f7e9f0b258bdb54338895d7251b202e8f0de3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/27e4c88b4048e5f56508d4e1aa417d60a3380892 --- .../src/v1/os_config_service_client.ts | 36 +++++++------- .../v1alpha/os_config_zonal_service_client.ts | 48 +++++++++---------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 1d5a58f9afc..8f18c3a8b60 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -323,7 +323,7 @@ export class OsConfigServiceClient { // -- Service calls -- // ------------------- executePatchJob( - request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, + request?: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, options?: CallOptions ): Promise< [ @@ -390,7 +390,7 @@ export class OsConfigServiceClient { * const [response] = await client.executePatchJob(request); */ executePatchJob( - request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, + request?: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -433,7 +433,7 @@ export class OsConfigServiceClient { return this.innerApiCalls.executePatchJob(request, options, callback); } getPatchJob( - request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, + request?: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, options?: CallOptions ): Promise< [ @@ -478,7 +478,7 @@ export class OsConfigServiceClient { * const [response] = await client.getPatchJob(request); */ getPatchJob( - request: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, + request?: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -519,7 +519,7 @@ export class OsConfigServiceClient { return this.innerApiCalls.getPatchJob(request, options, callback); } cancelPatchJob( - request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, + request?: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, options?: CallOptions ): Promise< [ @@ -564,7 +564,7 @@ export class OsConfigServiceClient { * const [response] = await client.cancelPatchJob(request); */ cancelPatchJob( - request: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, + request?: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -605,7 +605,7 @@ export class OsConfigServiceClient { return this.innerApiCalls.cancelPatchJob(request, options, callback); } createPatchDeployment( - request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, + request?: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, options?: CallOptions ): Promise< [ @@ -664,7 +664,7 @@ export class OsConfigServiceClient { * const [response] = await client.createPatchDeployment(request); */ createPatchDeployment( - request: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, + request?: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -707,7 +707,7 @@ export class OsConfigServiceClient { return this.innerApiCalls.createPatchDeployment(request, options, callback); } getPatchDeployment( - request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, + request?: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, options?: CallOptions ): Promise< [ @@ -756,7 +756,7 @@ export class OsConfigServiceClient { * const [response] = await client.getPatchDeployment(request); */ getPatchDeployment( - request: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, + request?: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -799,7 +799,7 @@ export class OsConfigServiceClient { return this.innerApiCalls.getPatchDeployment(request, options, callback); } deletePatchDeployment( - request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, + request?: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, options?: CallOptions ): Promise< [ @@ -848,7 +848,7 @@ export class OsConfigServiceClient { * const [response] = await client.deletePatchDeployment(request); */ deletePatchDeployment( - request: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, + request?: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -892,7 +892,7 @@ export class OsConfigServiceClient { } listPatchJobs( - request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, options?: CallOptions ): Promise< [ @@ -948,7 +948,7 @@ export class OsConfigServiceClient { * for more details and examples. */ listPatchJobs( - request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -1092,7 +1092,7 @@ export class OsConfigServiceClient { ) as AsyncIterable; } listPatchJobInstanceDetails( - request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, options?: CallOptions ): Promise< [ @@ -1153,7 +1153,7 @@ export class OsConfigServiceClient { * for more details and examples. */ listPatchJobInstanceDetails( - request: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, + request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -1305,7 +1305,7 @@ export class OsConfigServiceClient { ) as AsyncIterable; } listPatchDeployments( - request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, options?: CallOptions ): Promise< [ @@ -1363,7 +1363,7 @@ export class OsConfigServiceClient { * for more details and examples. */ listPatchDeployments( - request: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, + request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index e8320626683..8f85c14c60d 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -410,7 +410,7 @@ export class OsConfigZonalServiceClient { // -- Service calls -- // ------------------- getOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, + request?: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, options?: CallOptions ): Promise< [ @@ -468,7 +468,7 @@ export class OsConfigZonalServiceClient { * const [response] = await client.getOSPolicyAssignment(request); */ getOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, + request?: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -514,7 +514,7 @@ export class OsConfigZonalServiceClient { return this.innerApiCalls.getOSPolicyAssignment(request, options, callback); } getInstanceOSPoliciesCompliance( - request: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, + request?: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, options?: CallOptions ): Promise< [ @@ -574,7 +574,7 @@ export class OsConfigZonalServiceClient { * const [response] = await client.getInstanceOSPoliciesCompliance(request); */ getInstanceOSPoliciesCompliance( - request: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, + request?: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, optionsOrCallback?: | CallOptions | Callback< @@ -624,7 +624,7 @@ export class OsConfigZonalServiceClient { ); } getInventory( - request: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, + request?: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, options?: CallOptions ): Promise< [ @@ -683,7 +683,7 @@ export class OsConfigZonalServiceClient { * const [response] = await client.getInventory(request); */ getInventory( - request: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, + request?: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, optionsOrCallback?: | CallOptions | Callback< @@ -726,7 +726,7 @@ export class OsConfigZonalServiceClient { return this.innerApiCalls.getInventory(request, options, callback); } getVulnerabilityReport( - request: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, + request?: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, options?: CallOptions ): Promise< [ @@ -785,7 +785,7 @@ export class OsConfigZonalServiceClient { * const [response] = await client.getVulnerabilityReport(request); */ getVulnerabilityReport( - request: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, + request?: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, optionsOrCallback?: | CallOptions | Callback< @@ -836,7 +836,7 @@ export class OsConfigZonalServiceClient { } createOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, + request?: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, options?: CallOptions ): Promise< [ @@ -912,7 +912,7 @@ export class OsConfigZonalServiceClient { * const [response] = await operation.promise(); */ createOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, + request?: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1001,7 +1001,7 @@ export class OsConfigZonalServiceClient { >; } updateOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, + request?: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, options?: CallOptions ): Promise< [ @@ -1067,7 +1067,7 @@ export class OsConfigZonalServiceClient { * const [response] = await operation.promise(); */ updateOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, + request?: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1156,7 +1156,7 @@ export class OsConfigZonalServiceClient { >; } deleteOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, + request?: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, options?: CallOptions ): Promise< [ @@ -1223,7 +1223,7 @@ export class OsConfigZonalServiceClient { * const [response] = await operation.promise(); */ deleteOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, + request?: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1312,7 +1312,7 @@ export class OsConfigZonalServiceClient { >; } listOSPolicyAssignments( - request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, options?: CallOptions ): Promise< [ @@ -1371,7 +1371,7 @@ export class OsConfigZonalServiceClient { * for more details and examples. */ listOSPolicyAssignments( - request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -1515,7 +1515,7 @@ export class OsConfigZonalServiceClient { ) as AsyncIterable; } listOSPolicyAssignmentRevisions( - request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, options?: CallOptions ): Promise< [ @@ -1572,7 +1572,7 @@ export class OsConfigZonalServiceClient { * for more details and examples. */ listOSPolicyAssignmentRevisions( - request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -1716,7 +1716,7 @@ export class OsConfigZonalServiceClient { ) as AsyncIterable; } listInstanceOSPoliciesCompliances( - request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, options?: CallOptions ): Promise< [ @@ -1782,7 +1782,7 @@ export class OsConfigZonalServiceClient { * for more details and examples. */ listInstanceOSPoliciesCompliances( - request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -1942,7 +1942,7 @@ export class OsConfigZonalServiceClient { ) as AsyncIterable; } listInventories( - request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, options?: CallOptions ): Promise< [ @@ -2011,7 +2011,7 @@ export class OsConfigZonalServiceClient { * for more details and examples. */ listInventories( - request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -2175,7 +2175,7 @@ export class OsConfigZonalServiceClient { ) as AsyncIterable; } listVulnerabilityReports( - request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, options?: CallOptions ): Promise< [ @@ -2241,7 +2241,7 @@ export class OsConfigZonalServiceClient { * for more details and examples. */ listVulnerabilityReports( - request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + request?: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< From 1d9ca319832f9af7e0865114796c371eaf4dad57 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:48:28 +0000 Subject: [PATCH 084/154] chore: release 1.6.2 (#118) :robot: I have created a release \*beep\* \*boop\* --- ### [1.6.2](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.1...v1.6.2) (2021-06-22) ### Bug Fixes * make request optional in all cases ([#117](https://www.github.com/googleapis/nodejs-os-config/issues/117)) ([4d1bbb8](https://www.github.com/googleapis/nodejs-os-config/commit/4d1bbb8593c3ca0ea0f6e8af1737b7106239617b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 7000d20b7fc..23c0e8a2e0a 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.6.2](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.1...v1.6.2) (2021-06-22) + + +### Bug Fixes + +* make request optional in all cases ([#117](https://www.github.com/googleapis/nodejs-os-config/issues/117)) ([4d1bbb8](https://www.github.com/googleapis/nodejs-os-config/commit/4d1bbb8593c3ca0ea0f6e8af1737b7106239617b)) + ### [1.6.1](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.0...v1.6.1) (2021-05-25) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 10dc55008dc..b5b2ed88051 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.6.1", + "version": "1.6.2", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 9844a2c3df9..4ac4bdbc37a 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.6.1" + "@google-cloud/os-config": "^1.6.2" }, "devDependencies": { "c8": "^7.1.0", From bbd1ef44ab44f06fcee62ef567b12ff8a09fbd53 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 30 Jun 2021 12:18:42 -0400 Subject: [PATCH 085/154] fix(deps): google-gax v2.17.0 with mTLS (#123) --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index b5b2ed88051..061a3eb37ac 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -27,7 +27,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" }, "devDependencies": { "@types/mocha": "^8.0.0", From 121cbbd8e5742473a041dbce4f9121b2a847de2e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 04:40:26 +0000 Subject: [PATCH 086/154] chore: release 1.6.3 (#125) :robot: I have created a release \*beep\* \*boop\* --- ### [1.6.3](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.2...v1.6.3) (2021-07-01) ### Bug Fixes * **deps:** google-gax v2.17.0 with mTLS ([#123](https://www.github.com/googleapis/nodejs-os-config/issues/123)) ([29f562b](https://www.github.com/googleapis/nodejs-os-config/commit/29f562b5f3489e2bfd2d2ae797d3f0212375fe01)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 23c0e8a2e0a..77d8ceaaba3 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.6.3](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.2...v1.6.3) (2021-07-01) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#123](https://www.github.com/googleapis/nodejs-os-config/issues/123)) ([29f562b](https://www.github.com/googleapis/nodejs-os-config/commit/29f562b5f3489e2bfd2d2ae797d3f0212375fe01)) + ### [1.6.2](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.1...v1.6.2) (2021-06-22) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 061a3eb37ac..a9cc259cfe8 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.6.2", + "version": "1.6.3", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 4ac4bdbc37a..e9fecc05c53 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.6.2" + "@google-cloud/os-config": "^1.6.3" }, "devDependencies": { "c8": "^7.1.0", From ff207faede52e9408397e341ca55b0e5a021665d Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:46:33 -0400 Subject: [PATCH 087/154] fix(deps): google-gax v2.17.1 (#126) --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index a9cc259cfe8..07ff2f93944 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -27,7 +27,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" }, "devDependencies": { "@types/mocha": "^8.0.0", From 28292338073992109c73fecd0fee0c5975b6a7e4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 22:20:41 +0000 Subject: [PATCH 088/154] chore: release 1.6.4 (#127) :robot: I have created a release \*beep\* \*boop\* --- ### [1.6.4](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.3...v1.6.4) (2021-07-12) ### Bug Fixes * **deps:** google-gax v2.17.1 ([#126](https://www.github.com/googleapis/nodejs-os-config/issues/126)) ([a2744c6](https://www.github.com/googleapis/nodejs-os-config/commit/a2744c63a4d39a76e33f8a99d92c4027f25fc3a7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 77d8ceaaba3..42f3ffe70c9 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.6.4](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.3...v1.6.4) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#126](https://www.github.com/googleapis/nodejs-os-config/issues/126)) ([a2744c6](https://www.github.com/googleapis/nodejs-os-config/commit/a2744c63a4d39a76e33f8a99d92c4027f25fc3a7)) + ### [1.6.3](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.2...v1.6.3) (2021-07-01) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 07ff2f93944..8eb32ec5599 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.6.3", + "version": "1.6.4", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index e9fecc05c53..dc70d871668 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.6.3" + "@google-cloud/os-config": "^1.6.4" }, "devDependencies": { "c8": "^7.1.0", From bae87a086badbba3620fe546a49617b83c98e0c2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:10:23 +0000 Subject: [PATCH 089/154] fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#128) Also removing the explicit generator tag for the IAMPolicy mixin for the kms and pubsub APIS as the generator will now read it from the .yaml file. PiperOrigin-RevId: 385101839 Source-Link: https://github.com/googleapis/googleapis/commit/80f404215a9346259db760d80d0671f28c433453 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 --- .../src/v1/os_config_service_client.ts | 11 ++++++++++- .../src/v1alpha/os_config_zonal_service_client.ts | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 8f18c3a8b60..574e711ad57 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -51,6 +51,7 @@ const version = require('../../../package.json').version; export class OsConfigServiceClient { 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: {}; @@ -62,6 +63,7 @@ export class OsConfigServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; osConfigServiceStub?: Promise<{[name: string]: Function}>; @@ -105,6 +107,9 @@ export class OsConfigServiceClient { const staticMembers = this.constructor as typeof OsConfigServiceClient; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -197,6 +202,9 @@ export class OsConfigServiceClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -225,7 +233,8 @@ export class OsConfigServiceClient { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.osconfig.v1.OsConfigService, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index 8f85c14c60d..e1adbcb3074 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -52,6 +52,7 @@ const version = require('../../../package.json').version; export class OsConfigZonalServiceClient { 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: {}; @@ -63,6 +64,7 @@ export class OsConfigZonalServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; @@ -107,6 +109,9 @@ export class OsConfigZonalServiceClient { const staticMembers = this.constructor as typeof OsConfigZonalServiceClient; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -277,6 +282,9 @@ export class OsConfigZonalServiceClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -306,7 +314,8 @@ export class OsConfigZonalServiceClient { : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.osconfig.v1alpha .OsConfigZonalService, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides From eebbe6f360afdc162de65af750299eefa8184207 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 12:54:32 -0700 Subject: [PATCH 090/154] chore: release 1.6.5 (#129) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 42f3ffe70c9..4ae5b2485a3 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.6.5](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.4...v1.6.5) (2021-07-16) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#128](https://www.github.com/googleapis/nodejs-os-config/issues/128)) ([4d7deda](https://www.github.com/googleapis/nodejs-os-config/commit/4d7deda72a06ecdfa2e88a9c2373fb3ec6365b77)) + ### [1.6.4](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.3...v1.6.4) (2021-07-12) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 8eb32ec5599..3ec5d1872aa 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.6.4", + "version": "1.6.5", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index dc70d871668..bc2657d604f 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.6.4" + "@google-cloud/os-config": "^1.6.5" }, "devDependencies": { "c8": "^7.1.0", From a67a93f2481f5e4a30e8cda7aed2629c23624b82 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:06:53 -0400 Subject: [PATCH 091/154] chore(nodejs): update client ref docs link in metadata (#134) --- packages/google-cloud-osconfig/.repo-metadata.json | 2 +- packages/google-cloud-osconfig/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/.repo-metadata.json b/packages/google-cloud-osconfig/.repo-metadata.json index d0804f7e926..d90b35a1f4b 100644 --- a/packages/google-cloud-osconfig/.repo-metadata.json +++ b/packages/google-cloud-osconfig/.repo-metadata.json @@ -9,6 +9,6 @@ "release_level": "ga", "distribution_name": "@google-cloud/os-config", "name": "osconfig", - "client_documentation": "https://googleapis.dev/nodejs/osconfig/latest/index.html", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/os-config/latest", "api_id": "osconfig.googleapis.com" } diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index b4edcde3f1f..f51ea3e5b05 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -147,7 +147,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-os-config/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/osconfig/latest/index.html +[client-docs]: https://cloud.google.com/nodejs/docs/reference/os-config/latest [product-docs]: https://cloud.google.com/compute/docs/os-patch-management [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 9c509feacb0b5acf377385c382ddcb82bc0b3682 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:46:34 -0400 Subject: [PATCH 092/154] fix(deps): google-gax v2.24.1 (#136) --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 3ec5d1872aa..10a163c020c 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -27,7 +27,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" }, "devDependencies": { "@types/mocha": "^8.0.0", From 8427308926a57d992742daf34113628d0c801cd6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 17:18:42 +0000 Subject: [PATCH 093/154] chore: release 1.6.6 (#137) :robot: I have created a release \*beep\* \*boop\* --- ### [1.6.6](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.5...v1.6.6) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#136](https://www.github.com/googleapis/nodejs-os-config/issues/136)) ([d2f27b5](https://www.github.com/googleapis/nodejs-os-config/commit/d2f27b551e224cfcf5bc43dd8604dd1f2aa59fe9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 4ae5b2485a3..47630a9f9c1 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.6.6](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.5...v1.6.6) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#136](https://www.github.com/googleapis/nodejs-os-config/issues/136)) ([d2f27b5](https://www.github.com/googleapis/nodejs-os-config/commit/d2f27b551e224cfcf5bc43dd8604dd1f2aa59fe9)) + ### [1.6.5](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.4...v1.6.5) (2021-07-16) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 10a163c020c..8f6df9d300e 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.6.5", + "version": "1.6.6", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index bc2657d604f..e6fb0887405 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.6.5" + "@google-cloud/os-config": "^1.6.6" }, "devDependencies": { "c8": "^7.1.0", From 390a617e9dfbc1350e226d63e9252a009d5b87bf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:30:11 +0000 Subject: [PATCH 094/154] feat: turns on self-signed JWT feature flag (#138) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: https://github.com/googleapis/googleapis/commit/06345f7b95c4b4a3ffe4303f1f2984ccc304b2e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95882b37970e41e4cd51b22fa507cfd46dc7c4b6 --- .../src/v1/os_config_service_client.ts | 6 ++++++ .../src/v1alpha/os_config_zonal_service_client.ts | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 574e711ad57..799ac830de2 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -134,6 +134,12 @@ export class OsConfigServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index e1adbcb3074..fbb93206e80 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -136,6 +136,12 @@ export class OsConfigZonalServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; @@ -2660,6 +2666,7 @@ export class OsConfigZonalServiceClient { return this.osConfigZonalServiceStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); From 81c7c6f490768565420f63fe4bf57aaec65d6148 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:44:13 +0000 Subject: [PATCH 095/154] chore: release 1.7.0 (#139) :robot: I have created a release \*beep\* \*boop\* --- ## [1.7.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.6...v1.7.0) (2021-08-23) ### Features * turns on self-signed JWT feature flag ([#138](https://www.github.com/googleapis/nodejs-os-config/issues/138)) ([321fc5d](https://www.github.com/googleapis/nodejs-os-config/commit/321fc5d9088ad878d5343735659fc2884a76136a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 47630a9f9c1..978e7a03422 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.7.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.6...v1.7.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#138](https://www.github.com/googleapis/nodejs-os-config/issues/138)) ([321fc5d](https://www.github.com/googleapis/nodejs-os-config/commit/321fc5d9088ad878d5343735659fc2884a76136a)) + ### [1.6.6](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.5...v1.6.6) (2021-08-17) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 8f6df9d300e..79bfb9e6eac 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.6.6", + "version": "1.7.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index e6fb0887405..0042dd4f41a 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.6.6" + "@google-cloud/os-config": "^1.7.0" }, "devDependencies": { "c8": "^7.1.0", From ff0b7a437edce4bc33b3d0108f8937965714f411 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 23:36:33 +0000 Subject: [PATCH 096/154] chore: disable renovate dependency dashboard (#1194) (#141) --- packages/google-cloud-osconfig/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index f51ea3e5b05..96b35b92753 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -138,8 +138,8 @@ Contributions welcome! See the [Contributing Guide](https://github.com/googleapi Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) are generated from a central template. To edit one of these files, make an edit -to its template in this -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). +to its templates in +[directory](https://github.com/googleapis/synthtool). ## License From a7712e89b5783d0df7afe2b3b4b634eadcf2f319 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 30 Aug 2021 10:55:20 -0500 Subject: [PATCH 097/154] feat: Update osconfig v1 and v1alpha with WindowsApplication (#142) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Update osconfig v1 and v1alpha with WindowsApplication Committer: @coodie PiperOrigin-RevId: 393730900 Source-Link: https://github.com/googleapis/googleapis/commit/69fe13f7ca3ca96f34e042596c11e40bb3277924 Source-Link: https://github.com/googleapis/googleapis-gen/commit/69509318baafc42cbe4253dd9b53d56dd5a8f8ad * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google/cloud/osconfig/v1/inventory.proto | 29 + .../cloud/osconfig/v1alpha/inventory.proto | 40 +- .../google-cloud-osconfig/protos/protos.d.ts | 1224 +++--- .../google-cloud-osconfig/protos/protos.js | 3482 ++++++++++------- .../google-cloud-osconfig/protos/protos.json | 286 +- 5 files changed, 3199 insertions(+), 1862 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto index ba3318e70e4..11c998acb01 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1; import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; @@ -152,6 +153,9 @@ message Inventory { // Details of a COS package. VersionedPackage cos_package = 8; + + // Details of a Windows Application + WindowsApplication windows_application = 9; } } @@ -247,6 +251,31 @@ message Inventory { google.protobuf.Timestamp install_time = 5; } + // Contains information about a Windows application as retrieved from the + // Windows Registry. For more information about these fields, see + // + // [Windows Installer Properties for the Uninstall + // Registry](https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key){: + // class="external" } + message WindowsApplication { + // The name of the application or product. + string display_name = 1; + + // The version of the product or application in string format. + string display_version = 2; + + // The name of the manufacturer for the product or application. + string publisher = 3; + + // The last time this product received service. The value of this property + // is replaced each time a patch is applied or removed from the product or + // the command-line option is used to repair the product. + google.type.Date install_date = 4; + + // The internet address for technical support. + string help_link = 5; + } + // Base level operating system information for the VM. OsInfo os_info = 1; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto index 38e12f945b8..f9ad221e701 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto @@ -19,6 +19,7 @@ package google.cloud.osconfig.v1alpha; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; @@ -165,6 +166,9 @@ message Inventory { // Details of a COS package. VersionedPackage cos_package = 8; + + // Details of Windows Application. + WindowsApplication windows_application = 9; } } @@ -260,6 +264,31 @@ message Inventory { google.protobuf.Timestamp install_time = 5; } + // Contains information about a Windows application as retrieved from the + // Windows Registry. For more information about these fields, see + // + // [Windows Installer Properties for the Uninstall + // Registry](https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key){: + // class="external" } + message WindowsApplication { + // The name of the application or product. + string display_name = 1; + + // The version of the product or application in string format. + string display_version = 2; + + // The name of the manufacturer for the product or application. + string publisher = 3; + + // The last time this product received service. The value of this property + // is replaced each time a patch is applied or removed from the product or + // the command-line option is used to repair the product. + google.type.Date install_date = 4; + + // The internet address for technical support. + string help_link = 5; + } + // Output only. The `Inventory` API resource name. // // Format: @@ -269,14 +298,15 @@ message Inventory { // Output only. Base level operating system information for the VM. OsInfo os_info = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Inventory items related to the VM keyed by an opaque unique identifier for - // each inventory item. The identifier is unique to each distinct and - // addressable inventory item and will change, when there is a new package - // version. + // Output only. Inventory items related to the VM keyed by an opaque unique + // identifier for each inventory item. The identifier is unique to each + // distinct and addressable inventory item and will change, when there is a + // new package version. map items = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp of the last reported inventory for the VM. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request message for getting inventory data for the specified VM. diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index f6251764e71..c547218e95b 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -4022,6 +4022,9 @@ export namespace google { /** SoftwarePackage cosPackage */ cosPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + + /** SoftwarePackage windowsApplication */ + windowsApplication?: (google.cloud.osconfig.v1.Inventory.IWindowsApplication|null); } /** Represents a SoftwarePackage. */ @@ -4057,8 +4060,11 @@ export namespace google { /** SoftwarePackage cosPackage. */ public cosPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** SoftwarePackage windowsApplication. */ + public windowsApplication?: (google.cloud.osconfig.v1.Inventory.IWindowsApplication|null); + /** SoftwarePackage details. */ - public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"); + public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"); /** * Creates a new SoftwarePackage instance using the specified properties. @@ -4685,6 +4691,120 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a WindowsApplication. */ + interface IWindowsApplication { + + /** WindowsApplication displayName */ + displayName?: (string|null); + + /** WindowsApplication displayVersion */ + displayVersion?: (string|null); + + /** WindowsApplication publisher */ + publisher?: (string|null); + + /** WindowsApplication installDate */ + installDate?: (google.type.IDate|null); + + /** WindowsApplication helpLink */ + helpLink?: (string|null); + } + + /** Represents a WindowsApplication. */ + class WindowsApplication implements IWindowsApplication { + + /** + * Constructs a new WindowsApplication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IWindowsApplication); + + /** WindowsApplication displayName. */ + public displayName: string; + + /** WindowsApplication displayVersion. */ + public displayVersion: string; + + /** WindowsApplication publisher. */ + public publisher: string; + + /** WindowsApplication installDate. */ + public installDate?: (google.type.IDate|null); + + /** WindowsApplication helpLink. */ + public helpLink: string; + + /** + * Creates a new WindowsApplication instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsApplication instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IWindowsApplication): google.cloud.osconfig.v1.Inventory.WindowsApplication; + + /** + * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * @param message WindowsApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * @param message WindowsApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsApplication; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsApplication; + + /** + * Verifies a WindowsApplication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsApplication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsApplication; + + /** + * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. + * @param message WindowsApplication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsApplication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Properties of a FixedOrPercent. */ @@ -10068,6 +10188,9 @@ export namespace google { /** SoftwarePackage cosPackage */ cosPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage windowsApplication */ + windowsApplication?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null); } /** Represents a SoftwarePackage. */ @@ -10103,8 +10226,11 @@ export namespace google { /** SoftwarePackage cosPackage. */ public cosPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + /** SoftwarePackage windowsApplication. */ + public windowsApplication?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null); + /** SoftwarePackage details. */ - public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"); + public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"); /** * Creates a new SoftwarePackage instance using the specified properties. @@ -10731,6 +10857,120 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a WindowsApplication. */ + interface IWindowsApplication { + + /** WindowsApplication displayName */ + displayName?: (string|null); + + /** WindowsApplication displayVersion */ + displayVersion?: (string|null); + + /** WindowsApplication publisher */ + publisher?: (string|null); + + /** WindowsApplication installDate */ + installDate?: (google.type.IDate|null); + + /** WindowsApplication helpLink */ + helpLink?: (string|null); + } + + /** Represents a WindowsApplication. */ + class WindowsApplication implements IWindowsApplication { + + /** + * Constructs a new WindowsApplication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication); + + /** WindowsApplication displayName. */ + public displayName: string; + + /** WindowsApplication displayVersion. */ + public displayVersion: string; + + /** WindowsApplication publisher. */ + public publisher: string; + + /** WindowsApplication installDate. */ + public installDate?: (google.type.IDate|null); + + /** WindowsApplication helpLink. */ + public helpLink: string; + + /** + * Creates a new WindowsApplication instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsApplication instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + + /** + * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. + * @param message WindowsApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. + * @param message WindowsApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + + /** + * Verifies a WindowsApplication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsApplication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + + /** + * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. + * @param message WindowsApplication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsApplication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Properties of a GetInventoryRequest. */ @@ -16168,957 +16408,1059 @@ export namespace google { } } - /** Namespace api. */ - namespace api { + /** Namespace type. */ + namespace type { - /** Properties of a Http. */ - interface IHttp { + /** Properties of a Date. */ + interface IDate { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** Date year */ + year?: (number|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a Date. */ + class Date implements IDate { /** - * Constructs a new Http. + * Constructs a new Date. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.type.IDate); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** Date year. */ + public year: number; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; /** - * Creates a new Http instance using the specified properties. + * Creates a new Date instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns Date instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.type.IDate): google.type.Date; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a Date message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a Date message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; /** - * Verifies a Http message. + * Verifies a Date message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a Date message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns Date */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.type.Date; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this Date to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); + /** Properties of a DateTime. */ + interface IDateTime { - /** HttpRule get */ - get?: (string|null); + /** DateTime year */ + year?: (number|null); - /** HttpRule put */ - put?: (string|null); + /** DateTime month */ + month?: (number|null); - /** HttpRule post */ - post?: (string|null); + /** DateTime day */ + day?: (number|null); - /** HttpRule delete */ - "delete"?: (string|null); + /** DateTime hours */ + hours?: (number|null); - /** HttpRule patch */ - patch?: (string|null); + /** DateTime minutes */ + minutes?: (number|null); - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** DateTime seconds */ + seconds?: (number|null); - /** HttpRule body */ - body?: (string|null); + /** DateTime nanos */ + nanos?: (number|null); - /** HttpRule responseBody */ - responseBody?: (string|null); + /** DateTime utcOffset */ + utcOffset?: (google.protobuf.IDuration|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** DateTime timeZone */ + timeZone?: (google.type.ITimeZone|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a DateTime. */ + class DateTime implements IDateTime { /** - * Constructs a new HttpRule. + * Constructs a new DateTime. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); + constructor(properties?: google.type.IDateTime); - /** HttpRule selector. */ - public selector: string; + /** DateTime year. */ + public year: number; - /** HttpRule get. */ - public get?: (string|null); + /** DateTime month. */ + public month: number; - /** HttpRule put. */ - public put?: (string|null); + /** DateTime day. */ + public day: number; - /** HttpRule post. */ - public post?: (string|null); + /** DateTime hours. */ + public hours: number; - /** HttpRule delete. */ - public delete?: (string|null); + /** DateTime minutes. */ + public minutes: number; - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** DateTime seconds. */ + public seconds: number; - /** HttpRule body. */ - public body: string; + /** DateTime nanos. */ + public nanos: number; - /** HttpRule responseBody. */ - public responseBody: string; + /** DateTime utcOffset. */ + public utcOffset?: (google.protobuf.IDuration|null); - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** DateTime timeZone. */ + public timeZone?: (google.type.ITimeZone|null); - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** DateTime timeOffset. */ + public timeOffset?: ("utcOffset"|"timeZone"); /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new DateTime instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns DateTime instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.type.IDateTime): google.type.DateTime; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a DateTime message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns DateTime * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.DateTime; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a DateTime message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns DateTime * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.DateTime; /** - * Verifies a HttpRule message. + * Verifies a DateTime message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns DateTime */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.type.DateTime; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @param message DateTime * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this DateTime to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Properties of a TimeZone. */ + interface ITimeZone { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** TimeZone id */ + id?: (string|null); - /** CustomHttpPattern path */ - path?: (string|null); + /** TimeZone version */ + version?: (string|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a TimeZone. */ + class TimeZone implements ITimeZone { /** - * Constructs a new CustomHttpPattern. + * Constructs a new TimeZone. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.type.ITimeZone); - /** CustomHttpPattern kind. */ - public kind: string; + /** TimeZone id. */ + public id: string; - /** CustomHttpPattern path. */ - public path: string; + /** TimeZone version. */ + public version: string; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new TimeZone instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns TimeZone instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.type.ITimeZone): google.type.TimeZone; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a TimeZone message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns TimeZone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeZone; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a TimeZone message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns TimeZone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeZone; /** - * Verifies a CustomHttpPattern message. + * Verifies a TimeZone message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns TimeZone */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.type.TimeZone; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @param message TimeZone * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this TimeZone to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** Properties of a TimeOfDay. */ + interface ITimeOfDay { - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** TimeOfDay hours */ + hours?: (number|null); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** TimeOfDay minutes */ + minutes?: (number|null); - /** ResourceDescriptor singular */ - singular?: (string|null); + /** TimeOfDay seconds */ + seconds?: (number|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** TimeOfDay nanos */ + nanos?: (number|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a TimeOfDay. */ + class TimeOfDay implements ITimeOfDay { /** - * Constructs a new ResourceDescriptor. + * Constructs a new TimeOfDay. * @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; + constructor(properties?: google.type.ITimeOfDay); - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** TimeOfDay hours. */ + public hours: number; - /** ResourceDescriptor plural. */ - public plural: string; + /** TimeOfDay minutes. */ + public minutes: number; - /** ResourceDescriptor singular. */ - public singular: string; + /** TimeOfDay seconds. */ + public seconds: number; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** TimeOfDay nanos. */ + public nanos: number; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new TimeOfDay instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns TimeOfDay instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a TimeOfDay message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceDescriptor + * @returns TimeOfDay * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeOfDay; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @returns TimeOfDay * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeOfDay; /** - * Verifies a ResourceDescriptor message. + * Verifies a TimeOfDay message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns TimeOfDay */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. + * @param message TimeOfDay * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this TimeOfDay to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** Namespace api. */ + namespace api { - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** Properties of a Http. */ + interface IHttp { - /** ResourceReference type */ - type?: (string|null); + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** ResourceReference childType */ - childType?: (string|null); + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a Http. */ + class Http implements IHttp { /** - * Constructs a new ResourceReference. + * Constructs a new Http. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.api.IHttp); - /** ResourceReference type. */ - public type: string; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** ResourceReference childType. */ - public childType: string; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new Http instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns Http instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.api.IHttp): google.api.Http; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified 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.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified 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.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * 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 ResourceReference + * @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.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @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.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; /** - * Verifies a ResourceReference message. + * 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.api.Http; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * Creates a plain object from a 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.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this Http to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6 - } - } - - /** Namespace type. */ - namespace type { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** Properties of a DateTime. */ - interface IDateTime { + /** HttpRule selector */ + selector?: (string|null); - /** DateTime year */ - year?: (number|null); + /** HttpRule get */ + get?: (string|null); - /** DateTime month */ - month?: (number|null); + /** HttpRule put */ + put?: (string|null); - /** DateTime day */ - day?: (number|null); + /** HttpRule post */ + post?: (string|null); - /** DateTime hours */ - hours?: (number|null); + /** HttpRule delete */ + "delete"?: (string|null); - /** DateTime minutes */ - minutes?: (number|null); + /** HttpRule patch */ + patch?: (string|null); - /** DateTime seconds */ - seconds?: (number|null); + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** DateTime nanos */ - nanos?: (number|null); + /** HttpRule body */ + body?: (string|null); - /** DateTime utcOffset */ - utcOffset?: (google.protobuf.IDuration|null); + /** HttpRule responseBody */ + responseBody?: (string|null); - /** DateTime timeZone */ - timeZone?: (google.type.ITimeZone|null); + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); } - /** Represents a DateTime. */ - class DateTime implements IDateTime { + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { /** - * Constructs a new DateTime. + * Constructs a new HttpRule. * @param [properties] Properties to set */ - constructor(properties?: google.type.IDateTime); + constructor(properties?: google.api.IHttpRule); - /** DateTime year. */ - public year: number; + /** HttpRule selector. */ + public selector: string; - /** DateTime month. */ - public month: number; + /** HttpRule get. */ + public get?: (string|null); - /** DateTime day. */ - public day: number; + /** HttpRule put. */ + public put?: (string|null); - /** DateTime hours. */ - public hours: number; + /** HttpRule post. */ + public post?: (string|null); - /** DateTime minutes. */ - public minutes: number; + /** HttpRule delete. */ + public delete?: (string|null); - /** DateTime seconds. */ - public seconds: number; + /** HttpRule patch. */ + public patch?: (string|null); - /** DateTime nanos. */ - public nanos: number; + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); - /** DateTime utcOffset. */ - public utcOffset?: (google.protobuf.IDuration|null); + /** HttpRule body. */ + public body: string; - /** DateTime timeZone. */ - public timeZone?: (google.type.ITimeZone|null); + /** HttpRule responseBody. */ + public responseBody: string; - /** DateTime timeOffset. */ - public timeOffset?: ("utcOffset"|"timeZone"); + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); /** - * Creates a new DateTime instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @param [properties] Properties to set - * @returns DateTime instance + * @returns HttpRule instance */ - public static create(properties?: google.type.IDateTime): google.type.DateTime; + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; /** - * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. - * @param message DateTime message or plain object to encode + * 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.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. - * @param message DateTime message or plain object to encode + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DateTime message from the specified reader or buffer. + * 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 DateTime + * @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.type.DateTime; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a DateTime message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DateTime + * @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.type.DateTime; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a DateTime message. + * 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 DateTime message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DateTime + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.type.DateTime; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a DateTime message. Also converts values to other types if specified. - * @param message DateTime + * 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.type.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DateTime to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TimeZone. */ - interface ITimeZone { + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** TimeZone id */ - id?: (string|null); + /** ResourceDescriptor type */ + type?: (string|null); - /** TimeZone version */ - version?: (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 TimeZone. */ - class TimeZone implements ITimeZone { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new TimeZone. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.type.ITimeZone); + constructor(properties?: google.api.IResourceDescriptor); - /** TimeZone id. */ - public id: string; + /** ResourceDescriptor type. */ + public type: string; - /** TimeZone version. */ - public version: 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 TimeZone instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns TimeZone instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.type.ITimeZone): google.type.TimeZone; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. - * @param message TimeZone message or plain object to encode + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. - * @param message TimeZone message or plain object to encode + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeZone message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeZone + * @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.type.TimeZone; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeZone + * @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.type.TimeZone; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a TimeZone message. + * Verifies a ResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeZone + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.type.TimeZone; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a TimeZone message. Also converts values to other types if specified. - * @param message TimeZone + * 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.type.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeZone to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** DayOfWeek enum. */ - enum DayOfWeek { - DAY_OF_WEEK_UNSPECIFIED = 0, - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6, - SUNDAY = 7 - } + namespace ResourceDescriptor { - /** Properties of a TimeOfDay. */ - interface ITimeOfDay { + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } - /** TimeOfDay hours */ - hours?: (number|null); + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } - /** TimeOfDay minutes */ - minutes?: (number|null); + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** TimeOfDay seconds */ - seconds?: (number|null); + /** ResourceReference type */ + type?: (string|null); - /** TimeOfDay nanos */ - nanos?: (number|null); + /** ResourceReference childType */ + childType?: (string|null); } - /** Represents a TimeOfDay. */ - class TimeOfDay implements ITimeOfDay { + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { /** - * Constructs a new TimeOfDay. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.type.ITimeOfDay); - - /** TimeOfDay hours. */ - public hours: number; - - /** TimeOfDay minutes. */ - public minutes: number; + constructor(properties?: google.api.IResourceReference); - /** TimeOfDay seconds. */ - public seconds: number; + /** ResourceReference type. */ + public type: string; - /** TimeOfDay nanos. */ - public nanos: number; + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new TimeOfDay instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns TimeOfDay instance + * @returns ResourceReference instance */ - public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. - * @param message TimeOfDay message or plain object to encode + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. - * @param message TimeOfDay message or plain object to encode + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeOfDay message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeOfDay + * @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.type.TimeOfDay; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeOfDay + * @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.type.TimeOfDay; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies a TimeOfDay message. + * Verifies a ResourceReference message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeOfDay + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. - * @param message TimeOfDay + * 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.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeOfDay to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6 + } } /** Namespace longrunning. */ diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index ffe0f2f4fbc..0764b66c924 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -10853,6 +10853,7 @@ * @property {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null} [wuaPackage] SoftwarePackage wuaPackage * @property {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null} [qfePackage] SoftwarePackage qfePackage * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [cosPackage] SoftwarePackage cosPackage + * @property {google.cloud.osconfig.v1.Inventory.IWindowsApplication|null} [windowsApplication] SoftwarePackage windowsApplication */ /** @@ -10934,17 +10935,25 @@ */ SoftwarePackage.prototype.cosPackage = null; + /** + * SoftwarePackage windowsApplication. + * @member {google.cloud.osconfig.v1.Inventory.IWindowsApplication|null|undefined} windowsApplication + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.windowsApplication = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * SoftwarePackage details. - * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|undefined} details + * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"|undefined} details * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage * @instance */ Object.defineProperty(SoftwarePackage.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage"]), + get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage", "windowsApplication"]), set: $util.oneOfSetter($oneOfFields) }); @@ -10988,6 +10997,8 @@ $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.encode(message.qfePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.cosPackage != null && Object.hasOwnProperty.call(message, "cosPackage")) $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.cosPackage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.windowsApplication != null && Object.hasOwnProperty.call(message, "windowsApplication")) + $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.encode(message.windowsApplication, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -11046,6 +11057,9 @@ case 8: message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); break; + case 9: + message.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -11160,6 +11174,16 @@ return "cosPackage." + error; } } + if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.verify(message.windowsApplication); + if (error) + return "windowsApplication." + error; + } + } return null; }; @@ -11215,6 +11239,11 @@ throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.cosPackage: object expected"); message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.cosPackage); } + if (object.windowsApplication != null) { + if (typeof object.windowsApplication !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.windowsApplication: object expected"); + message.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.fromObject(object.windowsApplication); + } return message; }; @@ -11271,6 +11300,11 @@ if (options.oneofs) object.details = "cosPackage"; } + if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { + object.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.toObject(message.windowsApplication, options); + if (options.oneofs) + object.details = "windowsApplication"; + } return object; }; @@ -12667,6 +12701,287 @@ return WindowsQuickFixEngineeringPackage; })(); + Inventory.WindowsApplication = (function() { + + /** + * Properties of a WindowsApplication. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IWindowsApplication + * @property {string|null} [displayName] WindowsApplication displayName + * @property {string|null} [displayVersion] WindowsApplication displayVersion + * @property {string|null} [publisher] WindowsApplication publisher + * @property {google.type.IDate|null} [installDate] WindowsApplication installDate + * @property {string|null} [helpLink] WindowsApplication helpLink + */ + + /** + * Constructs a new WindowsApplication. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a WindowsApplication. + * @implements IWindowsApplication + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication=} [properties] Properties to set + */ + function WindowsApplication(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsApplication displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.displayName = ""; + + /** + * WindowsApplication displayVersion. + * @member {string} displayVersion + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.displayVersion = ""; + + /** + * WindowsApplication publisher. + * @member {string} publisher + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.publisher = ""; + + /** + * WindowsApplication installDate. + * @member {google.type.IDate|null|undefined} installDate + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.installDate = null; + + /** + * WindowsApplication helpLink. + * @member {string} helpLink + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.helpLink = ""; + + /** + * Creates a new WindowsApplication instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication instance + */ + WindowsApplication.create = function create(properties) { + return new WindowsApplication(properties); + }; + + /** + * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsApplication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.displayVersion != null && Object.hasOwnProperty.call(message, "displayVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayVersion); + if (message.publisher != null && Object.hasOwnProperty.call(message, "publisher")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.publisher); + if (message.installDate != null && Object.hasOwnProperty.call(message, "installDate")) + $root.google.type.Date.encode(message.installDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.helpLink != null && Object.hasOwnProperty.call(message, "helpLink")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.helpLink); + return writer; + }; + + /** + * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsApplication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsApplication.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsApplication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 2: + message.displayVersion = reader.string(); + break; + case 3: + message.publisher = reader.string(); + break; + case 4: + message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + case 5: + message.helpLink = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsApplication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsApplication message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsApplication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) + if (!$util.isString(message.displayVersion)) + return "displayVersion: string expected"; + if (message.publisher != null && message.hasOwnProperty("publisher")) + if (!$util.isString(message.publisher)) + return "publisher: string expected"; + if (message.installDate != null && message.hasOwnProperty("installDate")) { + var error = $root.google.type.Date.verify(message.installDate); + if (error) + return "installDate." + error; + } + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + if (!$util.isString(message.helpLink)) + return "helpLink: string expected"; + return null; + }; + + /** + * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication + */ + WindowsApplication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsApplication) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsApplication(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.displayVersion != null) + message.displayVersion = String(object.displayVersion); + if (object.publisher != null) + message.publisher = String(object.publisher); + if (object.installDate != null) { + if (typeof object.installDate !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsApplication.installDate: object expected"); + message.installDate = $root.google.type.Date.fromObject(object.installDate); + } + if (object.helpLink != null) + message.helpLink = String(object.helpLink); + return message; + }; + + /** + * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsApplication} message WindowsApplication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsApplication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.displayVersion = ""; + object.publisher = ""; + object.installDate = null; + object.helpLink = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) + object.displayVersion = message.displayVersion; + if (message.publisher != null && message.hasOwnProperty("publisher")) + object.publisher = message.publisher; + if (message.installDate != null && message.hasOwnProperty("installDate")) + object.installDate = $root.google.type.Date.toObject(message.installDate, options); + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + object.helpLink = message.helpLink; + return object; + }; + + /** + * Converts this WindowsApplication to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + * @returns {Object.} JSON object + */ + WindowsApplication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WindowsApplication; + })(); + return Inventory; })(); @@ -26615,6 +26930,7 @@ * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null} [wuaPackage] SoftwarePackage wuaPackage * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null} [qfePackage] SoftwarePackage qfePackage * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [cosPackage] SoftwarePackage cosPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null} [windowsApplication] SoftwarePackage windowsApplication */ /** @@ -26696,17 +27012,25 @@ */ SoftwarePackage.prototype.cosPackage = null; + /** + * SoftwarePackage windowsApplication. + * @member {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null|undefined} windowsApplication + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.windowsApplication = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * SoftwarePackage details. - * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|undefined} details + * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"|undefined} details * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage * @instance */ Object.defineProperty(SoftwarePackage.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage"]), + get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage", "windowsApplication"]), set: $util.oneOfSetter($oneOfFields) }); @@ -26750,6 +27074,8 @@ $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.encode(message.qfePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.cosPackage != null && Object.hasOwnProperty.call(message, "cosPackage")) $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.cosPackage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.windowsApplication != null && Object.hasOwnProperty.call(message, "windowsApplication")) + $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.encode(message.windowsApplication, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -26808,6 +27134,9 @@ case 8: message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); break; + case 9: + message.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -26922,6 +27251,16 @@ return "cosPackage." + error; } } + if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify(message.windowsApplication); + if (error) + return "windowsApplication." + error; + } + } return null; }; @@ -26977,6 +27316,11 @@ throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.cosPackage: object expected"); message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.cosPackage); } + if (object.windowsApplication != null) { + if (typeof object.windowsApplication !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.windowsApplication: object expected"); + message.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.fromObject(object.windowsApplication); + } return message; }; @@ -27033,6 +27377,11 @@ if (options.oneofs) object.details = "cosPackage"; } + if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { + object.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.toObject(message.windowsApplication, options); + if (options.oneofs) + object.details = "windowsApplication"; + } return object; }; @@ -28429,6 +28778,287 @@ return WindowsQuickFixEngineeringPackage; })(); + Inventory.WindowsApplication = (function() { + + /** + * Properties of a WindowsApplication. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IWindowsApplication + * @property {string|null} [displayName] WindowsApplication displayName + * @property {string|null} [displayVersion] WindowsApplication displayVersion + * @property {string|null} [publisher] WindowsApplication publisher + * @property {google.type.IDate|null} [installDate] WindowsApplication installDate + * @property {string|null} [helpLink] WindowsApplication helpLink + */ + + /** + * Constructs a new WindowsApplication. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a WindowsApplication. + * @implements IWindowsApplication + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication=} [properties] Properties to set + */ + function WindowsApplication(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsApplication displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.displayName = ""; + + /** + * WindowsApplication displayVersion. + * @member {string} displayVersion + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.displayVersion = ""; + + /** + * WindowsApplication publisher. + * @member {string} publisher + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.publisher = ""; + + /** + * WindowsApplication installDate. + * @member {google.type.IDate|null|undefined} installDate + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.installDate = null; + + /** + * WindowsApplication helpLink. + * @member {string} helpLink + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.helpLink = ""; + + /** + * Creates a new WindowsApplication instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication instance + */ + WindowsApplication.create = function create(properties) { + return new WindowsApplication(properties); + }; + + /** + * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsApplication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.displayVersion != null && Object.hasOwnProperty.call(message, "displayVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayVersion); + if (message.publisher != null && Object.hasOwnProperty.call(message, "publisher")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.publisher); + if (message.installDate != null && Object.hasOwnProperty.call(message, "installDate")) + $root.google.type.Date.encode(message.installDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.helpLink != null && Object.hasOwnProperty.call(message, "helpLink")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.helpLink); + return writer; + }; + + /** + * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsApplication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsApplication.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 2: + message.displayVersion = reader.string(); + break; + case 3: + message.publisher = reader.string(); + break; + case 4: + message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + case 5: + message.helpLink = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsApplication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsApplication message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsApplication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) + if (!$util.isString(message.displayVersion)) + return "displayVersion: string expected"; + if (message.publisher != null && message.hasOwnProperty("publisher")) + if (!$util.isString(message.publisher)) + return "publisher: string expected"; + if (message.installDate != null && message.hasOwnProperty("installDate")) { + var error = $root.google.type.Date.verify(message.installDate); + if (error) + return "installDate." + error; + } + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + if (!$util.isString(message.helpLink)) + return "helpLink: string expected"; + return null; + }; + + /** + * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication + */ + WindowsApplication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.displayVersion != null) + message.displayVersion = String(object.displayVersion); + if (object.publisher != null) + message.publisher = String(object.publisher); + if (object.installDate != null) { + if (typeof object.installDate !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.installDate: object expected"); + message.installDate = $root.google.type.Date.fromObject(object.installDate); + } + if (object.helpLink != null) + message.helpLink = String(object.helpLink); + return message; + }; + + /** + * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} message WindowsApplication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsApplication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.displayVersion = ""; + object.publisher = ""; + object.installDate = null; + object.helpLink = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) + object.displayVersion = message.displayVersion; + if (message.publisher != null && message.hasOwnProperty("publisher")) + object.publisher = message.publisher; + if (message.installDate != null && message.hasOwnProperty("installDate")) + object.installDate = $root.google.type.Date.toObject(message.installDate, options); + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + object.helpLink = message.helpLink; + return object; + }; + + /** + * Converts this WindowsApplication to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + * @returns {Object.} JSON object + */ + WindowsApplication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WindowsApplication; + })(); + return Inventory; })(); @@ -41802,35 +42432,35 @@ return cloud; })(); - google.api = (function() { + google.type = (function() { /** - * Namespace api. + * Namespace type. * @memberof google * @namespace */ - var api = {}; + var type = {}; - api.Http = (function() { + type.Date = (function() { /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day */ /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.type.IDate=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function Date(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41838,91 +42468,101 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * Date year. + * @member {number} year + * @memberof google.type.Date * @instance */ - Http.prototype.rules = $util.emptyArray; + Date.prototype.year = 0; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * Date month. + * @member {number} month + * @memberof google.type.Date * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + Date.prototype.month = 0; /** - * Creates a new Http instance using the specified properties. + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.type.Date * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance */ - Http.create = function create(properties) { - return new Http(properties); + Date.create = function create(properties) { + return new Date(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.type.Date * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + Date.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.type.Date * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + Date.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a Date message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + Date.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.year = reader.int32(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.month = reader.int32(); + break; + case 3: + message.day = reader.int32(); break; default: reader.skipType(tag & 7); @@ -41933,143 +42573,132 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a Date message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + Date.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a Date message. * @function verify - * @memberof google.api.Http + * @memberof google.type.Date * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + Date.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a Date message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.type.Date * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.type.Date} Date */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a Date message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.type.Date * @static - * @param {google.api.Http} message Http + * @param {google.type.Date} message Date * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + Date.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; return object; }; /** - * Converts this Http to JSON. + * Converts this Date to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.type.Date * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + Date.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return Date; })(); - api.HttpRule = (function() { + type.DateTime = (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 + * Properties of a DateTime. + * @memberof google.type + * @interface IDateTime + * @property {number|null} [year] DateTime year + * @property {number|null} [month] DateTime month + * @property {number|null} [day] DateTime day + * @property {number|null} [hours] DateTime hours + * @property {number|null} [minutes] DateTime minutes + * @property {number|null} [seconds] DateTime seconds + * @property {number|null} [nanos] DateTime nanos + * @property {google.protobuf.IDuration|null} [utcOffset] DateTime utcOffset + * @property {google.type.ITimeZone|null} [timeZone] DateTime timeZone */ /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * Constructs a new DateTime. + * @memberof google.type + * @classdesc Represents a DateTime. + * @implements IDateTime * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.type.IDateTime=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function DateTime(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42077,209 +42706,193 @@ } /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule + * DateTime year. + * @member {number} year + * @memberof google.type.DateTime * @instance */ - HttpRule.prototype.get = null; + DateTime.prototype.year = 0; /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule + * DateTime month. + * @member {number} month + * @memberof google.type.DateTime * @instance */ - HttpRule.prototype.put = null; + DateTime.prototype.month = 0; /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule + * DateTime day. + * @member {number} day + * @memberof google.type.DateTime * @instance */ - HttpRule.prototype.post = null; + DateTime.prototype.day = 0; /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule + * DateTime hours. + * @member {number} hours + * @memberof google.type.DateTime * @instance */ - HttpRule.prototype["delete"] = null; + DateTime.prototype.hours = 0; /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule + * DateTime minutes. + * @member {number} minutes + * @memberof google.type.DateTime * @instance */ - HttpRule.prototype.patch = null; + DateTime.prototype.minutes = 0; /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule + * DateTime seconds. + * @member {number} seconds + * @memberof google.type.DateTime * @instance */ - HttpRule.prototype.custom = null; + DateTime.prototype.seconds = 0; /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule + * DateTime nanos. + * @member {number} nanos + * @memberof google.type.DateTime * @instance */ - HttpRule.prototype.body = ""; + DateTime.prototype.nanos = 0; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule + * DateTime utcOffset. + * @member {google.protobuf.IDuration|null|undefined} utcOffset + * @memberof google.type.DateTime * @instance */ - HttpRule.prototype.responseBody = ""; + DateTime.prototype.utcOffset = null; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * DateTime timeZone. + * @member {google.type.ITimeZone|null|undefined} timeZone + * @memberof google.type.DateTime * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; + DateTime.prototype.timeZone = null; // 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 + * DateTime timeOffset. + * @member {"utcOffset"|"timeZone"|undefined} timeOffset + * @memberof google.type.DateTime * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + Object.defineProperty(DateTime.prototype, "timeOffset", { + get: $util.oneOfGetter($oneOfFields = ["utcOffset", "timeZone"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new DateTime instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.type.DateTime * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.type.IDateTime=} [properties] Properties to set + * @returns {google.type.DateTime} DateTime instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + DateTime.create = function create(properties) { + return new DateTime(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.type.DateTime * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.type.IDateTime} message DateTime message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + DateTime.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.nanos); + if (message.utcOffset != null && Object.hasOwnProperty.call(message, "utcOffset")) + $root.google.protobuf.Duration.encode(message.utcOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.type.DateTime * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.type.IDateTime} message DateTime message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + DateTime.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a DateTime message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.type.DateTime * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.type.DateTime} DateTime * @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) { + DateTime.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.DateTime(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.year = reader.int32(); break; case 2: - message.get = reader.string(); + message.month = reader.int32(); break; case 3: - message.put = reader.string(); + message.day = reader.int32(); break; case 4: - message.post = reader.string(); + message.hours = reader.int32(); break; case 5: - message["delete"] = reader.string(); + message.minutes = reader.int32(); break; case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + message.seconds = reader.int32(); break; case 7: - message.body = reader.string(); + message.nanos = reader.int32(); break; - case 12: - message.responseBody = reader.string(); + case 8: + message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + case 9: + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -42290,240 +42903,196 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a DateTime message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.type.DateTime * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.type.DateTime} DateTime * @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) { + DateTime.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a DateTime message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.type.DateTime * @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) { + DateTime.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; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + properties.timeOffset = 1; { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); + var error = $root.google.protobuf.Duration.verify(message.utcOffset); if (error) - return "custom." + error; + return "utcOffset." + 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 (message.timeZone != null && message.hasOwnProperty("timeZone")) { + if (properties.timeOffset === 1) + return "timeOffset: multiple values"; + properties.timeOffset = 1; + { + var error = $root.google.type.TimeZone.verify(message.timeZone); if (error) - return "additionalBindings." + error; + return "timeZone." + error; } } return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.type.DateTime * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.type.DateTime} DateTime */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + DateTime.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.DateTime) 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); + var message = new $root.google.type.DateTime(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; + if (object.utcOffset != null) { + if (typeof object.utcOffset !== "object") + throw TypeError(".google.type.DateTime.utcOffset: object expected"); + message.utcOffset = $root.google.protobuf.Duration.fromObject(object.utcOffset); } - 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]); - } + if (object.timeZone != null) { + if (typeof object.timeZone !== "object") + throw TypeError(".google.type.DateTime.timeZone: object expected"); + message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a DateTime message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.type.DateTime * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.type.DateTime} message DateTime * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + DateTime.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"; + object.year = 0; + object.month = 0; + object.day = 0; + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + object.utcOffset = $root.google.protobuf.Duration.toObject(message.utcOffset, options); if (options.oneofs) - object.pattern = "patch"; + object.timeOffset = "utcOffset"; } - 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 (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.timeOffset = "timeZone"; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this DateTime to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.type.DateTime * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + DateTime.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return DateTime; })(); - api.CustomHttpPattern = (function() { + type.TimeZone = (function() { /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * Properties of a TimeZone. + * @memberof google.type + * @interface ITimeZone + * @property {string|null} [id] TimeZone id + * @property {string|null} [version] TimeZone version */ /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * Constructs a new TimeZone. + * @memberof google.type + * @classdesc Represents a TimeZone. + * @implements ITimeZone * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.type.ITimeZone=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function TimeZone(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42531,88 +43100,88 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * TimeZone id. + * @member {string} id + * @memberof google.type.TimeZone * @instance */ - CustomHttpPattern.prototype.kind = ""; + TimeZone.prototype.id = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * TimeZone version. + * @member {string} version + * @memberof google.type.TimeZone * @instance */ - CustomHttpPattern.prototype.path = ""; + TimeZone.prototype.version = ""; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new TimeZone instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.type.TimeZone * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.type.ITimeZone=} [properties] Properties to set + * @returns {google.type.TimeZone} TimeZone instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + TimeZone.create = function create(properties) { + return new TimeZone(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.type.TimeZone * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + TimeZone.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.type.TimeZone * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + TimeZone.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a TimeZone message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.type.TimeZone * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.type.TimeZone} TimeZone * @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) { + TimeZone.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeZone(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + message.id = reader.string(); break; case 2: - message.path = reader.string(); + message.version = reader.string(); break; default: reader.skipType(tag & 7); @@ -42623,124 +43192,145 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a TimeZone message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.type.TimeZone * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.type.TimeZone} TimeZone * @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) { + TimeZone.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a TimeZone message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.type.TimeZone * @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) { + TimeZone.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.type.TimeZone * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.type.TimeZone} TimeZone */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + TimeZone.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeZone) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.type.TimeZone(); + if (object.id != null) + message.id = String(object.id); + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.type.TimeZone * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.type.TimeZone} message TimeZone * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + TimeZone.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.id = ""; + object.version = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this TimeZone to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.type.TimeZone * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + TimeZone.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + return TimeZone; })(); - api.ResourceDescriptor = (function() { + /** + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); + + type.TimeOfDay = (function() { /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * Properties of a TimeOfDay. + * @memberof google.type + * @interface ITimeOfDay + * @property {number|null} [hours] TimeOfDay hours + * @property {number|null} [minutes] TimeOfDay minutes + * @property {number|null} [seconds] TimeOfDay seconds + * @property {number|null} [nanos] TimeOfDay nanos */ /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * Constructs a new TimeOfDay. + * @memberof google.type + * @classdesc Represents a TimeOfDay. + * @implements ITimeOfDay * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.type.ITimeOfDay=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function TimeOfDay(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42748,167 +43338,114 @@ } /** - * 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 + * TimeOfDay hours. + * @member {number} hours + * @memberof google.type.TimeOfDay * @instance */ - ResourceDescriptor.prototype.history = 0; + TimeOfDay.prototype.hours = 0; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * TimeOfDay minutes. + * @member {number} minutes + * @memberof google.type.TimeOfDay * @instance */ - ResourceDescriptor.prototype.plural = ""; + TimeOfDay.prototype.minutes = 0; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * TimeOfDay seconds. + * @member {number} seconds + * @memberof google.type.TimeOfDay * @instance */ - ResourceDescriptor.prototype.singular = ""; + TimeOfDay.prototype.seconds = 0; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * TimeOfDay nanos. + * @member {number} nanos + * @memberof google.type.TimeOfDay * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + TimeOfDay.prototype.nanos = 0; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new TimeOfDay instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeOfDay * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @returns {google.type.TimeOfDay} TimeOfDay instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + TimeOfDay.create = function create(properties) { + return new TimeOfDay(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeOfDay * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + TimeOfDay.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeOfDay * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a TimeOfDay message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeOfDay * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.type.TimeOfDay} TimeOfDay * @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) { + TimeOfDay.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.hours = reader.int32(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.minutes = reader.int32(); break; case 3: - message.nameField = reader.string(); + message.seconds = reader.int32(); break; case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -42919,246 +43456,146 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeOfDay * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.type.TimeOfDay} TimeOfDay * @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) { + TimeOfDay.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a TimeOfDay message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeOfDay * @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) { + TimeOfDay.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeOfDay * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.type.TimeOfDay} TimeOfDay */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + TimeOfDay.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeOfDay) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } + var message = new $root.google.type.TimeOfDay(); + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeOfDay * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.type.TimeOfDay} message TimeOfDay * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + TimeOfDay.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; } + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this TimeOfDay to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeOfDay * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + TimeOfDay.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); + return TimeOfDay; + })(); - /** - * 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 type; + })(); - return ResourceDescriptor; - })(); + google.api = (function() { - api.ResourceReference = (function() { + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { /** - * Properties of a ResourceReference. + * Properties of a Http. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new ResourceReference. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function ResourceReference(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43166,88 +43603,91 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - ResourceReference.prototype.type = ""; + Http.prototype.rules = $util.emptyArray; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - ResourceReference.prototype.childType = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.Http * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.Http * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.Http * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.childType = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -43258,160 +43698,143 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a Http message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.Http} Http */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.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 ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.Http * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; + 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.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - return values; + return Http; })(); - return api; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.DateTime = (function() { + api.HttpRule = (function() { /** - * Properties of a DateTime. - * @memberof google.type - * @interface IDateTime - * @property {number|null} [year] DateTime year - * @property {number|null} [month] DateTime month - * @property {number|null} [day] DateTime day - * @property {number|null} [hours] DateTime hours - * @property {number|null} [minutes] DateTime minutes - * @property {number|null} [seconds] DateTime seconds - * @property {number|null} [nanos] DateTime nanos - * @property {google.protobuf.IDuration|null} [utcOffset] DateTime utcOffset - * @property {google.type.ITimeZone|null} [timeZone] DateTime timeZone + * 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 DateTime. - * @memberof google.type - * @classdesc Represents a DateTime. - * @implements IDateTime + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.type.IDateTime=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function DateTime(properties) { + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43419,193 +43842,209 @@ } /** - * DateTime year. - * @member {number} year - * @memberof google.type.DateTime + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - DateTime.prototype.year = 0; + HttpRule.prototype.selector = ""; /** - * DateTime month. - * @member {number} month - * @memberof google.type.DateTime + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - DateTime.prototype.month = 0; + HttpRule.prototype.get = null; /** - * DateTime day. - * @member {number} day - * @memberof google.type.DateTime + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule * @instance */ - DateTime.prototype.day = 0; + HttpRule.prototype.put = null; /** - * DateTime hours. - * @member {number} hours - * @memberof google.type.DateTime + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule * @instance */ - DateTime.prototype.hours = 0; + HttpRule.prototype.post = null; /** - * DateTime minutes. - * @member {number} minutes - * @memberof google.type.DateTime + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule * @instance */ - DateTime.prototype.minutes = 0; + HttpRule.prototype["delete"] = null; /** - * DateTime seconds. - * @member {number} seconds - * @memberof google.type.DateTime + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule * @instance */ - DateTime.prototype.seconds = 0; + HttpRule.prototype.patch = null; /** - * DateTime nanos. - * @member {number} nanos - * @memberof google.type.DateTime + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule * @instance */ - DateTime.prototype.nanos = 0; + HttpRule.prototype.custom = null; /** - * DateTime utcOffset. - * @member {google.protobuf.IDuration|null|undefined} utcOffset - * @memberof google.type.DateTime + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule * @instance */ - DateTime.prototype.utcOffset = null; + HttpRule.prototype.body = ""; /** - * DateTime timeZone. - * @member {google.type.ITimeZone|null|undefined} timeZone - * @memberof google.type.DateTime + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule * @instance */ - DateTime.prototype.timeZone = null; + 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; /** - * DateTime timeOffset. - * @member {"utcOffset"|"timeZone"|undefined} timeOffset - * @memberof google.type.DateTime + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - Object.defineProperty(DateTime.prototype, "timeOffset", { - get: $util.oneOfGetter($oneOfFields = ["utcOffset", "timeZone"]), + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new DateTime instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.type.DateTime + * @memberof google.api.HttpRule * @static - * @param {google.type.IDateTime=} [properties] Properties to set - * @returns {google.type.DateTime} DateTime instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - DateTime.create = function create(properties) { - return new DateTime(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.type.DateTime + * @memberof google.api.HttpRule * @static - * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DateTime.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); - if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hours); - if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minutes); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.nanos); - if (message.utcOffset != null && Object.hasOwnProperty.call(message, "utcOffset")) - $root.google.protobuf.Duration.encode(message.utcOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.DateTime + * @memberof google.api.HttpRule * @static - * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DateTime.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DateTime message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.type.DateTime + * @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.type.DateTime} DateTime + * @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 */ - DateTime.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.DateTime(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.year = reader.int32(); + message.selector = reader.string(); break; case 2: - message.month = reader.int32(); + message.get = reader.string(); break; case 3: - message.day = reader.int32(); + message.put = reader.string(); break; case 4: - message.hours = reader.int32(); + message.post = reader.string(); break; case 5: - message.minutes = reader.int32(); + message["delete"] = reader.string(); break; case 6: - message.seconds = reader.int32(); + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); break; case 7: - message.nanos = reader.int32(); + message.body = reader.string(); break; - case 8: - message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + case 12: + message.responseBody = reader.string(); break; - case 9: - message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + 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); @@ -43616,196 +44055,240 @@ }; /** - * Decodes a DateTime message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.DateTime + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.DateTime} DateTime + * @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 */ - DateTime.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DateTime message. + * Verifies a HttpRule message. * @function verify - * @memberof google.type.DateTime + * @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 */ - DateTime.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; - if (message.hours != null && message.hasOwnProperty("hours")) - if (!$util.isInteger(message.hours)) - return "hours: integer expected"; - if (message.minutes != null && message.hasOwnProperty("minutes")) - if (!$util.isInteger(message.minutes)) - return "minutes: integer expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds)) - return "seconds: integer expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { - properties.timeOffset = 1; + 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.protobuf.Duration.verify(message.utcOffset); + var error = $root.google.api.CustomHttpPattern.verify(message.custom); if (error) - return "utcOffset." + error; + return "custom." + error; } } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - if (properties.timeOffset === 1) - return "timeOffset: multiple values"; - properties.timeOffset = 1; - { - var error = $root.google.type.TimeZone.verify(message.timeZone); + 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 "timeZone." + error; + return "additionalBindings." + error; } } return null; }; /** - * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.DateTime + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.type.DateTime} DateTime + * @returns {google.api.HttpRule} HttpRule */ - DateTime.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.DateTime) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.type.DateTime(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; - if (object.hours != null) - message.hours = object.hours | 0; - if (object.minutes != null) - message.minutes = object.minutes | 0; - if (object.seconds != null) - message.seconds = object.seconds | 0; - if (object.nanos != null) - message.nanos = object.nanos | 0; - if (object.utcOffset != null) { - if (typeof object.utcOffset !== "object") - throw TypeError(".google.type.DateTime.utcOffset: object expected"); - message.utcOffset = $root.google.protobuf.Duration.fromObject(object.utcOffset); + 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.timeZone != null) { - if (typeof object.timeZone !== "object") - throw TypeError(".google.type.DateTime.timeZone: object expected"); - message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); + 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 DateTime message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.DateTime + * @memberof google.api.HttpRule * @static - * @param {google.type.DateTime} message DateTime + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DateTime.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - object.hours = 0; - object.minutes = 0; - object.seconds = 0; - object.nanos = 0; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; - if (message.hours != null && message.hasOwnProperty("hours")) - object.hours = message.hours; - if (message.minutes != null && message.hasOwnProperty("minutes")) - object.minutes = message.minutes; - if (message.seconds != null && message.hasOwnProperty("seconds")) - object.seconds = message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { - object.utcOffset = $root.google.protobuf.Duration.toObject(message.utcOffset, options); + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; if (options.oneofs) - object.timeOffset = "utcOffset"; + object.pattern = "get"; } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; if (options.oneofs) - object.timeOffset = "timeZone"; + 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 DateTime to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.type.DateTime + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - DateTime.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DateTime; + return HttpRule; })(); - type.TimeZone = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a TimeZone. - * @memberof google.type - * @interface ITimeZone - * @property {string|null} [id] TimeZone id - * @property {string|null} [version] TimeZone version + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new TimeZone. - * @memberof google.type - * @classdesc Represents a TimeZone. - * @implements ITimeZone + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.type.ITimeZone=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function TimeZone(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43813,88 +44296,384 @@ } /** - * TimeZone id. - * @member {string} id - * @memberof google.type.TimeZone + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - TimeZone.prototype.id = ""; + CustomHttpPattern.prototype.kind = ""; /** - * TimeZone version. - * @member {string} version - * @memberof google.type.TimeZone + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - TimeZone.prototype.version = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new TimeZone instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.type.TimeZone + * @memberof google.api.CustomHttpPattern * @static - * @param {google.type.ITimeZone=} [properties] Properties to set - * @returns {google.type.TimeZone} TimeZone instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - TimeZone.create = function create(properties) { - return new TimeZone(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.type.TimeZone + * @memberof google.api.CustomHttpPattern * @static - * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeZone.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + api.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 TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.TimeZone + * @memberof google.api.ResourceDescriptor * @static - * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeZone.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeZone message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.type.TimeZone + * @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.type.TimeZone} TimeZone + * @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 */ - TimeZone.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeZone(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.type = reader.string(); break; case 2: - message.version = reader.string(); + 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); @@ -43905,145 +44684,246 @@ }; /** - * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.TimeZone + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.TimeZone} TimeZone + * @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 */ - TimeZone.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeZone message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.type.TimeZone + * @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 */ - TimeZone.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string 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 TimeZone message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.TimeZone + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.type.TimeZone} TimeZone + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - TimeZone.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.TimeZone) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.type.TimeZone(); - if (object.id != null) - message.id = String(object.id); - if (object.version != null) - message.version = String(object.version); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; /** - * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.TimeZone + * @memberof google.api.ResourceDescriptor * @static - * @param {google.type.TimeZone} message TimeZone + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeZone.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } if (options.defaults) { - object.id = ""; - object.version = ""; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; return object; }; /** - * Converts this TimeZone to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.type.TimeZone + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - TimeZone.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeZone; - })(); + /** + * 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; + })(); - /** - * DayOfWeek enum. - * @name google.type.DayOfWeek - * @enum {number} - * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value - * @property {number} MONDAY=1 MONDAY value - * @property {number} TUESDAY=2 TUESDAY value - * @property {number} WEDNESDAY=3 WEDNESDAY value - * @property {number} THURSDAY=4 THURSDAY value - * @property {number} FRIDAY=5 FRIDAY value - * @property {number} SATURDAY=6 SATURDAY value - * @property {number} SUNDAY=7 SUNDAY value - */ - type.DayOfWeek = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; - values[valuesById[1] = "MONDAY"] = 1; - values[valuesById[2] = "TUESDAY"] = 2; - values[valuesById[3] = "WEDNESDAY"] = 3; - values[valuesById[4] = "THURSDAY"] = 4; - values[valuesById[5] = "FRIDAY"] = 5; - values[valuesById[6] = "SATURDAY"] = 6; - values[valuesById[7] = "SUNDAY"] = 7; - 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; })(); - type.TimeOfDay = (function() { + api.ResourceReference = (function() { /** - * Properties of a TimeOfDay. - * @memberof google.type - * @interface ITimeOfDay - * @property {number|null} [hours] TimeOfDay hours - * @property {number|null} [minutes] TimeOfDay minutes - * @property {number|null} [seconds] TimeOfDay seconds - * @property {number|null} [nanos] TimeOfDay nanos + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new TimeOfDay. - * @memberof google.type - * @classdesc Represents a TimeOfDay. - * @implements ITimeOfDay + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function TimeOfDay(properties) { + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44051,114 +44931,88 @@ } /** - * TimeOfDay hours. - * @member {number} hours - * @memberof google.type.TimeOfDay - * @instance - */ - TimeOfDay.prototype.hours = 0; - - /** - * TimeOfDay minutes. - * @member {number} minutes - * @memberof google.type.TimeOfDay - * @instance - */ - TimeOfDay.prototype.minutes = 0; - - /** - * TimeOfDay seconds. - * @member {number} seconds - * @memberof google.type.TimeOfDay + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - TimeOfDay.prototype.seconds = 0; + ResourceReference.prototype.type = ""; /** - * TimeOfDay nanos. - * @member {number} nanos - * @memberof google.type.TimeOfDay + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - TimeOfDay.prototype.nanos = 0; + ResourceReference.prototype.childType = ""; /** - * Creates a new TimeOfDay instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.type.TimeOfDay + * @memberof google.api.ResourceReference * @static - * @param {google.type.ITimeOfDay=} [properties] Properties to set - * @returns {google.type.TimeOfDay} TimeOfDay instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - TimeOfDay.create = function create(properties) { - return new TimeOfDay(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.type.TimeOfDay + * @memberof google.api.ResourceReference * @static - * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeOfDay.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); - if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); + 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 TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.TimeOfDay + * @memberof google.api.ResourceReference * @static - * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeOfDay message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.type.TimeOfDay + * @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.type.TimeOfDay} TimeOfDay + * @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 */ - TimeOfDay.decode = function decode(reader, length) { + ResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.hours = reader.int32(); + message.type = reader.string(); break; case 2: - message.minutes = reader.int32(); - break; - case 3: - message.seconds = reader.int32(); - break; - case 4: - message.nanos = reader.int32(); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -44169,115 +45023,123 @@ }; /** - * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.TimeOfDay + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.TimeOfDay} TimeOfDay + * @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 */ - TimeOfDay.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeOfDay message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.type.TimeOfDay + * @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 */ - TimeOfDay.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hours != null && message.hasOwnProperty("hours")) - if (!$util.isInteger(message.hours)) - return "hours: integer expected"; - if (message.minutes != null && message.hasOwnProperty("minutes")) - if (!$util.isInteger(message.minutes)) - return "minutes: integer expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds)) - return "seconds: integer expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer 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 TimeOfDay message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.TimeOfDay + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.type.TimeOfDay} TimeOfDay + * @returns {google.api.ResourceReference} ResourceReference */ - TimeOfDay.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.TimeOfDay) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.type.TimeOfDay(); - if (object.hours != null) - message.hours = object.hours | 0; - if (object.minutes != null) - message.minutes = object.minutes | 0; - if (object.seconds != null) - message.seconds = object.seconds | 0; - if (object.nanos != null) - message.nanos = object.nanos | 0; + 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 TimeOfDay message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.TimeOfDay + * @memberof google.api.ResourceReference * @static - * @param {google.type.TimeOfDay} message TimeOfDay + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeOfDay.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.hours = 0; - object.minutes = 0; - object.seconds = 0; - object.nanos = 0; + object.type = ""; + object.childType = ""; } - if (message.hours != null && message.hasOwnProperty("hours")) - object.hours = message.hours; - if (message.minutes != null && message.hasOwnProperty("minutes")) - object.minutes = message.minutes; - if (message.seconds != null && message.hasOwnProperty("seconds")) - object.seconds = message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + 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 TimeOfDay to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.type.TimeOfDay + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - TimeOfDay.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeOfDay; + return ResourceReference; })(); - return type; + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + return values; + })(); + + return api; })(); google.longrunning = (function() { diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 5c54f648eb8..cbcfe6f7523 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -1079,7 +1079,8 @@ "zypperPatch", "wuaPackage", "qfePackage", - "cosPackage" + "cosPackage", + "windowsApplication" ] } }, @@ -1115,6 +1116,10 @@ "cosPackage": { "type": "VersionedPackage", "id": 8 + }, + "windowsApplication": { + "type": "WindowsApplication", + "id": 9 } } }, @@ -1230,6 +1235,30 @@ "id": 5 } } + }, + "WindowsApplication": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "displayVersion": { + "type": "string", + "id": 2 + }, + "publisher": { + "type": "string", + "id": 3 + }, + "installDate": { + "type": "google.type.Date", + "id": 4 + }, + "helpLink": { + "type": "string", + "id": 5 + } + } } } }, @@ -2768,7 +2797,8 @@ "zypperPatch", "wuaPackage", "qfePackage", - "cosPackage" + "cosPackage", + "windowsApplication" ] } }, @@ -2804,6 +2834,10 @@ "cosPackage": { "type": "VersionedPackage", "id": 8 + }, + "windowsApplication": { + "type": "WindowsApplication", + "id": 9 } } }, @@ -2919,6 +2953,30 @@ "id": 5 } } + }, + "WindowsApplication": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "displayVersion": { + "type": "string", + "id": 2 + }, + "publisher": { + "type": "string", + "id": 3 + }, + "installDate": { + "type": "google.type.Date", + "id": 4 + }, + "helpLink": { + "type": "string", + "id": 5 + } + } } } }, @@ -4426,6 +4484,126 @@ } } }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/timeofday;timeofday", + "java_multiple_files": true, + "java_outer_classname": "TimeOfDayProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + }, + "DateTime": { + "oneofs": { + "timeOffset": { + "oneof": [ + "utcOffset", + "timeZone" + ] + } + }, + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + }, + "hours": { + "type": "int32", + "id": 4 + }, + "minutes": { + "type": "int32", + "id": 5 + }, + "seconds": { + "type": "int32", + "id": 6 + }, + "nanos": { + "type": "int32", + "id": 7 + }, + "utcOffset": { + "type": "google.protobuf.Duration", + "id": 8 + }, + "timeZone": { + "type": "TimeZone", + "id": 9 + } + } + }, + "TimeZone": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "version": { + "type": "string", + "id": 2 + } + } + }, + "DayOfWeek": { + "values": { + "DAY_OF_WEEK_UNSPECIFIED": 0, + "MONDAY": 1, + "TUESDAY": 2, + "WEDNESDAY": 3, + "THURSDAY": 4, + "FRIDAY": 5, + "SATURDAY": 6, + "SUNDAY": 7 + } + }, + "TimeOfDay": { + "fields": { + "hours": { + "type": "int32", + "id": 1 + }, + "minutes": { + "type": "int32", + "id": 2 + }, + "seconds": { + "type": "int32", + "id": 3 + }, + "nanos": { + "type": "int32", + "id": 4 + } + } + } + } + }, "api": { "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", @@ -4635,110 +4813,6 @@ } } }, - "type": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/type/timeofday;timeofday", - "java_multiple_files": true, - "java_outer_classname": "TimeOfDayProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "DateTime": { - "oneofs": { - "timeOffset": { - "oneof": [ - "utcOffset", - "timeZone" - ] - } - }, - "fields": { - "year": { - "type": "int32", - "id": 1 - }, - "month": { - "type": "int32", - "id": 2 - }, - "day": { - "type": "int32", - "id": 3 - }, - "hours": { - "type": "int32", - "id": 4 - }, - "minutes": { - "type": "int32", - "id": 5 - }, - "seconds": { - "type": "int32", - "id": 6 - }, - "nanos": { - "type": "int32", - "id": 7 - }, - "utcOffset": { - "type": "google.protobuf.Duration", - "id": 8 - }, - "timeZone": { - "type": "TimeZone", - "id": 9 - } - } - }, - "TimeZone": { - "fields": { - "id": { - "type": "string", - "id": 1 - }, - "version": { - "type": "string", - "id": 2 - } - } - }, - "DayOfWeek": { - "values": { - "DAY_OF_WEEK_UNSPECIFIED": 0, - "MONDAY": 1, - "TUESDAY": 2, - "WEDNESDAY": 3, - "THURSDAY": 4, - "FRIDAY": 5, - "SATURDAY": 6, - "SUNDAY": 7 - } - }, - "TimeOfDay": { - "fields": { - "hours": { - "type": "int32", - "id": 1 - }, - "minutes": { - "type": "int32", - "id": 2 - }, - "seconds": { - "type": "int32", - "id": 3 - }, - "nanos": { - "type": "int32", - "id": 4 - } - } - } - } - }, "longrunning": { "options": { "cc_enable_arenas": true, From fe9f86fb69c82bcddedb217991e764cff9bf42f4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 17:48:25 +0000 Subject: [PATCH 098/154] chore: release 1.8.0 (#143) :robot: I have created a release \*beep\* \*boop\* --- ## [1.8.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.7.0...v1.8.0) (2021-08-30) ### Features * Update osconfig v1 and v1alpha with WindowsApplication ([#142](https://www.github.com/googleapis/nodejs-os-config/issues/142)) ([6ad0c6d](https://www.github.com/googleapis/nodejs-os-config/commit/6ad0c6d547891986e3080fbcfc73ee64f7a31681)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 978e7a03422..82c62de160c 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.8.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.7.0...v1.8.0) (2021-08-30) + + +### Features + +* Update osconfig v1 and v1alpha with WindowsApplication ([#142](https://www.github.com/googleapis/nodejs-os-config/issues/142)) ([6ad0c6d](https://www.github.com/googleapis/nodejs-os-config/commit/6ad0c6d547891986e3080fbcfc73ee64f7a31681)) + ## [1.7.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.6.6...v1.7.0) (2021-08-23) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 79bfb9e6eac..e9a41b69904 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.7.0", + "version": "1.8.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 0042dd4f41a..df4f44f3b98 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.7.0" + "@google-cloud/os-config": "^1.8.0" }, "devDependencies": { "c8": "^7.1.0", From 5e9d64e49cbe44ef5ab5d13a7d022ffeabfaf339 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 7 Sep 2021 09:44:30 -0700 Subject: [PATCH 099/154] feat: add OSConfigZonalService API Committer: @jaiminsh (#144) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add OSConfigZonalService API Committer: @jaiminsh PiperOrigin-RevId: 394704298 Source-Link: https://github.com/googleapis/googleapis/commit/31d2d3432d9a0b910d7858eab7720b63445f23b2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/aa3ce0901f686a71b68e427c6bb7a611b151b540 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google/cloud/osconfig/v1/inventory.proto | 135 +- .../cloud/osconfig/v1/osconfig_service.proto | 1 + .../osconfig/v1/osconfig_zonal_service.proto | 74 + .../cloud/osconfig/v1/vulnerability.proto | 336 + .../google-cloud-osconfig/protos/protos.d.ts | 26649 +++--- .../google-cloud-osconfig/protos/protos.js | 77579 ++++++++-------- .../google-cloud-osconfig/protos/protos.json | 4582 +- packages/google-cloud-osconfig/src/index.ts | 6 +- .../src/v1/gapic_metadata.json | 62 + .../google-cloud-osconfig/src/v1/index.ts | 1 + .../src/v1/os_config_service_client.ts | 113 + .../src/v1/os_config_service_proto_list.json | 4 +- .../src/v1/os_config_zonal_service_client.ts | 1195 + ...os_config_zonal_service_client_config.json | 58 + .../os_config_zonal_service_proto_list.json | 9 + .../system-test/fixtures/sample/src/index.js | 1 + .../system-test/fixtures/sample/src/index.ts | 13 +- .../test/gapic_os_config_service_v1.ts | 142 + .../test/gapic_os_config_zonal_service_v1.ts | 1312 + 19 files changed, 60465 insertions(+), 51807 deletions(-) create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/vulnerability.proto create mode 100644 packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts create mode 100644 packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client_config.json create mode 100644 packages/google-cloud-osconfig/src/v1/os_config_zonal_service_proto_list.json create mode 100644 packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto index 11c998acb01..8f89d8b89b9 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.osconfig.v1; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; import "google/type/date.proto"; @@ -30,8 +32,19 @@ option ruby_package = "Google::Cloud::OsConfig::V1"; // OS Config Inventory is a service for collecting and reporting operating // system and package information on VM instances. -// The inventory details of a VM. +// This API resource represents the available inventory data for a +// Compute Engine virtual machine (VM) instance at a given point in time. +// +// You can use this API resource to determine the inventory data of your VM. +// +// For more information, see [Information provided by OS inventory +// management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected). message Inventory { + option (google.api.resource) = { + type: "osconfig.googleapis.com/Inventory" + pattern: "projects/{project}/locations/{location}/instances/{instance}/inventory" + }; + // Operating system information for the VM. message OsInfo { // The VM hostname. @@ -154,7 +167,7 @@ message Inventory { // Details of a COS package. VersionedPackage cos_package = 8; - // Details of a Windows Application + // Details of Windows Application. WindowsApplication windows_application = 9; } } @@ -172,6 +185,21 @@ message Inventory { string version = 3; } + // Details related to a Zypper Patch. + message ZypperPatch { + // The name of the patch. + string patch_name = 5; + + // The category of the patch. + string category = 2; + + // The severity specified for this patch + string severity = 3; + + // Any summary information provided about this patch. + string summary = 4; + } + // Details related to a Windows Update package. // Field data and names are taken from Windows Update API IUpdate Interface: // https://docs.microsoft.com/en-us/windows/win32/api/_wua/ @@ -218,21 +246,6 @@ message Inventory { google.protobuf.Timestamp last_deployment_change_time = 10; } - // Details related to a Zypper Patch. - message ZypperPatch { - // The name of the patch. - string patch_name = 5; - - // The category of the patch. - string category = 2; - - // The severity specified for this patch - string severity = 3; - - // Any summary information provided about this patch. - string summary = 4; - } - // Information related to a Quick Fix Engineering package. // Fields are taken from Windows QuickFixEngineering Interface and match // the source names: @@ -276,6 +289,12 @@ message Inventory { string help_link = 5; } + // Output only. The `Inventory` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` + string name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Base level operating system information for the VM. OsInfo os_info = 1; @@ -284,4 +303,84 @@ message Inventory { // addressable inventory item and will change, when there is a new package // version. map items = 2; + + // Output only. Timestamp of the last reported inventory for the VM. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request message for getting inventory data for the specified VM. +message GetInventoryRequest { + // Required. API resource name for inventory resource. + // + // Format: + // `projects/{project}/locations/{location}/instances/{instance}/inventory` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, either Compute Engine `instance-id` or `instance-name` + // can be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/Inventory" + } + ]; + + // Inventory view indicating what information should be included in the + // inventory resource. If unspecified, the default view is BASIC. + InventoryView view = 2; +} + +// A request message for listing inventory data for all VMs in the specified +// location. +message ListInventoriesRequest { + // Required. The parent resource name. + // + // Format: `projects/{project}/locations/{location}/instances/-` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + } + ]; + + // Inventory view indicating what information should be included in the + // inventory resource. If unspecified, the default view is BASIC. + InventoryView view = 2; + + // The maximum number of results to return. + int32 page_size = 3; + + // A pagination token returned from a previous call to + // `ListInventories` that indicates where this listing + // should continue from. + string page_token = 4; + + // If provided, this field specifies the criteria that must be met by a + // `Inventory` API resource to be included in the response. + string filter = 5; +} + +// A response message for listing inventory data for all VMs in a specified +// location. +message ListInventoriesResponse { + // List of inventory objects. + repeated Inventory inventories = 1; + + // The pagination token to retrieve the next page of inventory objects. + string next_page_token = 2; +} + +// The view for inventory objects. +enum InventoryView { + // The default value. + // The API defaults to the BASIC view. + INVENTORY_VIEW_UNSPECIFIED = 0; + + // Returns the basic inventory information that includes `os_info`. + BASIC = 1; + + // Returns all fields. + FULL = 2; } diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto index 2a654eaa2a4..88857b26b56 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto @@ -32,6 +32,7 @@ option ruby_package = "Google::Cloud::OsConfig::V1"; option (google.api.resource_definition) = { type: "compute.googleapis.com/Instance" pattern: "projects/{project}/zones/{zone}/instances/{instance}" + pattern: "projects/{project}/locations/{location}/instances/{instance}" }; // OS Config API diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto new file mode 100644 index 00000000000..22219f53973 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto @@ -0,0 +1,74 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1/inventory.proto"; +import "google/cloud/osconfig/v1/vulnerability.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "OsConfigZonalServiceProto"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// Zonal OS Config API +// +// The OS Config service is the server-side component that allows users to +// manage package installations and patch jobs for Compute Engine VM instances. +service OsConfigZonalService { + option (google.api.default_host) = "osconfig.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Get inventory data for the specified VM instance. If the VM has no + // associated inventory, the message `NOT_FOUND` is returned. + rpc GetInventory(GetInventoryRequest) returns (Inventory) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*/inventory}" + }; + option (google.api.method_signature) = "name"; + } + + // List inventory data for all VM instances in the specified zone. + rpc ListInventories(ListInventoriesRequest) returns (ListInventoriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/instances/*}/inventories" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the vulnerability report for the specified VM instance. Only VMs with + // inventory data have vulnerability reports associated with them. + rpc GetVulnerabilityReport(GetVulnerabilityReportRequest) returns (VulnerabilityReport) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}" + }; + option (google.api.method_signature) = "name"; + } + + // List vulnerability reports for all VM instances in the specified zone. + rpc ListVulnerabilityReports(ListVulnerabilityReportsRequest) returns (ListVulnerabilityReportsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports" + }; + option (google.api.method_signature) = "parent"; + } +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/vulnerability.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/vulnerability.proto new file mode 100644 index 00000000000..af86fbe098f --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/vulnerability.proto @@ -0,0 +1,336 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "VulnerabilityProto"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// This API resource represents the vulnerability report for a specified +// Compute Engine virtual machine (VM) instance at a given point in time. +// +// For more information, see [Vulnerability +// reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports). +message VulnerabilityReport { + option (google.api.resource) = { + type: "osconfig.googleapis.com/VulnerabilityReport" + pattern: "projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport" + }; + + // A vulnerability affecting the VM instance. + message Vulnerability { + // Contains metadata information for the vulnerability. This information is + // collected from the upstream feed of the operating system. + message Details { + // A reference for this vulnerability. + message Reference { + // The url of the reference. + string url = 1; + + // The source of the reference e.g. NVD. + string source = 2; + } + + // The CVE of the vulnerability. CVE cannot be + // empty and the combination of should be unique + // across vulnerabilities for a VM. + string cve = 1; + + // The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of + // 0 - 10 where 0 indicates low severity and 10 indicates high severity. + float cvss_v2_score = 2; + + // The full description of the CVSSv3 for this vulnerability from NVD. + CVSSv3 cvss_v3 = 3; + + // Assigned severity/impact ranking from the distro. + string severity = 4; + + // The note or description describing the vulnerability from the distro. + string description = 5; + + // Corresponds to the references attached to the `VulnerabilityDetails`. + repeated Reference references = 6; + } + + // Contains metadata as per the upstream feed of the operating system and + // NVD. + Details details = 1; + + // Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + // This field displays the inventory items affected by this vulnerability. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. For some distros, + // this field may be empty. + repeated string installed_inventory_item_ids = 2; + + // Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. If there is no + // available fix, the field is empty. The `inventory_item` value specifies + // the latest `SoftwarePackage` available to the VM that fixes the + // vulnerability. + repeated string available_inventory_item_ids = 3; + + // The timestamp for when the vulnerability was first detected. + google.protobuf.Timestamp create_time = 4; + + // The timestamp for when the vulnerability was last modified. + google.protobuf.Timestamp update_time = 5; + } + + // Output only. The `vulnerabilityReport` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of vulnerabilities affecting the VM. + repeated Vulnerability vulnerabilities = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp for when the last vulnerability report was generated for the + // VM. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request message for getting the vulnerability report for the specified VM. +message GetVulnerabilityReportRequest { + // Required. API resource name for vulnerability resource. + // + // Format: + // `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, either Compute Engine `instance-id` or `instance-name` + // can be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/VulnerabilityReport" + } + ]; +} + +// A request message for listing vulnerability reports for all VM instances in +// the specified location. +message ListVulnerabilityReportsRequest { + // Required. The parent resource name. + // + // Format: `projects/{project}/locations/{location}/instances/-` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + } + ]; + + // The maximum number of results to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListVulnerabilityReports` that indicates where this listing + // should continue from. + string page_token = 3; + + // If provided, this field specifies the criteria that must be met by a + // `vulnerabilityReport` API resource to be included in the response. + string filter = 4; +} + +// A response message for listing vulnerability reports for all VM instances in +// the specified location. +message ListVulnerabilityReportsResponse { + // List of vulnerabilityReport objects. + repeated VulnerabilityReport vulnerability_reports = 1; + + // The pagination token to retrieve the next page of vulnerabilityReports + // object. + string next_page_token = 2; +} + +// Common Vulnerability Scoring System version 3. +// For details, see https://www.first.org/cvss/specification-document +message CVSSv3 { + // This metric reflects the context by which vulnerability exploitation is + // possible. + enum AttackVector { + // Invalid value. + ATTACK_VECTOR_UNSPECIFIED = 0; + + // The vulnerable component is bound to the network stack and the set of + // possible attackers extends beyond the other options listed below, up to + // and including the entire Internet. + ATTACK_VECTOR_NETWORK = 1; + + // The vulnerable component is bound to the network stack, but the attack is + // limited at the protocol level to a logically adjacent topology. + ATTACK_VECTOR_ADJACENT = 2; + + // The vulnerable component is not bound to the network stack and the + // attacker's path is via read/write/execute capabilities. + ATTACK_VECTOR_LOCAL = 3; + + // The attack requires the attacker to physically touch or manipulate the + // vulnerable component. + ATTACK_VECTOR_PHYSICAL = 4; + } + + // This metric describes the conditions beyond the attacker's control that + // must exist in order to exploit the vulnerability. + enum AttackComplexity { + // Invalid value. + ATTACK_COMPLEXITY_UNSPECIFIED = 0; + + // Specialized access conditions or extenuating circumstances do not exist. + // An attacker can expect repeatable success when attacking the vulnerable + // component. + ATTACK_COMPLEXITY_LOW = 1; + + // A successful attack depends on conditions beyond the attacker's control. + // That is, a successful attack cannot be accomplished at will, but requires + // the attacker to invest in some measurable amount of effort in preparation + // or execution against the vulnerable component before a successful attack + // can be expected. + ATTACK_COMPLEXITY_HIGH = 2; + } + + // This metric describes the level of privileges an attacker must possess + // before successfully exploiting the vulnerability. + enum PrivilegesRequired { + // Invalid value. + PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + + // The attacker is unauthorized prior to attack, and therefore does not + // require any access to settings or files of the vulnerable system to + // carry out an attack. + PRIVILEGES_REQUIRED_NONE = 1; + + // The attacker requires privileges that provide basic user capabilities + // that could normally affect only settings and files owned by a user. + // Alternatively, an attacker with Low privileges has the ability to access + // only non-sensitive resources. + PRIVILEGES_REQUIRED_LOW = 2; + + // The attacker requires privileges that provide significant (e.g., + // administrative) control over the vulnerable component allowing access to + // component-wide settings and files. + PRIVILEGES_REQUIRED_HIGH = 3; + } + + // This metric captures the requirement for a human user, other than the + // attacker, to participate in the successful compromise of the vulnerable + // component. + enum UserInteraction { + // Invalid value. + USER_INTERACTION_UNSPECIFIED = 0; + + // The vulnerable system can be exploited without interaction from any user. + USER_INTERACTION_NONE = 1; + + // Successful exploitation of this vulnerability requires a user to take + // some action before the vulnerability can be exploited. + USER_INTERACTION_REQUIRED = 2; + } + + // The Scope metric captures whether a vulnerability in one vulnerable + // component impacts resources in components beyond its security scope. + enum Scope { + // Invalid value. + SCOPE_UNSPECIFIED = 0; + + // An exploited vulnerability can only affect resources managed by the same + // security authority. + SCOPE_UNCHANGED = 1; + + // An exploited vulnerability can affect resources beyond the security scope + // managed by the security authority of the vulnerable component. + SCOPE_CHANGED = 2; + } + + // The Impact metrics capture the effects of a successfully exploited + // vulnerability on the component that suffers the worst outcome that is most + // directly and predictably associated with the attack. + enum Impact { + // Invalid value. + IMPACT_UNSPECIFIED = 0; + + // High impact. + IMPACT_HIGH = 1; + + // Low impact. + IMPACT_LOW = 2; + + // No impact. + IMPACT_NONE = 3; + } + + // The base score is a function of the base metric scores. + // https://www.first.org/cvss/specification-document#Base-Metrics + float base_score = 1; + + // The Exploitability sub-score equation is derived from the Base + // Exploitability metrics. + // https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics + float exploitability_score = 2; + + // The Impact sub-score equation is derived from the Base Impact metrics. + float impact_score = 3; + + // This metric reflects the context by which vulnerability exploitation is + // possible. + AttackVector attack_vector = 5; + + // This metric describes the conditions beyond the attacker's control that + // must exist in order to exploit the vulnerability. + AttackComplexity attack_complexity = 6; + + // This metric describes the level of privileges an attacker must possess + // before successfully exploiting the vulnerability. + PrivilegesRequired privileges_required = 7; + + // This metric captures the requirement for a human user, other than the + // attacker, to participate in the successful compromise of the vulnerable + // component. + UserInteraction user_interaction = 8; + + // The Scope metric captures whether a vulnerability in one vulnerable + // component impacts resources in components beyond its security scope. + Scope scope = 9; + + // This metric measures the impact to the confidentiality of the information + // resources managed by a software component due to a successfully exploited + // vulnerability. + Impact confidentiality_impact = 10; + + // This metric measures the impact to integrity of a successfully exploited + // vulnerability. + Impact integrity_impact = 11; + + // This metric measures the impact to the availability of the impacted + // component resulting from a successfully exploited vulnerability. + Impact availability_impact = 12; +} diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index c547218e95b..393b6c67653 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -17,17450 +17,18817 @@ import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { - /** Namespace protobuf. */ - namespace protobuf { + /** Namespace cloud. */ + namespace cloud { - /** Properties of a Timestamp. */ - interface ITimestamp { + /** Namespace osconfig. */ + namespace osconfig { - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** Namespace v1. */ + namespace v1 { - /** Timestamp nanos */ - nanos?: (number|null); - } + /** Properties of an Inventory. */ + interface IInventory { - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Inventory name */ + name?: (string|null); - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); + /** Inventory osInfo */ + osInfo?: (google.cloud.osconfig.v1.Inventory.IOsInfo|null); - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** Inventory items */ + items?: ({ [k: string]: google.cloud.osconfig.v1.Inventory.IItem }|null); - /** Timestamp nanos. */ - public nanos: number; + /** Inventory updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** - * 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; + /** Represents an Inventory. */ + class Inventory implements IInventory { - /** - * 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; + /** + * Constructs a new Inventory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IInventory); - /** - * 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; + /** Inventory name. */ + public name: string; - /** - * 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; + /** Inventory osInfo. */ + public osInfo?: (google.cloud.osconfig.v1.Inventory.IOsInfo|null); - /** - * 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; + /** Inventory items. */ + public items: { [k: string]: google.cloud.osconfig.v1.Inventory.IItem }; - /** - * 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); + /** Inventory updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|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 new Inventory instance using the specified properties. + * @param [properties] Properties to set + * @returns Inventory instance + */ + public static create(properties?: google.cloud.osconfig.v1.IInventory): google.cloud.osconfig.v1.Inventory; - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** + * Decodes an Inventory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory; - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } + /** + * Decodes an Inventory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory; - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** + * Verifies an Inventory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Inventory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory; - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @param message Inventory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this Inventory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + namespace Inventory { - /** - * 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; + /** Properties of an OsInfo. */ + interface IOsInfo { - /** - * 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; + /** OsInfo hostname */ + hostname?: (string|null); - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + /** OsInfo longName */ + longName?: (string|null); - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** OsInfo shortName */ + shortName?: (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; + /** OsInfo version */ + version?: (string|null); - /** - * 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 }; + /** OsInfo architecture */ + architecture?: (string|null); - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** OsInfo kernelVersion */ + kernelVersion?: (string|null); - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { + /** OsInfo kernelRelease */ + kernelRelease?: (string|null); - /** FileDescriptorProto name */ - name?: (string|null); + /** OsInfo osconfigAgentVersion */ + osconfigAgentVersion?: (string|null); + } - /** FileDescriptorProto package */ - "package"?: (string|null); + /** Represents an OsInfo. */ + class OsInfo implements IOsInfo { - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); + /** + * Constructs a new OsInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IOsInfo); - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); + /** OsInfo hostname. */ + public hostname: string; - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); + /** OsInfo longName. */ + public longName: string; - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); + /** OsInfo shortName. */ + public shortName: string; - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** OsInfo version. */ + public version: string; - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); + /** OsInfo architecture. */ + public architecture: string; - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** OsInfo kernelVersion. */ + public kernelVersion: string; - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** OsInfo kernelRelease. */ + public kernelRelease: string; - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** OsInfo osconfigAgentVersion. */ + public osconfigAgentVersion: string; - /** FileDescriptorProto syntax */ - syntax?: (string|null); - } + /** + * Creates a new OsInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OsInfo instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IOsInfo): google.cloud.osconfig.v1.Inventory.OsInfo; - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** + * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. + * @param message OsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); + /** + * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. + * @param message OsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto name. */ - public name: string; + /** + * Decodes an OsInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.OsInfo; - /** FileDescriptorProto package. */ - public package: string; + /** + * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.OsInfo; - /** FileDescriptorProto dependency. */ - public dependency: string[]; + /** + * Verifies an OsInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; + /** + * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OsInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.OsInfo; - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; + /** + * Creates a plain object from an OsInfo message. Also converts values to other types if specified. + * @param message OsInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.OsInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; + /** + * Converts this OsInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** Properties of an Item. */ + interface IItem { - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; + /** Item id */ + id?: (string|null); - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** Item originType */ + originType?: (google.cloud.osconfig.v1.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1.Inventory.Item.OriginType|null); - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** Item createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** Item updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** FileDescriptorProto syntax. */ - public syntax: string; + /** Item type */ + type?: (google.cloud.osconfig.v1.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1.Inventory.Item.Type|null); - /** - * 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; + /** Item installedPackage */ + installedPackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** Item availablePackage */ + availablePackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); + } - /** - * 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; + /** Represents an Item. */ + class Item implements IItem { - /** - * 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; + /** + * Constructs a new Item. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IItem); - /** - * 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; + /** Item id. */ + public id: string; - /** - * 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); + /** Item originType. */ + public originType: (google.cloud.osconfig.v1.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1.Inventory.Item.OriginType); - /** - * 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; + /** Item createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** - * 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 }; + /** Item updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Item type. */ + public type: (google.cloud.osconfig.v1.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1.Inventory.Item.Type); - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); + /** Item installedPackage. */ + public installedPackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); + /** Item availablePackage. */ + public availablePackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** Item details. */ + public details?: ("installedPackage"|"availablePackage"); - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); + /** + * Creates a new Item instance using the specified properties. + * @param [properties] Properties to set + * @returns Item instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IItem): google.cloud.osconfig.v1.Inventory.Item; - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** + * Decodes an Item message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.Item; - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.Item; - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** + * Verifies an Item message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Item + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.Item; - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @param message Item + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); + /** + * Converts this Item to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** DescriptorProto name. */ - public name: string; + namespace Item { - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; + /** OriginType enum. */ + enum OriginType { + ORIGIN_TYPE_UNSPECIFIED = 0, + INVENTORY_REPORT = 1 + } - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + INSTALLED_PACKAGE = 1, + AVAILABLE_PACKAGE = 2 + } + } - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; + /** Properties of a SoftwarePackage. */ + interface ISoftwarePackage { - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** SoftwarePackage yumPackage */ + yumPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** SoftwarePackage aptPackage */ + aptPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** SoftwarePackage zypperPackage */ + zypperPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** SoftwarePackage googetPackage */ + googetPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** SoftwarePackage zypperPatch */ + zypperPatch?: (google.cloud.osconfig.v1.Inventory.IZypperPatch|null); - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** SoftwarePackage wuaPackage */ + wuaPackage?: (google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null); - /** - * 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; + /** SoftwarePackage qfePackage */ + qfePackage?: (google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null); - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** SoftwarePackage cosPackage */ + cosPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** SoftwarePackage windowsApplication */ + windowsApplication?: (google.cloud.osconfig.v1.Inventory.IWindowsApplication|null); + } - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + /** Represents a SoftwarePackage. */ + class SoftwarePackage implements ISoftwarePackage { - /** - * 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; + /** + * Constructs a new SoftwarePackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.ISoftwarePackage); - /** - * 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); + /** SoftwarePackage yumPackage. */ + public yumPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|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; + /** SoftwarePackage aptPackage. */ + public aptPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** - * 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 }; + /** SoftwarePackage zypperPackage. */ + public zypperPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** SoftwarePackage googetPackage. */ + public googetPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - namespace DescriptorProto { + /** SoftwarePackage zypperPatch. */ + public zypperPatch?: (google.cloud.osconfig.v1.Inventory.IZypperPatch|null); - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** SoftwarePackage wuaPackage. */ + public wuaPackage?: (google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null); - /** ExtensionRange start */ - start?: (number|null); + /** SoftwarePackage qfePackage. */ + public qfePackage?: (google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null); - /** ExtensionRange end */ - end?: (number|null); + /** SoftwarePackage cosPackage. */ + public cosPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } + /** SoftwarePackage windowsApplication. */ + public windowsApplication?: (google.cloud.osconfig.v1.Inventory.IWindowsApplication|null); - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** SoftwarePackage details. */ + public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"); - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; + /** + * Creates a new SoftwarePackage instance using the specified properties. + * @param [properties] Properties to set + * @returns SoftwarePackage instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.ISoftwarePackage): google.cloud.osconfig.v1.Inventory.SoftwarePackage; - /** ExtensionRange end. */ - public end: number; + /** + * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. + * @param message SoftwarePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** + * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. + * @param message SoftwarePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a SoftwarePackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.SoftwarePackage; - /** - * 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; + /** + * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.SoftwarePackage; - /** - * 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; + /** + * Verifies a SoftwarePackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an 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; + /** + * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoftwarePackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.SoftwarePackage; - /** - * 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; + /** + * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. + * @param message SoftwarePackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.SoftwarePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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); + /** + * Converts this SoftwarePackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a VersionedPackage. */ + interface IVersionedPackage { - /** - * 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 }; + /** VersionedPackage packageName */ + packageName?: (string|null); - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** VersionedPackage architecture */ + architecture?: (string|null); - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** VersionedPackage version */ + version?: (string|null); + } - /** ReservedRange start */ - start?: (number|null); + /** Represents a VersionedPackage. */ + class VersionedPackage implements IVersionedPackage { - /** ReservedRange end */ - end?: (number|null); - } + /** + * Constructs a new VersionedPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IVersionedPackage); - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** VersionedPackage packageName. */ + public packageName: string; - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** VersionedPackage architecture. */ + public architecture: string; - /** ReservedRange start. */ - public start: number; + /** VersionedPackage version. */ + public version: string; - /** ReservedRange end. */ - public end: number; + /** + * Creates a new VersionedPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionedPackage instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IVersionedPackage): google.cloud.osconfig.v1.Inventory.VersionedPackage; - /** - * 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 VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. + * @param message VersionedPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. + * @param message VersionedPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IVersionedPackage, 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 VersionedPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.VersionedPackage; - /** - * 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 VersionedPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.VersionedPackage; - /** - * 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 VersionedPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a 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 VersionedPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionedPackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.VersionedPackage; - /** - * 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 VersionedPackage message. Also converts values to other types if specified. + * @param message VersionedPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.VersionedPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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 VersionedPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Properties of a ZypperPatch. */ + interface IZypperPatch { - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** ZypperPatch patchName */ + patchName?: (string|null); - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** ZypperPatch category */ + category?: (string|null); - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** ZypperPatch severity */ + severity?: (string|null); - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + /** ZypperPatch summary */ + summary?: (string|null); + } - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Represents a ZypperPatch. */ + class ZypperPatch implements IZypperPatch { - /** - * 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; + /** + * Constructs a new ZypperPatch. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IZypperPatch); - /** - * 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; + /** ZypperPatch patchName. */ + public patchName: string; - /** - * 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; + /** ZypperPatch category. */ + public category: string; - /** - * 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; + /** ZypperPatch severity. */ + public severity: string; - /** - * 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; + /** ZypperPatch summary. */ + public summary: string; - /** - * 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 a new ZypperPatch instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperPatch instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IZypperPatch): google.cloud.osconfig.v1.Inventory.ZypperPatch; - /** - * 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; + /** + * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. + * @param message ZypperPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. + * @param message ZypperPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a ZypperPatch message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.ZypperPatch; - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** + * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.ZypperPatch; - /** FieldDescriptorProto name */ - name?: (string|null); + /** + * Verifies a ZypperPatch message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldDescriptorProto number */ - number?: (number|null); + /** + * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperPatch + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.ZypperPatch; - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + /** + * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. + * @param message ZypperPatch + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.ZypperPatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + /** + * Converts this ZypperPatch to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** Properties of a WindowsUpdatePackage. */ + interface IWindowsUpdatePackage { - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** WindowsUpdatePackage title */ + title?: (string|null); - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** WindowsUpdatePackage description */ + description?: (string|null); - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** WindowsUpdatePackage categories */ + categories?: (google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]|null); - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** WindowsUpdatePackage kbArticleIds */ + kbArticleIds?: (string[]|null); - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); + /** WindowsUpdatePackage supportUrl */ + supportUrl?: (string|null); - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } + /** WindowsUpdatePackage moreInfoUrls */ + moreInfoUrls?: (string[]|null); - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** WindowsUpdatePackage updateId */ + updateId?: (string|null); - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + /** WindowsUpdatePackage revisionNumber */ + revisionNumber?: (number|null); - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; + /** WindowsUpdatePackage lastDeploymentChangeTime */ + lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); + } - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + /** Represents a WindowsUpdatePackage. */ + class WindowsUpdatePackage implements IWindowsUpdatePackage { - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + /** + * Constructs a new WindowsUpdatePackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage); - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** WindowsUpdatePackage title. */ + public title: string; - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** WindowsUpdatePackage description. */ + public description: string; - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** WindowsUpdatePackage categories. */ + public categories: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]; - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** WindowsUpdatePackage kbArticleIds. */ + public kbArticleIds: string[]; - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** WindowsUpdatePackage supportUrl. */ + public supportUrl: string; - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** WindowsUpdatePackage moreInfoUrls. */ + public moreInfoUrls: string[]; - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** WindowsUpdatePackage updateId. */ + public updateId: string; - /** - * 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; + /** WindowsUpdatePackage revisionNumber. */ + public revisionNumber: number; - /** - * 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; + /** WindowsUpdatePackage lastDeploymentChangeTime. */ + public lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** + * Creates a new WindowsUpdatePackage instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdatePackage instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; - /** - * 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; + /** + * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @param message WindowsUpdatePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @param message WindowsUpdatePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; - /** - * 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; + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; - /** - * 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 }; + /** + * Verifies a WindowsUpdatePackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdatePackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; - namespace FieldDescriptorProto { + /** + * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. + * @param message WindowsUpdatePackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** 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 - } + /** + * Converts this WindowsUpdatePackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } + namespace WindowsUpdatePackage { - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { + /** Properties of a WindowsUpdateCategory. */ + interface IWindowsUpdateCategory { - /** OneofDescriptorProto name */ - name?: (string|null); + /** WindowsUpdateCategory id */ + id?: (string|null); - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } + /** WindowsUpdateCategory name */ + name?: (string|null); + } - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Represents a WindowsUpdateCategory. */ + class WindowsUpdateCategory implements IWindowsUpdateCategory { - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); + /** + * Constructs a new WindowsUpdateCategory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory); - /** OneofDescriptorProto name. */ - public name: string; + /** WindowsUpdateCategory id. */ + public id: string; - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** WindowsUpdateCategory name. */ + public name: string; - /** - * 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; + /** + * Creates a new WindowsUpdateCategory instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdateCategory instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; - /** - * 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 WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @param message WindowsUpdateCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, 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; + /** + * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @param message WindowsUpdateCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, 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 a WindowsUpdateCategory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; - /** - * 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; + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; - /** - * 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); + /** + * Verifies a WindowsUpdateCategory message. + * @param message Plain object 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 WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdateCategory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; - /** - * 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 }; + /** + * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. + * @param message WindowsUpdateCategory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this WindowsUpdateCategory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { + /** Properties of a WindowsQuickFixEngineeringPackage. */ + interface IWindowsQuickFixEngineeringPackage { - /** EnumDescriptorProto name */ - name?: (string|null); + /** WindowsQuickFixEngineeringPackage caption */ + caption?: (string|null); - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** WindowsQuickFixEngineeringPackage description */ + description?: (string|null); - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** WindowsQuickFixEngineeringPackage hotFixId */ + hotFixId?: (string|null); - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + /** WindowsQuickFixEngineeringPackage installTime */ + installTime?: (google.protobuf.ITimestamp|null); + } - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } + /** Represents a WindowsQuickFixEngineeringPackage. */ + class WindowsQuickFixEngineeringPackage implements IWindowsQuickFixEngineeringPackage { - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** + * Constructs a new WindowsQuickFixEngineeringPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage); - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); + /** WindowsQuickFixEngineeringPackage caption. */ + public caption: string; - /** EnumDescriptorProto name. */ - public name: string; + /** WindowsQuickFixEngineeringPackage description. */ + public description: string; - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + /** WindowsQuickFixEngineeringPackage hotFixId. */ + public hotFixId: string; - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** WindowsQuickFixEngineeringPackage installTime. */ + public installTime?: (google.protobuf.ITimestamp|null); - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + /** + * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsQuickFixEngineeringPackage instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @param message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @param message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; - /** - * 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; + /** + * Verifies a WindowsQuickFixEngineeringPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + /** + * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsQuickFixEngineeringPackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. + * @param message WindowsQuickFixEngineeringPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + /** + * Converts this WindowsQuickFixEngineeringPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a WindowsApplication. */ + interface IWindowsApplication { - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** WindowsApplication displayName */ + displayName?: (string|null); - namespace EnumDescriptorProto { + /** WindowsApplication displayVersion */ + displayVersion?: (string|null); - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { + /** WindowsApplication publisher */ + publisher?: (string|null); - /** EnumReservedRange start */ - start?: (number|null); + /** WindowsApplication installDate */ + installDate?: (google.type.IDate|null); - /** EnumReservedRange end */ - end?: (number|null); - } + /** WindowsApplication helpLink */ + helpLink?: (string|null); + } - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { + /** Represents a WindowsApplication. */ + class WindowsApplication implements IWindowsApplication { - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + /** + * Constructs a new WindowsApplication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.Inventory.IWindowsApplication); - /** EnumReservedRange start. */ - public start: number; + /** WindowsApplication displayName. */ + public displayName: string; - /** EnumReservedRange end. */ - public end: number; + /** WindowsApplication displayVersion. */ + public displayVersion: string; - /** - * 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; + /** WindowsApplication publisher. */ + public publisher: string; - /** - * 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; + /** WindowsApplication installDate. */ + public installDate?: (google.type.IDate|null); - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** WindowsApplication helpLink. */ + public helpLink: string; - /** - * 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; + /** + * Creates a new WindowsApplication instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsApplication instance + */ + public static create(properties?: google.cloud.osconfig.v1.Inventory.IWindowsApplication): google.cloud.osconfig.v1.Inventory.WindowsApplication; - /** - * 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; + /** + * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * @param message WindowsApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * @param message WindowsApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** + * Decodes a WindowsApplication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsApplication; - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsApplication; - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Verifies a WindowsApplication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { + /** + * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsApplication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsApplication; - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** + * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. + * @param message WindowsApplication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** + * Converts this WindowsApplication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } + /** Properties of a GetInventoryRequest. */ + interface IGetInventoryRequest { - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** GetInventoryRequest name */ + name?: (string|null); - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + /** GetInventoryRequest view */ + view?: (google.cloud.osconfig.v1.InventoryView|keyof typeof google.cloud.osconfig.v1.InventoryView|null); + } - /** EnumValueDescriptorProto name. */ - public name: string; + /** Represents a GetInventoryRequest. */ + class GetInventoryRequest implements IGetInventoryRequest { - /** EnumValueDescriptorProto number. */ - public number: number; + /** + * Constructs a new GetInventoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGetInventoryRequest); - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** GetInventoryRequest name. */ + public name: string; - /** - * 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; + /** GetInventoryRequest view. */ + public view: (google.cloud.osconfig.v1.InventoryView|keyof typeof google.cloud.osconfig.v1.InventoryView); - /** - * 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; + /** + * Creates a new GetInventoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetInventoryRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGetInventoryRequest): google.cloud.osconfig.v1.GetInventoryRequest; - /** - * 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; + /** + * Encodes the specified GetInventoryRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetInventoryRequest.verify|verify} messages. + * @param message GetInventoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGetInventoryRequest, 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; + /** + * Encodes the specified GetInventoryRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetInventoryRequest.verify|verify} messages. + * @param message GetInventoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetInventoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a GetInventoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetInventoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetInventoryRequest; - /** - * 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); + /** + * Decodes a GetInventoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetInventoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetInventoryRequest; - /** - * 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; + /** + * Verifies a GetInventoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from an 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 }; + /** + * Creates a GetInventoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetInventoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetInventoryRequest; - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a GetInventoryRequest message. Also converts values to other types if specified. + * @param message GetInventoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GetInventoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { + /** + * Converts this GetInventoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ServiceDescriptorProto name */ - name?: (string|null); + /** Properties of a ListInventoriesRequest. */ + interface IListInventoriesRequest { - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** ListInventoriesRequest parent */ + parent?: (string|null); - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } + /** ListInventoriesRequest view */ + view?: (google.cloud.osconfig.v1.InventoryView|keyof typeof google.cloud.osconfig.v1.InventoryView|null); - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** ListInventoriesRequest pageSize */ + pageSize?: (number|null); - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); + /** ListInventoriesRequest pageToken */ + pageToken?: (string|null); - /** ServiceDescriptorProto name. */ - public name: string; + /** ListInventoriesRequest filter */ + filter?: (string|null); + } - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** Represents a ListInventoriesRequest. */ + class ListInventoriesRequest implements IListInventoriesRequest { - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** + * Constructs a new ListInventoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListInventoriesRequest); - /** - * 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; + /** ListInventoriesRequest parent. */ + public parent: string; - /** - * 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; + /** ListInventoriesRequest view. */ + public view: (google.cloud.osconfig.v1.InventoryView|keyof typeof google.cloud.osconfig.v1.InventoryView); - /** - * 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; + /** ListInventoriesRequest pageSize. */ + public pageSize: number; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + /** ListInventoriesRequest pageToken. */ + public pageToken: string; - /** - * 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; + /** ListInventoriesRequest filter. */ + public filter: string; - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new ListInventoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInventoriesRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListInventoriesRequest): google.cloud.osconfig.v1.ListInventoriesRequest; - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + /** + * Encodes the specified ListInventoriesRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListInventoriesRequest.verify|verify} messages. + * @param message ListInventoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListInventoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ListInventoriesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListInventoriesRequest.verify|verify} messages. + * @param message ListInventoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListInventoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a ListInventoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInventoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListInventoriesRequest; - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + /** + * Decodes a ListInventoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInventoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListInventoriesRequest; - /** MethodDescriptorProto name */ - name?: (string|null); + /** + * Verifies a ListInventoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** + * Creates a ListInventoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInventoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListInventoriesRequest; - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** + * Creates a plain object from a ListInventoriesRequest message. Also converts values to other types if specified. + * @param message ListInventoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListInventoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** + * Converts this ListInventoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } + /** Properties of a ListInventoriesResponse. */ + interface IListInventoriesResponse { - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** ListInventoriesResponse inventories */ + inventories?: (google.cloud.osconfig.v1.IInventory[]|null); - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); + /** ListInventoriesResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** MethodDescriptorProto name. */ - public name: string; + /** Represents a ListInventoriesResponse. */ + class ListInventoriesResponse implements IListInventoriesResponse { - /** MethodDescriptorProto inputType. */ - public inputType: string; + /** + * Constructs a new ListInventoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListInventoriesResponse); - /** MethodDescriptorProto outputType. */ - public outputType: string; + /** ListInventoriesResponse inventories. */ + public inventories: google.cloud.osconfig.v1.IInventory[]; - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** ListInventoriesResponse nextPageToken. */ + public nextPageToken: string; - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** + * Creates a new ListInventoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInventoriesResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListInventoriesResponse): google.cloud.osconfig.v1.ListInventoriesResponse; - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** + * Encodes the specified ListInventoriesResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListInventoriesResponse.verify|verify} messages. + * @param message ListInventoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListInventoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 ListInventoriesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListInventoriesResponse.verify|verify} messages. + * @param message ListInventoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListInventoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a ListInventoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInventoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListInventoriesResponse; - /** - * 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 ListInventoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInventoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListInventoriesResponse; - /** - * 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; + /** + * Verifies a ListInventoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a 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; + /** + * Creates a ListInventoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInventoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListInventoriesResponse; - /** - * 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 plain object from a ListInventoriesResponse message. Also converts values to other types if specified. + * @param message ListInventoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListInventoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this ListInventoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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 }; + /** InventoryView enum. */ + enum InventoryView { + INVENTORY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a FixedOrPercent. */ + interface IFixedOrPercent { - /** Properties of a FileOptions. */ - interface IFileOptions { + /** FixedOrPercent fixed */ + fixed?: (number|null); - /** FileOptions javaPackage */ - javaPackage?: (string|null); + /** FixedOrPercent percent */ + percent?: (number|null); + } - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); + /** Represents a FixedOrPercent. */ + class FixedOrPercent implements IFixedOrPercent { - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); + /** + * Constructs a new FixedOrPercent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IFixedOrPercent); - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); + /** FixedOrPercent fixed. */ + public fixed?: (number|null); - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); + /** FixedOrPercent percent. */ + public percent?: (number|null); - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + /** FixedOrPercent mode. */ + public mode?: ("fixed"|"percent"); - /** FileOptions goPackage */ - goPackage?: (string|null); + /** + * Creates a new FixedOrPercent instance using the specified properties. + * @param [properties] Properties to set + * @returns FixedOrPercent instance + */ + public static create(properties?: google.cloud.osconfig.v1.IFixedOrPercent): google.cloud.osconfig.v1.FixedOrPercent; - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); + /** + * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * @param message FixedOrPercent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); + /** + * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * @param message FixedOrPercent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); + /** + * Decodes a FixedOrPercent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.FixedOrPercent; - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); + /** + * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.FixedOrPercent; - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); + /** + * Verifies a FixedOrPercent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); + /** + * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FixedOrPercent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.FixedOrPercent; - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); + /** + * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. + * @param message FixedOrPercent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.FixedOrPercent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); + /** + * Converts this FixedOrPercent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); + /** Represents an OsConfigService */ + class OsConfigService extends $protobuf.rpc.Service { - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); + /** + * Constructs a new OsConfigService 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); - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); + /** + * Creates new OsConfigService 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): OsConfigService; - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Calls ExecutePatchJob. + * @param request ExecutePatchJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchJob + */ + public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback): void; - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } + /** + * Calls ExecutePatchJob. + * @param request ExecutePatchJobRequest message or plain object + * @returns Promise + */ + public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest): Promise; - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { + /** + * Calls GetPatchJob. + * @param request GetPatchJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchJob + */ + public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback): void; - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + /** + * Calls GetPatchJob. + * @param request GetPatchJobRequest message or plain object + * @returns Promise + */ + public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest): Promise; - /** FileOptions javaPackage. */ - public javaPackage: string; + /** + * Calls CancelPatchJob. + * @param request CancelPatchJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchJob + */ + public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback): void; - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + /** + * Calls CancelPatchJob. + * @param request CancelPatchJobRequest message or plain object + * @returns Promise + */ + public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest): Promise; - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** + * Calls ListPatchJobs. + * @param request ListPatchJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPatchJobsResponse + */ + public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback): void; - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** + * Calls ListPatchJobs. + * @param request ListPatchJobsRequest message or plain object + * @returns Promise + */ + public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest): Promise; - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** + * Calls ListPatchJobInstanceDetails. + * @param request ListPatchJobInstanceDetailsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse + */ + public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback): void; - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** + * Calls ListPatchJobInstanceDetails. + * @param request ListPatchJobInstanceDetailsRequest message or plain object + * @returns Promise + */ + public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): Promise; - /** FileOptions goPackage. */ - public goPackage: string; + /** + * Calls CreatePatchDeployment. + * @param request CreatePatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchDeployment + */ + public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback): void; - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** + * Calls CreatePatchDeployment. + * @param request CreatePatchDeploymentRequest message or plain object + * @returns Promise + */ + public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): Promise; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** + * Calls GetPatchDeployment. + * @param request GetPatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchDeployment + */ + public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback): void; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** + * Calls GetPatchDeployment. + * @param request GetPatchDeploymentRequest message or plain object + * @returns Promise + */ + public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): Promise; - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; + /** + * Calls ListPatchDeployments. + * @param request ListPatchDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse + */ + public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback): void; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * Calls ListPatchDeployments. + * @param request ListPatchDeploymentsRequest message or plain object + * @returns Promise + */ + public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): Promise; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * Calls DeletePatchDeployment. + * @param request DeletePatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback): void; - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * Calls DeletePatchDeployment. + * @param request DeletePatchDeploymentRequest message or plain object + * @returns Promise + */ + public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): Promise; + } - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + namespace OsConfigService { - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. + * @param error Error, if any + * @param [response] PatchJob + */ + type ExecutePatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. + * @param error Error, if any + * @param [response] PatchJob + */ + type GetPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. + * @param error Error, if any + * @param [response] PatchJob + */ + type CancelPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. + * @param error Error, if any + * @param [response] ListPatchJobsResponse + */ + type ListPatchJobsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobsResponse) => void; - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. + * @param error Error, if any + * @param [response] ListPatchJobInstanceDetailsResponse + */ + type ListPatchJobInstanceDetailsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) => void; - /** - * 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; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. + * @param error Error, if any + * @param [response] PatchDeployment + */ + type CreatePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; - /** - * 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; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. + * @param error Error, if any + * @param [response] PatchDeployment + */ + type GetPatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; - /** - * 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; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. + * @param error Error, if any + * @param [response] ListPatchDeploymentsResponse + */ + type ListPatchDeploymentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchDeploymentsResponse) => void; - /** - * 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; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePatchDeploymentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } - /** - * 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; + /** Properties of a PatchDeployment. */ + interface IPatchDeployment { - /** - * 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); + /** PatchDeployment name */ + name?: (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; + /** PatchDeployment description */ + description?: (string|null); - /** - * 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 }; + /** PatchDeployment instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** PatchDeployment patchConfig */ + patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - namespace FileOptions { + /** PatchDeployment duration */ + duration?: (google.protobuf.IDuration|null); - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } + /** PatchDeployment oneTimeSchedule */ + oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** PatchDeployment recurringSchedule */ + recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** PatchDeployment createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** PatchDeployment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** PatchDeployment lastExecuteTime */ + lastExecuteTime?: (google.protobuf.ITimestamp|null); - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** PatchDeployment rollout */ + rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + } - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Represents a PatchDeployment. */ + class PatchDeployment implements IPatchDeployment { - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } + /** + * Constructs a new PatchDeployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchDeployment); - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** PatchDeployment name. */ + public name: string; - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + /** PatchDeployment description. */ + public description: string; - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** PatchDeployment instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** PatchDeployment patchConfig. */ + public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** PatchDeployment duration. */ + public duration?: (google.protobuf.IDuration|null); - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** PatchDeployment oneTimeSchedule. */ + public oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** PatchDeployment recurringSchedule. */ + public recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); - /** - * 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; + /** PatchDeployment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** PatchDeployment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** PatchDeployment lastExecuteTime. */ + public lastExecuteTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** PatchDeployment rollout. */ + public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); - /** - * 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; + /** PatchDeployment schedule. */ + public schedule?: ("oneTimeSchedule"|"recurringSchedule"); - /** - * 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 new PatchDeployment instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchDeployment instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchDeployment): google.cloud.osconfig.v1.PatchDeployment; - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + /** + * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @param message PatchDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @param message PatchDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a PatchDeployment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchDeployment; - /** Properties of a FieldOptions. */ - interface IFieldOptions { + /** + * Decodes a PatchDeployment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchDeployment; - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + /** + * Verifies a PatchDeployment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldOptions packed */ - packed?: (boolean|null); + /** + * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchDeployment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchDeployment; - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + /** + * Creates a plain object from a PatchDeployment message. Also converts values to other types if specified. + * @param message PatchDeployment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** + * Converts this PatchDeployment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of an OneTimeSchedule. */ + interface IOneTimeSchedule { - /** FieldOptions weak */ - weak?: (boolean|null); + /** OneTimeSchedule executeTime */ + executeTime?: (google.protobuf.ITimestamp|null); + } - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Represents an OneTimeSchedule. */ + class OneTimeSchedule implements IOneTimeSchedule { - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); + /** + * Constructs a new OneTimeSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IOneTimeSchedule); - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - } + /** OneTimeSchedule executeTime. */ + public executeTime?: (google.protobuf.ITimestamp|null); - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** + * Creates a new OneTimeSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns OneTimeSchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IOneTimeSchedule): google.cloud.osconfig.v1.OneTimeSchedule; - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** + * Encodes the specified OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @param message OneTimeSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IOneTimeSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + /** + * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @param message OneTimeSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IOneTimeSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldOptions packed. */ - public packed: boolean; + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OneTimeSchedule; - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OneTimeSchedule; - /** FieldOptions lazy. */ - public lazy: boolean; + /** + * Verifies an OneTimeSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** + * Creates an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneTimeSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OneTimeSchedule; - /** FieldOptions weak. */ - public weak: boolean; + /** + * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. + * @param message OneTimeSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OneTimeSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Converts this OneTimeSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a RecurringSchedule. */ + interface IRecurringSchedule { - /** - * 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; + /** RecurringSchedule timeZone */ + timeZone?: (google.type.ITimeZone|null); - /** - * 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; + /** RecurringSchedule startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** RecurringSchedule endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** RecurringSchedule timeOfDay */ + timeOfDay?: (google.type.ITimeOfDay|null); - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** RecurringSchedule frequency */ + frequency?: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency|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; + /** RecurringSchedule weekly */ + weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** RecurringSchedule monthly */ + monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** RecurringSchedule lastExecuteTime */ + lastExecuteTime?: (google.protobuf.ITimestamp|null); - namespace FieldOptions { + /** RecurringSchedule nextExecuteTime */ + nextExecuteTime?: (google.protobuf.ITimestamp|null); + } - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } + /** Represents a RecurringSchedule. */ + class RecurringSchedule implements IRecurringSchedule { - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - } + /** + * Constructs a new RecurringSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IRecurringSchedule); - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** RecurringSchedule timeZone. */ + public timeZone?: (google.type.ITimeZone|null); - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** RecurringSchedule startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** RecurringSchedule endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); + /** RecurringSchedule timeOfDay. */ + public timeOfDay?: (google.type.ITimeOfDay|null); - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** RecurringSchedule frequency. */ + public frequency: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency); - /** - * 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; + /** RecurringSchedule weekly. */ + public weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** RecurringSchedule monthly. */ + public monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** RecurringSchedule lastExecuteTime. */ + public lastExecuteTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** RecurringSchedule nextExecuteTime. */ + public nextExecuteTime?: (google.protobuf.ITimestamp|null); - /** - * 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; + /** RecurringSchedule scheduleConfig. */ + public scheduleConfig?: ("weekly"|"monthly"); - /** - * 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 a new RecurringSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns RecurringSchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IRecurringSchedule): google.cloud.osconfig.v1.RecurringSchedule; - /** - * 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; + /** + * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @param message RecurringSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @param message RecurringSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a RecurringSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.RecurringSchedule; - /** Properties of an EnumOptions. */ - interface IEnumOptions { + /** + * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.RecurringSchedule; - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** + * Verifies a RecurringSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** + * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecurringSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.RecurringSchedule; - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. + * @param message RecurringSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.RecurringSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** + * Converts this RecurringSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); + namespace RecurringSchedule { - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + /** Frequency enum. */ + enum Frequency { + FREQUENCY_UNSPECIFIED = 0, + WEEKLY = 1, + MONTHLY = 2 + } + } - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** Properties of a WeeklySchedule. */ + interface IWeeklySchedule { - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** WeeklySchedule dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } - /** - * 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; + /** Represents a WeeklySchedule. */ + class WeeklySchedule implements IWeeklySchedule { - /** - * 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; + /** + * Constructs a new WeeklySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IWeeklySchedule); - /** - * 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; + /** WeeklySchedule dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); - /** - * 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 a new WeeklySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns WeeklySchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IWeeklySchedule): google.cloud.osconfig.v1.WeeklySchedule; - /** - * 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; + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeeklySchedule; - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeeklySchedule; - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** + * Verifies a WeeklySchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeeklySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeeklySchedule; - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @param message WeeklySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); + /** + * Converts this WeeklySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** Properties of a MonthlySchedule. */ + interface IMonthlySchedule { - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** MonthlySchedule weekDayOfMonth */ + weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); - /** - * 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; + /** MonthlySchedule monthDay */ + monthDay?: (number|null); + } - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a MonthlySchedule. */ + class MonthlySchedule implements IMonthlySchedule { - /** - * 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; + /** + * Constructs a new MonthlySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IMonthlySchedule); - /** - * 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; + /** MonthlySchedule weekDayOfMonth. */ + public weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); - /** - * 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; + /** MonthlySchedule monthDay. */ + public monthDay?: (number|null); - /** - * 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); + /** MonthlySchedule dayOfMonth. */ + public dayOfMonth?: ("weekDayOfMonth"|"monthDay"); - /** - * 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 new MonthlySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns MonthlySchedule instance + */ + public static create(properties?: google.cloud.osconfig.v1.IMonthlySchedule): google.cloud.osconfig.v1.MonthlySchedule; - /** - * 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 }; + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a ServiceOptions. */ - interface IServiceOptions { + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.MonthlySchedule; - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.MonthlySchedule; - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Verifies a MonthlySchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** + * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonthlySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.MonthlySchedule; - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - } + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @param message MonthlySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** + * Converts this MonthlySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); + /** Properties of a WeekDayOfMonth. */ + interface IWeekDayOfMonth { - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** WeekDayOfMonth weekOrdinal */ + weekOrdinal?: (number|null); - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** WeekDayOfMonth dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } - /** - * 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; + /** Represents a WeekDayOfMonth. */ + class WeekDayOfMonth implements IWeekDayOfMonth { - /** - * 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; + /** + * Constructs a new WeekDayOfMonth. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth); - /** - * 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; + /** WeekDayOfMonth weekOrdinal. */ + public weekOrdinal: number; - /** - * 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; + /** WeekDayOfMonth dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); - /** - * 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; + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @param [properties] Properties to set + * @returns WeekDayOfMonth instance + */ + public static create(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth): google.cloud.osconfig.v1.WeekDayOfMonth; - /** - * 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); + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeekDayOfMonth; - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeekDayOfMonth; - /** Properties of a MethodOptions. */ - interface IMethodOptions { + /** + * Verifies a WeekDayOfMonth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeekDayOfMonth + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeekDayOfMonth; - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @param message WeekDayOfMonth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Converts this WeekDayOfMonth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** Properties of a CreatePatchDeploymentRequest. */ + interface ICreatePatchDeploymentRequest { - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); + /** CreatePatchDeploymentRequest parent */ + parent?: (string|null); - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } + /** CreatePatchDeploymentRequest patchDeploymentId */ + patchDeploymentId?: (string|null); - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** CreatePatchDeploymentRequest patchDeployment */ + patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + } - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); + /** Represents a CreatePatchDeploymentRequest. */ + class CreatePatchDeploymentRequest implements ICreatePatchDeploymentRequest { - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** + * Constructs a new CreatePatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest); - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** CreatePatchDeploymentRequest parent. */ + public parent: string; - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** CreatePatchDeploymentRequest patchDeploymentId. */ + public patchDeploymentId: string; - /** - * 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; + /** CreatePatchDeploymentRequest patchDeployment. */ + public patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new CreatePatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @param message CreatePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + /** + * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @param message CreatePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + /** + * Verifies a CreatePatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. + * @param message CreatePatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.CreatePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace MethodOptions { + /** + * Converts this CreatePatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } + /** Properties of a GetPatchDeploymentRequest. */ + interface IGetPatchDeploymentRequest { - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { + /** GetPatchDeploymentRequest name */ + name?: (string|null); + } - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** Represents a GetPatchDeploymentRequest. */ + class GetPatchDeploymentRequest implements IGetPatchDeploymentRequest { - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** + * Constructs a new GetPatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest); - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); + /** GetPatchDeploymentRequest name. */ + public name: string; - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); + /** + * Creates a new GetPatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): google.cloud.osconfig.v1.GetPatchDeploymentRequest; - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** + * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @param message GetPatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + /** + * Encodes the specified GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @param message GetPatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchDeploymentRequest; - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchDeploymentRequest; - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); + /** + * Verifies a GetPatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; + /** + * Creates a GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchDeploymentRequest; - /** UninterpretedOption identifierValue. */ - public identifierValue: string; + /** + * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. + * @param message GetPatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GetPatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); + /** + * Converts this GetPatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); + /** Properties of a ListPatchDeploymentsRequest. */ + interface IListPatchDeploymentsRequest { - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + /** ListPatchDeploymentsRequest parent */ + parent?: (string|null); - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); + /** ListPatchDeploymentsRequest pageSize */ + pageSize?: (number|null); - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** ListPatchDeploymentsRequest pageToken */ + pageToken?: (string|null); + } - /** - * 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; + /** Represents a ListPatchDeploymentsRequest. */ + class ListPatchDeploymentsRequest implements IListPatchDeploymentsRequest { - /** - * 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; + /** + * Constructs a new ListPatchDeploymentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest); - /** - * 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; + /** ListPatchDeploymentsRequest parent. */ + public parent: string; - /** - * 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; + /** ListPatchDeploymentsRequest pageSize. */ + public pageSize: number; - /** - * 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); + /** ListPatchDeploymentsRequest pageToken. */ + public pageToken: string; - /** - * 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 new ListPatchDeploymentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchDeploymentsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; - /** - * 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 }; + /** + * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @param message ListPatchDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @param message ListPatchDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - namespace UninterpretedOption { + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; - /** Properties of a NamePart. */ - interface INamePart { + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; - /** NamePart namePart */ - namePart: string; + /** + * Verifies a ListPatchDeploymentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** NamePart isExtension */ - isExtension: boolean; - } + /** + * Creates a ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchDeploymentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** + * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListPatchDeploymentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + /** + * Converts this ListPatchDeploymentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** NamePart namePart. */ - public namePart: string; + /** Properties of a ListPatchDeploymentsResponse. */ + interface IListPatchDeploymentsResponse { - /** NamePart isExtension. */ - public isExtension: boolean; + /** ListPatchDeploymentsResponse patchDeployments */ + patchDeployments?: (google.cloud.osconfig.v1.IPatchDeployment[]|null); - /** - * 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; + /** ListPatchDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * 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; + /** Represents a ListPatchDeploymentsResponse. */ + class ListPatchDeploymentsResponse implements IListPatchDeploymentsResponse { - /** - * 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; + /** + * Constructs a new ListPatchDeploymentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse); - /** - * 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; + /** ListPatchDeploymentsResponse patchDeployments. */ + public patchDeployments: google.cloud.osconfig.v1.IPatchDeployment[]; - /** - * 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; + /** ListPatchDeploymentsResponse nextPageToken. */ + public nextPageToken: string; - /** - * 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 new ListPatchDeploymentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchDeploymentsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; - /** - * 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; + /** + * Encodes the specified ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @param message ListPatchDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @param message ListPatchDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } + /** + * Verifies a ListPatchDeploymentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** + * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchDeploymentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + /** + * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListPatchDeploymentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** + * Converts this ListPatchDeploymentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a DeletePatchDeploymentRequest. */ + interface IDeletePatchDeploymentRequest { - /** - * 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; + /** DeletePatchDeploymentRequest name */ + name?: (string|null); + } - /** - * 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; + /** Represents a DeletePatchDeploymentRequest. */ + class DeletePatchDeploymentRequest implements IDeletePatchDeploymentRequest { - /** - * 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; + /** + * Constructs a new DeletePatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest); - /** - * 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; + /** DeletePatchDeploymentRequest name. */ + public name: string; - /** - * 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 new DeletePatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; - /** - * 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; + /** + * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @param message DeletePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @param message DeletePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; - namespace SourceCodeInfo { + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; - /** Properties of a Location. */ - interface ILocation { + /** + * Verifies a DeletePatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Location path */ - path?: (number[]|null); + /** + * Creates a DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; - /** Location span */ - span?: (number[]|null); + /** + * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. + * @param message DeletePatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.DeletePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Location leadingComments */ - leadingComments?: (string|null); + /** + * Converts this DeletePatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Location trailingComments */ - trailingComments?: (string|null); + /** Properties of an ExecutePatchJobRequest. */ + interface IExecutePatchJobRequest { - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } + /** ExecutePatchJobRequest parent */ + parent?: (string|null); - /** Represents a Location. */ - class Location implements ILocation { + /** ExecutePatchJobRequest description */ + description?: (string|null); - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + /** ExecutePatchJobRequest instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - /** Location path. */ - public path: number[]; + /** ExecutePatchJobRequest patchConfig */ + patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - /** Location span. */ - public span: number[]; + /** ExecutePatchJobRequest duration */ + duration?: (google.protobuf.IDuration|null); - /** Location leadingComments. */ - public leadingComments: string; + /** ExecutePatchJobRequest dryRun */ + dryRun?: (boolean|null); - /** Location trailingComments. */ - public trailingComments: string; + /** ExecutePatchJobRequest displayName */ + displayName?: (string|null); - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** ExecutePatchJobRequest rollout */ + rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + } - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + /** Represents an ExecutePatchJobRequest. */ + class ExecutePatchJobRequest implements IExecutePatchJobRequest { - /** - * 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; + /** + * Constructs a new ExecutePatchJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest); - /** - * 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; + /** ExecutePatchJobRequest parent. */ + public parent: string; - /** - * 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; + /** ExecutePatchJobRequest description. */ + public description: string; - /** - * 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; + /** ExecutePatchJobRequest instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ExecutePatchJobRequest patchConfig. */ + public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** ExecutePatchJobRequest duration. */ + public duration?: (google.protobuf.IDuration|null); - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** ExecutePatchJobRequest dryRun. */ + public dryRun: boolean; - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } + /** ExecutePatchJobRequest displayName. */ + public displayName: string; - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** ExecutePatchJobRequest rollout. */ + public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + /** + * Creates a new ExecutePatchJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutePatchJobRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest): google.cloud.osconfig.v1.ExecutePatchJobRequest; - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** + * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @param message ExecutePatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. + * @param message ExecutePatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecutePatchJobRequest; - /** - * 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 an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutePatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecutePatchJobRequest; - /** - * 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; + /** + * Verifies an ExecutePatchJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a 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; + /** + * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutePatchJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecutePatchJobRequest; - /** - * 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 plain object from an ExecutePatchJobRequest message. Also converts values to other types if specified. + * @param message ExecutePatchJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ExecutePatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this ExecutePatchJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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 }; + /** Properties of a GetPatchJobRequest. */ + interface IGetPatchJobRequest { - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** GetPatchJobRequest name */ + name?: (string|null); + } - namespace GeneratedCodeInfo { + /** Represents a GetPatchJobRequest. */ + class GetPatchJobRequest implements IGetPatchJobRequest { - /** Properties of an Annotation. */ - interface IAnnotation { + /** + * Constructs a new GetPatchJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest); - /** Annotation path */ - path?: (number[]|null); + /** GetPatchJobRequest name. */ + public name: string; - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** + * Creates a new GetPatchJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPatchJobRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest): google.cloud.osconfig.v1.GetPatchJobRequest; - /** Annotation begin */ - begin?: (number|null); + /** + * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @param message GetPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGetPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Annotation end */ - end?: (number|null); - } + /** + * Encodes the specified GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @param message GetPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchJobRequest; - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchJobRequest; - /** Annotation path. */ - public path: number[]; + /** + * Verifies a GetPatchJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Annotation sourceFile. */ - public sourceFile: string; + /** + * Creates a GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPatchJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchJobRequest; - /** Annotation begin. */ - public begin: number; + /** + * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. + * @param message GetPatchJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GetPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Annotation end. */ - public end: number; + /** + * Converts this GetPatchJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a ListPatchJobInstanceDetailsRequest. */ + interface IListPatchJobInstanceDetailsRequest { - /** - * 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; + /** ListPatchJobInstanceDetailsRequest parent */ + parent?: (string|null); - /** - * 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; + /** ListPatchJobInstanceDetailsRequest pageSize */ + pageSize?: (number|null); - /** - * 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; + /** ListPatchJobInstanceDetailsRequest pageToken */ + pageToken?: (string|null); - /** - * 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; + /** ListPatchJobInstanceDetailsRequest filter */ + filter?: (string|null); + } - /** - * 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); + /** Represents a ListPatchJobInstanceDetailsRequest. */ + class ListPatchJobInstanceDetailsRequest implements IListPatchJobInstanceDetailsRequest { - /** - * 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; + /** + * Constructs a new ListPatchJobInstanceDetailsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest); - /** - * 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 }; + /** ListPatchJobInstanceDetailsRequest parent. */ + public parent: string; - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** ListPatchJobInstanceDetailsRequest pageSize. */ + public pageSize: number; - /** Properties of a Duration. */ - interface IDuration { + /** ListPatchJobInstanceDetailsRequest pageToken. */ + public pageToken: string; - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** ListPatchJobInstanceDetailsRequest filter. */ + public filter: string; - /** Duration nanos */ - nanos?: (number|null); - } + /** + * Creates a new ListPatchJobInstanceDetailsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobInstanceDetailsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; - /** Represents a Duration. */ - class Duration implements IDuration { + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Duration seconds. */ - public seconds: (number|Long|string); + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; - /** Duration nanos. */ - public nanos: number; + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; - /** - * 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; + /** + * Verifies a ListPatchJobInstanceDetailsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified 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; + /** + * Creates a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobInstanceDetailsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; - /** - * 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; + /** + * Creates a plain object from a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. + * @param message ListPatchJobInstanceDetailsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this ListPatchJobInstanceDetailsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a ListPatchJobInstanceDetailsResponse. */ + interface IListPatchJobInstanceDetailsResponse { - /** - * 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); + /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails */ + patchJobInstanceDetails?: (google.cloud.osconfig.v1.IPatchJobInstanceDetails[]|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; + /** ListPatchJobInstanceDetailsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * 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 }; - } + /** Represents a ListPatchJobInstanceDetailsResponse. */ + class ListPatchJobInstanceDetailsResponse implements IListPatchJobInstanceDetailsResponse { - /** Properties of an Empty. */ - interface IEmpty { - } + /** + * Constructs a new ListPatchJobInstanceDetailsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse); - /** Represents an Empty. */ - class Empty implements IEmpty { + /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. */ + public patchJobInstanceDetails: google.cloud.osconfig.v1.IPatchJobInstanceDetails[]; - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); + /** ListPatchJobInstanceDetailsResponse nextPageToken. */ + public nextPageToken: string; - /** - * 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; + /** + * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobInstanceDetailsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; - /** - * 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 ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, 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; + /** + * Encodes the specified ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, 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 a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; - /** - * 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; + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; - /** - * 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); + /** + * Verifies a ListPatchJobInstanceDetailsResponse message. + * @param message Plain object 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 ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobInstanceDetailsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; - /** - * 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 }; + /** + * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. + * @param message ListPatchJobInstanceDetailsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this ListPatchJobInstanceDetailsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a FieldMask. */ - interface IFieldMask { + /** Properties of a PatchJobInstanceDetails. */ + interface IPatchJobInstanceDetails { - /** FieldMask paths */ - paths?: (string[]|null); - } + /** PatchJobInstanceDetails name */ + name?: (string|null); - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** PatchJobInstanceDetails instanceSystemId */ + instanceSystemId?: (string|null); - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); + /** PatchJobInstanceDetails state */ + state?: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState|null); - /** FieldMask paths. */ - public paths: string[]; + /** PatchJobInstanceDetails failureReason */ + failureReason?: (string|null); - /** - * 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; + /** PatchJobInstanceDetails attemptCount */ + attemptCount?: (number|Long|string|null); + } - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a PatchJobInstanceDetails. */ + class PatchJobInstanceDetails implements IPatchJobInstanceDetails { - /** - * 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; + /** + * Constructs a new PatchJobInstanceDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails); - /** - * 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; + /** PatchJobInstanceDetails name. */ + public name: string; - /** - * 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; + /** PatchJobInstanceDetails instanceSystemId. */ + public instanceSystemId: string; - /** - * 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); + /** PatchJobInstanceDetails state. */ + public state: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState); - /** - * 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; + /** PatchJobInstanceDetails failureReason. */ + public failureReason: string; - /** - * 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 }; + /** PatchJobInstanceDetails attemptCount. */ + public attemptCount: (number|Long|string); - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new PatchJobInstanceDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchJobInstanceDetails instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails): google.cloud.osconfig.v1.PatchJobInstanceDetails; - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @param message PatchJobInstanceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + /** + * Encodes the specified PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @param message PatchJobInstanceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJobInstanceDetails; - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJobInstanceDetails; - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + /** + * Verifies a PatchJobInstanceDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchJobInstanceDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJobInstanceDetails; - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. + * @param message PatchJobInstanceDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchJobInstanceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Namespace cloud. */ - namespace cloud { + /** + * Converts this PatchJobInstanceDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Namespace osconfig. */ - namespace osconfig { + /** Properties of a ListPatchJobsRequest. */ + interface IListPatchJobsRequest { - /** Namespace v1. */ - namespace v1 { + /** ListPatchJobsRequest parent */ + parent?: (string|null); - /** Properties of an Inventory. */ - interface IInventory { + /** ListPatchJobsRequest pageSize */ + pageSize?: (number|null); - /** Inventory osInfo */ - osInfo?: (google.cloud.osconfig.v1.Inventory.IOsInfo|null); + /** ListPatchJobsRequest pageToken */ + pageToken?: (string|null); - /** Inventory items */ - items?: ({ [k: string]: google.cloud.osconfig.v1.Inventory.IItem }|null); + /** ListPatchJobsRequest filter */ + filter?: (string|null); } - /** Represents an Inventory. */ - class Inventory implements IInventory { + /** Represents a ListPatchJobsRequest. */ + class ListPatchJobsRequest implements IListPatchJobsRequest { /** - * Constructs a new Inventory. + * Constructs a new ListPatchJobsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IInventory); + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest); - /** Inventory osInfo. */ - public osInfo?: (google.cloud.osconfig.v1.Inventory.IOsInfo|null); + /** ListPatchJobsRequest parent. */ + public parent: string; - /** Inventory items. */ - public items: { [k: string]: google.cloud.osconfig.v1.Inventory.IItem }; + /** ListPatchJobsRequest pageSize. */ + public pageSize: number; + + /** ListPatchJobsRequest pageToken. */ + public pageToken: string; + + /** ListPatchJobsRequest filter. */ + public filter: string; /** - * Creates a new Inventory instance using the specified properties. + * Creates a new ListPatchJobsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Inventory instance + * @returns ListPatchJobsRequest instance */ - public static create(properties?: google.cloud.osconfig.v1.IInventory): google.cloud.osconfig.v1.Inventory; + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest): google.cloud.osconfig.v1.ListPatchJobsRequest; /** - * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. - * @param message Inventory message or plain object to encode + * Encodes the specified ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @param message ListPatchJobsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.IListPatchJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. - * @param message Inventory message or plain object to encode + * Encodes the specified ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @param message ListPatchJobsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Inventory message from the specified reader or buffer. + * Decodes a ListPatchJobsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Inventory + * @returns ListPatchJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsRequest; /** - * Decodes an Inventory message from the specified reader or buffer, length delimited. + * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Inventory + * @returns ListPatchJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsRequest; /** - * Verifies an Inventory message. + * Verifies a ListPatchJobsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * Creates a ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Inventory + * @returns ListPatchJobsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsRequest; /** - * Creates a plain object from an Inventory message. Also converts values to other types if specified. - * @param message Inventory + * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. + * @param message ListPatchJobsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.Inventory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Inventory to JSON. + * Converts this ListPatchJobsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Inventory { - - /** Properties of an OsInfo. */ - interface IOsInfo { + /** Properties of a ListPatchJobsResponse. */ + interface IListPatchJobsResponse { - /** OsInfo hostname */ - hostname?: (string|null); + /** ListPatchJobsResponse patchJobs */ + patchJobs?: (google.cloud.osconfig.v1.IPatchJob[]|null); - /** OsInfo longName */ - longName?: (string|null); + /** ListPatchJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** OsInfo shortName */ - shortName?: (string|null); + /** Represents a ListPatchJobsResponse. */ + class ListPatchJobsResponse implements IListPatchJobsResponse { - /** OsInfo version */ - version?: (string|null); + /** + * Constructs a new ListPatchJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse); - /** OsInfo architecture */ - architecture?: (string|null); + /** ListPatchJobsResponse patchJobs. */ + public patchJobs: google.cloud.osconfig.v1.IPatchJob[]; - /** OsInfo kernelVersion */ - kernelVersion?: (string|null); + /** ListPatchJobsResponse nextPageToken. */ + public nextPageToken: string; - /** OsInfo kernelRelease */ - kernelRelease?: (string|null); + /** + * Creates a new ListPatchJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPatchJobsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse): google.cloud.osconfig.v1.ListPatchJobsResponse; - /** OsInfo osconfigAgentVersion */ - osconfigAgentVersion?: (string|null); - } + /** + * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @param message ListPatchJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an OsInfo. */ - class OsInfo implements IOsInfo { + /** + * Encodes the specified ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @param message ListPatchJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new OsInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.Inventory.IOsInfo); + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsResponse; - /** OsInfo hostname. */ - public hostname: string; + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsResponse; - /** OsInfo longName. */ - public longName: string; + /** + * Verifies a ListPatchJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** OsInfo shortName. */ - public shortName: string; + /** + * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPatchJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsResponse; - /** OsInfo version. */ - public version: string; + /** + * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. + * @param message ListPatchJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** OsInfo architecture. */ - public architecture: string; + /** + * Converts this ListPatchJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** OsInfo kernelVersion. */ - public kernelVersion: string; + /** Properties of a PatchJob. */ + interface IPatchJob { - /** OsInfo kernelRelease. */ - public kernelRelease: string; + /** PatchJob name */ + name?: (string|null); - /** OsInfo osconfigAgentVersion. */ - public osconfigAgentVersion: string; + /** PatchJob displayName */ + displayName?: (string|null); - /** - * Creates a new OsInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OsInfo instance - */ - public static create(properties?: google.cloud.osconfig.v1.Inventory.IOsInfo): google.cloud.osconfig.v1.Inventory.OsInfo; + /** PatchJob description */ + description?: (string|null); - /** - * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. - * @param message OsInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** PatchJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. - * @param message OsInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** PatchJob updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes an OsInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OsInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.OsInfo; + /** PatchJob state */ + state?: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State|null); - /** - * Decodes an OsInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OsInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.OsInfo; + /** PatchJob instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - /** - * Verifies an OsInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** PatchJob patchConfig */ + patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - /** - * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OsInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.OsInfo; + /** PatchJob duration */ + duration?: (google.protobuf.IDuration|null); - /** - * Creates a plain object from an OsInfo message. Also converts values to other types if specified. - * @param message OsInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Inventory.OsInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PatchJob instanceDetailsSummary */ + instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); - /** - * Converts this OsInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** PatchJob dryRun */ + dryRun?: (boolean|null); - /** Properties of an Item. */ - interface IItem { + /** PatchJob errorMessage */ + errorMessage?: (string|null); - /** Item id */ - id?: (string|null); + /** PatchJob percentComplete */ + percentComplete?: (number|null); - /** Item originType */ - originType?: (google.cloud.osconfig.v1.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1.Inventory.Item.OriginType|null); + /** PatchJob patchDeployment */ + patchDeployment?: (string|null); - /** Item createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** PatchJob rollout */ + rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + } - /** Item updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Represents a PatchJob. */ + class PatchJob implements IPatchJob { - /** Item type */ - type?: (google.cloud.osconfig.v1.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1.Inventory.Item.Type|null); + /** + * Constructs a new PatchJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchJob); - /** Item installedPackage */ - installedPackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); + /** PatchJob name. */ + public name: string; - /** Item availablePackage */ - availablePackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); - } + /** PatchJob displayName. */ + public displayName: string; - /** Represents an Item. */ - class Item implements IItem { + /** PatchJob description. */ + public description: string; - /** - * Constructs a new Item. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.Inventory.IItem); + /** PatchJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** Item id. */ - public id: string; + /** PatchJob updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** Item originType. */ - public originType: (google.cloud.osconfig.v1.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1.Inventory.Item.OriginType); + /** PatchJob state. */ + public state: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State); - /** Item createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** PatchJob instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - /** Item updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** PatchJob patchConfig. */ + public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - /** Item type. */ - public type: (google.cloud.osconfig.v1.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1.Inventory.Item.Type); + /** PatchJob duration. */ + public duration?: (google.protobuf.IDuration|null); - /** Item installedPackage. */ - public installedPackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); + /** PatchJob instanceDetailsSummary. */ + public instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); - /** Item availablePackage. */ - public availablePackage?: (google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null); + /** PatchJob dryRun. */ + public dryRun: boolean; - /** Item details. */ - public details?: ("installedPackage"|"availablePackage"); + /** PatchJob errorMessage. */ + public errorMessage: string; + + /** PatchJob percentComplete. */ + public percentComplete: number; + + /** PatchJob patchDeployment. */ + public patchDeployment: string; + + /** PatchJob rollout. */ + public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + + /** + * Creates a new PatchJob instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchJob instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchJob): google.cloud.osconfig.v1.PatchJob; + + /** + * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @param message PatchJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @param message PatchJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PatchJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob; + + /** + * Decodes a PatchJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob; + + /** + * Verifies a PatchJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob; + + /** + * Creates a plain object from a PatchJob message. Also converts values to other types if specified. + * @param message PatchJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PatchJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PatchJob { + + /** Properties of an InstanceDetailsSummary. */ + interface IInstanceDetailsSummary { + + /** InstanceDetailsSummary pendingInstanceCount */ + pendingInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary inactiveInstanceCount */ + inactiveInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary notifiedInstanceCount */ + notifiedInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary startedInstanceCount */ + startedInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary downloadingPatchesInstanceCount */ + downloadingPatchesInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary applyingPatchesInstanceCount */ + applyingPatchesInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary rebootingInstanceCount */ + rebootingInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary succeededInstanceCount */ + succeededInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary succeededRebootRequiredInstanceCount */ + succeededRebootRequiredInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary failedInstanceCount */ + failedInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary ackedInstanceCount */ + ackedInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary timedOutInstanceCount */ + timedOutInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary prePatchStepInstanceCount */ + prePatchStepInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary postPatchStepInstanceCount */ + postPatchStepInstanceCount?: (number|Long|string|null); + + /** InstanceDetailsSummary noAgentDetectedInstanceCount */ + noAgentDetectedInstanceCount?: (number|Long|string|null); + } + + /** Represents an InstanceDetailsSummary. */ + class InstanceDetailsSummary implements IInstanceDetailsSummary { /** - * Creates a new Item instance using the specified properties. + * Constructs a new InstanceDetailsSummary. * @param [properties] Properties to set - * @returns Item instance */ - public static create(properties?: google.cloud.osconfig.v1.Inventory.IItem): google.cloud.osconfig.v1.Inventory.Item; + constructor(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary); + + /** InstanceDetailsSummary pendingInstanceCount. */ + public pendingInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary inactiveInstanceCount. */ + public inactiveInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary notifiedInstanceCount. */ + public notifiedInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary startedInstanceCount. */ + public startedInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary downloadingPatchesInstanceCount. */ + public downloadingPatchesInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary applyingPatchesInstanceCount. */ + public applyingPatchesInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary rebootingInstanceCount. */ + public rebootingInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary succeededInstanceCount. */ + public succeededInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary succeededRebootRequiredInstanceCount. */ + public succeededRebootRequiredInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary failedInstanceCount. */ + public failedInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary ackedInstanceCount. */ + public ackedInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary timedOutInstanceCount. */ + public timedOutInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary prePatchStepInstanceCount. */ + public prePatchStepInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary postPatchStepInstanceCount. */ + public postPatchStepInstanceCount: (number|Long|string); + + /** InstanceDetailsSummary noAgentDetectedInstanceCount. */ + public noAgentDetectedInstanceCount: (number|Long|string); /** - * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. - * @param message Item message or plain object to encode + * Creates a new InstanceDetailsSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceDetailsSummary instance + */ + public static create(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + + /** + * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @param message InstanceDetailsSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. - * @param message Item message or plain object to encode + * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. + * @param message InstanceDetailsSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Item message from the specified reader or buffer. + * Decodes an InstanceDetailsSummary message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Item + * @returns InstanceDetailsSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.Item; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; /** - * Decodes an Item message from the specified reader or buffer, length delimited. + * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Item + * @returns InstanceDetailsSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.Item; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; /** - * Verifies an Item message. + * Verifies an InstanceDetailsSummary message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Item message from a plain object. Also converts values to their respective internal types. + * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Item + * @returns InstanceDetailsSummary */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.Item; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; /** - * Creates a plain object from an Item message. Also converts values to other types if specified. - * @param message Item + * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. + * @param message InstanceDetailsSummary * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.Inventory.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Item to JSON. + * Converts this InstanceDetailsSummary to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Item { - - /** OriginType enum. */ - enum OriginType { - ORIGIN_TYPE_UNSPECIFIED = 0, - INVENTORY_REPORT = 1 - } - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - INSTALLED_PACKAGE = 1, - AVAILABLE_PACKAGE = 2 - } + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTED = 1, + INSTANCE_LOOKUP = 2, + PATCHING = 3, + SUCCEEDED = 4, + COMPLETED_WITH_ERRORS = 5, + CANCELED = 6, + TIMED_OUT = 7 } + } - /** Properties of a SoftwarePackage. */ - interface ISoftwarePackage { - - /** SoftwarePackage yumPackage */ - yumPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** Properties of a PatchConfig. */ + interface IPatchConfig { - /** SoftwarePackage aptPackage */ - aptPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** PatchConfig rebootConfig */ + rebootConfig?: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig|null); - /** SoftwarePackage zypperPackage */ - zypperPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** PatchConfig apt */ + apt?: (google.cloud.osconfig.v1.IAptSettings|null); - /** SoftwarePackage googetPackage */ - googetPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** PatchConfig yum */ + yum?: (google.cloud.osconfig.v1.IYumSettings|null); - /** SoftwarePackage zypperPatch */ - zypperPatch?: (google.cloud.osconfig.v1.Inventory.IZypperPatch|null); + /** PatchConfig goo */ + goo?: (google.cloud.osconfig.v1.IGooSettings|null); - /** SoftwarePackage wuaPackage */ - wuaPackage?: (google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null); + /** PatchConfig zypper */ + zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); - /** SoftwarePackage qfePackage */ - qfePackage?: (google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null); + /** PatchConfig windowsUpdate */ + windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); - /** SoftwarePackage cosPackage */ - cosPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** PatchConfig preStep */ + preStep?: (google.cloud.osconfig.v1.IExecStep|null); - /** SoftwarePackage windowsApplication */ - windowsApplication?: (google.cloud.osconfig.v1.Inventory.IWindowsApplication|null); - } + /** PatchConfig postStep */ + postStep?: (google.cloud.osconfig.v1.IExecStep|null); + } - /** Represents a SoftwarePackage. */ - class SoftwarePackage implements ISoftwarePackage { + /** Represents a PatchConfig. */ + class PatchConfig implements IPatchConfig { - /** - * Constructs a new SoftwarePackage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.Inventory.ISoftwarePackage); + /** + * Constructs a new PatchConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPatchConfig); - /** SoftwarePackage yumPackage. */ - public yumPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** PatchConfig rebootConfig. */ + public rebootConfig: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig); - /** SoftwarePackage aptPackage. */ - public aptPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** PatchConfig apt. */ + public apt?: (google.cloud.osconfig.v1.IAptSettings|null); - /** SoftwarePackage zypperPackage. */ - public zypperPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** PatchConfig yum. */ + public yum?: (google.cloud.osconfig.v1.IYumSettings|null); - /** SoftwarePackage googetPackage. */ - public googetPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** PatchConfig goo. */ + public goo?: (google.cloud.osconfig.v1.IGooSettings|null); - /** SoftwarePackage zypperPatch. */ - public zypperPatch?: (google.cloud.osconfig.v1.Inventory.IZypperPatch|null); + /** PatchConfig zypper. */ + public zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); - /** SoftwarePackage wuaPackage. */ - public wuaPackage?: (google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null); + /** PatchConfig windowsUpdate. */ + public windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); - /** SoftwarePackage qfePackage. */ - public qfePackage?: (google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null); + /** PatchConfig preStep. */ + public preStep?: (google.cloud.osconfig.v1.IExecStep|null); - /** SoftwarePackage cosPackage. */ - public cosPackage?: (google.cloud.osconfig.v1.Inventory.IVersionedPackage|null); + /** PatchConfig postStep. */ + public postStep?: (google.cloud.osconfig.v1.IExecStep|null); - /** SoftwarePackage windowsApplication. */ - public windowsApplication?: (google.cloud.osconfig.v1.Inventory.IWindowsApplication|null); + /** + * Creates a new PatchConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PatchConfig instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPatchConfig): google.cloud.osconfig.v1.PatchConfig; - /** SoftwarePackage details. */ - public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"); + /** + * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @param message PatchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new SoftwarePackage instance using the specified properties. - * @param [properties] Properties to set - * @returns SoftwarePackage instance - */ - public static create(properties?: google.cloud.osconfig.v1.Inventory.ISoftwarePackage): google.cloud.osconfig.v1.Inventory.SoftwarePackage; + /** + * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * @param message PatchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. - * @param message SoftwarePackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a PatchConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchConfig; - /** - * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. - * @param message SoftwarePackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a PatchConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchConfig; - /** - * Decodes a SoftwarePackage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SoftwarePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.SoftwarePackage; + /** + * Verifies a PatchConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SoftwarePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.SoftwarePackage; + /** + * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PatchConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchConfig; - /** - * Verifies a SoftwarePackage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. + * @param message PatchConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SoftwarePackage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.SoftwarePackage; + /** + * Converts this PatchConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. - * @param message SoftwarePackage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Inventory.SoftwarePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace PatchConfig { - /** - * Converts this SoftwarePackage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** RebootConfig enum. */ + enum RebootConfig { + REBOOT_CONFIG_UNSPECIFIED = 0, + DEFAULT = 1, + ALWAYS = 2, + NEVER = 3 } + } - /** Properties of a VersionedPackage. */ - interface IVersionedPackage { + /** Properties of an Instance. */ + interface IInstance { + } - /** VersionedPackage packageName */ - packageName?: (string|null); + /** Represents an Instance. */ + class Instance implements IInstance { - /** VersionedPackage architecture */ - architecture?: (string|null); + /** + * Constructs a new Instance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IInstance); - /** VersionedPackage version */ - version?: (string|null); - } + /** + * Creates a new Instance instance using the specified properties. + * @param [properties] Properties to set + * @returns Instance instance + */ + public static create(properties?: google.cloud.osconfig.v1.IInstance): google.cloud.osconfig.v1.Instance; - /** Represents a VersionedPackage. */ - class VersionedPackage implements IVersionedPackage { + /** + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new VersionedPackage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.Inventory.IVersionedPackage); + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; - /** VersionedPackage packageName. */ - public packageName: string; + /** + * Decodes an Instance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Instance; - /** VersionedPackage architecture. */ - public architecture: string; + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Instance; - /** VersionedPackage version. */ - public version: string; + /** + * Verifies an Instance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new VersionedPackage instance using the specified properties. - * @param [properties] Properties to set - * @returns VersionedPackage instance - */ - public static create(properties?: google.cloud.osconfig.v1.Inventory.IVersionedPackage): google.cloud.osconfig.v1.Inventory.VersionedPackage; + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Instance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Instance; - /** - * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. - * @param message VersionedPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @param message Instance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.Instance, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. - * @param message VersionedPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Instance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a VersionedPackage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VersionedPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.VersionedPackage; + namespace Instance { - /** - * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VersionedPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.VersionedPackage; + /** PatchState enum. */ + enum PatchState { + PATCH_STATE_UNSPECIFIED = 0, + PENDING = 1, + INACTIVE = 2, + NOTIFIED = 3, + STARTED = 4, + DOWNLOADING_PATCHES = 5, + APPLYING_PATCHES = 6, + REBOOTING = 7, + SUCCEEDED = 8, + SUCCEEDED_REBOOT_REQUIRED = 9, + FAILED = 10, + ACKED = 11, + TIMED_OUT = 12, + RUNNING_PRE_PATCH_STEP = 13, + RUNNING_POST_PATCH_STEP = 14, + NO_AGENT_DETECTED = 15 + } + } - /** - * Verifies a VersionedPackage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a CancelPatchJobRequest. */ + interface ICancelPatchJobRequest { - /** - * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VersionedPackage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.VersionedPackage; + /** CancelPatchJobRequest name */ + name?: (string|null); + } - /** - * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. - * @param message VersionedPackage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Inventory.VersionedPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a CancelPatchJobRequest. */ + class CancelPatchJobRequest implements ICancelPatchJobRequest { - /** - * Converts this VersionedPackage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new CancelPatchJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest); - /** Properties of a WindowsUpdatePackage. */ - interface IWindowsUpdatePackage { + /** CancelPatchJobRequest name. */ + public name: string; - /** WindowsUpdatePackage title */ - title?: (string|null); + /** + * Creates a new CancelPatchJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelPatchJobRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest): google.cloud.osconfig.v1.CancelPatchJobRequest; - /** WindowsUpdatePackage description */ - description?: (string|null); + /** + * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @param message CancelPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsUpdatePackage categories */ - categories?: (google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]|null); + /** + * Encodes the specified CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @param message CancelPatchJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsUpdatePackage kbArticleIds */ - kbArticleIds?: (string[]|null); + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CancelPatchJobRequest; - /** WindowsUpdatePackage supportUrl */ - supportUrl?: (string|null); + /** + * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CancelPatchJobRequest; - /** WindowsUpdatePackage moreInfoUrls */ - moreInfoUrls?: (string[]|null); + /** + * Verifies a CancelPatchJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** WindowsUpdatePackage updateId */ - updateId?: (string|null); + /** + * Creates a CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelPatchJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CancelPatchJobRequest; - /** WindowsUpdatePackage revisionNumber */ - revisionNumber?: (number|null); + /** + * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. + * @param message CancelPatchJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.CancelPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** WindowsUpdatePackage lastDeploymentChangeTime */ - lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); - } + /** + * Converts this CancelPatchJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a WindowsUpdatePackage. */ - class WindowsUpdatePackage implements IWindowsUpdatePackage { + /** Properties of an AptSettings. */ + interface IAptSettings { - /** - * Constructs a new WindowsUpdatePackage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage); + /** AptSettings type */ + type?: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type|null); - /** WindowsUpdatePackage title. */ - public title: string; + /** AptSettings excludes */ + excludes?: (string[]|null); - /** WindowsUpdatePackage description. */ - public description: string; + /** AptSettings exclusivePackages */ + exclusivePackages?: (string[]|null); + } - /** WindowsUpdatePackage categories. */ - public categories: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]; + /** Represents an AptSettings. */ + class AptSettings implements IAptSettings { - /** WindowsUpdatePackage kbArticleIds. */ - public kbArticleIds: string[]; + /** + * Constructs a new AptSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IAptSettings); - /** WindowsUpdatePackage supportUrl. */ - public supportUrl: string; + /** AptSettings type. */ + public type: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type); - /** WindowsUpdatePackage moreInfoUrls. */ - public moreInfoUrls: string[]; + /** AptSettings excludes. */ + public excludes: string[]; - /** WindowsUpdatePackage updateId. */ - public updateId: string; + /** AptSettings exclusivePackages. */ + public exclusivePackages: string[]; - /** WindowsUpdatePackage revisionNumber. */ - public revisionNumber: number; + /** + * Creates a new AptSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AptSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IAptSettings): google.cloud.osconfig.v1.AptSettings; - /** WindowsUpdatePackage lastDeploymentChangeTime. */ - public lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @param message AptSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new WindowsUpdatePackage instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsUpdatePackage instance - */ - public static create(properties?: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; + /** + * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * @param message AptSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. - * @param message WindowsUpdatePackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AptSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.AptSettings; - /** - * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. - * @param message WindowsUpdatePackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AptSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AptSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.AptSettings; - /** - * Decodes a WindowsUpdatePackage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsUpdatePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; + /** + * Verifies an AptSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsUpdatePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; + /** + * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AptSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.AptSettings; - /** - * Verifies a WindowsUpdatePackage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from an AptSettings message. Also converts values to other types if specified. + * @param message AptSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.AptSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsUpdatePackage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage; + /** + * Converts this AptSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. - * @param message WindowsUpdatePackage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace AptSettings { - /** - * Converts this WindowsUpdatePackage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + DIST = 1, + UPGRADE = 2 } + } - namespace WindowsUpdatePackage { + /** Properties of a YumSettings. */ + interface IYumSettings { - /** Properties of a WindowsUpdateCategory. */ - interface IWindowsUpdateCategory { + /** YumSettings security */ + security?: (boolean|null); - /** WindowsUpdateCategory id */ - id?: (string|null); + /** YumSettings minimal */ + minimal?: (boolean|null); - /** WindowsUpdateCategory name */ - name?: (string|null); - } + /** YumSettings excludes */ + excludes?: (string[]|null); - /** Represents a WindowsUpdateCategory. */ - class WindowsUpdateCategory implements IWindowsUpdateCategory { + /** YumSettings exclusivePackages */ + exclusivePackages?: (string[]|null); + } - /** - * Constructs a new WindowsUpdateCategory. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory); + /** Represents a YumSettings. */ + class YumSettings implements IYumSettings { - /** WindowsUpdateCategory id. */ - public id: string; + /** + * Constructs a new YumSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IYumSettings); - /** WindowsUpdateCategory name. */ - public name: string; + /** YumSettings security. */ + public security: boolean; - /** - * Creates a new WindowsUpdateCategory instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsUpdateCategory instance - */ - public static create(properties?: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + /** YumSettings minimal. */ + public minimal: boolean; - /** - * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. - * @param message WindowsUpdateCategory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; + /** YumSettings excludes. */ + public excludes: string[]; - /** - * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. - * @param message WindowsUpdateCategory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; + /** YumSettings exclusivePackages. */ + public exclusivePackages: string[]; - /** - * Decodes a WindowsUpdateCategory message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsUpdateCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + /** + * Creates a new YumSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns YumSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IYumSettings): google.cloud.osconfig.v1.YumSettings; - /** - * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsUpdateCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + /** + * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @param message YumSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a WindowsUpdateCategory message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * @param message YumSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsUpdateCategory - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + /** + * Decodes a YumSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.YumSettings; - /** - * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. - * @param message WindowsUpdateCategory - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a YumSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.YumSettings; - /** - * Converts this WindowsUpdateCategory to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Verifies a YumSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a ZypperPatch. */ - interface IZypperPatch { + /** + * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.YumSettings; - /** ZypperPatch patchName */ - patchName?: (string|null); + /** + * Creates a plain object from a YumSettings message. Also converts values to other types if specified. + * @param message YumSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.YumSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ZypperPatch category */ - category?: (string|null); + /** + * Converts this YumSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ZypperPatch severity */ - severity?: (string|null); + /** Properties of a GooSettings. */ + interface IGooSettings { + } - /** ZypperPatch summary */ - summary?: (string|null); - } + /** Represents a GooSettings. */ + class GooSettings implements IGooSettings { - /** Represents a ZypperPatch. */ - class ZypperPatch implements IZypperPatch { + /** + * Constructs a new GooSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGooSettings); - /** - * Constructs a new ZypperPatch. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.Inventory.IZypperPatch); + /** + * Creates a new GooSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GooSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGooSettings): google.cloud.osconfig.v1.GooSettings; - /** ZypperPatch patchName. */ - public patchName: string; + /** + * Encodes the specified GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @param message GooSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGooSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** ZypperPatch category. */ - public category: string; + /** + * Encodes the specified GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * @param message GooSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGooSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** ZypperPatch severity. */ - public severity: string; + /** + * Decodes a GooSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GooSettings; - /** ZypperPatch summary. */ - public summary: string; + /** + * Decodes a GooSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GooSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GooSettings; - /** - * Creates a new ZypperPatch instance using the specified properties. - * @param [properties] Properties to set - * @returns ZypperPatch instance - */ - public static create(properties?: google.cloud.osconfig.v1.Inventory.IZypperPatch): google.cloud.osconfig.v1.Inventory.ZypperPatch; + /** + * Verifies a GooSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. - * @param message ZypperPatch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a GooSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GooSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GooSettings; - /** - * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. - * @param message ZypperPatch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a GooSettings message. Also converts values to other types if specified. + * @param message GooSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GooSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ZypperPatch message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ZypperPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.ZypperPatch; + /** + * Converts this GooSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ZypperPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.ZypperPatch; + /** Properties of a ZypperSettings. */ + interface IZypperSettings { - /** - * Verifies a ZypperPatch message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ZypperSettings withOptional */ + withOptional?: (boolean|null); - /** - * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ZypperPatch - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.ZypperPatch; + /** ZypperSettings withUpdate */ + withUpdate?: (boolean|null); - /** - * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. - * @param message ZypperPatch - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Inventory.ZypperPatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ZypperSettings categories */ + categories?: (string[]|null); - /** - * Converts this ZypperPatch to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ZypperSettings severities */ + severities?: (string[]|null); - /** Properties of a WindowsQuickFixEngineeringPackage. */ - interface IWindowsQuickFixEngineeringPackage { + /** ZypperSettings excludes */ + excludes?: (string[]|null); - /** WindowsQuickFixEngineeringPackage caption */ - caption?: (string|null); + /** ZypperSettings exclusivePatches */ + exclusivePatches?: (string[]|null); + } - /** WindowsQuickFixEngineeringPackage description */ - description?: (string|null); + /** Represents a ZypperSettings. */ + class ZypperSettings implements IZypperSettings { - /** WindowsQuickFixEngineeringPackage hotFixId */ - hotFixId?: (string|null); + /** + * Constructs a new ZypperSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IZypperSettings); - /** WindowsQuickFixEngineeringPackage installTime */ - installTime?: (google.protobuf.ITimestamp|null); - } + /** ZypperSettings withOptional. */ + public withOptional: boolean; - /** Represents a WindowsQuickFixEngineeringPackage. */ - class WindowsQuickFixEngineeringPackage implements IWindowsQuickFixEngineeringPackage { + /** ZypperSettings withUpdate. */ + public withUpdate: boolean; - /** - * Constructs a new WindowsQuickFixEngineeringPackage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage); + /** ZypperSettings categories. */ + public categories: string[]; - /** WindowsQuickFixEngineeringPackage caption. */ - public caption: string; + /** ZypperSettings severities. */ + public severities: string[]; - /** WindowsQuickFixEngineeringPackage description. */ - public description: string; + /** ZypperSettings excludes. */ + public excludes: string[]; - /** WindowsQuickFixEngineeringPackage hotFixId. */ - public hotFixId: string; + /** ZypperSettings exclusivePatches. */ + public exclusivePatches: string[]; - /** WindowsQuickFixEngineeringPackage installTime. */ - public installTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new ZypperSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IZypperSettings): google.cloud.osconfig.v1.ZypperSettings; - /** - * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsQuickFixEngineeringPackage instance - */ - public static create(properties?: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; + /** + * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @param message ZypperSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. - * @param message WindowsQuickFixEngineeringPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * @param message ZypperSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. - * @param message WindowsQuickFixEngineeringPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ZypperSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ZypperSettings; - /** - * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsQuickFixEngineeringPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; + /** + * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ZypperSettings; - /** - * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsQuickFixEngineeringPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; + /** + * Verifies a ZypperSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a WindowsQuickFixEngineeringPackage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ZypperSettings; - /** - * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsQuickFixEngineeringPackage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage; + /** + * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. + * @param message ZypperSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ZypperSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. - * @param message WindowsQuickFixEngineeringPackage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this ZypperSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this WindowsQuickFixEngineeringPackage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a WindowsUpdateSettings. */ + interface IWindowsUpdateSettings { - /** Properties of a WindowsApplication. */ - interface IWindowsApplication { + /** WindowsUpdateSettings classifications */ + classifications?: (google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]|null); - /** WindowsApplication displayName */ - displayName?: (string|null); + /** WindowsUpdateSettings excludes */ + excludes?: (string[]|null); - /** WindowsApplication displayVersion */ - displayVersion?: (string|null); + /** WindowsUpdateSettings exclusivePatches */ + exclusivePatches?: (string[]|null); + } - /** WindowsApplication publisher */ - publisher?: (string|null); + /** Represents a WindowsUpdateSettings. */ + class WindowsUpdateSettings implements IWindowsUpdateSettings { - /** WindowsApplication installDate */ - installDate?: (google.type.IDate|null); + /** + * Constructs a new WindowsUpdateSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings); - /** WindowsApplication helpLink */ - helpLink?: (string|null); - } + /** WindowsUpdateSettings classifications. */ + public classifications: google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]; - /** Represents a WindowsApplication. */ - class WindowsApplication implements IWindowsApplication { + /** WindowsUpdateSettings excludes. */ + public excludes: string[]; - /** - * Constructs a new WindowsApplication. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.Inventory.IWindowsApplication); + /** WindowsUpdateSettings exclusivePatches. */ + public exclusivePatches: string[]; - /** WindowsApplication displayName. */ - public displayName: string; + /** + * Creates a new WindowsUpdateSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdateSettings instance + */ + public static create(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings): google.cloud.osconfig.v1.WindowsUpdateSettings; - /** WindowsApplication displayVersion. */ - public displayVersion: string; + /** + * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @param message WindowsUpdateSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsApplication publisher. */ - public publisher: string; + /** + * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. + * @param message WindowsUpdateSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsApplication installDate. */ - public installDate?: (google.type.IDate|null); - - /** WindowsApplication helpLink. */ - public helpLink: string; - - /** - * Creates a new WindowsApplication instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsApplication instance - */ - public static create(properties?: google.cloud.osconfig.v1.Inventory.IWindowsApplication): google.cloud.osconfig.v1.Inventory.WindowsApplication; - - /** - * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. - * @param message WindowsApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a WindowsUpdateSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WindowsUpdateSettings; - /** - * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. - * @param message WindowsApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a WindowsUpdateSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdateSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WindowsUpdateSettings; - /** - * Decodes a WindowsApplication message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Inventory.WindowsApplication; + /** + * Verifies a WindowsUpdateSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Inventory.WindowsApplication; + /** + * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdateSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WindowsUpdateSettings; - /** - * Verifies a WindowsApplication message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. + * @param message WindowsUpdateSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.WindowsUpdateSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsApplication - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Inventory.WindowsApplication; + /** + * Converts this WindowsUpdateSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. - * @param message WindowsApplication - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Inventory.WindowsApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace WindowsUpdateSettings { - /** - * Converts this WindowsApplication to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Classification enum. */ + enum Classification { + CLASSIFICATION_UNSPECIFIED = 0, + CRITICAL = 1, + SECURITY = 2, + DEFINITION = 3, + DRIVER = 4, + FEATURE_PACK = 5, + SERVICE_PACK = 6, + TOOL = 7, + UPDATE_ROLLUP = 8, + UPDATE = 9 } } - /** Properties of a FixedOrPercent. */ - interface IFixedOrPercent { + /** Properties of an ExecStep. */ + interface IExecStep { - /** FixedOrPercent fixed */ - fixed?: (number|null); + /** ExecStep linuxExecStepConfig */ + linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); - /** FixedOrPercent percent */ - percent?: (number|null); + /** ExecStep windowsExecStepConfig */ + windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); } - /** Represents a FixedOrPercent. */ - class FixedOrPercent implements IFixedOrPercent { + /** Represents an ExecStep. */ + class ExecStep implements IExecStep { /** - * Constructs a new FixedOrPercent. + * Constructs a new ExecStep. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IFixedOrPercent); - - /** FixedOrPercent fixed. */ - public fixed?: (number|null); + constructor(properties?: google.cloud.osconfig.v1.IExecStep); - /** FixedOrPercent percent. */ - public percent?: (number|null); + /** ExecStep linuxExecStepConfig. */ + public linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); - /** FixedOrPercent mode. */ - public mode?: ("fixed"|"percent"); + /** ExecStep windowsExecStepConfig. */ + public windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); /** - * Creates a new FixedOrPercent instance using the specified properties. + * Creates a new ExecStep instance using the specified properties. * @param [properties] Properties to set - * @returns FixedOrPercent instance + * @returns ExecStep instance */ - public static create(properties?: google.cloud.osconfig.v1.IFixedOrPercent): google.cloud.osconfig.v1.FixedOrPercent; + public static create(properties?: google.cloud.osconfig.v1.IExecStep): google.cloud.osconfig.v1.ExecStep; /** - * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. - * @param message FixedOrPercent message or plain object to encode + * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @param message ExecStep message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. - * @param message FixedOrPercent message or plain object to encode + * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. + * @param message ExecStep message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FixedOrPercent message from the specified reader or buffer. + * Decodes an ExecStep message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FixedOrPercent + * @returns ExecStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.FixedOrPercent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStep; /** - * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. + * Decodes an ExecStep message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FixedOrPercent + * @returns ExecStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.FixedOrPercent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStep; /** - * Verifies a FixedOrPercent message. + * Verifies an ExecStep message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. + * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FixedOrPercent + * @returns ExecStep */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.FixedOrPercent; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStep; /** - * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. - * @param message FixedOrPercent + * Creates a plain object from an ExecStep message. Also converts values to other types if specified. + * @param message ExecStep * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.FixedOrPercent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.ExecStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FixedOrPercent to JSON. + * Converts this ExecStep to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents an OsConfigService */ - class OsConfigService extends $protobuf.rpc.Service { + /** Properties of an ExecStepConfig. */ + interface IExecStepConfig { - /** - * Constructs a new OsConfigService 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); + /** ExecStepConfig localPath */ + localPath?: (string|null); - /** - * Creates new OsConfigService 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): OsConfigService; + /** ExecStepConfig gcsObject */ + gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); - /** - * Calls ExecutePatchJob. - * @param request ExecutePatchJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchJob - */ - public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback): void; + /** ExecStepConfig allowedSuccessCodes */ + allowedSuccessCodes?: (number[]|null); - /** - * Calls ExecutePatchJob. - * @param request ExecutePatchJobRequest message or plain object - * @returns Promise - */ - public executePatchJob(request: google.cloud.osconfig.v1.IExecutePatchJobRequest): Promise; + /** ExecStepConfig interpreter */ + interpreter?: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null); + } - /** - * Calls GetPatchJob. - * @param request GetPatchJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchJob - */ - public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback): void; + /** Represents an ExecStepConfig. */ + class ExecStepConfig implements IExecStepConfig { /** - * Calls GetPatchJob. - * @param request GetPatchJobRequest message or plain object - * @returns Promise + * Constructs a new ExecStepConfig. + * @param [properties] Properties to set */ - public getPatchJob(request: google.cloud.osconfig.v1.IGetPatchJobRequest): Promise; + constructor(properties?: google.cloud.osconfig.v1.IExecStepConfig); - /** - * Calls CancelPatchJob. - * @param request CancelPatchJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchJob - */ - public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest, callback: google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback): void; + /** ExecStepConfig localPath. */ + public localPath?: (string|null); - /** - * Calls CancelPatchJob. - * @param request CancelPatchJobRequest message or plain object - * @returns Promise - */ - public cancelPatchJob(request: google.cloud.osconfig.v1.ICancelPatchJobRequest): Promise; + /** ExecStepConfig gcsObject. */ + public gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); - /** - * Calls ListPatchJobs. - * @param request ListPatchJobsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPatchJobsResponse - */ - public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback): void; + /** ExecStepConfig allowedSuccessCodes. */ + public allowedSuccessCodes: number[]; - /** - * Calls ListPatchJobs. - * @param request ListPatchJobsRequest message or plain object - * @returns Promise - */ - public listPatchJobs(request: google.cloud.osconfig.v1.IListPatchJobsRequest): Promise; + /** ExecStepConfig interpreter. */ + public interpreter: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter); + + /** ExecStepConfig executable. */ + public executable?: ("localPath"|"gcsObject"); /** - * Calls ListPatchJobInstanceDetails. - * @param request ListPatchJobInstanceDetailsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse + * Creates a new ExecStepConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecStepConfig instance */ - public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback): void; + public static create(properties?: google.cloud.osconfig.v1.IExecStepConfig): google.cloud.osconfig.v1.ExecStepConfig; /** - * Calls ListPatchJobInstanceDetails. - * @param request ListPatchJobInstanceDetailsRequest message or plain object - * @returns Promise + * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @param message ExecStepConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listPatchJobInstanceDetails(request: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): Promise; + public static encode(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreatePatchDeployment. - * @param request CreatePatchDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchDeployment + * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. + * @param message ExecStepConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback): void; + public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreatePatchDeployment. - * @param request CreatePatchDeploymentRequest message or plain object - * @returns Promise + * Decodes an ExecStepConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createPatchDeployment(request: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStepConfig; /** - * Calls GetPatchDeployment. - * @param request GetPatchDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PatchDeployment + * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecStepConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStepConfig; /** - * Calls GetPatchDeployment. - * @param request GetPatchDeploymentRequest message or plain object - * @returns Promise + * Verifies an ExecStepConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getPatchDeployment(request: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListPatchDeployments. - * @param request ListPatchDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse + * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecStepConfig */ - public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, callback: google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStepConfig; /** - * Calls ListPatchDeployments. - * @param request ListPatchDeploymentsRequest message or plain object - * @returns Promise + * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. + * @param message ExecStepConfig + * @param [options] Conversion options + * @returns Plain object */ - public listPatchDeployments(request: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): Promise; + public static toObject(message: google.cloud.osconfig.v1.ExecStepConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeletePatchDeployment. - * @param request DeletePatchDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Converts this ExecStepConfig to JSON. + * @returns JSON object */ - public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback): void; + public toJSON(): { [k: string]: any }; + } + + namespace ExecStepConfig { + + /** Interpreter enum. */ + enum Interpreter { + INTERPRETER_UNSPECIFIED = 0, + SHELL = 1, + POWERSHELL = 2 + } + } + + /** Properties of a GcsObject. */ + interface IGcsObject { + + /** GcsObject bucket */ + bucket?: (string|null); + + /** GcsObject object */ + object?: (string|null); + + /** GcsObject generationNumber */ + generationNumber?: (number|Long|string|null); + } + + /** Represents a GcsObject. */ + class GcsObject implements IGcsObject { /** - * Calls DeletePatchDeployment. - * @param request DeletePatchDeploymentRequest message or plain object - * @returns Promise + * Constructs a new GcsObject. + * @param [properties] Properties to set */ - public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): Promise; - } + constructor(properties?: google.cloud.osconfig.v1.IGcsObject); - namespace OsConfigService { + /** GcsObject bucket. */ + public bucket: string; + + /** GcsObject object. */ + public object: string; + + /** GcsObject generationNumber. */ + public generationNumber: (number|Long|string); /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. - * @param error Error, if any - * @param [response] PatchJob + * Creates a new GcsObject instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsObject instance */ - type ExecutePatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; + public static create(properties?: google.cloud.osconfig.v1.IGcsObject): google.cloud.osconfig.v1.GcsObject; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. - * @param error Error, if any - * @param [response] PatchJob + * Encodes the specified GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @param message GcsObject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; + public static encode(message: google.cloud.osconfig.v1.IGcsObject, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. - * @param error Error, if any - * @param [response] PatchJob + * Encodes the specified GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. + * @param message GcsObject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CancelPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; + public static encodeDelimited(message: google.cloud.osconfig.v1.IGcsObject, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. - * @param error Error, if any - * @param [response] ListPatchJobsResponse + * Decodes a GcsObject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListPatchJobsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobsResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GcsObject; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. - * @param error Error, if any - * @param [response] ListPatchJobInstanceDetailsResponse + * Decodes a GcsObject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListPatchJobInstanceDetailsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GcsObject; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. - * @param error Error, if any - * @param [response] PatchDeployment + * Verifies a GcsObject message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type CreatePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. - * @param error Error, if any - * @param [response] PatchDeployment + * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsObject */ - type GetPatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GcsObject; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. - * @param error Error, if any - * @param [response] ListPatchDeploymentsResponse + * Creates a plain object from a GcsObject message. Also converts values to other types if specified. + * @param message GcsObject + * @param [options] Conversion options + * @returns Plain object */ - type ListPatchDeploymentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchDeploymentsResponse) => void; + public static toObject(message: google.cloud.osconfig.v1.GcsObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. - * @param error Error, if any - * @param [response] Empty + * Converts this GcsObject to JSON. + * @returns JSON object */ - type DeletePatchDeploymentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a PatchDeployment. */ - interface IPatchDeployment { + /** Properties of a PatchInstanceFilter. */ + interface IPatchInstanceFilter { - /** PatchDeployment name */ - name?: (string|null); + /** PatchInstanceFilter all */ + all?: (boolean|null); - /** PatchDeployment description */ - description?: (string|null); + /** PatchInstanceFilter groupLabels */ + groupLabels?: (google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]|null); - /** PatchDeployment instanceFilter */ - instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** PatchInstanceFilter zones */ + zones?: (string[]|null); - /** PatchDeployment patchConfig */ - patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** PatchInstanceFilter instances */ + instances?: (string[]|null); - /** PatchDeployment duration */ - duration?: (google.protobuf.IDuration|null); - - /** PatchDeployment oneTimeSchedule */ - oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); - - /** PatchDeployment recurringSchedule */ - recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); - - /** PatchDeployment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** PatchDeployment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** PatchDeployment lastExecuteTime */ - lastExecuteTime?: (google.protobuf.ITimestamp|null); - - /** PatchDeployment rollout */ - rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + /** PatchInstanceFilter instanceNamePrefixes */ + instanceNamePrefixes?: (string[]|null); } - /** Represents a PatchDeployment. */ - class PatchDeployment implements IPatchDeployment { + /** Represents a PatchInstanceFilter. */ + class PatchInstanceFilter implements IPatchInstanceFilter { /** - * Constructs a new PatchDeployment. + * Constructs a new PatchInstanceFilter. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IPatchDeployment); - - /** PatchDeployment name. */ - public name: string; - - /** PatchDeployment description. */ - public description: string; - - /** PatchDeployment instanceFilter. */ - public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); - - /** PatchDeployment patchConfig. */ - public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); - - /** PatchDeployment duration. */ - public duration?: (google.protobuf.IDuration|null); - - /** PatchDeployment oneTimeSchedule. */ - public oneTimeSchedule?: (google.cloud.osconfig.v1.IOneTimeSchedule|null); - - /** PatchDeployment recurringSchedule. */ - public recurringSchedule?: (google.cloud.osconfig.v1.IRecurringSchedule|null); + constructor(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter); - /** PatchDeployment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** PatchInstanceFilter all. */ + public all: boolean; - /** PatchDeployment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** PatchInstanceFilter groupLabels. */ + public groupLabels: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]; - /** PatchDeployment lastExecuteTime. */ - public lastExecuteTime?: (google.protobuf.ITimestamp|null); + /** PatchInstanceFilter zones. */ + public zones: string[]; - /** PatchDeployment rollout. */ - public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + /** PatchInstanceFilter instances. */ + public instances: string[]; - /** PatchDeployment schedule. */ - public schedule?: ("oneTimeSchedule"|"recurringSchedule"); + /** PatchInstanceFilter instanceNamePrefixes. */ + public instanceNamePrefixes: string[]; /** - * Creates a new PatchDeployment instance using the specified properties. + * Creates a new PatchInstanceFilter instance using the specified properties. * @param [properties] Properties to set - * @returns PatchDeployment instance + * @returns PatchInstanceFilter instance */ - public static create(properties?: google.cloud.osconfig.v1.IPatchDeployment): google.cloud.osconfig.v1.PatchDeployment; + public static create(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter): google.cloud.osconfig.v1.PatchInstanceFilter; /** - * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. - * @param message PatchDeployment message or plain object to encode + * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @param message PatchInstanceFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. - * @param message PatchDeployment message or plain object to encode + * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. + * @param message PatchInstanceFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PatchDeployment message from the specified reader or buffer. + * Decodes a PatchInstanceFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PatchDeployment + * @returns PatchInstanceFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchDeployment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchInstanceFilter; /** - * Decodes a PatchDeployment message from the specified reader or buffer, length delimited. + * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PatchDeployment + * @returns PatchInstanceFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchDeployment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchInstanceFilter; /** - * Verifies a PatchDeployment message. + * Verifies a PatchInstanceFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. + * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PatchDeployment + * @returns PatchInstanceFilter */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchDeployment; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter; /** - * Creates a plain object from a PatchDeployment message. Also converts values to other types if specified. - * @param message PatchDeployment + * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. + * @param message PatchInstanceFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.PatchDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.PatchInstanceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PatchDeployment to JSON. + * Converts this PatchInstanceFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an OneTimeSchedule. */ - interface IOneTimeSchedule { + namespace PatchInstanceFilter { - /** OneTimeSchedule executeTime */ - executeTime?: (google.protobuf.ITimestamp|null); + /** Properties of a GroupLabel. */ + interface IGroupLabel { + + /** GroupLabel labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a GroupLabel. */ + class GroupLabel implements IGroupLabel { + + /** + * Constructs a new GroupLabel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel); + + /** GroupLabel labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new GroupLabel instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupLabel instance + */ + public static create(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + + /** + * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @param message GroupLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @param message GroupLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GroupLabel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + + /** + * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + + /** + * Verifies a GroupLabel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GroupLabel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupLabel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + + /** + * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. + * @param message GroupLabel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GroupLabel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents an OneTimeSchedule. */ - class OneTimeSchedule implements IOneTimeSchedule { + /** Properties of a PatchRollout. */ + interface IPatchRollout { + + /** PatchRollout mode */ + mode?: (google.cloud.osconfig.v1.PatchRollout.Mode|keyof typeof google.cloud.osconfig.v1.PatchRollout.Mode|null); + + /** PatchRollout disruptionBudget */ + disruptionBudget?: (google.cloud.osconfig.v1.IFixedOrPercent|null); + } + + /** Represents a PatchRollout. */ + class PatchRollout implements IPatchRollout { /** - * Constructs a new OneTimeSchedule. + * Constructs a new PatchRollout. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IOneTimeSchedule); + constructor(properties?: google.cloud.osconfig.v1.IPatchRollout); - /** OneTimeSchedule executeTime. */ - public executeTime?: (google.protobuf.ITimestamp|null); + /** PatchRollout mode. */ + public mode: (google.cloud.osconfig.v1.PatchRollout.Mode|keyof typeof google.cloud.osconfig.v1.PatchRollout.Mode); + + /** PatchRollout disruptionBudget. */ + public disruptionBudget?: (google.cloud.osconfig.v1.IFixedOrPercent|null); /** - * Creates a new OneTimeSchedule instance using the specified properties. + * Creates a new PatchRollout instance using the specified properties. * @param [properties] Properties to set - * @returns OneTimeSchedule instance + * @returns PatchRollout instance */ - public static create(properties?: google.cloud.osconfig.v1.IOneTimeSchedule): google.cloud.osconfig.v1.OneTimeSchedule; + public static create(properties?: google.cloud.osconfig.v1.IPatchRollout): google.cloud.osconfig.v1.PatchRollout; /** - * Encodes the specified OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. - * @param message OneTimeSchedule message or plain object to encode + * Encodes the specified PatchRollout message. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. + * @param message PatchRollout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IOneTimeSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.IPatchRollout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. - * @param message OneTimeSchedule message or plain object to encode + * Encodes the specified PatchRollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. + * @param message PatchRollout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IOneTimeSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchRollout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneTimeSchedule message from the specified reader or buffer. + * Decodes a PatchRollout message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OneTimeSchedule + * @returns PatchRollout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OneTimeSchedule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchRollout; /** - * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. + * Decodes a PatchRollout message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneTimeSchedule + * @returns PatchRollout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OneTimeSchedule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchRollout; /** - * Verifies an OneTimeSchedule message. + * Verifies a PatchRollout message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. + * Creates a PatchRollout message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneTimeSchedule + * @returns PatchRollout */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OneTimeSchedule; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchRollout; /** - * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. - * @param message OneTimeSchedule + * Creates a plain object from a PatchRollout message. Also converts values to other types if specified. + * @param message PatchRollout * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.OneTimeSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.PatchRollout, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneTimeSchedule to JSON. + * Converts this PatchRollout to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RecurringSchedule. */ - interface IRecurringSchedule { - - /** RecurringSchedule timeZone */ - timeZone?: (google.type.ITimeZone|null); - - /** RecurringSchedule startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** RecurringSchedule endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** RecurringSchedule timeOfDay */ - timeOfDay?: (google.type.ITimeOfDay|null); - - /** RecurringSchedule frequency */ - frequency?: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency|null); - - /** RecurringSchedule weekly */ - weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); - - /** RecurringSchedule monthly */ - monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); - - /** RecurringSchedule lastExecuteTime */ - lastExecuteTime?: (google.protobuf.ITimestamp|null); + namespace PatchRollout { - /** RecurringSchedule nextExecuteTime */ - nextExecuteTime?: (google.protobuf.ITimestamp|null); + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + ZONE_BY_ZONE = 1, + CONCURRENT_ZONES = 2 + } } - /** Represents a RecurringSchedule. */ - class RecurringSchedule implements IRecurringSchedule { + /** Represents an OsConfigZonalService */ + class OsConfigZonalService extends $protobuf.rpc.Service { /** - * Constructs a new RecurringSchedule. - * @param [properties] Properties to set + * Constructs a new OsConfigZonalService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.osconfig.v1.IRecurringSchedule); - - /** RecurringSchedule timeZone. */ - public timeZone?: (google.type.ITimeZone|null); - - /** RecurringSchedule startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** RecurringSchedule endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** RecurringSchedule timeOfDay. */ - public timeOfDay?: (google.type.ITimeOfDay|null); - - /** RecurringSchedule frequency. */ - public frequency: (google.cloud.osconfig.v1.RecurringSchedule.Frequency|keyof typeof google.cloud.osconfig.v1.RecurringSchedule.Frequency); - - /** RecurringSchedule weekly. */ - public weekly?: (google.cloud.osconfig.v1.IWeeklySchedule|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** RecurringSchedule monthly. */ - public monthly?: (google.cloud.osconfig.v1.IMonthlySchedule|null); + /** + * Creates new OsConfigZonalService 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): OsConfigZonalService; - /** RecurringSchedule lastExecuteTime. */ - public lastExecuteTime?: (google.protobuf.ITimestamp|null); + /** + * Calls GetInventory. + * @param request GetInventoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Inventory + */ + public getInventory(request: google.cloud.osconfig.v1.IGetInventoryRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.GetInventoryCallback): void; - /** RecurringSchedule nextExecuteTime. */ - public nextExecuteTime?: (google.protobuf.ITimestamp|null); + /** + * Calls GetInventory. + * @param request GetInventoryRequest message or plain object + * @returns Promise + */ + public getInventory(request: google.cloud.osconfig.v1.IGetInventoryRequest): Promise; - /** RecurringSchedule scheduleConfig. */ - public scheduleConfig?: ("weekly"|"monthly"); + /** + * Calls ListInventories. + * @param request ListInventoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListInventoriesResponse + */ + public listInventories(request: google.cloud.osconfig.v1.IListInventoriesRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.ListInventoriesCallback): void; /** - * Creates a new RecurringSchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns RecurringSchedule instance + * Calls ListInventories. + * @param request ListInventoriesRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.osconfig.v1.IRecurringSchedule): google.cloud.osconfig.v1.RecurringSchedule; + public listInventories(request: google.cloud.osconfig.v1.IListInventoriesRequest): Promise; /** - * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. - * @param message RecurringSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetVulnerabilityReport. + * @param request GetVulnerabilityReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VulnerabilityReport */ - public static encode(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + public getVulnerabilityReport(request: google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.GetVulnerabilityReportCallback): void; /** - * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. - * @param message RecurringSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetVulnerabilityReport. + * @param request GetVulnerabilityReportRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IRecurringSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + public getVulnerabilityReport(request: google.cloud.osconfig.v1.IGetVulnerabilityReportRequest): Promise; /** - * Decodes a RecurringSchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecurringSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListVulnerabilityReports. + * @param request ListVulnerabilityReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVulnerabilityReportsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.RecurringSchedule; + public listVulnerabilityReports(request: google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.ListVulnerabilityReportsCallback): void; /** - * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecurringSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListVulnerabilityReports. + * @param request ListVulnerabilityReportsRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.RecurringSchedule; + public listVulnerabilityReports(request: google.cloud.osconfig.v1.IListVulnerabilityReportsRequest): Promise; + } + + namespace OsConfigZonalService { /** - * Verifies a RecurringSchedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getInventory}. + * @param error Error, if any + * @param [response] Inventory */ - public static verify(message: { [k: string]: any }): (string|null); + type GetInventoryCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.Inventory) => void; /** - * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecurringSchedule + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listInventories}. + * @param error Error, if any + * @param [response] ListInventoriesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.RecurringSchedule; + type ListInventoriesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListInventoriesResponse) => void; /** - * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. - * @param message RecurringSchedule - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getVulnerabilityReport}. + * @param error Error, if any + * @param [response] VulnerabilityReport */ - public static toObject(message: google.cloud.osconfig.v1.RecurringSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetVulnerabilityReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.VulnerabilityReport) => void; /** - * Converts this RecurringSchedule to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listVulnerabilityReports}. + * @param error Error, if any + * @param [response] ListVulnerabilityReportsResponse */ - public toJSON(): { [k: string]: any }; + type ListVulnerabilityReportsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListVulnerabilityReportsResponse) => void; } - namespace RecurringSchedule { + /** Properties of a VulnerabilityReport. */ + interface IVulnerabilityReport { - /** Frequency enum. */ - enum Frequency { - FREQUENCY_UNSPECIFIED = 0, - WEEKLY = 1, - MONTHLY = 2 - } - } + /** VulnerabilityReport name */ + name?: (string|null); - /** Properties of a WeeklySchedule. */ - interface IWeeklySchedule { + /** VulnerabilityReport vulnerabilities */ + vulnerabilities?: (google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability[]|null); - /** WeeklySchedule dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + /** VulnerabilityReport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a WeeklySchedule. */ - class WeeklySchedule implements IWeeklySchedule { + /** Represents a VulnerabilityReport. */ + class VulnerabilityReport implements IVulnerabilityReport { /** - * Constructs a new WeeklySchedule. + * Constructs a new VulnerabilityReport. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IWeeklySchedule); + constructor(properties?: google.cloud.osconfig.v1.IVulnerabilityReport); - /** WeeklySchedule dayOfWeek. */ - public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + /** VulnerabilityReport name. */ + public name: string; + + /** VulnerabilityReport vulnerabilities. */ + public vulnerabilities: google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability[]; + + /** VulnerabilityReport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new WeeklySchedule instance using the specified properties. + * Creates a new VulnerabilityReport instance using the specified properties. * @param [properties] Properties to set - * @returns WeeklySchedule instance + * @returns VulnerabilityReport instance */ - public static create(properties?: google.cloud.osconfig.v1.IWeeklySchedule): google.cloud.osconfig.v1.WeeklySchedule; + public static create(properties?: google.cloud.osconfig.v1.IVulnerabilityReport): google.cloud.osconfig.v1.VulnerabilityReport; /** - * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. - * @param message WeeklySchedule message or plain object to encode + * Encodes the specified VulnerabilityReport message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.verify|verify} messages. + * @param message VulnerabilityReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.IVulnerabilityReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. - * @param message WeeklySchedule message or plain object to encode + * Encodes the specified VulnerabilityReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.verify|verify} messages. + * @param message VulnerabilityReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.IVulnerabilityReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WeeklySchedule message from the specified reader or buffer. + * Decodes a VulnerabilityReport message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WeeklySchedule + * @returns VulnerabilityReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeeklySchedule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.VulnerabilityReport; /** - * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * Decodes a VulnerabilityReport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WeeklySchedule + * @returns VulnerabilityReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeeklySchedule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.VulnerabilityReport; /** - * Verifies a WeeklySchedule message. + * Verifies a VulnerabilityReport message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * Creates a VulnerabilityReport message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WeeklySchedule + * @returns VulnerabilityReport */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeeklySchedule; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.VulnerabilityReport; /** - * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. - * @param message WeeklySchedule + * Creates a plain object from a VulnerabilityReport message. Also converts values to other types if specified. + * @param message VulnerabilityReport * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.VulnerabilityReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WeeklySchedule to JSON. + * Converts this VulnerabilityReport to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MonthlySchedule. */ - interface IMonthlySchedule { + namespace VulnerabilityReport { - /** MonthlySchedule weekDayOfMonth */ - weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); + /** Properties of a Vulnerability. */ + interface IVulnerability { - /** MonthlySchedule monthDay */ - monthDay?: (number|null); - } + /** Vulnerability details */ + details?: (google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails|null); - /** Represents a MonthlySchedule. */ - class MonthlySchedule implements IMonthlySchedule { + /** Vulnerability installedInventoryItemIds */ + installedInventoryItemIds?: (string[]|null); - /** - * Constructs a new MonthlySchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IMonthlySchedule); + /** Vulnerability availableInventoryItemIds */ + availableInventoryItemIds?: (string[]|null); - /** MonthlySchedule weekDayOfMonth. */ - public weekDayOfMonth?: (google.cloud.osconfig.v1.IWeekDayOfMonth|null); + /** Vulnerability createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** MonthlySchedule monthDay. */ - public monthDay?: (number|null); + /** Vulnerability updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** MonthlySchedule dayOfMonth. */ - public dayOfMonth?: ("weekDayOfMonth"|"monthDay"); + /** Represents a Vulnerability. */ + class Vulnerability implements IVulnerability { - /** - * Creates a new MonthlySchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns MonthlySchedule instance - */ - public static create(properties?: google.cloud.osconfig.v1.IMonthlySchedule): google.cloud.osconfig.v1.MonthlySchedule; + /** + * Constructs a new Vulnerability. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability); - /** - * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. - * @param message MonthlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** Vulnerability details. */ + public details?: (google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails|null); - /** - * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. - * @param message MonthlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + /** Vulnerability installedInventoryItemIds. */ + public installedInventoryItemIds: string[]; - /** - * Decodes a MonthlySchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.MonthlySchedule; + /** Vulnerability availableInventoryItemIds. */ + public availableInventoryItemIds: string[]; - /** - * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.MonthlySchedule; + /** Vulnerability createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** - * Verifies a MonthlySchedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Vulnerability updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonthlySchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.MonthlySchedule; + /** + * Creates a new Vulnerability instance using the specified properties. + * @param [properties] Properties to set + * @returns Vulnerability instance + */ + public static create(properties?: google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability; - /** - * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. - * @param message MonthlySchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this MonthlySchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a WeekDayOfMonth. */ - interface IWeekDayOfMonth { + /** + * Decodes a Vulnerability message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability; - /** WeekDayOfMonth weekOrdinal */ - weekOrdinal?: (number|null); + /** + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability; - /** WeekDayOfMonth dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); - } + /** + * Verifies a Vulnerability message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a WeekDayOfMonth. */ - class WeekDayOfMonth implements IWeekDayOfMonth { + /** + * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Vulnerability + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability; - /** - * Constructs a new WeekDayOfMonth. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth); + /** + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * @param message Vulnerability + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** WeekDayOfMonth weekOrdinal. */ - public weekOrdinal: number; + /** + * Converts this Vulnerability to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** WeekDayOfMonth dayOfWeek. */ - public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + namespace Vulnerability { - /** - * Creates a new WeekDayOfMonth instance using the specified properties. - * @param [properties] Properties to set - * @returns WeekDayOfMonth instance - */ - public static create(properties?: google.cloud.osconfig.v1.IWeekDayOfMonth): google.cloud.osconfig.v1.WeekDayOfMonth; + /** Properties of a Details. */ + interface IDetails { - /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + /** Details cve */ + cve?: (string|null); - /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + /** Details cvssV2Score */ + cvssV2Score?: (number|null); - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WeekDayOfMonth; + /** Details cvssV3 */ + cvssV3?: (google.cloud.osconfig.v1.ICVSSv3|null); - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WeekDayOfMonth; + /** Details severity */ + severity?: (string|null); - /** - * Verifies a WeekDayOfMonth message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Details description */ + description?: (string|null); - /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeekDayOfMonth - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WeekDayOfMonth; + /** Details references */ + references?: (google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference[]|null); + } - /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. - * @param message WeekDayOfMonth - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a Details. */ + class Details implements IDetails { - /** - * Converts this WeekDayOfMonth to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new Details. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails); - /** Properties of a CreatePatchDeploymentRequest. */ - interface ICreatePatchDeploymentRequest { + /** Details cve. */ + public cve: string; - /** CreatePatchDeploymentRequest parent */ - parent?: (string|null); + /** Details cvssV2Score. */ + public cvssV2Score: number; - /** CreatePatchDeploymentRequest patchDeploymentId */ - patchDeploymentId?: (string|null); + /** Details cvssV3. */ + public cvssV3?: (google.cloud.osconfig.v1.ICVSSv3|null); - /** CreatePatchDeploymentRequest patchDeployment */ - patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + /** Details severity. */ + public severity: string; + + /** Details description. */ + public description: string; + + /** Details references. */ + public references: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference[]; + + /** + * Creates a new Details instance using the specified properties. + * @param [properties] Properties to set + * @returns Details instance + */ + public static create(properties?: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details; + + /** + * Encodes the specified Details message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @param message Details message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @param message Details message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Details message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details; + + /** + * Decodes a Details message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details; + + /** + * Verifies a Details message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Details message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Details + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details; + + /** + * Creates a plain object from a Details message. Also converts values to other types if specified. + * @param message Details + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Details to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Details { + + /** Properties of a Reference. */ + interface IReference { + + /** Reference url */ + url?: (string|null); + + /** Reference source */ + source?: (string|null); + } + + /** Represents a Reference. */ + class Reference implements IReference { + + /** + * Constructs a new Reference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference); + + /** Reference url. */ + public url: string; + + /** Reference source. */ + public source: string; + + /** + * Creates a new Reference instance using the specified properties. + * @param [properties] Properties to set + * @returns Reference instance + */ + public static create(properties?: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference; + + /** + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Reference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference; + + /** + * Decodes a Reference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference; + + /** + * Verifies a Reference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Reference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Reference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference; + + /** + * Creates a plain object from a Reference message. Also converts values to other types if specified. + * @param message Reference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Reference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } } - /** Represents a CreatePatchDeploymentRequest. */ - class CreatePatchDeploymentRequest implements ICreatePatchDeploymentRequest { + /** Properties of a GetVulnerabilityReportRequest. */ + interface IGetVulnerabilityReportRequest { + + /** GetVulnerabilityReportRequest name */ + name?: (string|null); + } + + /** Represents a GetVulnerabilityReportRequest. */ + class GetVulnerabilityReportRequest implements IGetVulnerabilityReportRequest { /** - * Constructs a new CreatePatchDeploymentRequest. + * Constructs a new GetVulnerabilityReportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest); - - /** CreatePatchDeploymentRequest parent. */ - public parent: string; - - /** CreatePatchDeploymentRequest patchDeploymentId. */ - public patchDeploymentId: string; + constructor(properties?: google.cloud.osconfig.v1.IGetVulnerabilityReportRequest); - /** CreatePatchDeploymentRequest patchDeployment. */ - public patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + /** GetVulnerabilityReportRequest name. */ + public name: string; /** - * Creates a new CreatePatchDeploymentRequest instance using the specified properties. + * Creates a new GetVulnerabilityReportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreatePatchDeploymentRequest instance + * @returns GetVulnerabilityReportRequest instance */ - public static create(properties?: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + public static create(properties?: google.cloud.osconfig.v1.IGetVulnerabilityReportRequest): google.cloud.osconfig.v1.GetVulnerabilityReportRequest; /** - * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. - * @param message CreatePatchDeploymentRequest message or plain object to encode + * Encodes the specified GetVulnerabilityReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetVulnerabilityReportRequest.verify|verify} messages. + * @param message GetVulnerabilityReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. - * @param message CreatePatchDeploymentRequest message or plain object to encode + * Encodes the specified GetVulnerabilityReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetVulnerabilityReportRequest.verify|verify} messages. + * @param message GetVulnerabilityReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreatePatchDeploymentRequest + * @returns GetVulnerabilityReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetVulnerabilityReportRequest; /** - * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreatePatchDeploymentRequest + * @returns GetVulnerabilityReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetVulnerabilityReportRequest; /** - * Verifies a CreatePatchDeploymentRequest message. + * Verifies a GetVulnerabilityReportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetVulnerabilityReportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreatePatchDeploymentRequest + * @returns GetVulnerabilityReportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CreatePatchDeploymentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetVulnerabilityReportRequest; /** - * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. - * @param message CreatePatchDeploymentRequest + * Creates a plain object from a GetVulnerabilityReportRequest message. Also converts values to other types if specified. + * @param message GetVulnerabilityReportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.CreatePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.GetVulnerabilityReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreatePatchDeploymentRequest to JSON. + * Converts this GetVulnerabilityReportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetPatchDeploymentRequest. */ - interface IGetPatchDeploymentRequest { + /** Properties of a ListVulnerabilityReportsRequest. */ + interface IListVulnerabilityReportsRequest { - /** GetPatchDeploymentRequest name */ - name?: (string|null); - } + /** ListVulnerabilityReportsRequest parent */ + parent?: (string|null); - /** Represents a GetPatchDeploymentRequest. */ - class GetPatchDeploymentRequest implements IGetPatchDeploymentRequest { + /** ListVulnerabilityReportsRequest pageSize */ + pageSize?: (number|null); - /** - * Constructs a new GetPatchDeploymentRequest. + /** ListVulnerabilityReportsRequest pageToken */ + pageToken?: (string|null); + + /** ListVulnerabilityReportsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListVulnerabilityReportsRequest. */ + class ListVulnerabilityReportsRequest implements IListVulnerabilityReportsRequest { + + /** + * Constructs a new ListVulnerabilityReportsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest); + constructor(properties?: google.cloud.osconfig.v1.IListVulnerabilityReportsRequest); - /** GetPatchDeploymentRequest name. */ - public name: string; + /** ListVulnerabilityReportsRequest parent. */ + public parent: string; + + /** ListVulnerabilityReportsRequest pageSize. */ + public pageSize: number; + + /** ListVulnerabilityReportsRequest pageToken. */ + public pageToken: string; + + /** ListVulnerabilityReportsRequest filter. */ + public filter: string; /** - * Creates a new GetPatchDeploymentRequest instance using the specified properties. + * Creates a new ListVulnerabilityReportsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetPatchDeploymentRequest instance + * @returns ListVulnerabilityReportsRequest instance */ - public static create(properties?: google.cloud.osconfig.v1.IGetPatchDeploymentRequest): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + public static create(properties?: google.cloud.osconfig.v1.IListVulnerabilityReportsRequest): google.cloud.osconfig.v1.ListVulnerabilityReportsRequest; /** - * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. - * @param message GetPatchDeploymentRequest message or plain object to encode + * Encodes the specified ListVulnerabilityReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListVulnerabilityReportsRequest.verify|verify} messages. + * @param message ListVulnerabilityReportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. - * @param message GetPatchDeploymentRequest message or plain object to encode + * Encodes the specified ListVulnerabilityReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListVulnerabilityReportsRequest.verify|verify} messages. + * @param message ListVulnerabilityReportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPatchDeploymentRequest + * @returns ListVulnerabilityReportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListVulnerabilityReportsRequest; /** - * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPatchDeploymentRequest + * @returns ListVulnerabilityReportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListVulnerabilityReportsRequest; /** - * Verifies a GetPatchDeploymentRequest message. + * Verifies a ListVulnerabilityReportsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListVulnerabilityReportsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPatchDeploymentRequest + * @returns ListVulnerabilityReportsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchDeploymentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListVulnerabilityReportsRequest; /** - * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. - * @param message GetPatchDeploymentRequest + * Creates a plain object from a ListVulnerabilityReportsRequest message. Also converts values to other types if specified. + * @param message ListVulnerabilityReportsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.GetPatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.ListVulnerabilityReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPatchDeploymentRequest to JSON. + * Converts this ListVulnerabilityReportsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListPatchDeploymentsRequest. */ - interface IListPatchDeploymentsRequest { - - /** ListPatchDeploymentsRequest parent */ - parent?: (string|null); + /** Properties of a ListVulnerabilityReportsResponse. */ + interface IListVulnerabilityReportsResponse { - /** ListPatchDeploymentsRequest pageSize */ - pageSize?: (number|null); + /** ListVulnerabilityReportsResponse vulnerabilityReports */ + vulnerabilityReports?: (google.cloud.osconfig.v1.IVulnerabilityReport[]|null); - /** ListPatchDeploymentsRequest pageToken */ - pageToken?: (string|null); + /** ListVulnerabilityReportsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListPatchDeploymentsRequest. */ - class ListPatchDeploymentsRequest implements IListPatchDeploymentsRequest { + /** Represents a ListVulnerabilityReportsResponse. */ + class ListVulnerabilityReportsResponse implements IListVulnerabilityReportsResponse { /** - * Constructs a new ListPatchDeploymentsRequest. + * Constructs a new ListVulnerabilityReportsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest); + constructor(properties?: google.cloud.osconfig.v1.IListVulnerabilityReportsResponse); - /** ListPatchDeploymentsRequest parent. */ - public parent: string; - - /** ListPatchDeploymentsRequest pageSize. */ - public pageSize: number; + /** ListVulnerabilityReportsResponse vulnerabilityReports. */ + public vulnerabilityReports: google.cloud.osconfig.v1.IVulnerabilityReport[]; - /** ListPatchDeploymentsRequest pageToken. */ - public pageToken: string; + /** ListVulnerabilityReportsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListPatchDeploymentsRequest instance using the specified properties. + * Creates a new ListVulnerabilityReportsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListPatchDeploymentsRequest instance + * @returns ListVulnerabilityReportsResponse instance */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsRequest): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + public static create(properties?: google.cloud.osconfig.v1.IListVulnerabilityReportsResponse): google.cloud.osconfig.v1.ListVulnerabilityReportsResponse; /** - * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. - * @param message ListPatchDeploymentsRequest message or plain object to encode + * Encodes the specified ListVulnerabilityReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListVulnerabilityReportsResponse.verify|verify} messages. + * @param message ListVulnerabilityReportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.IListVulnerabilityReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. - * @param message ListPatchDeploymentsRequest message or plain object to encode + * Encodes the specified ListVulnerabilityReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListVulnerabilityReportsResponse.verify|verify} messages. + * @param message ListVulnerabilityReportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.IListVulnerabilityReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPatchDeploymentsRequest + * @returns ListVulnerabilityReportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListVulnerabilityReportsResponse; /** - * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPatchDeploymentsRequest + * @returns ListVulnerabilityReportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListVulnerabilityReportsResponse; /** - * Verifies a ListPatchDeploymentsRequest message. + * Verifies a ListVulnerabilityReportsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListVulnerabilityReportsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPatchDeploymentsRequest + * @returns ListVulnerabilityReportsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListVulnerabilityReportsResponse; /** - * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListPatchDeploymentsRequest + * Creates a plain object from a ListVulnerabilityReportsResponse message. Also converts values to other types if specified. + * @param message ListVulnerabilityReportsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.ListVulnerabilityReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPatchDeploymentsRequest to JSON. + * Converts this ListVulnerabilityReportsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListPatchDeploymentsResponse. */ - interface IListPatchDeploymentsResponse { + /** Properties of a CVSSv3. */ + interface ICVSSv3 { - /** ListPatchDeploymentsResponse patchDeployments */ - patchDeployments?: (google.cloud.osconfig.v1.IPatchDeployment[]|null); + /** CVSSv3 baseScore */ + baseScore?: (number|null); - /** ListPatchDeploymentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** CVSSv3 exploitabilityScore */ + exploitabilityScore?: (number|null); + + /** CVSSv3 impactScore */ + impactScore?: (number|null); + + /** CVSSv3 attackVector */ + attackVector?: (google.cloud.osconfig.v1.CVSSv3.AttackVector|keyof typeof google.cloud.osconfig.v1.CVSSv3.AttackVector|null); + + /** CVSSv3 attackComplexity */ + attackComplexity?: (google.cloud.osconfig.v1.CVSSv3.AttackComplexity|keyof typeof google.cloud.osconfig.v1.CVSSv3.AttackComplexity|null); + + /** CVSSv3 privilegesRequired */ + privilegesRequired?: (google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired|keyof typeof google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired|null); + + /** CVSSv3 userInteraction */ + userInteraction?: (google.cloud.osconfig.v1.CVSSv3.UserInteraction|keyof typeof google.cloud.osconfig.v1.CVSSv3.UserInteraction|null); + + /** CVSSv3 scope */ + scope?: (google.cloud.osconfig.v1.CVSSv3.Scope|keyof typeof google.cloud.osconfig.v1.CVSSv3.Scope|null); + + /** CVSSv3 confidentialityImpact */ + confidentialityImpact?: (google.cloud.osconfig.v1.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1.CVSSv3.Impact|null); + + /** CVSSv3 integrityImpact */ + integrityImpact?: (google.cloud.osconfig.v1.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1.CVSSv3.Impact|null); + + /** CVSSv3 availabilityImpact */ + availabilityImpact?: (google.cloud.osconfig.v1.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1.CVSSv3.Impact|null); } - /** Represents a ListPatchDeploymentsResponse. */ - class ListPatchDeploymentsResponse implements IListPatchDeploymentsResponse { + /** Represents a CVSSv3. */ + class CVSSv3 implements ICVSSv3 { /** - * Constructs a new ListPatchDeploymentsResponse. + * Constructs a new CVSSv3. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse); + constructor(properties?: google.cloud.osconfig.v1.ICVSSv3); - /** ListPatchDeploymentsResponse patchDeployments. */ - public patchDeployments: google.cloud.osconfig.v1.IPatchDeployment[]; + /** CVSSv3 baseScore. */ + public baseScore: number; - /** ListPatchDeploymentsResponse nextPageToken. */ - public nextPageToken: string; + /** CVSSv3 exploitabilityScore. */ + public exploitabilityScore: number; + + /** CVSSv3 impactScore. */ + public impactScore: number; + + /** CVSSv3 attackVector. */ + public attackVector: (google.cloud.osconfig.v1.CVSSv3.AttackVector|keyof typeof google.cloud.osconfig.v1.CVSSv3.AttackVector); + + /** CVSSv3 attackComplexity. */ + public attackComplexity: (google.cloud.osconfig.v1.CVSSv3.AttackComplexity|keyof typeof google.cloud.osconfig.v1.CVSSv3.AttackComplexity); + + /** CVSSv3 privilegesRequired. */ + public privilegesRequired: (google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired|keyof typeof google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired); + + /** CVSSv3 userInteraction. */ + public userInteraction: (google.cloud.osconfig.v1.CVSSv3.UserInteraction|keyof typeof google.cloud.osconfig.v1.CVSSv3.UserInteraction); + + /** CVSSv3 scope. */ + public scope: (google.cloud.osconfig.v1.CVSSv3.Scope|keyof typeof google.cloud.osconfig.v1.CVSSv3.Scope); + + /** CVSSv3 confidentialityImpact. */ + public confidentialityImpact: (google.cloud.osconfig.v1.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1.CVSSv3.Impact); + + /** CVSSv3 integrityImpact. */ + public integrityImpact: (google.cloud.osconfig.v1.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1.CVSSv3.Impact); + + /** CVSSv3 availabilityImpact. */ + public availabilityImpact: (google.cloud.osconfig.v1.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1.CVSSv3.Impact); /** - * Creates a new ListPatchDeploymentsResponse instance using the specified properties. + * Creates a new CVSSv3 instance using the specified properties. * @param [properties] Properties to set - * @returns ListPatchDeploymentsResponse instance + * @returns CVSSv3 instance */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchDeploymentsResponse): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + public static create(properties?: google.cloud.osconfig.v1.ICVSSv3): google.cloud.osconfig.v1.CVSSv3; /** - * Encodes the specified ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. - * @param message ListPatchDeploymentsResponse message or plain object to encode + * Encodes the specified CVSSv3 message. Does not implicitly {@link google.cloud.osconfig.v1.CVSSv3.verify|verify} messages. + * @param message CVSSv3 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. - * @param message ListPatchDeploymentsResponse message or plain object to encode + * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CVSSv3.verify|verify} messages. + * @param message CVSSv3 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. + * Decodes a CVSSv3 message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPatchDeploymentsResponse + * @returns CVSSv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CVSSv3; /** - * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. + * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPatchDeploymentsResponse + * @returns CVSSv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CVSSv3; /** - * Verifies a ListPatchDeploymentsResponse message. + * Verifies a CVSSv3 message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPatchDeploymentsResponse + * @returns CVSSv3 */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchDeploymentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CVSSv3; /** - * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListPatchDeploymentsResponse + * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. + * @param message CVSSv3 * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1.CVSSv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPatchDeploymentsResponse to JSON. + * Converts this CVSSv3 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeletePatchDeploymentRequest. */ - interface IDeletePatchDeploymentRequest { + namespace CVSSv3 { - /** DeletePatchDeploymentRequest name */ - name?: (string|null); - } + /** AttackVector enum. */ + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0, + ATTACK_VECTOR_NETWORK = 1, + ATTACK_VECTOR_ADJACENT = 2, + ATTACK_VECTOR_LOCAL = 3, + ATTACK_VECTOR_PHYSICAL = 4 + } - /** Represents a DeletePatchDeploymentRequest. */ - class DeletePatchDeploymentRequest implements IDeletePatchDeploymentRequest { + /** AttackComplexity enum. */ + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0, + ATTACK_COMPLEXITY_LOW = 1, + ATTACK_COMPLEXITY_HIGH = 2 + } - /** - * Constructs a new DeletePatchDeploymentRequest. + /** PrivilegesRequired enum. */ + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0, + PRIVILEGES_REQUIRED_NONE = 1, + PRIVILEGES_REQUIRED_LOW = 2, + PRIVILEGES_REQUIRED_HIGH = 3 + } + + /** UserInteraction enum. */ + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0, + USER_INTERACTION_NONE = 1, + USER_INTERACTION_REQUIRED = 2 + } + + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + SCOPE_UNCHANGED = 1, + SCOPE_CHANGED = 2 + } + + /** Impact enum. */ + enum Impact { + IMPACT_UNSPECIFIED = 0, + IMPACT_HIGH = 1, + IMPACT_LOW = 2, + IMPACT_NONE = 3 + } + } + } + + /** Namespace v1alpha. */ + namespace v1alpha { + + /** Properties of a OSPolicyResourceConfigStep. */ + interface IOSPolicyResourceConfigStep { + + /** OSPolicyResourceConfigStep type */ + type?: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|null); + + /** OSPolicyResourceConfigStep outcome */ + outcome?: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|null); + + /** OSPolicyResourceConfigStep errorMessage */ + errorMessage?: (string|null); + } + + /** Represents a OSPolicyResourceConfigStep. */ + class OSPolicyResourceConfigStep implements IOSPolicyResourceConfigStep { + + /** + * Constructs a new OSPolicyResourceConfigStep. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest); + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep); - /** DeletePatchDeploymentRequest name. */ - public name: string; + /** OSPolicyResourceConfigStep type. */ + public type: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type); + + /** OSPolicyResourceConfigStep outcome. */ + public outcome: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome); + + /** OSPolicyResourceConfigStep errorMessage. */ + public errorMessage: string; /** - * Creates a new DeletePatchDeploymentRequest instance using the specified properties. + * Creates a new OSPolicyResourceConfigStep instance using the specified properties. * @param [properties] Properties to set - * @returns DeletePatchDeploymentRequest instance + * @returns OSPolicyResourceConfigStep instance */ - public static create(properties?: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; /** - * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. - * @param message DeletePatchDeploymentRequest message or plain object to encode + * Encodes the specified OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. + * @param message OSPolicyResourceConfigStep message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. - * @param message DeletePatchDeploymentRequest message or plain object to encode + * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. + * @param message OSPolicyResourceConfigStep message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeletePatchDeploymentRequest + * @returns OSPolicyResourceConfigStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; /** - * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeletePatchDeploymentRequest + * @returns OSPolicyResourceConfigStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; /** - * Verifies a DeletePatchDeploymentRequest message. + * Verifies a OSPolicyResourceConfigStep message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeletePatchDeploymentRequest + * @returns OSPolicyResourceConfigStep */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.DeletePatchDeploymentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; /** - * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. - * @param message DeletePatchDeploymentRequest + * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. + * @param message OSPolicyResourceConfigStep * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.DeletePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeletePatchDeploymentRequest to JSON. + * Converts this OSPolicyResourceConfigStep to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecutePatchJobRequest. */ - interface IExecutePatchJobRequest { - - /** ExecutePatchJobRequest parent */ - parent?: (string|null); + namespace OSPolicyResourceConfigStep { - /** ExecutePatchJobRequest description */ - description?: (string|null); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + VALIDATION = 1, + DESIRED_STATE_CHECK = 2, + DESIRED_STATE_ENFORCEMENT = 3, + DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4 + } - /** ExecutePatchJobRequest instanceFilter */ - instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** Outcome enum. */ + enum Outcome { + OUTCOME_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2 + } + } - /** ExecutePatchJobRequest patchConfig */ - patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** Properties of a OSPolicyResourceCompliance. */ + interface IOSPolicyResourceCompliance { - /** ExecutePatchJobRequest duration */ - duration?: (google.protobuf.IDuration|null); + /** OSPolicyResourceCompliance osPolicyResourceId */ + osPolicyResourceId?: (string|null); - /** ExecutePatchJobRequest dryRun */ - dryRun?: (boolean|null); + /** OSPolicyResourceCompliance configSteps */ + configSteps?: (google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep[]|null); - /** ExecutePatchJobRequest displayName */ - displayName?: (string|null); + /** OSPolicyResourceCompliance state */ + state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); - /** ExecutePatchJobRequest rollout */ - rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + /** OSPolicyResourceCompliance execResourceOutput */ + execResourceOutput?: (google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null); } - /** Represents an ExecutePatchJobRequest. */ - class ExecutePatchJobRequest implements IExecutePatchJobRequest { + /** Represents a OSPolicyResourceCompliance. */ + class OSPolicyResourceCompliance implements IOSPolicyResourceCompliance { /** - * Constructs a new ExecutePatchJobRequest. + * Constructs a new OSPolicyResourceCompliance. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest); - - /** ExecutePatchJobRequest parent. */ - public parent: string; - - /** ExecutePatchJobRequest description. */ - public description: string; - - /** ExecutePatchJobRequest instanceFilter. */ - public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance); - /** ExecutePatchJobRequest patchConfig. */ - public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** OSPolicyResourceCompliance osPolicyResourceId. */ + public osPolicyResourceId: string; - /** ExecutePatchJobRequest duration. */ - public duration?: (google.protobuf.IDuration|null); + /** OSPolicyResourceCompliance configSteps. */ + public configSteps: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep[]; - /** ExecutePatchJobRequest dryRun. */ - public dryRun: boolean; + /** OSPolicyResourceCompliance state. */ + public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); - /** ExecutePatchJobRequest displayName. */ - public displayName: string; + /** OSPolicyResourceCompliance execResourceOutput. */ + public execResourceOutput?: (google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null); - /** ExecutePatchJobRequest rollout. */ - public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + /** OSPolicyResourceCompliance output. */ + public output?: "execResourceOutput"; /** - * Creates a new ExecutePatchJobRequest instance using the specified properties. + * Creates a new OSPolicyResourceCompliance instance using the specified properties. * @param [properties] Properties to set - * @returns ExecutePatchJobRequest instance + * @returns OSPolicyResourceCompliance instance */ - public static create(properties?: google.cloud.osconfig.v1.IExecutePatchJobRequest): google.cloud.osconfig.v1.ExecutePatchJobRequest; + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; /** - * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. - * @param message ExecutePatchJobRequest message or plain object to encode + * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. + * @param message OSPolicyResourceCompliance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. - * @param message ExecutePatchJobRequest message or plain object to encode + * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. + * @param message OSPolicyResourceCompliance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IExecutePatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecutePatchJobRequest + * @returns OSPolicyResourceCompliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecutePatchJobRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; /** - * Decodes an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecutePatchJobRequest + * @returns OSPolicyResourceCompliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecutePatchJobRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; /** - * Verifies an ExecutePatchJobRequest message. + * Verifies a OSPolicyResourceCompliance message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecutePatchJobRequest + * @returns OSPolicyResourceCompliance */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecutePatchJobRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; /** - * Creates a plain object from an ExecutePatchJobRequest message. Also converts values to other types if specified. - * @param message ExecutePatchJobRequest + * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. + * @param message OSPolicyResourceCompliance * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ExecutePatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecutePatchJobRequest to JSON. + * Converts this OSPolicyResourceCompliance to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetPatchJobRequest. */ - interface IGetPatchJobRequest { + namespace OSPolicyResourceCompliance { - /** GetPatchJobRequest name */ - name?: (string|null); - } + /** Properties of an ExecResourceOutput. */ + interface IExecResourceOutput { - /** Represents a GetPatchJobRequest. */ - class GetPatchJobRequest implements IGetPatchJobRequest { + /** ExecResourceOutput enforcementOutput */ + enforcementOutput?: (Uint8Array|string|null); + } - /** - * Constructs a new GetPatchJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest); + /** Represents an ExecResourceOutput. */ + class ExecResourceOutput implements IExecResourceOutput { - /** GetPatchJobRequest name. */ - public name: string; + /** + * Constructs a new ExecResourceOutput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput); - /** - * Creates a new GetPatchJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPatchJobRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.IGetPatchJobRequest): google.cloud.osconfig.v1.GetPatchJobRequest; + /** ExecResourceOutput enforcementOutput. */ + public enforcementOutput: (Uint8Array|string); - /** - * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. - * @param message GetPatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IGetPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ExecResourceOutput instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecResourceOutput instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; - /** - * Encodes the specified GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. - * @param message GetPatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IGetPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @param message ExecResourceOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a GetPatchJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetPatchJobRequest; + /** + * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @param message ExecResourceOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetPatchJobRequest; + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; - /** - * Verifies a GetPatchJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; - /** - * Creates a GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPatchJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetPatchJobRequest; + /** + * Verifies an ExecResourceOutput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. - * @param message GetPatchJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.GetPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecResourceOutput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; - /** - * Converts this GetPatchJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. + * @param message ExecResourceOutput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecResourceOutput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Properties of a ListPatchJobInstanceDetailsRequest. */ - interface IListPatchJobInstanceDetailsRequest { + /** OSPolicyComplianceState enum. */ + enum OSPolicyComplianceState { + OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0, + COMPLIANT = 1, + NON_COMPLIANT = 2, + UNKNOWN = 3, + NO_OS_POLICIES_APPLICABLE = 4 + } - /** ListPatchJobInstanceDetailsRequest parent */ - parent?: (string|null); + /** Properties of an InstanceOSPoliciesCompliance. */ + interface IInstanceOSPoliciesCompliance { - /** ListPatchJobInstanceDetailsRequest pageSize */ - pageSize?: (number|null); + /** InstanceOSPoliciesCompliance name */ + name?: (string|null); - /** ListPatchJobInstanceDetailsRequest pageToken */ - pageToken?: (string|null); + /** InstanceOSPoliciesCompliance instance */ + instance?: (string|null); - /** ListPatchJobInstanceDetailsRequest filter */ - filter?: (string|null); + /** InstanceOSPoliciesCompliance state */ + state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); + + /** InstanceOSPoliciesCompliance detailedState */ + detailedState?: (string|null); + + /** InstanceOSPoliciesCompliance detailedStateReason */ + detailedStateReason?: (string|null); + + /** InstanceOSPoliciesCompliance osPolicyCompliances */ + osPolicyCompliances?: (google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance[]|null); + + /** InstanceOSPoliciesCompliance lastComplianceCheckTime */ + lastComplianceCheckTime?: (google.protobuf.ITimestamp|null); + + /** InstanceOSPoliciesCompliance lastComplianceRunId */ + lastComplianceRunId?: (string|null); } - /** Represents a ListPatchJobInstanceDetailsRequest. */ - class ListPatchJobInstanceDetailsRequest implements IListPatchJobInstanceDetailsRequest { + /** Represents an InstanceOSPoliciesCompliance. */ + class InstanceOSPoliciesCompliance implements IInstanceOSPoliciesCompliance { /** - * Constructs a new ListPatchJobInstanceDetailsRequest. + * Constructs a new InstanceOSPoliciesCompliance. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest); + constructor(properties?: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance); - /** ListPatchJobInstanceDetailsRequest parent. */ - public parent: string; + /** InstanceOSPoliciesCompliance name. */ + public name: string; - /** ListPatchJobInstanceDetailsRequest pageSize. */ - public pageSize: number; + /** InstanceOSPoliciesCompliance instance. */ + public instance: string; - /** ListPatchJobInstanceDetailsRequest pageToken. */ - public pageToken: string; + /** InstanceOSPoliciesCompliance state. */ + public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); - /** ListPatchJobInstanceDetailsRequest filter. */ - public filter: string; + /** InstanceOSPoliciesCompliance detailedState. */ + public detailedState: string; + + /** InstanceOSPoliciesCompliance detailedStateReason. */ + public detailedStateReason: string; + + /** InstanceOSPoliciesCompliance osPolicyCompliances. */ + public osPolicyCompliances: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance[]; + + /** InstanceOSPoliciesCompliance lastComplianceCheckTime. */ + public lastComplianceCheckTime?: (google.protobuf.ITimestamp|null); + + /** InstanceOSPoliciesCompliance lastComplianceRunId. */ + public lastComplianceRunId: string; /** - * Creates a new ListPatchJobInstanceDetailsRequest instance using the specified properties. + * Creates a new InstanceOSPoliciesCompliance instance using the specified properties. * @param [properties] Properties to set - * @returns ListPatchJobInstanceDetailsRequest instance + * @returns InstanceOSPoliciesCompliance instance */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + public static create(properties?: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; /** - * Encodes the specified ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. - * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode + * Encodes the specified InstanceOSPoliciesCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. + * @param message InstanceOSPoliciesCompliance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. - * @param message ListPatchJobInstanceDetailsRequest message or plain object to encode + * Encodes the specified InstanceOSPoliciesCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. + * @param message InstanceOSPoliciesCompliance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. + * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPatchJobInstanceDetailsRequest + * @returns InstanceOSPoliciesCompliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; /** - * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. + * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPatchJobInstanceDetailsRequest + * @returns InstanceOSPoliciesCompliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; /** - * Verifies a ListPatchJobInstanceDetailsRequest message. + * Verifies an InstanceOSPoliciesCompliance message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InstanceOSPoliciesCompliance message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPatchJobInstanceDetailsRequest + * @returns InstanceOSPoliciesCompliance */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; /** - * Creates a plain object from a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. - * @param message ListPatchJobInstanceDetailsRequest + * Creates a plain object from an InstanceOSPoliciesCompliance message. Also converts values to other types if specified. + * @param message InstanceOSPoliciesCompliance * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPatchJobInstanceDetailsRequest to JSON. + * Converts this InstanceOSPoliciesCompliance to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListPatchJobInstanceDetailsResponse. */ - interface IListPatchJobInstanceDetailsResponse { + namespace InstanceOSPoliciesCompliance { - /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails */ - patchJobInstanceDetails?: (google.cloud.osconfig.v1.IPatchJobInstanceDetails[]|null); + /** Properties of a OSPolicyCompliance. */ + interface IOSPolicyCompliance { - /** ListPatchJobInstanceDetailsResponse nextPageToken */ - nextPageToken?: (string|null); + /** OSPolicyCompliance osPolicyId */ + osPolicyId?: (string|null); + + /** OSPolicyCompliance osPolicyAssignment */ + osPolicyAssignment?: (string|null); + + /** OSPolicyCompliance state */ + state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); + + /** OSPolicyCompliance osPolicyResourceCompliances */ + osPolicyResourceCompliances?: (google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance[]|null); + } + + /** Represents a OSPolicyCompliance. */ + class OSPolicyCompliance implements IOSPolicyCompliance { + + /** + * Constructs a new OSPolicyCompliance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance); + + /** OSPolicyCompliance osPolicyId. */ + public osPolicyId: string; + + /** OSPolicyCompliance osPolicyAssignment. */ + public osPolicyAssignment: string; + + /** OSPolicyCompliance state. */ + public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); + + /** OSPolicyCompliance osPolicyResourceCompliances. */ + public osPolicyResourceCompliances: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance[]; + + /** + * Creates a new OSPolicyCompliance instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyCompliance instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + + /** + * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. + * @param message OSPolicyCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. + * @param message OSPolicyCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + + /** + * Verifies a OSPolicyCompliance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyCompliance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + + /** + * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. + * @param message OSPolicyCompliance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyCompliance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a ListPatchJobInstanceDetailsResponse. */ - class ListPatchJobInstanceDetailsResponse implements IListPatchJobInstanceDetailsResponse { + /** Properties of a GetInstanceOSPoliciesComplianceRequest. */ + interface IGetInstanceOSPoliciesComplianceRequest { + + /** GetInstanceOSPoliciesComplianceRequest name */ + name?: (string|null); + } + + /** Represents a GetInstanceOSPoliciesComplianceRequest. */ + class GetInstanceOSPoliciesComplianceRequest implements IGetInstanceOSPoliciesComplianceRequest { /** - * Constructs a new ListPatchJobInstanceDetailsResponse. + * Constructs a new GetInstanceOSPoliciesComplianceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse); - - /** ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. */ - public patchJobInstanceDetails: google.cloud.osconfig.v1.IPatchJobInstanceDetails[]; + constructor(properties?: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest); - /** ListPatchJobInstanceDetailsResponse nextPageToken. */ - public nextPageToken: string; + /** GetInstanceOSPoliciesComplianceRequest name. */ + public name: string; /** - * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. + * Creates a new GetInstanceOSPoliciesComplianceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListPatchJobInstanceDetailsResponse instance + * @returns GetInstanceOSPoliciesComplianceRequest instance */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + public static create(properties?: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; /** - * Encodes the specified ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. - * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode + * Encodes the specified GetInstanceOSPoliciesComplianceRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. + * @param message GetInstanceOSPoliciesComplianceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. - * @param message ListPatchJobInstanceDetailsResponse message or plain object to encode + * Encodes the specified GetInstanceOSPoliciesComplianceRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. + * @param message GetInstanceOSPoliciesComplianceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. + * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPatchJobInstanceDetailsResponse + * @returns GetInstanceOSPoliciesComplianceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; /** - * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPatchJobInstanceDetailsResponse + * @returns GetInstanceOSPoliciesComplianceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; /** - * Verifies a ListPatchJobInstanceDetailsResponse message. + * Verifies a GetInstanceOSPoliciesComplianceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetInstanceOSPoliciesComplianceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPatchJobInstanceDetailsResponse + * @returns GetInstanceOSPoliciesComplianceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; /** - * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. - * @param message ListPatchJobInstanceDetailsResponse + * Creates a plain object from a GetInstanceOSPoliciesComplianceRequest message. Also converts values to other types if specified. + * @param message GetInstanceOSPoliciesComplianceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPatchJobInstanceDetailsResponse to JSON. + * Converts this GetInstanceOSPoliciesComplianceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PatchJobInstanceDetails. */ - interface IPatchJobInstanceDetails { - - /** PatchJobInstanceDetails name */ - name?: (string|null); + /** Properties of a ListInstanceOSPoliciesCompliancesRequest. */ + interface IListInstanceOSPoliciesCompliancesRequest { - /** PatchJobInstanceDetails instanceSystemId */ - instanceSystemId?: (string|null); + /** ListInstanceOSPoliciesCompliancesRequest parent */ + parent?: (string|null); - /** PatchJobInstanceDetails state */ - state?: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState|null); + /** ListInstanceOSPoliciesCompliancesRequest pageSize */ + pageSize?: (number|null); - /** PatchJobInstanceDetails failureReason */ - failureReason?: (string|null); + /** ListInstanceOSPoliciesCompliancesRequest pageToken */ + pageToken?: (string|null); - /** PatchJobInstanceDetails attemptCount */ - attemptCount?: (number|Long|string|null); + /** ListInstanceOSPoliciesCompliancesRequest filter */ + filter?: (string|null); } - /** Represents a PatchJobInstanceDetails. */ - class PatchJobInstanceDetails implements IPatchJobInstanceDetails { + /** Represents a ListInstanceOSPoliciesCompliancesRequest. */ + class ListInstanceOSPoliciesCompliancesRequest implements IListInstanceOSPoliciesCompliancesRequest { /** - * Constructs a new PatchJobInstanceDetails. + * Constructs a new ListInstanceOSPoliciesCompliancesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails); - - /** PatchJobInstanceDetails name. */ - public name: string; + constructor(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest); - /** PatchJobInstanceDetails instanceSystemId. */ - public instanceSystemId: string; + /** ListInstanceOSPoliciesCompliancesRequest parent. */ + public parent: string; - /** PatchJobInstanceDetails state. */ - public state: (google.cloud.osconfig.v1.Instance.PatchState|keyof typeof google.cloud.osconfig.v1.Instance.PatchState); + /** ListInstanceOSPoliciesCompliancesRequest pageSize. */ + public pageSize: number; - /** PatchJobInstanceDetails failureReason. */ - public failureReason: string; + /** ListInstanceOSPoliciesCompliancesRequest pageToken. */ + public pageToken: string; - /** PatchJobInstanceDetails attemptCount. */ - public attemptCount: (number|Long|string); + /** ListInstanceOSPoliciesCompliancesRequest filter. */ + public filter: string; /** - * Creates a new PatchJobInstanceDetails instance using the specified properties. + * Creates a new ListInstanceOSPoliciesCompliancesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PatchJobInstanceDetails instance + * @returns ListInstanceOSPoliciesCompliancesRequest instance */ - public static create(properties?: google.cloud.osconfig.v1.IPatchJobInstanceDetails): google.cloud.osconfig.v1.PatchJobInstanceDetails; + public static create(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; /** - * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. - * @param message PatchJobInstanceDetails message or plain object to encode + * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. + * @param message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. - * @param message PatchJobInstanceDetails message or plain object to encode + * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. + * @param message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJobInstanceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. + * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PatchJobInstanceDetails + * @returns ListInstanceOSPoliciesCompliancesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJobInstanceDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; /** - * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. + * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PatchJobInstanceDetails + * @returns ListInstanceOSPoliciesCompliancesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJobInstanceDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; /** - * Verifies a PatchJobInstanceDetails message. + * Verifies a ListInstanceOSPoliciesCompliancesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. + * Creates a ListInstanceOSPoliciesCompliancesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PatchJobInstanceDetails + * @returns ListInstanceOSPoliciesCompliancesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJobInstanceDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; /** - * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. - * @param message PatchJobInstanceDetails + * Creates a plain object from a ListInstanceOSPoliciesCompliancesRequest message. Also converts values to other types if specified. + * @param message ListInstanceOSPoliciesCompliancesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.PatchJobInstanceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PatchJobInstanceDetails to JSON. + * Converts this ListInstanceOSPoliciesCompliancesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListPatchJobsRequest. */ - interface IListPatchJobsRequest { - - /** ListPatchJobsRequest parent */ - parent?: (string|null); - - /** ListPatchJobsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a ListInstanceOSPoliciesCompliancesResponse. */ + interface IListInstanceOSPoliciesCompliancesResponse { - /** ListPatchJobsRequest pageToken */ - pageToken?: (string|null); + /** ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances */ + instanceOsPoliciesCompliances?: (google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[]|null); - /** ListPatchJobsRequest filter */ - filter?: (string|null); + /** ListInstanceOSPoliciesCompliancesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListPatchJobsRequest. */ - class ListPatchJobsRequest implements IListPatchJobsRequest { + /** Represents a ListInstanceOSPoliciesCompliancesResponse. */ + class ListInstanceOSPoliciesCompliancesResponse implements IListInstanceOSPoliciesCompliancesResponse { /** - * Constructs a new ListPatchJobsRequest. + * Constructs a new ListInstanceOSPoliciesCompliancesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest); - - /** ListPatchJobsRequest parent. */ - public parent: string; - - /** ListPatchJobsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse); - /** ListPatchJobsRequest pageToken. */ - public pageToken: string; + /** ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances. */ + public instanceOsPoliciesCompliances: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[]; - /** ListPatchJobsRequest filter. */ - public filter: string; + /** ListInstanceOSPoliciesCompliancesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListPatchJobsRequest instance using the specified properties. + * Creates a new ListInstanceOSPoliciesCompliancesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListPatchJobsRequest instance + * @returns ListInstanceOSPoliciesCompliancesResponse instance */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsRequest): google.cloud.osconfig.v1.ListPatchJobsRequest; + public static create(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; /** - * Encodes the specified ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. - * @param message ListPatchJobsRequest message or plain object to encode + * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. + * @param message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IListPatchJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. - * @param message ListPatchJobsRequest message or plain object to encode + * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. + * @param message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPatchJobsRequest message from the specified reader or buffer. + * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPatchJobsRequest + * @returns ListInstanceOSPoliciesCompliancesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; /** - * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPatchJobsRequest + * @returns ListInstanceOSPoliciesCompliancesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; /** - * Verifies a ListPatchJobsRequest message. + * Verifies a ListInstanceOSPoliciesCompliancesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListInstanceOSPoliciesCompliancesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPatchJobsRequest + * @returns ListInstanceOSPoliciesCompliancesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; /** - * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. - * @param message ListPatchJobsRequest + * Creates a plain object from a ListInstanceOSPoliciesCompliancesResponse message. Also converts values to other types if specified. + * @param message ListInstanceOSPoliciesCompliancesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPatchJobsRequest to JSON. + * Converts this ListInstanceOSPoliciesCompliancesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListPatchJobsResponse. */ - interface IListPatchJobsResponse { + /** Properties of an Inventory. */ + interface IInventory { - /** ListPatchJobsResponse patchJobs */ - patchJobs?: (google.cloud.osconfig.v1.IPatchJob[]|null); + /** Inventory name */ + name?: (string|null); - /** ListPatchJobsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Inventory osInfo */ + osInfo?: (google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null); + + /** Inventory items */ + items?: ({ [k: string]: google.cloud.osconfig.v1alpha.Inventory.IItem }|null); + + /** Inventory updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListPatchJobsResponse. */ - class ListPatchJobsResponse implements IListPatchJobsResponse { + /** Represents an Inventory. */ + class Inventory implements IInventory { /** - * Constructs a new ListPatchJobsResponse. + * Constructs a new Inventory. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse); + constructor(properties?: google.cloud.osconfig.v1alpha.IInventory); - /** ListPatchJobsResponse patchJobs. */ - public patchJobs: google.cloud.osconfig.v1.IPatchJob[]; + /** Inventory name. */ + public name: string; - /** ListPatchJobsResponse nextPageToken. */ - public nextPageToken: string; + /** Inventory osInfo. */ + public osInfo?: (google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null); + + /** Inventory items. */ + public items: { [k: string]: google.cloud.osconfig.v1alpha.Inventory.IItem }; + + /** Inventory updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListPatchJobsResponse instance using the specified properties. + * Creates a new Inventory instance using the specified properties. * @param [properties] Properties to set - * @returns ListPatchJobsResponse instance + * @returns Inventory instance */ - public static create(properties?: google.cloud.osconfig.v1.IListPatchJobsResponse): google.cloud.osconfig.v1.ListPatchJobsResponse; + public static create(properties?: google.cloud.osconfig.v1alpha.IInventory): google.cloud.osconfig.v1alpha.Inventory; /** - * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. - * @param message ListPatchJobsResponse message or plain object to encode + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. - * @param message ListPatchJobsResponse message or plain object to encode + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IListPatchJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPatchJobsResponse message from the specified reader or buffer. + * Decodes an Inventory message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPatchJobsResponse + * @returns Inventory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListPatchJobsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory; /** - * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. + * Decodes an Inventory message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPatchJobsResponse + * @returns Inventory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListPatchJobsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory; /** - * Verifies a ListPatchJobsResponse message. + * Verifies an Inventory message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPatchJobsResponse + * @returns Inventory */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListPatchJobsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory; /** - * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. - * @param message ListPatchJobsResponse + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @param message Inventory * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ListPatchJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPatchJobsResponse to JSON. + * Converts this Inventory to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PatchJob. */ - interface IPatchJob { + namespace Inventory { - /** PatchJob name */ - name?: (string|null); + /** Properties of an OsInfo. */ + interface IOsInfo { - /** PatchJob displayName */ - displayName?: (string|null); + /** OsInfo hostname */ + hostname?: (string|null); - /** PatchJob description */ - description?: (string|null); + /** OsInfo longName */ + longName?: (string|null); - /** PatchJob createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** OsInfo shortName */ + shortName?: (string|null); - /** PatchJob updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** OsInfo version */ + version?: (string|null); - /** PatchJob state */ - state?: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State|null); + /** OsInfo architecture */ + architecture?: (string|null); - /** PatchJob instanceFilter */ - instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** OsInfo kernelVersion */ + kernelVersion?: (string|null); - /** PatchJob patchConfig */ - patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** OsInfo kernelRelease */ + kernelRelease?: (string|null); - /** PatchJob duration */ - duration?: (google.protobuf.IDuration|null); + /** OsInfo osconfigAgentVersion */ + osconfigAgentVersion?: (string|null); + } - /** PatchJob instanceDetailsSummary */ - instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); + /** Represents an OsInfo. */ + class OsInfo implements IOsInfo { - /** PatchJob dryRun */ - dryRun?: (boolean|null); + /** + * Constructs a new OsInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IOsInfo); - /** PatchJob errorMessage */ - errorMessage?: (string|null); + /** OsInfo hostname. */ + public hostname: string; - /** PatchJob percentComplete */ - percentComplete?: (number|null); + /** OsInfo longName. */ + public longName: string; - /** PatchJob patchDeployment */ - patchDeployment?: (string|null); - - /** PatchJob rollout */ - rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); - } + /** OsInfo shortName. */ + public shortName: string; - /** Represents a PatchJob. */ - class PatchJob implements IPatchJob { + /** OsInfo version. */ + public version: string; - /** - * Constructs a new PatchJob. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IPatchJob); + /** OsInfo architecture. */ + public architecture: string; - /** PatchJob name. */ - public name: string; + /** OsInfo kernelVersion. */ + public kernelVersion: string; - /** PatchJob displayName. */ - public displayName: string; + /** OsInfo kernelRelease. */ + public kernelRelease: string; - /** PatchJob description. */ - public description: string; + /** OsInfo osconfigAgentVersion. */ + public osconfigAgentVersion: string; - /** PatchJob createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new OsInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OsInfo instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IOsInfo): google.cloud.osconfig.v1alpha.Inventory.OsInfo; - /** PatchJob updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * @param message OsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** PatchJob state. */ - public state: (google.cloud.osconfig.v1.PatchJob.State|keyof typeof google.cloud.osconfig.v1.PatchJob.State); + /** + * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * @param message OsInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** PatchJob instanceFilter. */ - public instanceFilter?: (google.cloud.osconfig.v1.IPatchInstanceFilter|null); + /** + * Decodes an OsInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.OsInfo; - /** PatchJob patchConfig. */ - public patchConfig?: (google.cloud.osconfig.v1.IPatchConfig|null); + /** + * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.OsInfo; - /** PatchJob duration. */ - public duration?: (google.protobuf.IDuration|null); + /** + * Verifies an OsInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** PatchJob instanceDetailsSummary. */ - public instanceDetailsSummary?: (google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null); + /** + * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OsInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.OsInfo; - /** PatchJob dryRun. */ - public dryRun: boolean; + /** + * Creates a plain object from an OsInfo message. Also converts values to other types if specified. + * @param message OsInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.OsInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** PatchJob errorMessage. */ - public errorMessage: string; + /** + * Converts this OsInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** PatchJob percentComplete. */ - public percentComplete: number; + /** Properties of an Item. */ + interface IItem { - /** PatchJob patchDeployment. */ - public patchDeployment: string; + /** Item id */ + id?: (string|null); - /** PatchJob rollout. */ - public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + /** Item originType */ + originType?: (google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|null); - /** - * Creates a new PatchJob instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchJob instance - */ - public static create(properties?: google.cloud.osconfig.v1.IPatchJob): google.cloud.osconfig.v1.PatchJob; + /** Item createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. - * @param message PatchJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; + /** Item updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. - * @param message PatchJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchJob, writer?: $protobuf.Writer): $protobuf.Writer; + /** Item type */ + type?: (google.cloud.osconfig.v1alpha.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.Type|null); - /** - * Decodes a PatchJob message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob; + /** Item installedPackage */ + installedPackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); - /** - * Decodes a PatchJob message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob; + /** Item availablePackage */ + availablePackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); + } - /** - * Verifies a PatchJob message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents an Item. */ + class Item implements IItem { - /** - * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchJob - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob; + /** + * Constructs a new Item. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IItem); - /** - * Creates a plain object from a PatchJob message. Also converts values to other types if specified. - * @param message PatchJob - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Item id. */ + public id: string; - /** - * Converts this PatchJob to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Item originType. */ + public originType: (google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.OriginType); - namespace PatchJob { + /** Item createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** Properties of an InstanceDetailsSummary. */ - interface IInstanceDetailsSummary { + /** Item updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** InstanceDetailsSummary pendingInstanceCount */ - pendingInstanceCount?: (number|Long|string|null); + /** Item type. */ + public type: (google.cloud.osconfig.v1alpha.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.Type); - /** InstanceDetailsSummary inactiveInstanceCount */ - inactiveInstanceCount?: (number|Long|string|null); + /** Item installedPackage. */ + public installedPackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); - /** InstanceDetailsSummary notifiedInstanceCount */ - notifiedInstanceCount?: (number|Long|string|null); + /** Item availablePackage. */ + public availablePackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); - /** InstanceDetailsSummary startedInstanceCount */ - startedInstanceCount?: (number|Long|string|null); + /** Item details. */ + public details?: ("installedPackage"|"availablePackage"); - /** InstanceDetailsSummary downloadingPatchesInstanceCount */ - downloadingPatchesInstanceCount?: (number|Long|string|null); + /** + * Creates a new Item instance using the specified properties. + * @param [properties] Properties to set + * @returns Item instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IItem): google.cloud.osconfig.v1alpha.Inventory.Item; - /** InstanceDetailsSummary applyingPatchesInstanceCount */ - applyingPatchesInstanceCount?: (number|Long|string|null); + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; - /** InstanceDetailsSummary rebootingInstanceCount */ - rebootingInstanceCount?: (number|Long|string|null); + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; - /** InstanceDetailsSummary succeededInstanceCount */ - succeededInstanceCount?: (number|Long|string|null); + /** + * Decodes an Item message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.Item; - /** InstanceDetailsSummary succeededRebootRequiredInstanceCount */ - succeededRebootRequiredInstanceCount?: (number|Long|string|null); + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.Item; - /** InstanceDetailsSummary failedInstanceCount */ - failedInstanceCount?: (number|Long|string|null); + /** + * Verifies an Item message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** InstanceDetailsSummary ackedInstanceCount */ - ackedInstanceCount?: (number|Long|string|null); + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Item + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.Item; - /** InstanceDetailsSummary timedOutInstanceCount */ - timedOutInstanceCount?: (number|Long|string|null); + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @param message Item + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** InstanceDetailsSummary prePatchStepInstanceCount */ - prePatchStepInstanceCount?: (number|Long|string|null); + /** + * Converts this Item to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** InstanceDetailsSummary postPatchStepInstanceCount */ - postPatchStepInstanceCount?: (number|Long|string|null); + namespace Item { - /** InstanceDetailsSummary noAgentDetectedInstanceCount */ - noAgentDetectedInstanceCount?: (number|Long|string|null); + /** OriginType enum. */ + enum OriginType { + ORIGIN_TYPE_UNSPECIFIED = 0, + INVENTORY_REPORT = 1 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + INSTALLED_PACKAGE = 1, + AVAILABLE_PACKAGE = 2 + } } - /** Represents an InstanceDetailsSummary. */ - class InstanceDetailsSummary implements IInstanceDetailsSummary { + /** Properties of a SoftwarePackage. */ + interface ISoftwarePackage { - /** - * Constructs a new InstanceDetailsSummary. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary); + /** SoftwarePackage yumPackage */ + yumPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - /** InstanceDetailsSummary pendingInstanceCount. */ - public pendingInstanceCount: (number|Long|string); + /** SoftwarePackage aptPackage */ + aptPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - /** InstanceDetailsSummary inactiveInstanceCount. */ - public inactiveInstanceCount: (number|Long|string); + /** SoftwarePackage zypperPackage */ + zypperPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - /** InstanceDetailsSummary notifiedInstanceCount. */ - public notifiedInstanceCount: (number|Long|string); + /** SoftwarePackage googetPackage */ + googetPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - /** InstanceDetailsSummary startedInstanceCount. */ - public startedInstanceCount: (number|Long|string); + /** SoftwarePackage zypperPatch */ + zypperPatch?: (google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null); - /** InstanceDetailsSummary downloadingPatchesInstanceCount. */ - public downloadingPatchesInstanceCount: (number|Long|string); + /** SoftwarePackage wuaPackage */ + wuaPackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null); - /** InstanceDetailsSummary applyingPatchesInstanceCount. */ - public applyingPatchesInstanceCount: (number|Long|string); + /** SoftwarePackage qfePackage */ + qfePackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null); - /** InstanceDetailsSummary rebootingInstanceCount. */ - public rebootingInstanceCount: (number|Long|string); + /** SoftwarePackage cosPackage */ + cosPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - /** InstanceDetailsSummary succeededInstanceCount. */ - public succeededInstanceCount: (number|Long|string); + /** SoftwarePackage windowsApplication */ + windowsApplication?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null); + } - /** InstanceDetailsSummary succeededRebootRequiredInstanceCount. */ - public succeededRebootRequiredInstanceCount: (number|Long|string); + /** Represents a SoftwarePackage. */ + class SoftwarePackage implements ISoftwarePackage { - /** InstanceDetailsSummary failedInstanceCount. */ - public failedInstanceCount: (number|Long|string); + /** + * Constructs a new SoftwarePackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage); - /** InstanceDetailsSummary ackedInstanceCount. */ - public ackedInstanceCount: (number|Long|string); + /** SoftwarePackage yumPackage. */ + public yumPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - /** InstanceDetailsSummary timedOutInstanceCount. */ - public timedOutInstanceCount: (number|Long|string); + /** SoftwarePackage aptPackage. */ + public aptPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - /** InstanceDetailsSummary prePatchStepInstanceCount. */ - public prePatchStepInstanceCount: (number|Long|string); + /** SoftwarePackage zypperPackage. */ + public zypperPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - /** InstanceDetailsSummary postPatchStepInstanceCount. */ - public postPatchStepInstanceCount: (number|Long|string); + /** SoftwarePackage googetPackage. */ + public googetPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - /** InstanceDetailsSummary noAgentDetectedInstanceCount. */ - public noAgentDetectedInstanceCount: (number|Long|string); + /** SoftwarePackage zypperPatch. */ + public zypperPatch?: (google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null); + + /** SoftwarePackage wuaPackage. */ + public wuaPackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null); + + /** SoftwarePackage qfePackage. */ + public qfePackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null); + + /** SoftwarePackage cosPackage. */ + public cosPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + + /** SoftwarePackage windowsApplication. */ + public windowsApplication?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null); + + /** SoftwarePackage details. */ + public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"); /** - * Creates a new InstanceDetailsSummary instance using the specified properties. + * Creates a new SoftwarePackage instance using the specified properties. * @param [properties] Properties to set - * @returns InstanceDetailsSummary instance + * @returns SoftwarePackage instance */ - public static create(properties?: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; /** - * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. - * @param message InstanceDetailsSummary message or plain object to encode + * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. + * @param message SoftwarePackage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. - * @param message InstanceDetailsSummary message or plain object to encode + * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. + * @param message SoftwarePackage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InstanceDetailsSummary message from the specified reader or buffer. + * Decodes a SoftwarePackage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InstanceDetailsSummary + * @returns SoftwarePackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; /** - * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. + * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InstanceDetailsSummary + * @returns SoftwarePackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; /** - * Verifies an InstanceDetailsSummary message. + * Verifies a SoftwarePackage message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. + * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InstanceDetailsSummary + * @returns SoftwarePackage */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; /** - * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. - * @param message InstanceDetailsSummary + * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. + * @param message SoftwarePackage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InstanceDetailsSummary to JSON. + * Converts this SoftwarePackage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - STARTED = 1, - INSTANCE_LOOKUP = 2, - PATCHING = 3, - SUCCEEDED = 4, - COMPLETED_WITH_ERRORS = 5, - CANCELED = 6, - TIMED_OUT = 7 - } - } - - /** Properties of a PatchConfig. */ - interface IPatchConfig { + /** Properties of a VersionedPackage. */ + interface IVersionedPackage { - /** PatchConfig rebootConfig */ - rebootConfig?: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig|null); + /** VersionedPackage packageName */ + packageName?: (string|null); - /** PatchConfig apt */ - apt?: (google.cloud.osconfig.v1.IAptSettings|null); + /** VersionedPackage architecture */ + architecture?: (string|null); - /** PatchConfig yum */ - yum?: (google.cloud.osconfig.v1.IYumSettings|null); + /** VersionedPackage version */ + version?: (string|null); + } - /** PatchConfig goo */ - goo?: (google.cloud.osconfig.v1.IGooSettings|null); + /** Represents a VersionedPackage. */ + class VersionedPackage implements IVersionedPackage { - /** PatchConfig zypper */ - zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); + /** + * Constructs a new VersionedPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage); - /** PatchConfig windowsUpdate */ - windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); + /** VersionedPackage packageName. */ + public packageName: string; - /** PatchConfig preStep */ - preStep?: (google.cloud.osconfig.v1.IExecStep|null); + /** VersionedPackage architecture. */ + public architecture: string; - /** PatchConfig postStep */ - postStep?: (google.cloud.osconfig.v1.IExecStep|null); - } + /** VersionedPackage version. */ + public version: string; - /** Represents a PatchConfig. */ - class PatchConfig implements IPatchConfig { + /** + * Creates a new VersionedPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionedPackage instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; - /** - * Constructs a new PatchConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IPatchConfig); + /** + * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. + * @param message VersionedPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** PatchConfig rebootConfig. */ - public rebootConfig: (google.cloud.osconfig.v1.PatchConfig.RebootConfig|keyof typeof google.cloud.osconfig.v1.PatchConfig.RebootConfig); + /** + * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. + * @param message VersionedPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** PatchConfig apt. */ - public apt?: (google.cloud.osconfig.v1.IAptSettings|null); + /** + * Decodes a VersionedPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; - /** PatchConfig yum. */ - public yum?: (google.cloud.osconfig.v1.IYumSettings|null); + /** + * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; - /** PatchConfig goo. */ - public goo?: (google.cloud.osconfig.v1.IGooSettings|null); + /** + * Verifies a VersionedPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** PatchConfig zypper. */ - public zypper?: (google.cloud.osconfig.v1.IZypperSettings|null); + /** + * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionedPackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; - /** PatchConfig windowsUpdate. */ - public windowsUpdate?: (google.cloud.osconfig.v1.IWindowsUpdateSettings|null); + /** + * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. + * @param message VersionedPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** PatchConfig preStep. */ - public preStep?: (google.cloud.osconfig.v1.IExecStep|null); + /** + * Converts this VersionedPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** PatchConfig postStep. */ - public postStep?: (google.cloud.osconfig.v1.IExecStep|null); + /** Properties of a ZypperPatch. */ + interface IZypperPatch { - /** - * Creates a new PatchConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchConfig instance - */ - public static create(properties?: google.cloud.osconfig.v1.IPatchConfig): google.cloud.osconfig.v1.PatchConfig; + /** ZypperPatch patchName */ + patchName?: (string|null); - /** - * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. - * @param message PatchConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** ZypperPatch category */ + category?: (string|null); - /** - * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. - * @param message PatchConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** ZypperPatch severity */ + severity?: (string|null); - /** - * Decodes a PatchConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchConfig; + /** ZypperPatch summary */ + summary?: (string|null); + } - /** - * Decodes a PatchConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchConfig; + /** Represents a ZypperPatch. */ + class ZypperPatch implements IZypperPatch { - /** - * Verifies a PatchConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new ZypperPatch. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch); - /** - * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchConfig; + /** ZypperPatch patchName. */ + public patchName: string; - /** - * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. - * @param message PatchConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ZypperPatch category. */ + public category: string; - /** - * Converts this PatchConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ZypperPatch severity. */ + public severity: string; - namespace PatchConfig { + /** ZypperPatch summary. */ + public summary: string; - /** RebootConfig enum. */ - enum RebootConfig { - REBOOT_CONFIG_UNSPECIFIED = 0, - DEFAULT = 1, - ALWAYS = 2, - NEVER = 3 - } - } + /** + * Creates a new ZypperPatch instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperPatch instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; - /** Properties of an Instance. */ - interface IInstance { - } + /** + * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. + * @param message ZypperPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an Instance. */ - class Instance implements IInstance { + /** + * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. + * @param message ZypperPatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Instance. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IInstance); + /** + * Decodes a ZypperPatch message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; - /** - * Creates a new Instance instance using the specified properties. - * @param [properties] Properties to set - * @returns Instance instance - */ - public static create(properties?: google.cloud.osconfig.v1.IInstance): google.cloud.osconfig.v1.Instance; + /** + * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; - /** - * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. - * @param message Instance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a ZypperPatch message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. - * @param message Instance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Instance message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Instance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.Instance; + /** + * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperPatch + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; - /** - * Decodes an Instance message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Instance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.Instance; + /** + * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. + * @param message ZypperPatch + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.ZypperPatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies an Instance message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this ZypperPatch to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates an Instance message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Instance - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.Instance; + /** Properties of a WindowsUpdatePackage. */ + interface IWindowsUpdatePackage { - /** - * Creates a plain object from an Instance message. Also converts values to other types if specified. - * @param message Instance - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.Instance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** WindowsUpdatePackage title */ + title?: (string|null); - /** - * Converts this Instance to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** WindowsUpdatePackage description */ + description?: (string|null); - namespace Instance { + /** WindowsUpdatePackage categories */ + categories?: (google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]|null); - /** PatchState enum. */ - enum PatchState { - PATCH_STATE_UNSPECIFIED = 0, - PENDING = 1, - INACTIVE = 2, - NOTIFIED = 3, - STARTED = 4, - DOWNLOADING_PATCHES = 5, - APPLYING_PATCHES = 6, - REBOOTING = 7, - SUCCEEDED = 8, - SUCCEEDED_REBOOT_REQUIRED = 9, - FAILED = 10, - ACKED = 11, - TIMED_OUT = 12, - RUNNING_PRE_PATCH_STEP = 13, - RUNNING_POST_PATCH_STEP = 14, - NO_AGENT_DETECTED = 15 - } - } + /** WindowsUpdatePackage kbArticleIds */ + kbArticleIds?: (string[]|null); - /** Properties of a CancelPatchJobRequest. */ - interface ICancelPatchJobRequest { + /** WindowsUpdatePackage supportUrl */ + supportUrl?: (string|null); - /** CancelPatchJobRequest name */ - name?: (string|null); - } + /** WindowsUpdatePackage moreInfoUrls */ + moreInfoUrls?: (string[]|null); - /** Represents a CancelPatchJobRequest. */ - class CancelPatchJobRequest implements ICancelPatchJobRequest { + /** WindowsUpdatePackage updateId */ + updateId?: (string|null); - /** - * Constructs a new CancelPatchJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest); + /** WindowsUpdatePackage revisionNumber */ + revisionNumber?: (number|null); - /** CancelPatchJobRequest name. */ - public name: string; + /** WindowsUpdatePackage lastDeploymentChangeTime */ + lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); + } - /** - * Creates a new CancelPatchJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelPatchJobRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1.ICancelPatchJobRequest): google.cloud.osconfig.v1.CancelPatchJobRequest; + /** Represents a WindowsUpdatePackage. */ + class WindowsUpdatePackage implements IWindowsUpdatePackage { - /** - * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. - * @param message CancelPatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new WindowsUpdatePackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage); - /** - * Encodes the specified CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. - * @param message CancelPatchJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.ICancelPatchJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** WindowsUpdatePackage title. */ + public title: string; - /** - * Decodes a CancelPatchJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CancelPatchJobRequest; + /** WindowsUpdatePackage description. */ + public description: string; - /** - * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelPatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CancelPatchJobRequest; + /** WindowsUpdatePackage categories. */ + public categories: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]; - /** - * Verifies a CancelPatchJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** WindowsUpdatePackage kbArticleIds. */ + public kbArticleIds: string[]; - /** - * Creates a CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelPatchJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CancelPatchJobRequest; + /** WindowsUpdatePackage supportUrl. */ + public supportUrl: string; - /** - * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. - * @param message CancelPatchJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.CancelPatchJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** WindowsUpdatePackage moreInfoUrls. */ + public moreInfoUrls: string[]; - /** - * Converts this CancelPatchJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** WindowsUpdatePackage updateId. */ + public updateId: string; - /** Properties of an AptSettings. */ - interface IAptSettings { + /** WindowsUpdatePackage revisionNumber. */ + public revisionNumber: number; - /** AptSettings type */ - type?: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type|null); + /** WindowsUpdatePackage lastDeploymentChangeTime. */ + public lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); - /** AptSettings excludes */ - excludes?: (string[]|null); + /** + * Creates a new WindowsUpdatePackage instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdatePackage instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; - /** AptSettings exclusivePackages */ - exclusivePackages?: (string[]|null); - } + /** + * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @param message WindowsUpdatePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an AptSettings. */ - class AptSettings implements IAptSettings { + /** + * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @param message WindowsUpdatePackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new AptSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IAptSettings); + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; - /** AptSettings type. */ - public type: (google.cloud.osconfig.v1.AptSettings.Type|keyof typeof google.cloud.osconfig.v1.AptSettings.Type); + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; - /** AptSettings excludes. */ - public excludes: string[]; + /** + * Verifies a WindowsUpdatePackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** AptSettings exclusivePackages. */ - public exclusivePackages: string[]; + /** + * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdatePackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; - /** - * Creates a new AptSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns AptSettings instance - */ - public static create(properties?: google.cloud.osconfig.v1.IAptSettings): google.cloud.osconfig.v1.AptSettings; + /** + * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. + * @param message WindowsUpdatePackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. - * @param message AptSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this WindowsUpdatePackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. - * @param message AptSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IAptSettings, writer?: $protobuf.Writer): $protobuf.Writer; + namespace WindowsUpdatePackage { - /** - * Decodes an AptSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AptSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.AptSettings; + /** Properties of a WindowsUpdateCategory. */ + interface IWindowsUpdateCategory { - /** - * Decodes an AptSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AptSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.AptSettings; + /** WindowsUpdateCategory id */ + id?: (string|null); - /** - * Verifies an AptSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** WindowsUpdateCategory name */ + name?: (string|null); + } - /** - * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AptSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.AptSettings; + /** Represents a WindowsUpdateCategory. */ + class WindowsUpdateCategory implements IWindowsUpdateCategory { - /** - * Creates a plain object from an AptSettings message. Also converts values to other types if specified. - * @param message AptSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.AptSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new WindowsUpdateCategory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory); - /** - * Converts this AptSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** WindowsUpdateCategory id. */ + public id: string; - namespace AptSettings { + /** WindowsUpdateCategory name. */ + public name: string; - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - DIST = 1, - UPGRADE = 2 - } - } + /** + * Creates a new WindowsUpdateCategory instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsUpdateCategory instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; - /** Properties of a YumSettings. */ - interface IYumSettings { + /** + * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @param message WindowsUpdateCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; - /** YumSettings security */ - security?: (boolean|null); + /** + * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @param message WindowsUpdateCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; - /** YumSettings minimal */ - minimal?: (boolean|null); + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; - /** YumSettings excludes */ - excludes?: (string[]|null); + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; - /** YumSettings exclusivePackages */ - exclusivePackages?: (string[]|null); - } + /** + * Verifies a WindowsUpdateCategory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a YumSettings. */ - class YumSettings implements IYumSettings { + /** + * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsUpdateCategory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; - /** - * Constructs a new YumSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IYumSettings); + /** + * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. + * @param message WindowsUpdateCategory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** YumSettings security. */ - public security: boolean; + /** + * Converts this WindowsUpdateCategory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** YumSettings minimal. */ - public minimal: boolean; + /** Properties of a WindowsQuickFixEngineeringPackage. */ + interface IWindowsQuickFixEngineeringPackage { - /** YumSettings excludes. */ - public excludes: string[]; + /** WindowsQuickFixEngineeringPackage caption */ + caption?: (string|null); - /** YumSettings exclusivePackages. */ - public exclusivePackages: string[]; + /** WindowsQuickFixEngineeringPackage description */ + description?: (string|null); - /** - * Creates a new YumSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns YumSettings instance - */ - public static create(properties?: google.cloud.osconfig.v1.IYumSettings): google.cloud.osconfig.v1.YumSettings; + /** WindowsQuickFixEngineeringPackage hotFixId */ + hotFixId?: (string|null); - /** - * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. - * @param message YumSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** WindowsQuickFixEngineeringPackage installTime */ + installTime?: (google.protobuf.ITimestamp|null); + } - /** - * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. - * @param message YumSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IYumSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a WindowsQuickFixEngineeringPackage. */ + class WindowsQuickFixEngineeringPackage implements IWindowsQuickFixEngineeringPackage { - /** - * Decodes a YumSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns YumSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.YumSettings; - - /** - * Decodes a YumSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns YumSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.YumSettings; - - /** - * Verifies a YumSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new WindowsQuickFixEngineeringPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage); - /** - * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns YumSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.YumSettings; + /** WindowsQuickFixEngineeringPackage caption. */ + public caption: string; - /** - * Creates a plain object from a YumSettings message. Also converts values to other types if specified. - * @param message YumSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.YumSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** WindowsQuickFixEngineeringPackage description. */ + public description: string; - /** - * Converts this YumSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** WindowsQuickFixEngineeringPackage hotFixId. */ + public hotFixId: string; - /** Properties of a GooSettings. */ - interface IGooSettings { - } + /** WindowsQuickFixEngineeringPackage installTime. */ + public installTime?: (google.protobuf.ITimestamp|null); - /** Represents a GooSettings. */ - class GooSettings implements IGooSettings { + /** + * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsQuickFixEngineeringPackage instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; - /** - * Constructs a new GooSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IGooSettings); + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @param message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new GooSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GooSettings instance - */ - public static create(properties?: google.cloud.osconfig.v1.IGooSettings): google.cloud.osconfig.v1.GooSettings; + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @param message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. - * @param message GooSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IGooSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; - /** - * Encodes the specified GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. - * @param message GooSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IGooSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; - /** - * Decodes a GooSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GooSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GooSettings; + /** + * Verifies a WindowsQuickFixEngineeringPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a GooSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GooSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GooSettings; + /** + * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsQuickFixEngineeringPackage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; - /** - * Verifies a GooSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. + * @param message WindowsQuickFixEngineeringPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a GooSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GooSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GooSettings; + /** + * Converts this WindowsQuickFixEngineeringPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a GooSettings message. Also converts values to other types if specified. - * @param message GooSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.GooSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a WindowsApplication. */ + interface IWindowsApplication { - /** - * Converts this GooSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** WindowsApplication displayName */ + displayName?: (string|null); - /** Properties of a ZypperSettings. */ - interface IZypperSettings { + /** WindowsApplication displayVersion */ + displayVersion?: (string|null); - /** ZypperSettings withOptional */ - withOptional?: (boolean|null); + /** WindowsApplication publisher */ + publisher?: (string|null); - /** ZypperSettings withUpdate */ - withUpdate?: (boolean|null); + /** WindowsApplication installDate */ + installDate?: (google.type.IDate|null); - /** ZypperSettings categories */ - categories?: (string[]|null); + /** WindowsApplication helpLink */ + helpLink?: (string|null); + } - /** ZypperSettings severities */ - severities?: (string[]|null); + /** Represents a WindowsApplication. */ + class WindowsApplication implements IWindowsApplication { - /** ZypperSettings excludes */ - excludes?: (string[]|null); + /** + * Constructs a new WindowsApplication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication); - /** ZypperSettings exclusivePatches */ - exclusivePatches?: (string[]|null); - } + /** WindowsApplication displayName. */ + public displayName: string; - /** Represents a ZypperSettings. */ - class ZypperSettings implements IZypperSettings { + /** WindowsApplication displayVersion. */ + public displayVersion: string; - /** - * Constructs a new ZypperSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IZypperSettings); + /** WindowsApplication publisher. */ + public publisher: string; - /** ZypperSettings withOptional. */ - public withOptional: boolean; + /** WindowsApplication installDate. */ + public installDate?: (google.type.IDate|null); - /** ZypperSettings withUpdate. */ - public withUpdate: boolean; + /** WindowsApplication helpLink. */ + public helpLink: string; - /** ZypperSettings categories. */ - public categories: string[]; + /** + * Creates a new WindowsApplication instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsApplication instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; - /** ZypperSettings severities. */ - public severities: string[]; + /** + * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. + * @param message WindowsApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; - /** ZypperSettings excludes. */ - public excludes: string[]; + /** + * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. + * @param message WindowsApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; - /** ZypperSettings exclusivePatches. */ - public exclusivePatches: string[]; + /** + * Decodes a WindowsApplication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + + /** + * Verifies a WindowsApplication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsApplication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + + /** + * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. + * @param message WindowsApplication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsApplication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GetInventoryRequest. */ + interface IGetInventoryRequest { + + /** GetInventoryRequest name */ + name?: (string|null); + + /** GetInventoryRequest view */ + view?: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView|null); + } + + /** Represents a GetInventoryRequest. */ + class GetInventoryRequest implements IGetInventoryRequest { /** - * Creates a new ZypperSettings instance using the specified properties. + * Constructs a new GetInventoryRequest. * @param [properties] Properties to set - * @returns ZypperSettings instance */ - public static create(properties?: google.cloud.osconfig.v1.IZypperSettings): google.cloud.osconfig.v1.ZypperSettings; + constructor(properties?: google.cloud.osconfig.v1alpha.IGetInventoryRequest); + + /** GetInventoryRequest name. */ + public name: string; + + /** GetInventoryRequest view. */ + public view: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView); /** - * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. - * @param message ZypperSettings message or plain object to encode + * Creates a new GetInventoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetInventoryRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IGetInventoryRequest): google.cloud.osconfig.v1alpha.GetInventoryRequest; + + /** + * Encodes the specified GetInventoryRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. + * @param message GetInventoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IGetInventoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. - * @param message ZypperSettings message or plain object to encode + * Encodes the specified GetInventoryRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. + * @param message GetInventoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IZypperSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetInventoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ZypperSettings message from the specified reader or buffer. + * Decodes a GetInventoryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ZypperSettings + * @returns GetInventoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ZypperSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetInventoryRequest; /** - * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. + * Decodes a GetInventoryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ZypperSettings + * @returns GetInventoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ZypperSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetInventoryRequest; /** - * Verifies a ZypperSettings message. + * Verifies a GetInventoryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. + * Creates a GetInventoryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ZypperSettings + * @returns GetInventoryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ZypperSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetInventoryRequest; /** - * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. - * @param message ZypperSettings + * Creates a plain object from a GetInventoryRequest message. Also converts values to other types if specified. + * @param message GetInventoryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ZypperSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.GetInventoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ZypperSettings to JSON. + * Converts this GetInventoryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WindowsUpdateSettings. */ - interface IWindowsUpdateSettings { + /** Properties of a ListInventoriesRequest. */ + interface IListInventoriesRequest { - /** WindowsUpdateSettings classifications */ - classifications?: (google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]|null); + /** ListInventoriesRequest parent */ + parent?: (string|null); - /** WindowsUpdateSettings excludes */ - excludes?: (string[]|null); + /** ListInventoriesRequest view */ + view?: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView|null); - /** WindowsUpdateSettings exclusivePatches */ - exclusivePatches?: (string[]|null); + /** ListInventoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListInventoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListInventoriesRequest filter */ + filter?: (string|null); } - /** Represents a WindowsUpdateSettings. */ - class WindowsUpdateSettings implements IWindowsUpdateSettings { + /** Represents a ListInventoriesRequest. */ + class ListInventoriesRequest implements IListInventoriesRequest { /** - * Constructs a new WindowsUpdateSettings. + * Constructs a new ListInventoriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings); + constructor(properties?: google.cloud.osconfig.v1alpha.IListInventoriesRequest); - /** WindowsUpdateSettings classifications. */ - public classifications: google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[]; + /** ListInventoriesRequest parent. */ + public parent: string; - /** WindowsUpdateSettings excludes. */ - public excludes: string[]; + /** ListInventoriesRequest view. */ + public view: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView); - /** WindowsUpdateSettings exclusivePatches. */ - public exclusivePatches: string[]; + /** ListInventoriesRequest pageSize. */ + public pageSize: number; + + /** ListInventoriesRequest pageToken. */ + public pageToken: string; + + /** ListInventoriesRequest filter. */ + public filter: string; /** - * Creates a new WindowsUpdateSettings instance using the specified properties. + * Creates a new ListInventoriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WindowsUpdateSettings instance + * @returns ListInventoriesRequest instance */ - public static create(properties?: google.cloud.osconfig.v1.IWindowsUpdateSettings): google.cloud.osconfig.v1.WindowsUpdateSettings; + public static create(properties?: google.cloud.osconfig.v1alpha.IListInventoriesRequest): google.cloud.osconfig.v1alpha.ListInventoriesRequest; /** - * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. - * @param message WindowsUpdateSettings message or plain object to encode + * Encodes the specified ListInventoriesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. + * @param message ListInventoriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IListInventoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. - * @param message WindowsUpdateSettings message or plain object to encode + * Encodes the specified ListInventoriesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. + * @param message ListInventoriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IWindowsUpdateSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInventoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WindowsUpdateSettings message from the specified reader or buffer. + * Decodes a ListInventoriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WindowsUpdateSettings + * @returns ListInventoriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.WindowsUpdateSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInventoriesRequest; /** - * Decodes a WindowsUpdateSettings message from the specified reader or buffer, length delimited. + * Decodes a ListInventoriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WindowsUpdateSettings + * @returns ListInventoriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.WindowsUpdateSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInventoriesRequest; /** - * Verifies a WindowsUpdateSettings message. + * Verifies a ListInventoriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListInventoriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WindowsUpdateSettings + * @returns ListInventoriesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.WindowsUpdateSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInventoriesRequest; /** - * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. - * @param message WindowsUpdateSettings + * Creates a plain object from a ListInventoriesRequest message. Also converts values to other types if specified. + * @param message ListInventoriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.WindowsUpdateSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.ListInventoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WindowsUpdateSettings to JSON. + * Converts this ListInventoriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace WindowsUpdateSettings { + /** Properties of a ListInventoriesResponse. */ + interface IListInventoriesResponse { - /** Classification enum. */ - enum Classification { - CLASSIFICATION_UNSPECIFIED = 0, - CRITICAL = 1, - SECURITY = 2, - DEFINITION = 3, - DRIVER = 4, - FEATURE_PACK = 5, - SERVICE_PACK = 6, - TOOL = 7, - UPDATE_ROLLUP = 8, - UPDATE = 9 - } + /** ListInventoriesResponse inventories */ + inventories?: (google.cloud.osconfig.v1alpha.IInventory[]|null); + + /** ListInventoriesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Properties of an ExecStep. */ - interface IExecStep { + /** Represents a ListInventoriesResponse. */ + class ListInventoriesResponse implements IListInventoriesResponse { - /** ExecStep linuxExecStepConfig */ - linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + /** + * Constructs a new ListInventoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListInventoriesResponse); - /** ExecStep windowsExecStepConfig */ - windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); - } - - /** Represents an ExecStep. */ - class ExecStep implements IExecStep { - - /** - * Constructs a new ExecStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IExecStep); - - /** ExecStep linuxExecStepConfig. */ - public linuxExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + /** ListInventoriesResponse inventories. */ + public inventories: google.cloud.osconfig.v1alpha.IInventory[]; - /** ExecStep windowsExecStepConfig. */ - public windowsExecStepConfig?: (google.cloud.osconfig.v1.IExecStepConfig|null); + /** ListInventoriesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ExecStep instance using the specified properties. + * Creates a new ListInventoriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExecStep instance + * @returns ListInventoriesResponse instance */ - public static create(properties?: google.cloud.osconfig.v1.IExecStep): google.cloud.osconfig.v1.ExecStep; + public static create(properties?: google.cloud.osconfig.v1alpha.IListInventoriesResponse): google.cloud.osconfig.v1alpha.ListInventoriesResponse; /** - * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. - * @param message ExecStep message or plain object to encode + * Encodes the specified ListInventoriesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. + * @param message ListInventoriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IListInventoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. - * @param message ExecStep message or plain object to encode + * Encodes the specified ListInventoriesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. + * @param message ListInventoriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStep, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInventoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecStep message from the specified reader or buffer. + * Decodes a ListInventoriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecStep + * @returns ListInventoriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStep; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInventoriesResponse; /** - * Decodes an ExecStep message from the specified reader or buffer, length delimited. + * Decodes a ListInventoriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecStep + * @returns ListInventoriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStep; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInventoriesResponse; /** - * Verifies an ExecStep message. + * Verifies a ListInventoriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. + * Creates a ListInventoriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecStep + * @returns ListInventoriesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStep; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInventoriesResponse; /** - * Creates a plain object from an ExecStep message. Also converts values to other types if specified. - * @param message ExecStep + * Creates a plain object from a ListInventoriesResponse message. Also converts values to other types if specified. + * @param message ListInventoriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ExecStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.ListInventoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecStep to JSON. + * Converts this ListInventoriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExecStepConfig. */ - interface IExecStepConfig { + /** InventoryView enum. */ + enum InventoryView { + INVENTORY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } - /** ExecStepConfig localPath */ - localPath?: (string|null); + /** Properties of a OSPolicy. */ + interface IOSPolicy { - /** ExecStepConfig gcsObject */ - gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); + /** OSPolicy id */ + id?: (string|null); - /** ExecStepConfig allowedSuccessCodes */ - allowedSuccessCodes?: (number[]|null); + /** OSPolicy description */ + description?: (string|null); - /** ExecStepConfig interpreter */ - interpreter?: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null); + /** OSPolicy mode */ + mode?: (google.cloud.osconfig.v1alpha.OSPolicy.Mode|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Mode|null); + + /** OSPolicy resourceGroups */ + resourceGroups?: (google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup[]|null); + + /** OSPolicy allowNoResourceGroupMatch */ + allowNoResourceGroupMatch?: (boolean|null); } - /** Represents an ExecStepConfig. */ - class ExecStepConfig implements IExecStepConfig { + /** Represents a OSPolicy. */ + class OSPolicy implements IOSPolicy { /** - * Constructs a new ExecStepConfig. + * Constructs a new OSPolicy. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1.IExecStepConfig); + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicy); - /** ExecStepConfig localPath. */ - public localPath?: (string|null); + /** OSPolicy id. */ + public id: string; - /** ExecStepConfig gcsObject. */ - public gcsObject?: (google.cloud.osconfig.v1.IGcsObject|null); + /** OSPolicy description. */ + public description: string; - /** ExecStepConfig allowedSuccessCodes. */ - public allowedSuccessCodes: number[]; + /** OSPolicy mode. */ + public mode: (google.cloud.osconfig.v1alpha.OSPolicy.Mode|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Mode); - /** ExecStepConfig interpreter. */ - public interpreter: (google.cloud.osconfig.v1.ExecStepConfig.Interpreter|keyof typeof google.cloud.osconfig.v1.ExecStepConfig.Interpreter); + /** OSPolicy resourceGroups. */ + public resourceGroups: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup[]; - /** ExecStepConfig executable. */ - public executable?: ("localPath"|"gcsObject"); + /** OSPolicy allowNoResourceGroupMatch. */ + public allowNoResourceGroupMatch: boolean; /** - * Creates a new ExecStepConfig instance using the specified properties. + * Creates a new OSPolicy instance using the specified properties. * @param [properties] Properties to set - * @returns ExecStepConfig instance + * @returns OSPolicy instance */ - public static create(properties?: google.cloud.osconfig.v1.IExecStepConfig): google.cloud.osconfig.v1.ExecStepConfig; + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicy): google.cloud.osconfig.v1alpha.OSPolicy; /** - * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. - * @param message ExecStepConfig message or plain object to encode + * Encodes the specified OSPolicy message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. + * @param message OSPolicy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. - * @param message ExecStepConfig message or plain object to encode + * Encodes the specified OSPolicy message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. + * @param message OSPolicy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IExecStepConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecStepConfig message from the specified reader or buffer. + * Decodes a OSPolicy message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecStepConfig + * @returns OSPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ExecStepConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy; /** - * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. + * Decodes a OSPolicy message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecStepConfig + * @returns OSPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ExecStepConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy; /** - * Verifies an ExecStepConfig message. + * Verifies a OSPolicy message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. + * Creates a OSPolicy message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecStepConfig + * @returns OSPolicy */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ExecStepConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy; /** - * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. - * @param message ExecStepConfig + * Creates a plain object from a OSPolicy message. Also converts values to other types if specified. + * @param message OSPolicy * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1.ExecStepConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecStepConfig to JSON. + * Converts this OSPolicy to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ExecStepConfig { + namespace OSPolicy { - /** Interpreter enum. */ - enum Interpreter { - INTERPRETER_UNSPECIFIED = 0, - SHELL = 1, - POWERSHELL = 2 - } - } + /** Properties of a OSFilter. */ + interface IOSFilter { - /** Properties of a GcsObject. */ - interface IGcsObject { + /** OSFilter osShortName */ + osShortName?: (string|null); - /** GcsObject bucket */ - bucket?: (string|null); + /** OSFilter osVersion */ + osVersion?: (string|null); + } - /** GcsObject object */ - object?: (string|null); + /** Represents a OSFilter. */ + class OSFilter implements IOSFilter { - /** GcsObject generationNumber */ - generationNumber?: (number|Long|string|null); - } + /** + * Constructs a new OSFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter); - /** Represents a GcsObject. */ - class GcsObject implements IGcsObject { + /** OSFilter osShortName. */ + public osShortName: string; - /** - * Constructs a new GcsObject. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IGcsObject); + /** OSFilter osVersion. */ + public osVersion: string; - /** GcsObject bucket. */ - public bucket: string; + /** + * Creates a new OSFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns OSFilter instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; - /** GcsObject object. */ - public object: string; + /** + * Encodes the specified OSFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. + * @param message OSFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter, writer?: $protobuf.Writer): $protobuf.Writer; - /** GcsObject generationNumber. */ - public generationNumber: (number|Long|string); + /** + * Encodes the specified OSFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. + * @param message OSFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new GcsObject instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsObject instance - */ - public static create(properties?: google.cloud.osconfig.v1.IGcsObject): google.cloud.osconfig.v1.GcsObject; + /** + * Decodes a OSFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; - /** - * Encodes the specified GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. - * @param message GcsObject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IGcsObject, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. - * @param message GcsObject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IGcsObject, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsObject message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GcsObject; - - /** - * Decodes a GcsObject message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GcsObject; - - /** - * Verifies a GcsObject message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsObject - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GcsObject; - - /** - * Creates a plain object from a GcsObject message. Also converts values to other types if specified. - * @param message GcsObject - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.GcsObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsObject to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PatchInstanceFilter. */ - interface IPatchInstanceFilter { - - /** PatchInstanceFilter all */ - all?: (boolean|null); - - /** PatchInstanceFilter groupLabels */ - groupLabels?: (google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]|null); - - /** PatchInstanceFilter zones */ - zones?: (string[]|null); - - /** PatchInstanceFilter instances */ - instances?: (string[]|null); - - /** PatchInstanceFilter instanceNamePrefixes */ - instanceNamePrefixes?: (string[]|null); - } - - /** Represents a PatchInstanceFilter. */ - class PatchInstanceFilter implements IPatchInstanceFilter { - - /** - * Constructs a new PatchInstanceFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter); + /** + * Decodes a OSFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; - /** PatchInstanceFilter all. */ - public all: boolean; + /** + * Verifies a OSFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** PatchInstanceFilter groupLabels. */ - public groupLabels: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel[]; + /** + * Creates a OSFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; - /** PatchInstanceFilter zones. */ - public zones: string[]; + /** + * Creates a plain object from a OSFilter message. Also converts values to other types if specified. + * @param message OSFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** PatchInstanceFilter instances. */ - public instances: string[]; + /** + * Converts this OSFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** PatchInstanceFilter instanceNamePrefixes. */ - public instanceNamePrefixes: string[]; + /** Properties of a Resource. */ + interface IResource { - /** - * Creates a new PatchInstanceFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchInstanceFilter instance - */ - public static create(properties?: google.cloud.osconfig.v1.IPatchInstanceFilter): google.cloud.osconfig.v1.PatchInstanceFilter; + /** Resource id */ + id?: (string|null); - /** - * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. - * @param message PatchInstanceFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** Resource pkg */ + pkg?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null); - /** - * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. - * @param message PatchInstanceFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** Resource repository */ + repository?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null); - /** - * Decodes a PatchInstanceFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchInstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchInstanceFilter; + /** Resource exec */ + exec?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null); - /** - * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchInstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchInstanceFilter; + /** Resource file */ + file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null); + } - /** - * Verifies a PatchInstanceFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a Resource. */ + class Resource implements IResource { - /** - * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchInstanceFilter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter; + /** + * Constructs a new Resource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResource); - /** - * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. - * @param message PatchInstanceFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchInstanceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Resource id. */ + public id: string; - /** - * Converts this PatchInstanceFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Resource pkg. */ + public pkg?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null); - namespace PatchInstanceFilter { + /** Resource repository. */ + public repository?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null); - /** Properties of a GroupLabel. */ - interface IGroupLabel { + /** Resource exec. */ + public exec?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null); - /** GroupLabel labels */ - labels?: ({ [k: string]: string }|null); - } + /** Resource file. */ + public file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null); - /** Represents a GroupLabel. */ - class GroupLabel implements IGroupLabel { + /** Resource resourceType. */ + public resourceType?: ("pkg"|"repository"|"exec"|"file"); /** - * Constructs a new GroupLabel. + * Creates a new Resource instance using the specified properties. * @param [properties] Properties to set + * @returns Resource instance */ - constructor(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel); - - /** GroupLabel labels. */ - public labels: { [k: string]: string }; + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource; /** - * Creates a new GroupLabel instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupLabel instance + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public static create(properties?: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.IResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. - * @param message GroupLabel message or plain object to encode + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.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.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. - * @param message GroupLabel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.IResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GroupLabel message from the specified reader or buffer. + * 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 GroupLabel + * @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.osconfig.v1.PatchInstanceFilter.GroupLabel; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource; /** - * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * Decodes a Resource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GroupLabel + * @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.osconfig.v1.PatchInstanceFilter.GroupLabel; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource; /** - * Verifies a GroupLabel message. + * 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 GroupLabel message from a plain object. Also converts values to their respective internal types. + * Creates a Resource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GroupLabel + * @returns Resource */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource; /** - * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. - * @param message GroupLabel + * 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.osconfig.v1.PatchInstanceFilter.GroupLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GroupLabel to JSON. + * Converts this Resource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** Properties of a PatchRollout. */ - interface IPatchRollout { - /** PatchRollout mode */ - mode?: (google.cloud.osconfig.v1.PatchRollout.Mode|keyof typeof google.cloud.osconfig.v1.PatchRollout.Mode|null); + namespace Resource { - /** PatchRollout disruptionBudget */ - disruptionBudget?: (google.cloud.osconfig.v1.IFixedOrPercent|null); - } + /** Properties of a File. */ + interface IFile { - /** Represents a PatchRollout. */ - class PatchRollout implements IPatchRollout { + /** File remote */ + remote?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null); - /** - * Constructs a new PatchRollout. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1.IPatchRollout); + /** File gcs */ + gcs?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null); - /** PatchRollout mode. */ - public mode: (google.cloud.osconfig.v1.PatchRollout.Mode|keyof typeof google.cloud.osconfig.v1.PatchRollout.Mode); + /** File localPath */ + localPath?: (string|null); - /** PatchRollout disruptionBudget. */ - public disruptionBudget?: (google.cloud.osconfig.v1.IFixedOrPercent|null); + /** File allowInsecure */ + allowInsecure?: (boolean|null); + } - /** - * Creates a new PatchRollout instance using the specified properties. - * @param [properties] Properties to set - * @returns PatchRollout instance - */ - public static create(properties?: google.cloud.osconfig.v1.IPatchRollout): google.cloud.osconfig.v1.PatchRollout; + /** Represents a File. */ + class File implements IFile { - /** - * Encodes the specified PatchRollout message. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. - * @param message PatchRollout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1.IPatchRollout, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new File. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile); - /** - * Encodes the specified PatchRollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. - * @param message PatchRollout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1.IPatchRollout, writer?: $protobuf.Writer): $protobuf.Writer; + /** File remote. */ + public remote?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null); - /** - * Decodes a PatchRollout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PatchRollout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PatchRollout; + /** File gcs. */ + public gcs?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null); - /** - * Decodes a PatchRollout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PatchRollout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PatchRollout; + /** File localPath. */ + public localPath?: (string|null); - /** - * Verifies a PatchRollout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** File allowInsecure. */ + public allowInsecure: boolean; - /** - * Creates a PatchRollout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PatchRollout - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PatchRollout; + /** File type. */ + public type?: ("remote"|"gcs"|"localPath"); - /** - * Creates a plain object from a PatchRollout message. Also converts values to other types if specified. - * @param message PatchRollout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1.PatchRollout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new File instance using the specified properties. + * @param [properties] Properties to set + * @returns File instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; - /** - * Converts this PatchRollout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified File message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile, writer?: $protobuf.Writer): $protobuf.Writer; - namespace PatchRollout { + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile, writer?: $protobuf.Writer): $protobuf.Writer; - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - ZONE_BY_ZONE = 1, - CONCURRENT_ZONES = 2 - } - } - } + /** + * Decodes a File message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; - /** Namespace v1alpha. */ - namespace v1alpha { + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; - /** Properties of a OSPolicyResourceConfigStep. */ - interface IOSPolicyResourceConfigStep { + /** + * Verifies a File message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** OSPolicyResourceConfigStep type */ - type?: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|null); + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns File + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; - /** OSPolicyResourceConfigStep outcome */ - outcome?: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|null); + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @param message File + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** OSPolicyResourceConfigStep errorMessage */ - errorMessage?: (string|null); - } + /** + * Converts this File to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a OSPolicyResourceConfigStep. */ - class OSPolicyResourceConfigStep implements IOSPolicyResourceConfigStep { + namespace File { - /** - * Constructs a new OSPolicyResourceConfigStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep); + /** Properties of a Remote. */ + interface IRemote { - /** OSPolicyResourceConfigStep type. */ - public type: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type); + /** Remote uri */ + uri?: (string|null); - /** OSPolicyResourceConfigStep outcome. */ - public outcome: (google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome); + /** Remote sha256Checksum */ + sha256Checksum?: (string|null); + } - /** OSPolicyResourceConfigStep errorMessage. */ - public errorMessage: string; + /** Represents a Remote. */ + class Remote implements IRemote { - /** - * Creates a new OSPolicyResourceConfigStep instance using the specified properties. - * @param [properties] Properties to set - * @returns OSPolicyResourceConfigStep instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; - - /** - * Encodes the specified OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. - * @param message OSPolicyResourceConfigStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Remote. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote); - /** - * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. - * @param message OSPolicyResourceConfigStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep, writer?: $protobuf.Writer): $protobuf.Writer; + /** Remote uri. */ + public uri: string; - /** - * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OSPolicyResourceConfigStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; + /** Remote sha256Checksum. */ + public sha256Checksum: string; - /** - * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OSPolicyResourceConfigStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; + /** + * Creates a new Remote instance using the specified properties. + * @param [properties] Properties to set + * @returns Remote instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; - /** - * Verifies a OSPolicyResourceConfigStep message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified Remote message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @param message Remote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OSPolicyResourceConfigStep - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep; + /** + * Encodes the specified Remote message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @param message Remote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. - * @param message OSPolicyResourceConfigStep - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a Remote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; - /** - * Converts this OSPolicyResourceConfigStep to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a Remote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; - namespace OSPolicyResourceConfigStep { + /** + * Verifies a Remote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - VALIDATION = 1, - DESIRED_STATE_CHECK = 2, - DESIRED_STATE_ENFORCEMENT = 3, - DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4 - } + /** + * Creates a Remote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Remote + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; - /** Outcome enum. */ - enum Outcome { - OUTCOME_UNSPECIFIED = 0, - SUCCEEDED = 1, - FAILED = 2 - } - } + /** + * Creates a plain object from a Remote message. Also converts values to other types if specified. + * @param message Remote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a OSPolicyResourceCompliance. */ - interface IOSPolicyResourceCompliance { + /** + * Converts this Remote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** OSPolicyResourceCompliance osPolicyResourceId */ - osPolicyResourceId?: (string|null); + /** Properties of a Gcs. */ + interface IGcs { - /** OSPolicyResourceCompliance configSteps */ - configSteps?: (google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep[]|null); + /** Gcs bucket */ + bucket?: (string|null); - /** OSPolicyResourceCompliance state */ - state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); + /** Gcs object */ + object?: (string|null); - /** OSPolicyResourceCompliance execResourceOutput */ - execResourceOutput?: (google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null); - } + /** Gcs generation */ + generation?: (number|Long|string|null); + } - /** Represents a OSPolicyResourceCompliance. */ - class OSPolicyResourceCompliance implements IOSPolicyResourceCompliance { + /** Represents a Gcs. */ + class Gcs implements IGcs { - /** - * Constructs a new OSPolicyResourceCompliance. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance); + /** + * Constructs a new Gcs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs); - /** OSPolicyResourceCompliance osPolicyResourceId. */ - public osPolicyResourceId: string; + /** Gcs bucket. */ + public bucket: string; - /** OSPolicyResourceCompliance configSteps. */ - public configSteps: google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep[]; + /** Gcs object. */ + public object: string; - /** OSPolicyResourceCompliance state. */ - public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); + /** Gcs generation. */ + public generation: (number|Long|string); - /** OSPolicyResourceCompliance execResourceOutput. */ - public execResourceOutput?: (google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null); + /** + * Creates a new Gcs instance using the specified properties. + * @param [properties] Properties to set + * @returns Gcs instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; - /** OSPolicyResourceCompliance output. */ - public output?: "execResourceOutput"; + /** + * Encodes the specified Gcs message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @param message Gcs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new OSPolicyResourceCompliance instance using the specified properties. - * @param [properties] Properties to set - * @returns OSPolicyResourceCompliance instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; + /** + * Encodes the specified Gcs message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @param message Gcs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. - * @param message OSPolicyResourceCompliance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Gcs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; - /** - * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. - * @param message OSPolicyResourceCompliance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Gcs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; - /** - * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OSPolicyResourceCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; + /** + * Verifies a Gcs message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OSPolicyResourceCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; + /** + * Creates a Gcs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Gcs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; - /** - * Verifies a OSPolicyResourceCompliance message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a Gcs message. Also converts values to other types if specified. + * @param message Gcs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OSPolicyResourceCompliance - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance; + /** + * Converts this Gcs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. - * @param message OSPolicyResourceCompliance - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a PackageResource. */ + interface IPackageResource { - /** - * Converts this OSPolicyResourceCompliance to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** PackageResource desiredState */ + desiredState?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|null); - namespace OSPolicyResourceCompliance { + /** PackageResource apt */ + apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null); - /** Properties of an ExecResourceOutput. */ - interface IExecResourceOutput { + /** PackageResource deb */ + deb?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null); - /** ExecResourceOutput enforcementOutput */ - enforcementOutput?: (Uint8Array|string|null); - } + /** PackageResource yum */ + yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null); - /** Represents an ExecResourceOutput. */ - class ExecResourceOutput implements IExecResourceOutput { + /** PackageResource zypper */ + zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null); - /** - * Constructs a new ExecResourceOutput. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput); + /** PackageResource rpm */ + rpm?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null); - /** ExecResourceOutput enforcementOutput. */ - public enforcementOutput: (Uint8Array|string); + /** PackageResource googet */ + googet?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null); - /** - * Creates a new ExecResourceOutput instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecResourceOutput instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; + /** PackageResource msi */ + msi?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null); + } - /** - * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. - * @param message ExecResourceOutput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a PackageResource. */ + class PackageResource implements IPackageResource { - /** - * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. - * @param message ExecResourceOutput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new PackageResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource); - /** - * Decodes an ExecResourceOutput message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecResourceOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; + /** PackageResource desiredState. */ + public desiredState: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState); - /** - * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecResourceOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; + /** PackageResource apt. */ + public apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null); - /** - * Verifies an ExecResourceOutput message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** PackageResource deb. */ + public deb?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null); - /** - * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecResourceOutput - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput; + /** PackageResource yum. */ + public yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null); - /** - * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. - * @param message ExecResourceOutput - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PackageResource zypper. */ + public zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null); - /** - * Converts this ExecResourceOutput to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** PackageResource rpm. */ + public rpm?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null); - /** OSPolicyComplianceState enum. */ - enum OSPolicyComplianceState { - OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0, - COMPLIANT = 1, - NON_COMPLIANT = 2, - UNKNOWN = 3, - NO_OS_POLICIES_APPLICABLE = 4 - } + /** PackageResource googet. */ + public googet?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null); - /** Properties of an InstanceOSPoliciesCompliance. */ - interface IInstanceOSPoliciesCompliance { + /** PackageResource msi. */ + public msi?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null); - /** InstanceOSPoliciesCompliance name */ - name?: (string|null); + /** PackageResource systemPackage. */ + public systemPackage?: ("apt"|"deb"|"yum"|"zypper"|"rpm"|"googet"|"msi"); - /** InstanceOSPoliciesCompliance instance */ - instance?: (string|null); + /** + * Creates a new PackageResource instance using the specified properties. + * @param [properties] Properties to set + * @returns PackageResource instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; - /** InstanceOSPoliciesCompliance state */ - state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); + /** + * Encodes the specified PackageResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @param message PackageResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** InstanceOSPoliciesCompliance detailedState */ - detailedState?: (string|null); + /** + * Encodes the specified PackageResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @param message PackageResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** InstanceOSPoliciesCompliance detailedStateReason */ - detailedStateReason?: (string|null); + /** + * Decodes a PackageResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; - /** InstanceOSPoliciesCompliance osPolicyCompliances */ - osPolicyCompliances?: (google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance[]|null); + /** + * Decodes a PackageResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; - /** InstanceOSPoliciesCompliance lastComplianceCheckTime */ - lastComplianceCheckTime?: (google.protobuf.ITimestamp|null); + /** + * Verifies a PackageResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** InstanceOSPoliciesCompliance lastComplianceRunId */ - lastComplianceRunId?: (string|null); - } - - /** Represents an InstanceOSPoliciesCompliance. */ - class InstanceOSPoliciesCompliance implements IInstanceOSPoliciesCompliance { + /** + * Creates a PackageResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PackageResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; - /** - * Constructs a new InstanceOSPoliciesCompliance. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance); + /** + * Creates a plain object from a PackageResource message. Also converts values to other types if specified. + * @param message PackageResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** InstanceOSPoliciesCompliance name. */ - public name: string; + /** + * Converts this PackageResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** InstanceOSPoliciesCompliance instance. */ - public instance: string; + namespace PackageResource { - /** InstanceOSPoliciesCompliance state. */ - public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); + /** Properties of a Deb. */ + interface IDeb { - /** InstanceOSPoliciesCompliance detailedState. */ - public detailedState: string; + /** Deb source */ + source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); - /** InstanceOSPoliciesCompliance detailedStateReason. */ - public detailedStateReason: string; + /** Deb pullDeps */ + pullDeps?: (boolean|null); + } - /** InstanceOSPoliciesCompliance osPolicyCompliances. */ - public osPolicyCompliances: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance[]; + /** Represents a Deb. */ + class Deb implements IDeb { - /** InstanceOSPoliciesCompliance lastComplianceCheckTime. */ - public lastComplianceCheckTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new Deb. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb); - /** InstanceOSPoliciesCompliance lastComplianceRunId. */ - public lastComplianceRunId: string; + /** Deb source. */ + public source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); - /** - * Creates a new InstanceOSPoliciesCompliance instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceOSPoliciesCompliance instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; + /** Deb pullDeps. */ + public pullDeps: boolean; - /** - * Encodes the specified InstanceOSPoliciesCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. - * @param message InstanceOSPoliciesCompliance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new Deb instance using the specified properties. + * @param [properties] Properties to set + * @returns Deb instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; - /** - * Encodes the specified InstanceOSPoliciesCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. - * @param message InstanceOSPoliciesCompliance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Deb message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @param message Deb message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceOSPoliciesCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; + /** + * Encodes the specified Deb message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @param message Deb message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceOSPoliciesCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; + /** + * Decodes a Deb message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; - /** - * Verifies an InstanceOSPoliciesCompliance message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a Deb message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; - /** - * Creates an InstanceOSPoliciesCompliance message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceOSPoliciesCompliance - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; + /** + * Verifies a Deb message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from an InstanceOSPoliciesCompliance message. Also converts values to other types if specified. - * @param message InstanceOSPoliciesCompliance - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a Deb message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deb + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; - /** - * Converts this InstanceOSPoliciesCompliance to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a Deb message. Also converts values to other types if specified. + * @param message Deb + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace InstanceOSPoliciesCompliance { + /** + * Converts this Deb to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a OSPolicyCompliance. */ - interface IOSPolicyCompliance { + /** Properties of a APT. */ + interface IAPT { - /** OSPolicyCompliance osPolicyId */ - osPolicyId?: (string|null); + /** APT name */ + name?: (string|null); + } - /** OSPolicyCompliance osPolicyAssignment */ - osPolicyAssignment?: (string|null); + /** Represents a APT. */ + class APT implements IAPT { - /** OSPolicyCompliance state */ - state?: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null); + /** + * Constructs a new APT. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT); - /** OSPolicyCompliance osPolicyResourceCompliances */ - osPolicyResourceCompliances?: (google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance[]|null); - } + /** APT name. */ + public name: string; - /** Represents a OSPolicyCompliance. */ - class OSPolicyCompliance implements IOSPolicyCompliance { + /** + * Creates a new APT instance using the specified properties. + * @param [properties] Properties to set + * @returns APT instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; - /** - * Constructs a new OSPolicyCompliance. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance); + /** + * Encodes the specified APT message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @param message APT message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT, writer?: $protobuf.Writer): $protobuf.Writer; - /** OSPolicyCompliance osPolicyId. */ - public osPolicyId: string; + /** + * Encodes the specified APT message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @param message APT message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT, writer?: $protobuf.Writer): $protobuf.Writer; - /** OSPolicyCompliance osPolicyAssignment. */ - public osPolicyAssignment: string; + /** + * Decodes a APT message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; - /** OSPolicyCompliance state. */ - public state: (google.cloud.osconfig.v1alpha.OSPolicyComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyComplianceState); + /** + * Decodes a APT message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + + /** + * Verifies a APT message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a APT message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns APT + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + + /** + * Creates a plain object from a APT message. Also converts values to other types if specified. + * @param message APT + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this APT to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RPM. */ + interface IRPM { + + /** RPM source */ + source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** RPM pullDeps */ + pullDeps?: (boolean|null); + } + + /** Represents a RPM. */ + class RPM implements IRPM { + + /** + * Constructs a new RPM. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM); + + /** RPM source. */ + public source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** RPM pullDeps. */ + public pullDeps: boolean; + + /** + * Creates a new RPM instance using the specified properties. + * @param [properties] Properties to set + * @returns RPM instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + + /** + * Encodes the specified RPM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @param message RPM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RPM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @param message RPM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RPM message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + + /** + * Decodes a RPM message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + + /** + * Verifies a RPM message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RPM message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RPM + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + + /** + * Creates a plain object from a RPM message. Also converts values to other types if specified. + * @param message RPM + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RPM to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a YUM. */ + interface IYUM { + + /** YUM name */ + name?: (string|null); + } + + /** Represents a YUM. */ + class YUM implements IYUM { + + /** + * Constructs a new YUM. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM); + + /** YUM name. */ + public name: string; + + /** + * Creates a new YUM instance using the specified properties. + * @param [properties] Properties to set + * @returns YUM instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + + /** + * Encodes the specified YUM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @param message YUM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YUM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @param message YUM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YUM message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + + /** + * Decodes a YUM message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + + /** + * Verifies a YUM message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a YUM message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YUM + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + + /** + * Creates a plain object from a YUM message. Also converts values to other types if specified. + * @param message YUM + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YUM to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Zypper. */ + interface IZypper { + + /** Zypper name */ + name?: (string|null); + } + + /** Represents a Zypper. */ + class Zypper implements IZypper { + + /** + * Constructs a new Zypper. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper); + + /** Zypper name. */ + public name: string; + + /** + * Creates a new Zypper instance using the specified properties. + * @param [properties] Properties to set + * @returns Zypper instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Encodes the specified Zypper message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @param message Zypper message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Zypper message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @param message Zypper message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Zypper message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Decodes a Zypper message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Verifies a Zypper message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Zypper message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Zypper + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Creates a plain object from a Zypper message. Also converts values to other types if specified. + * @param message Zypper + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Zypper to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GooGet. */ + interface IGooGet { + + /** GooGet name */ + name?: (string|null); + } + + /** Represents a GooGet. */ + class GooGet implements IGooGet { + + /** + * Constructs a new GooGet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet); + + /** GooGet name. */ + public name: string; + + /** + * Creates a new GooGet instance using the specified properties. + * @param [properties] Properties to set + * @returns GooGet instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Encodes the specified GooGet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @param message GooGet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GooGet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @param message GooGet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GooGet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Decodes a GooGet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Verifies a GooGet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GooGet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GooGet + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Creates a plain object from a GooGet message. Also converts values to other types if specified. + * @param message GooGet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GooGet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MSI. */ + interface IMSI { + + /** MSI source */ + source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** MSI properties */ + properties?: (string[]|null); + } + + /** Represents a MSI. */ + class MSI implements IMSI { + + /** + * Constructs a new MSI. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI); + + /** MSI source. */ + public source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + + /** MSI properties. */ + public properties: string[]; + + /** + * Creates a new MSI instance using the specified properties. + * @param [properties] Properties to set + * @returns MSI instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + + /** + * Encodes the specified MSI message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @param message MSI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MSI message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @param message MSI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MSI message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + + /** + * Decodes a MSI message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + + /** + * Verifies a MSI message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MSI message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MSI + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + + /** + * Creates a plain object from a MSI message. Also converts values to other types if specified. + * @param message MSI + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MSI to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** DesiredState enum. */ + enum DesiredState { + DESIRED_STATE_UNSPECIFIED = 0, + INSTALLED = 1, + REMOVED = 2 + } + } + + /** Properties of a RepositoryResource. */ + interface IRepositoryResource { + + /** RepositoryResource apt */ + apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null); + + /** RepositoryResource yum */ + yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null); + + /** RepositoryResource zypper */ + zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null); + + /** RepositoryResource goo */ + goo?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null); + } + + /** Represents a RepositoryResource. */ + class RepositoryResource implements IRepositoryResource { + + /** + * Constructs a new RepositoryResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource); + + /** RepositoryResource apt. */ + public apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null); + + /** RepositoryResource yum. */ + public yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null); + + /** RepositoryResource zypper. */ + public zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null); + + /** RepositoryResource goo. */ + public goo?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null); + + /** RepositoryResource repository. */ + public repository?: ("apt"|"yum"|"zypper"|"goo"); + + /** + * Creates a new RepositoryResource instance using the specified properties. + * @param [properties] Properties to set + * @returns RepositoryResource instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + + /** + * Encodes the specified RepositoryResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @param message RepositoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepositoryResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @param message RepositoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + + /** + * Verifies a RepositoryResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RepositoryResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepositoryResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + + /** + * Creates a plain object from a RepositoryResource message. Also converts values to other types if specified. + * @param message RepositoryResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepositoryResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RepositoryResource { + + /** Properties of an AptRepository. */ + interface IAptRepository { + + /** AptRepository archiveType */ + archiveType?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|null); + + /** AptRepository uri */ + uri?: (string|null); + + /** AptRepository distribution */ + distribution?: (string|null); + + /** AptRepository components */ + components?: (string[]|null); + + /** AptRepository gpgKey */ + gpgKey?: (string|null); + } + + /** Represents an AptRepository. */ + class AptRepository implements IAptRepository { + + /** + * Constructs a new AptRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository); + + /** AptRepository archiveType. */ + public archiveType: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType); + + /** AptRepository uri. */ + public uri: string; + + /** AptRepository distribution. */ + public distribution: string; + + /** AptRepository components. */ + public components: string[]; + + /** AptRepository gpgKey. */ + public gpgKey: string; + + /** + * Creates a new AptRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns AptRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Encodes the specified AptRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @param message AptRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @param message AptRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AptRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Decodes an AptRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Verifies an AptRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AptRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Creates a plain object from an AptRepository message. Also converts values to other types if specified. + * @param message AptRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AptRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AptRepository { + + /** ArchiveType enum. */ + enum ArchiveType { + ARCHIVE_TYPE_UNSPECIFIED = 0, + DEB = 1, + DEB_SRC = 2 + } + } + + /** Properties of a YumRepository. */ + interface IYumRepository { + + /** YumRepository id */ + id?: (string|null); + + /** YumRepository displayName */ + displayName?: (string|null); + + /** YumRepository baseUrl */ + baseUrl?: (string|null); + + /** YumRepository gpgKeys */ + gpgKeys?: (string[]|null); + } + + /** Represents a YumRepository. */ + class YumRepository implements IYumRepository { + + /** + * Constructs a new YumRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository); + + /** YumRepository id. */ + public id: string; + + /** YumRepository displayName. */ + public displayName: string; + + /** YumRepository baseUrl. */ + public baseUrl: string; + + /** YumRepository gpgKeys. */ + public gpgKeys: string[]; + + /** + * Creates a new YumRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns YumRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Encodes the specified YumRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @param message YumRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @param message YumRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YumRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Decodes a YumRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Verifies a YumRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Creates a plain object from a YumRepository message. Also converts values to other types if specified. + * @param message YumRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YumRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ZypperRepository. */ + interface IZypperRepository { + + /** ZypperRepository id */ + id?: (string|null); + + /** ZypperRepository displayName */ + displayName?: (string|null); + + /** ZypperRepository baseUrl */ + baseUrl?: (string|null); + + /** ZypperRepository gpgKeys */ + gpgKeys?: (string[]|null); + } + + /** Represents a ZypperRepository. */ + class ZypperRepository implements IZypperRepository { + + /** + * Constructs a new ZypperRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository); + + /** ZypperRepository id. */ + public id: string; + + /** ZypperRepository displayName. */ + public displayName: string; + + /** ZypperRepository baseUrl. */ + public baseUrl: string; - /** OSPolicyCompliance osPolicyResourceCompliances. */ - public osPolicyResourceCompliances: google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance[]; + /** ZypperRepository gpgKeys. */ + public gpgKeys: string[]; - /** - * Creates a new OSPolicyCompliance instance using the specified properties. - * @param [properties] Properties to set - * @returns OSPolicyCompliance instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + /** + * Creates a new ZypperRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; - /** - * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. - * @param message OSPolicyCompliance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ZypperRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @param message ZypperRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. - * @param message OSPolicyCompliance message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ZypperRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @param message ZypperRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a OSPolicyCompliance message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OSPolicyCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + /** + * Decodes a ZypperRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; - /** - * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OSPolicyCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + /** + * Decodes a ZypperRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; - /** - * Verifies a OSPolicyCompliance message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a ZypperRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OSPolicyCompliance - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance; + /** + * Creates a ZypperRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; - /** - * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. - * @param message OSPolicyCompliance - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ZypperRepository message. Also converts values to other types if specified. + * @param message ZypperRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this OSPolicyCompliance to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Converts this ZypperRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a GetInstanceOSPoliciesComplianceRequest. */ - interface IGetInstanceOSPoliciesComplianceRequest { + /** Properties of a GooRepository. */ + interface IGooRepository { - /** GetInstanceOSPoliciesComplianceRequest name */ - name?: (string|null); - } + /** GooRepository name */ + name?: (string|null); - /** Represents a GetInstanceOSPoliciesComplianceRequest. */ - class GetInstanceOSPoliciesComplianceRequest implements IGetInstanceOSPoliciesComplianceRequest { + /** GooRepository url */ + url?: (string|null); + } - /** - * Constructs a new GetInstanceOSPoliciesComplianceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest); + /** Represents a GooRepository. */ + class GooRepository implements IGooRepository { - /** GetInstanceOSPoliciesComplianceRequest name. */ - public name: string; + /** + * Constructs a new GooRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository); - /** - * Creates a new GetInstanceOSPoliciesComplianceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetInstanceOSPoliciesComplianceRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; + /** GooRepository name. */ + public name: string; - /** - * Encodes the specified GetInstanceOSPoliciesComplianceRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. - * @param message GetInstanceOSPoliciesComplianceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** GooRepository url. */ + public url: string; - /** - * Encodes the specified GetInstanceOSPoliciesComplianceRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. - * @param message GetInstanceOSPoliciesComplianceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new GooRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns GooRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; - /** - * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetInstanceOSPoliciesComplianceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; + /** + * Encodes the specified GooRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @param message GooRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetInstanceOSPoliciesComplianceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; + /** + * Encodes the specified GooRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @param message GooRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a GetInstanceOSPoliciesComplianceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a GooRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Decodes a GooRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Verifies a GooRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GooRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GooRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; - /** - * Creates a GetInstanceOSPoliciesComplianceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetInstanceOSPoliciesComplianceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; + /** + * Creates a plain object from a GooRepository message. Also converts values to other types if specified. + * @param message GooRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a GetInstanceOSPoliciesComplianceRequest message. Also converts values to other types if specified. - * @param message GetInstanceOSPoliciesComplianceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this GooRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Converts this GetInstanceOSPoliciesComplianceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an ExecResource. */ + interface IExecResource { - /** Properties of a ListInstanceOSPoliciesCompliancesRequest. */ - interface IListInstanceOSPoliciesCompliancesRequest { + /** ExecResource validate */ + validate?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); - /** ListInstanceOSPoliciesCompliancesRequest parent */ - parent?: (string|null); + /** ExecResource enforce */ + enforce?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); + } - /** ListInstanceOSPoliciesCompliancesRequest pageSize */ - pageSize?: (number|null); + /** Represents an ExecResource. */ + class ExecResource implements IExecResource { - /** ListInstanceOSPoliciesCompliancesRequest pageToken */ - pageToken?: (string|null); + /** + * Constructs a new ExecResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource); - /** ListInstanceOSPoliciesCompliancesRequest filter */ - filter?: (string|null); - } + /** ExecResource validate. */ + public validate?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); - /** Represents a ListInstanceOSPoliciesCompliancesRequest. */ - class ListInstanceOSPoliciesCompliancesRequest implements IListInstanceOSPoliciesCompliancesRequest { + /** ExecResource enforce. */ + public enforce?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); - /** - * Constructs a new ListInstanceOSPoliciesCompliancesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest); + /** + * Creates a new ExecResource instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecResource instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; - /** ListInstanceOSPoliciesCompliancesRequest parent. */ - public parent: string; + /** + * Encodes the specified ExecResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @param message ExecResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListInstanceOSPoliciesCompliancesRequest pageSize. */ - public pageSize: number; + /** + * Encodes the specified ExecResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @param message ExecResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListInstanceOSPoliciesCompliancesRequest pageToken. */ - public pageToken: string; + /** + * Decodes an ExecResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; - /** ListInstanceOSPoliciesCompliancesRequest filter. */ - public filter: string; + /** + * Decodes an ExecResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; - /** - * Creates a new ListInstanceOSPoliciesCompliancesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListInstanceOSPoliciesCompliancesRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; + /** + * Verifies an ExecResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. - * @param message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an ExecResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; - /** - * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. - * @param message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an ExecResource message. Also converts values to other types if specified. + * @param message ExecResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListInstanceOSPoliciesCompliancesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; + /** + * Converts this ExecResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListInstanceOSPoliciesCompliancesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; + namespace ExecResource { - /** - * Verifies a ListInstanceOSPoliciesCompliancesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of an Exec. */ + interface IExec { - /** - * Creates a ListInstanceOSPoliciesCompliancesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListInstanceOSPoliciesCompliancesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; + /** Exec file */ + file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); - /** - * Creates a plain object from a ListInstanceOSPoliciesCompliancesRequest message. Also converts values to other types if specified. - * @param message ListInstanceOSPoliciesCompliancesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Exec script */ + script?: (string|null); - /** - * Converts this ListInstanceOSPoliciesCompliancesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Exec args */ + args?: (string[]|null); - /** Properties of a ListInstanceOSPoliciesCompliancesResponse. */ - interface IListInstanceOSPoliciesCompliancesResponse { + /** Exec interpreter */ + interpreter?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|null); - /** ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances */ - instanceOsPoliciesCompliances?: (google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[]|null); + /** Exec outputFilePath */ + outputFilePath?: (string|null); + } - /** ListInstanceOSPoliciesCompliancesResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Represents an Exec. */ + class Exec implements IExec { - /** Represents a ListInstanceOSPoliciesCompliancesResponse. */ - class ListInstanceOSPoliciesCompliancesResponse implements IListInstanceOSPoliciesCompliancesResponse { + /** + * Constructs a new Exec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec); - /** - * Constructs a new ListInstanceOSPoliciesCompliancesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse); + /** Exec file. */ + public file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); - /** ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances. */ - public instanceOsPoliciesCompliances: google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[]; + /** Exec script. */ + public script?: (string|null); - /** ListInstanceOSPoliciesCompliancesResponse nextPageToken. */ - public nextPageToken: string; + /** Exec args. */ + public args: string[]; - /** - * Creates a new ListInstanceOSPoliciesCompliancesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListInstanceOSPoliciesCompliancesResponse instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; + /** Exec interpreter. */ + public interpreter: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter); + + /** Exec outputFilePath. */ + public outputFilePath: string; - /** - * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. - * @param message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Exec source. */ + public source?: ("file"|"script"); - /** - * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. - * @param message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new Exec instance using the specified properties. + * @param [properties] Properties to set + * @returns Exec instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; - /** - * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListInstanceOSPoliciesCompliancesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; + /** + * Encodes the specified Exec message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @param message Exec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListInstanceOSPoliciesCompliancesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; + /** + * Encodes the specified Exec message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @param message Exec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ListInstanceOSPoliciesCompliancesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an Exec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; - /** - * Creates a ListInstanceOSPoliciesCompliancesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListInstanceOSPoliciesCompliancesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; + /** + * Decodes an Exec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; - /** - * Creates a plain object from a ListInstanceOSPoliciesCompliancesResponse message. Also converts values to other types if specified. - * @param message ListInstanceOSPoliciesCompliancesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an Exec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this ListInstanceOSPoliciesCompliancesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates an Exec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; - /** Properties of an Inventory. */ - interface IInventory { + /** + * Creates a plain object from an Exec message. Also converts values to other types if specified. + * @param message Exec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Inventory name */ - name?: (string|null); + /** + * Converts this Exec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Inventory osInfo */ - osInfo?: (google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null); + namespace Exec { - /** Inventory items */ - items?: ({ [k: string]: google.cloud.osconfig.v1alpha.Inventory.IItem }|null); + /** Interpreter enum. */ + enum Interpreter { + INTERPRETER_UNSPECIFIED = 0, + NONE = 1, + SHELL = 2, + POWERSHELL = 3 + } + } + } - /** Inventory updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** Properties of a FileResource. */ + interface IFileResource { - /** Represents an Inventory. */ - class Inventory implements IInventory { + /** FileResource file */ + file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); - /** - * Constructs a new Inventory. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IInventory); + /** FileResource content */ + content?: (string|null); - /** Inventory name. */ - public name: string; + /** FileResource path */ + path?: (string|null); - /** Inventory osInfo. */ - public osInfo?: (google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null); + /** FileResource state */ + state?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|null); - /** Inventory items. */ - public items: { [k: string]: google.cloud.osconfig.v1alpha.Inventory.IItem }; + /** FileResource permissions */ + permissions?: (string|null); + } - /** Inventory updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Represents a FileResource. */ + class FileResource implements IFileResource { - /** - * Creates a new Inventory instance using the specified properties. - * @param [properties] Properties to set - * @returns Inventory instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IInventory): google.cloud.osconfig.v1alpha.Inventory; + /** + * Constructs a new FileResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource); - /** - * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. - * @param message Inventory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileResource file. */ + public file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); - /** - * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. - * @param message Inventory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileResource content. */ + public content?: (string|null); - /** - * Decodes an Inventory message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Inventory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory; + /** FileResource path. */ + public path: string; - /** - * Decodes an Inventory message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Inventory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory; + /** FileResource state. */ + public state: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState); - /** - * Verifies an Inventory message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileResource permissions. */ + public permissions: string; - /** - * Creates an Inventory message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Inventory - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory; + /** FileResource source. */ + public source?: ("file"|"content"); - /** - * Creates a plain object from an Inventory message. Also converts values to other types if specified. - * @param message Inventory - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new FileResource instance using the specified properties. + * @param [properties] Properties to set + * @returns FileResource instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; + + /** + * Encodes the specified FileResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. + * @param message FileResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Inventory to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified FileResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. + * @param message FileResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource, writer?: $protobuf.Writer): $protobuf.Writer; - namespace Inventory { + /** + * Decodes a FileResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; - /** Properties of an OsInfo. */ - interface IOsInfo { + /** + * Decodes a FileResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; - /** OsInfo hostname */ - hostname?: (string|null); + /** + * Verifies a FileResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** OsInfo longName */ - longName?: (string|null); + /** + * Creates a FileResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; - /** OsInfo shortName */ - shortName?: (string|null); + /** + * Creates a plain object from a FileResource message. Also converts values to other types if specified. + * @param message FileResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** OsInfo version */ - version?: (string|null); + /** + * Converts this FileResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** OsInfo architecture */ - architecture?: (string|null); + namespace FileResource { - /** OsInfo kernelVersion */ - kernelVersion?: (string|null); + /** DesiredState enum. */ + enum DesiredState { + DESIRED_STATE_UNSPECIFIED = 0, + PRESENT = 1, + ABSENT = 2, + CONTENTS_MATCH = 3 + } + } + } - /** OsInfo kernelRelease */ - kernelRelease?: (string|null); + /** Properties of a ResourceGroup. */ + interface IResourceGroup { - /** OsInfo osconfigAgentVersion */ - osconfigAgentVersion?: (string|null); + /** ResourceGroup osFilter */ + osFilter?: (google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null); + + /** ResourceGroup resources */ + resources?: (google.cloud.osconfig.v1alpha.OSPolicy.IResource[]|null); } - /** Represents an OsInfo. */ - class OsInfo implements IOsInfo { + /** Represents a ResourceGroup. */ + class ResourceGroup implements IResourceGroup { /** - * Constructs a new OsInfo. + * Constructs a new ResourceGroup. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IOsInfo); - - /** OsInfo hostname. */ - public hostname: string; - - /** OsInfo longName. */ - public longName: string; - - /** OsInfo shortName. */ - public shortName: string; - - /** OsInfo version. */ - public version: string; - - /** OsInfo architecture. */ - public architecture: string; - - /** OsInfo kernelVersion. */ - public kernelVersion: string; + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup); - /** OsInfo kernelRelease. */ - public kernelRelease: string; + /** ResourceGroup osFilter. */ + public osFilter?: (google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null); - /** OsInfo osconfigAgentVersion. */ - public osconfigAgentVersion: string; + /** ResourceGroup resources. */ + public resources: google.cloud.osconfig.v1alpha.OSPolicy.IResource[]; /** - * Creates a new OsInfo instance using the specified properties. + * Creates a new ResourceGroup instance using the specified properties. * @param [properties] Properties to set - * @returns OsInfo instance + * @returns ResourceGroup instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IOsInfo): google.cloud.osconfig.v1alpha.Inventory.OsInfo; + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; /** - * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. - * @param message OsInfo message or plain object to encode + * Encodes the specified ResourceGroup message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. - * @param message OsInfo message or plain object to encode + * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IOsInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OsInfo message from the specified reader or buffer. + * Decodes a ResourceGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OsInfo + * @returns ResourceGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.OsInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; /** - * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OsInfo + * @returns ResourceGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.OsInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; /** - * Verifies an OsInfo message. + * Verifies a ResourceGroup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OsInfo + * @returns ResourceGroup */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.OsInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; /** - * Creates a plain object from an OsInfo message. Also converts values to other types if specified. - * @param message OsInfo + * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. + * @param message ResourceGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.OsInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OsInfo to JSON. + * Converts this ResourceGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Item. */ - interface IItem { + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + VALIDATION = 1, + ENFORCEMENT = 2 + } + } + + /** Properties of a OSPolicyAssignment. */ + interface IOSPolicyAssignment { + + /** OSPolicyAssignment name */ + name?: (string|null); + + /** OSPolicyAssignment description */ + description?: (string|null); + + /** OSPolicyAssignment osPolicies */ + osPolicies?: (google.cloud.osconfig.v1alpha.IOSPolicy[]|null); + + /** OSPolicyAssignment instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); + + /** OSPolicyAssignment rollout */ + rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); + + /** OSPolicyAssignment revisionId */ + revisionId?: (string|null); + + /** OSPolicyAssignment revisionCreateTime */ + revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignment rolloutState */ + rolloutState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null); + + /** OSPolicyAssignment baseline */ + baseline?: (boolean|null); + + /** OSPolicyAssignment deleted */ + deleted?: (boolean|null); + + /** OSPolicyAssignment reconciling */ + reconciling?: (boolean|null); + + /** OSPolicyAssignment uid */ + uid?: (string|null); + } + + /** Represents a OSPolicyAssignment. */ + class OSPolicyAssignment implements IOSPolicyAssignment { + + /** + * Constructs a new OSPolicyAssignment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment); + + /** OSPolicyAssignment name. */ + public name: string; + + /** OSPolicyAssignment description. */ + public description: string; + + /** OSPolicyAssignment osPolicies. */ + public osPolicies: google.cloud.osconfig.v1alpha.IOSPolicy[]; + + /** OSPolicyAssignment instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); + + /** OSPolicyAssignment rollout. */ + public rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); + + /** OSPolicyAssignment revisionId. */ + public revisionId: string; + + /** OSPolicyAssignment revisionCreateTime. */ + public revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignment rolloutState. */ + public rolloutState: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState); + + /** OSPolicyAssignment baseline. */ + public baseline: boolean; + + /** OSPolicyAssignment deleted. */ + public deleted: boolean; - /** Item id */ - id?: (string|null); + /** OSPolicyAssignment reconciling. */ + public reconciling: boolean; - /** Item originType */ - originType?: (google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|null); + /** OSPolicyAssignment uid. */ + public uid: string; - /** Item createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new OSPolicyAssignment instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyAssignment instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment): google.cloud.osconfig.v1alpha.OSPolicyAssignment; - /** Item updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @param message OSPolicyAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; - /** Item type */ - type?: (google.cloud.osconfig.v1alpha.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.Type|null); + /** + * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @param message OSPolicyAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; - /** Item installedPackage */ - installedPackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment; - /** Item availablePackage */ - availablePackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); - } + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment; - /** Represents an Item. */ - class Item implements IItem { + /** + * Verifies a OSPolicyAssignment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Constructs a new Item. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IItem); + /** + * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyAssignment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment; - /** Item id. */ - public id: string; + /** + * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. + * @param message OSPolicyAssignment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Item originType. */ - public originType: (google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.OriginType); + /** + * Converts this OSPolicyAssignment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Item createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + namespace OSPolicyAssignment { - /** Item updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Properties of a LabelSet. */ + interface ILabelSet { - /** Item type. */ - public type: (google.cloud.osconfig.v1alpha.Inventory.Item.Type|keyof typeof google.cloud.osconfig.v1alpha.Inventory.Item.Type); + /** LabelSet labels */ + labels?: ({ [k: string]: string }|null); + } - /** Item installedPackage. */ - public installedPackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); + /** Represents a LabelSet. */ + class LabelSet implements ILabelSet { - /** Item availablePackage. */ - public availablePackage?: (google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null); + /** + * Constructs a new LabelSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet); - /** Item details. */ - public details?: ("installedPackage"|"availablePackage"); + /** LabelSet labels. */ + public labels: { [k: string]: string }; /** - * Creates a new Item instance using the specified properties. + * Creates a new LabelSet instance using the specified properties. * @param [properties] Properties to set - * @returns Item instance + * @returns LabelSet instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IItem): google.cloud.osconfig.v1alpha.Inventory.Item; + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; /** - * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. - * @param message Item message or plain object to encode + * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @param message LabelSet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. - * @param message Item message or plain object to encode + * Encodes the specified LabelSet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @param message LabelSet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Item message from the specified reader or buffer. + * Decodes a LabelSet message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Item + * @returns LabelSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.Item; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; /** - * Decodes an Item message from the specified reader or buffer, length delimited. + * Decodes a LabelSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Item + * @returns LabelSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.Item; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; /** - * Verifies an Item message. + * Verifies a LabelSet message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Item message from a plain object. Also converts values to their respective internal types. + * Creates a LabelSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Item + * @returns LabelSet */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.Item; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; /** - * Creates a plain object from an Item message. Also converts values to other types if specified. - * @param message Item + * Creates a plain object from a LabelSet message. Also converts values to other types if specified. + * @param message LabelSet * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Item to JSON. + * Converts this LabelSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Item { - - /** OriginType enum. */ - enum OriginType { - ORIGIN_TYPE_UNSPECIFIED = 0, - INVENTORY_REPORT = 1 - } - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - INSTALLED_PACKAGE = 1, - AVAILABLE_PACKAGE = 2 - } - } - - /** Properties of a SoftwarePackage. */ - interface ISoftwarePackage { - - /** SoftwarePackage yumPackage */ - yumPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - - /** SoftwarePackage aptPackage */ - aptPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - - /** SoftwarePackage zypperPackage */ - zypperPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - - /** SoftwarePackage googetPackage */ - googetPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - - /** SoftwarePackage zypperPatch */ - zypperPatch?: (google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null); + /** Properties of an InstanceFilter. */ + interface IInstanceFilter { - /** SoftwarePackage wuaPackage */ - wuaPackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null); + /** InstanceFilter all */ + all?: (boolean|null); - /** SoftwarePackage qfePackage */ - qfePackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null); + /** InstanceFilter osShortNames */ + osShortNames?: (string[]|null); - /** SoftwarePackage cosPackage */ - cosPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + /** InstanceFilter inclusionLabels */ + inclusionLabels?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]|null); - /** SoftwarePackage windowsApplication */ - windowsApplication?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null); + /** InstanceFilter exclusionLabels */ + exclusionLabels?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]|null); } - /** Represents a SoftwarePackage. */ - class SoftwarePackage implements ISoftwarePackage { + /** Represents an InstanceFilter. */ + class InstanceFilter implements IInstanceFilter { /** - * Constructs a new SoftwarePackage. + * Constructs a new InstanceFilter. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage); - - /** SoftwarePackage yumPackage. */ - public yumPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - - /** SoftwarePackage aptPackage. */ - public aptPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - - /** SoftwarePackage zypperPackage. */ - public zypperPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - - /** SoftwarePackage googetPackage. */ - public googetPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); - - /** SoftwarePackage zypperPatch. */ - public zypperPatch?: (google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null); - - /** SoftwarePackage wuaPackage. */ - public wuaPackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null); + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter); - /** SoftwarePackage qfePackage. */ - public qfePackage?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null); + /** InstanceFilter all. */ + public all: boolean; - /** SoftwarePackage cosPackage. */ - public cosPackage?: (google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null); + /** InstanceFilter osShortNames. */ + public osShortNames: string[]; - /** SoftwarePackage windowsApplication. */ - public windowsApplication?: (google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null); + /** InstanceFilter inclusionLabels. */ + public inclusionLabels: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]; - /** SoftwarePackage details. */ - public details?: ("yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"); + /** InstanceFilter exclusionLabels. */ + public exclusionLabels: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]; /** - * Creates a new SoftwarePackage instance using the specified properties. + * Creates a new InstanceFilter instance using the specified properties. * @param [properties] Properties to set - * @returns SoftwarePackage instance + * @returns InstanceFilter instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; /** - * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. - * @param message SoftwarePackage message or plain object to encode + * Encodes the specified InstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @param message InstanceFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. - * @param message SoftwarePackage message or plain object to encode + * Encodes the specified InstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @param message InstanceFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SoftwarePackage message from the specified reader or buffer. + * Decodes an InstanceFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SoftwarePackage + * @returns InstanceFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; /** - * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. + * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SoftwarePackage + * @returns InstanceFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; /** - * Verifies a SoftwarePackage message. + * Verifies an InstanceFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. + * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SoftwarePackage + * @returns InstanceFilter */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; /** - * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. - * @param message SoftwarePackage + * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. + * @param message InstanceFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SoftwarePackage to JSON. + * Converts this InstanceFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VersionedPackage. */ - interface IVersionedPackage { - - /** VersionedPackage packageName */ - packageName?: (string|null); + /** Properties of a Rollout. */ + interface IRollout { - /** VersionedPackage architecture */ - architecture?: (string|null); + /** Rollout disruptionBudget */ + disruptionBudget?: (google.cloud.osconfig.v1alpha.IFixedOrPercent|null); - /** VersionedPackage version */ - version?: (string|null); + /** Rollout minWaitDuration */ + minWaitDuration?: (google.protobuf.IDuration|null); } - /** Represents a VersionedPackage. */ - class VersionedPackage implements IVersionedPackage { + /** Represents a Rollout. */ + class Rollout implements IRollout { /** - * Constructs a new VersionedPackage. + * Constructs a new Rollout. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage); - - /** VersionedPackage packageName. */ - public packageName: string; + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout); - /** VersionedPackage architecture. */ - public architecture: string; + /** Rollout disruptionBudget. */ + public disruptionBudget?: (google.cloud.osconfig.v1alpha.IFixedOrPercent|null); - /** VersionedPackage version. */ - public version: string; + /** Rollout minWaitDuration. */ + public minWaitDuration?: (google.protobuf.IDuration|null); /** - * Creates a new VersionedPackage instance using the specified properties. + * Creates a new Rollout instance using the specified properties. * @param [properties] Properties to set - * @returns VersionedPackage instance + * @returns Rollout instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; /** - * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. - * @param message VersionedPackage message or plain object to encode + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. - * @param message VersionedPackage message or plain object to encode + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VersionedPackage message from the specified reader or buffer. + * Decodes a Rollout message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VersionedPackage + * @returns Rollout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; /** - * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. + * Decodes a Rollout message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VersionedPackage + * @returns Rollout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; /** - * Verifies a VersionedPackage message. + * Verifies a Rollout message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VersionedPackage + * @returns Rollout */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.VersionedPackage; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; /** - * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. - * @param message VersionedPackage + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @param message Rollout * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VersionedPackage to JSON. + * Converts this Rollout to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ZypperPatch. */ - interface IZypperPatch { + /** RolloutState enum. */ + enum RolloutState { + ROLLOUT_STATE_UNSPECIFIED = 0, + IN_PROGRESS = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4 + } + } - /** ZypperPatch patchName */ - patchName?: (string|null); + /** Properties of a OSPolicyAssignmentOperationMetadata. */ + interface IOSPolicyAssignmentOperationMetadata { - /** ZypperPatch category */ - category?: (string|null); + /** OSPolicyAssignmentOperationMetadata osPolicyAssignment */ + osPolicyAssignment?: (string|null); - /** ZypperPatch severity */ - severity?: (string|null); + /** OSPolicyAssignmentOperationMetadata apiMethod */ + apiMethod?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|null); - /** ZypperPatch summary */ - summary?: (string|null); - } + /** OSPolicyAssignmentOperationMetadata rolloutState */ + rolloutState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|null); - /** Represents a ZypperPatch. */ - class ZypperPatch implements IZypperPatch { + /** OSPolicyAssignmentOperationMetadata rolloutStartTime */ + rolloutStartTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new ZypperPatch. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch); + /** OSPolicyAssignmentOperationMetadata rolloutUpdateTime */ + rolloutUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a OSPolicyAssignmentOperationMetadata. */ + class OSPolicyAssignmentOperationMetadata implements IOSPolicyAssignmentOperationMetadata { + + /** + * Constructs a new OSPolicyAssignmentOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata); + + /** OSPolicyAssignmentOperationMetadata osPolicyAssignment. */ + public osPolicyAssignment: string; + + /** OSPolicyAssignmentOperationMetadata apiMethod. */ + public apiMethod: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod); + + /** OSPolicyAssignmentOperationMetadata rolloutState. */ + public rolloutState: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState); + + /** OSPolicyAssignmentOperationMetadata rolloutStartTime. */ + public rolloutStartTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignmentOperationMetadata rolloutUpdateTime. */ + public rolloutUpdateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OSPolicyAssignmentOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyAssignmentOperationMetadata instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @param message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @param message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + + /** + * Verifies a OSPolicyAssignmentOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyAssignmentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyAssignmentOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + + /** + * Creates a plain object from a OSPolicyAssignmentOperationMetadata message. Also converts values to other types if specified. + * @param message OSPolicyAssignmentOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ZypperPatch patchName. */ - public patchName: string; + /** + * Converts this OSPolicyAssignmentOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ZypperPatch category. */ - public category: string; + namespace OSPolicyAssignmentOperationMetadata { - /** ZypperPatch severity. */ - public severity: string; + /** APIMethod enum. */ + enum APIMethod { + API_METHOD_UNSPECIFIED = 0, + CREATE = 1, + UPDATE = 2, + DELETE = 3 + } - /** ZypperPatch summary. */ - public summary: string; + /** RolloutState enum. */ + enum RolloutState { + ROLLOUT_STATE_UNSPECIFIED = 0, + IN_PROGRESS = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4 + } + } - /** - * Creates a new ZypperPatch instance using the specified properties. - * @param [properties] Properties to set - * @returns ZypperPatch instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; + /** Properties of a CreateOSPolicyAssignmentRequest. */ + interface ICreateOSPolicyAssignmentRequest { - /** - * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. - * @param message ZypperPatch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateOSPolicyAssignmentRequest parent */ + parent?: (string|null); - /** - * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. - * @param message ZypperPatch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IZypperPatch, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateOSPolicyAssignmentRequest osPolicyAssignment */ + osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); - /** - * Decodes a ZypperPatch message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ZypperPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; + /** CreateOSPolicyAssignmentRequest osPolicyAssignmentId */ + osPolicyAssignmentId?: (string|null); + } - /** - * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ZypperPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; + /** Represents a CreateOSPolicyAssignmentRequest. */ + class CreateOSPolicyAssignmentRequest implements ICreateOSPolicyAssignmentRequest { - /** - * Verifies a ZypperPatch message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new CreateOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest); - /** - * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ZypperPatch - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.ZypperPatch; + /** CreateOSPolicyAssignmentRequest parent. */ + public parent: string; - /** - * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. - * @param message ZypperPatch - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.ZypperPatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CreateOSPolicyAssignmentRequest osPolicyAssignment. */ + public osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); - /** - * Converts this ZypperPatch to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** CreateOSPolicyAssignmentRequest osPolicyAssignmentId. */ + public osPolicyAssignmentId: string; - /** Properties of a WindowsUpdatePackage. */ - interface IWindowsUpdatePackage { + /** + * Creates a new CreateOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; - /** WindowsUpdatePackage title */ - title?: (string|null); + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsUpdatePackage description */ - description?: (string|null); + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsUpdatePackage categories */ - categories?: (google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]|null); + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; - /** WindowsUpdatePackage kbArticleIds */ - kbArticleIds?: (string[]|null); + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; - /** WindowsUpdatePackage supportUrl */ - supportUrl?: (string|null); + /** + * Verifies a CreateOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** WindowsUpdatePackage moreInfoUrls */ - moreInfoUrls?: (string[]|null); + /** + * Creates a CreateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; - /** WindowsUpdatePackage updateId */ - updateId?: (string|null); + /** + * Creates a plain object from a CreateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message CreateOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** WindowsUpdatePackage revisionNumber */ - revisionNumber?: (number|null); + /** + * Converts this CreateOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** WindowsUpdatePackage lastDeploymentChangeTime */ - lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); - } + /** Properties of an UpdateOSPolicyAssignmentRequest. */ + interface IUpdateOSPolicyAssignmentRequest { - /** Represents a WindowsUpdatePackage. */ - class WindowsUpdatePackage implements IWindowsUpdatePackage { + /** UpdateOSPolicyAssignmentRequest osPolicyAssignment */ + osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); - /** - * Constructs a new WindowsUpdatePackage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage); + /** UpdateOSPolicyAssignmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** WindowsUpdatePackage title. */ - public title: string; + /** Represents an UpdateOSPolicyAssignmentRequest. */ + class UpdateOSPolicyAssignmentRequest implements IUpdateOSPolicyAssignmentRequest { - /** WindowsUpdatePackage description. */ - public description: string; + /** + * Constructs a new UpdateOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest); - /** WindowsUpdatePackage categories. */ - public categories: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory[]; + /** UpdateOSPolicyAssignmentRequest osPolicyAssignment. */ + public osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); - /** WindowsUpdatePackage kbArticleIds. */ - public kbArticleIds: string[]; + /** UpdateOSPolicyAssignmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** WindowsUpdatePackage supportUrl. */ - public supportUrl: string; + /** + * Creates a new UpdateOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; - /** WindowsUpdatePackage moreInfoUrls. */ - public moreInfoUrls: string[]; + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsUpdatePackage updateId. */ - public updateId: string; + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsUpdatePackage revisionNumber. */ - public revisionNumber: number; + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; - /** WindowsUpdatePackage lastDeploymentChangeTime. */ - public lastDeploymentChangeTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; - /** - * Creates a new WindowsUpdatePackage instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsUpdatePackage instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; + /** + * Verifies an UpdateOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. - * @param message WindowsUpdatePackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an UpdateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; - /** - * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. - * @param message WindowsUpdatePackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an UpdateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message UpdateOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a WindowsUpdatePackage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsUpdatePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; + /** + * Converts this UpdateOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsUpdatePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; + /** Properties of a GetOSPolicyAssignmentRequest. */ + interface IGetOSPolicyAssignmentRequest { - /** - * Verifies a WindowsUpdatePackage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** GetOSPolicyAssignmentRequest name */ + name?: (string|null); + } - /** - * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsUpdatePackage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage; + /** Represents a GetOSPolicyAssignmentRequest. */ + class GetOSPolicyAssignmentRequest implements IGetOSPolicyAssignmentRequest { - /** - * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. - * @param message WindowsUpdatePackage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new GetOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest); - /** - * Converts this WindowsUpdatePackage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** GetOSPolicyAssignmentRequest name. */ + public name: string; - namespace WindowsUpdatePackage { + /** + * Creates a new GetOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; - /** Properties of a WindowsUpdateCategory. */ - interface IWindowsUpdateCategory { + /** + * Encodes the specified GetOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsUpdateCategory id */ - id?: (string|null); + /** + * Encodes the specified GetOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsUpdateCategory name */ - name?: (string|null); - } + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; - /** Represents a WindowsUpdateCategory. */ - class WindowsUpdateCategory implements IWindowsUpdateCategory { + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; - /** - * Constructs a new WindowsUpdateCategory. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory); + /** + * Verifies a GetOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** WindowsUpdateCategory id. */ - public id: string; + /** + * Creates a GetOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; - /** WindowsUpdateCategory name. */ - public name: string; + /** + * Creates a plain object from a GetOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message GetOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new WindowsUpdateCategory instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsUpdateCategory instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + /** + * Converts this GetOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. - * @param message WindowsUpdateCategory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a ListOSPolicyAssignmentsRequest. */ + interface IListOSPolicyAssignmentsRequest { - /** - * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. - * @param message WindowsUpdateCategory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListOSPolicyAssignmentsRequest parent */ + parent?: (string|null); - /** - * Decodes a WindowsUpdateCategory message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsUpdateCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + /** ListOSPolicyAssignmentsRequest pageSize */ + pageSize?: (number|null); - /** - * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsUpdateCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + /** ListOSPolicyAssignmentsRequest pageToken */ + pageToken?: (string|null); + } - /** - * Verifies a WindowsUpdateCategory message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a ListOSPolicyAssignmentsRequest. */ + class ListOSPolicyAssignmentsRequest implements IListOSPolicyAssignmentsRequest { - /** - * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsUpdateCategory - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory; + /** + * Constructs a new ListOSPolicyAssignmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest); - /** - * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. - * @param message WindowsUpdateCategory - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListOSPolicyAssignmentsRequest parent. */ + public parent: string; - /** - * Converts this WindowsUpdateCategory to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** ListOSPolicyAssignmentsRequest pageSize. */ + public pageSize: number; - /** Properties of a WindowsQuickFixEngineeringPackage. */ - interface IWindowsQuickFixEngineeringPackage { + /** ListOSPolicyAssignmentsRequest pageToken. */ + public pageToken: string; - /** WindowsQuickFixEngineeringPackage caption */ - caption?: (string|null); + /** + * Creates a new ListOSPolicyAssignmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; - /** WindowsQuickFixEngineeringPackage description */ - description?: (string|null); + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsQuickFixEngineeringPackage hotFixId */ - hotFixId?: (string|null); + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** WindowsQuickFixEngineeringPackage installTime */ - installTime?: (google.protobuf.ITimestamp|null); - } + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; - /** Represents a WindowsQuickFixEngineeringPackage. */ - class WindowsQuickFixEngineeringPackage implements IWindowsQuickFixEngineeringPackage { + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; - /** - * Constructs a new WindowsQuickFixEngineeringPackage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage); + /** + * Verifies a ListOSPolicyAssignmentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** WindowsQuickFixEngineeringPackage caption. */ - public caption: string; + /** + * Creates a ListOSPolicyAssignmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; - /** WindowsQuickFixEngineeringPackage description. */ - public description: string; + /** + * Creates a plain object from a ListOSPolicyAssignmentsRequest message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** WindowsQuickFixEngineeringPackage hotFixId. */ - public hotFixId: string; + /** + * Converts this ListOSPolicyAssignmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** WindowsQuickFixEngineeringPackage installTime. */ - public installTime?: (google.protobuf.ITimestamp|null); + /** Properties of a ListOSPolicyAssignmentsResponse. */ + interface IListOSPolicyAssignmentsResponse { - /** - * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsQuickFixEngineeringPackage instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; + /** ListOSPolicyAssignmentsResponse osPolicyAssignments */ + osPolicyAssignments?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]|null); - /** - * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. - * @param message WindowsQuickFixEngineeringPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListOSPolicyAssignmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. - * @param message WindowsQuickFixEngineeringPackage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ListOSPolicyAssignmentsResponse. */ + class ListOSPolicyAssignmentsResponse implements IListOSPolicyAssignmentsResponse { - /** - * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsQuickFixEngineeringPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; + /** + * Constructs a new ListOSPolicyAssignmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse); - /** - * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsQuickFixEngineeringPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; + /** ListOSPolicyAssignmentsResponse osPolicyAssignments. */ + public osPolicyAssignments: google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]; - /** - * Verifies a WindowsQuickFixEngineeringPackage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListOSPolicyAssignmentsResponse nextPageToken. */ + public nextPageToken: string; - /** - * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsQuickFixEngineeringPackage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage; + /** + * Creates a new ListOSPolicyAssignmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; - /** - * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. - * @param message WindowsQuickFixEngineeringPackage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this WindowsQuickFixEngineeringPackage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a WindowsApplication. */ - interface IWindowsApplication { + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; - /** WindowsApplication displayName */ - displayName?: (string|null); + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; + + /** + * Verifies a ListOSPolicyAssignmentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; - /** WindowsApplication displayVersion */ - displayVersion?: (string|null); + /** + * Creates a plain object from a ListOSPolicyAssignmentsResponse message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** WindowsApplication publisher */ - publisher?: (string|null); + /** + * Converts this ListOSPolicyAssignmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** WindowsApplication installDate */ - installDate?: (google.type.IDate|null); + /** Properties of a ListOSPolicyAssignmentRevisionsRequest. */ + interface IListOSPolicyAssignmentRevisionsRequest { - /** WindowsApplication helpLink */ - helpLink?: (string|null); - } + /** ListOSPolicyAssignmentRevisionsRequest name */ + name?: (string|null); - /** Represents a WindowsApplication. */ - class WindowsApplication implements IWindowsApplication { + /** ListOSPolicyAssignmentRevisionsRequest pageSize */ + pageSize?: (number|null); - /** - * Constructs a new WindowsApplication. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication); + /** ListOSPolicyAssignmentRevisionsRequest pageToken */ + pageToken?: (string|null); + } - /** WindowsApplication displayName. */ - public displayName: string; + /** Represents a ListOSPolicyAssignmentRevisionsRequest. */ + class ListOSPolicyAssignmentRevisionsRequest implements IListOSPolicyAssignmentRevisionsRequest { - /** WindowsApplication displayVersion. */ - public displayVersion: string; + /** + * Constructs a new ListOSPolicyAssignmentRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest); - /** WindowsApplication publisher. */ - public publisher: string; + /** ListOSPolicyAssignmentRevisionsRequest name. */ + public name: string; - /** WindowsApplication installDate. */ - public installDate?: (google.type.IDate|null); + /** ListOSPolicyAssignmentRevisionsRequest pageSize. */ + public pageSize: number; - /** WindowsApplication helpLink. */ - public helpLink: string; + /** ListOSPolicyAssignmentRevisionsRequest pageToken. */ + public pageToken: string; - /** - * Creates a new WindowsApplication instance using the specified properties. - * @param [properties] Properties to set - * @returns WindowsApplication instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + /** + * Creates a new ListOSPolicyAssignmentRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentRevisionsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; - /** - * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. - * @param message WindowsApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. - * @param message WindowsApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a WindowsApplication message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WindowsApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; - /** - * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WindowsApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; - /** - * Verifies a WindowsApplication message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a ListOSPolicyAssignmentRevisionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WindowsApplication - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.Inventory.WindowsApplication; + /** + * Creates a ListOSPolicyAssignmentRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; - /** - * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. - * @param message WindowsApplication - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.Inventory.WindowsApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsRequest message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this WindowsApplication to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this ListOSPolicyAssignmentRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a GetInventoryRequest. */ - interface IGetInventoryRequest { + /** Properties of a ListOSPolicyAssignmentRevisionsResponse. */ + interface IListOSPolicyAssignmentRevisionsResponse { - /** GetInventoryRequest name */ - name?: (string|null); + /** ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments */ + osPolicyAssignments?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]|null); - /** GetInventoryRequest view */ - view?: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView|null); + /** ListOSPolicyAssignmentRevisionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetInventoryRequest. */ - class GetInventoryRequest implements IGetInventoryRequest { + /** Represents a ListOSPolicyAssignmentRevisionsResponse. */ + class ListOSPolicyAssignmentRevisionsResponse implements IListOSPolicyAssignmentRevisionsResponse { /** - * Constructs a new GetInventoryRequest. + * Constructs a new ListOSPolicyAssignmentRevisionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1alpha.IGetInventoryRequest); + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse); - /** GetInventoryRequest name. */ - public name: string; + /** ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments. */ + public osPolicyAssignments: google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]; - /** GetInventoryRequest view. */ - public view: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView); + /** ListOSPolicyAssignmentRevisionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetInventoryRequest instance using the specified properties. + * Creates a new ListOSPolicyAssignmentRevisionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetInventoryRequest instance + * @returns ListOSPolicyAssignmentRevisionsResponse instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.IGetInventoryRequest): google.cloud.osconfig.v1alpha.GetInventoryRequest; + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; /** - * Encodes the specified GetInventoryRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. - * @param message GetInventoryRequest message or plain object to encode + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.IGetInventoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetInventoryRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. - * @param message GetInventoryRequest message or plain object to encode + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetInventoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetInventoryRequest message from the specified reader or buffer. + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetInventoryRequest + * @returns ListOSPolicyAssignmentRevisionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetInventoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; /** - * Decodes a GetInventoryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetInventoryRequest + * @returns ListOSPolicyAssignmentRevisionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetInventoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; /** - * Verifies a GetInventoryRequest message. + * Verifies a ListOSPolicyAssignmentRevisionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetInventoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListOSPolicyAssignmentRevisionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetInventoryRequest + * @returns ListOSPolicyAssignmentRevisionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetInventoryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; /** - * Creates a plain object from a GetInventoryRequest message. Also converts values to other types if specified. - * @param message GetInventoryRequest + * Creates a plain object from a ListOSPolicyAssignmentRevisionsResponse message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentRevisionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.GetInventoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetInventoryRequest to JSON. + * Converts this ListOSPolicyAssignmentRevisionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListInventoriesRequest. */ - interface IListInventoriesRequest { - - /** ListInventoriesRequest parent */ - parent?: (string|null); - - /** ListInventoriesRequest view */ - view?: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView|null); - - /** ListInventoriesRequest pageSize */ - pageSize?: (number|null); - - /** ListInventoriesRequest pageToken */ - pageToken?: (string|null); + /** Properties of a DeleteOSPolicyAssignmentRequest. */ + interface IDeleteOSPolicyAssignmentRequest { - /** ListInventoriesRequest filter */ - filter?: (string|null); + /** DeleteOSPolicyAssignmentRequest name */ + name?: (string|null); } - /** Represents a ListInventoriesRequest. */ - class ListInventoriesRequest implements IListInventoriesRequest { + /** Represents a DeleteOSPolicyAssignmentRequest. */ + class DeleteOSPolicyAssignmentRequest implements IDeleteOSPolicyAssignmentRequest { /** - * Constructs a new ListInventoriesRequest. + * Constructs a new DeleteOSPolicyAssignmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListInventoriesRequest); - - /** ListInventoriesRequest parent. */ - public parent: string; - - /** ListInventoriesRequest view. */ - public view: (google.cloud.osconfig.v1alpha.InventoryView|keyof typeof google.cloud.osconfig.v1alpha.InventoryView); - - /** ListInventoriesRequest pageSize. */ - public pageSize: number; - - /** ListInventoriesRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest); - /** ListInventoriesRequest filter. */ - public filter: string; + /** DeleteOSPolicyAssignmentRequest name. */ + public name: string; /** - * Creates a new ListInventoriesRequest instance using the specified properties. + * Creates a new DeleteOSPolicyAssignmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListInventoriesRequest instance + * @returns DeleteOSPolicyAssignmentRequest instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListInventoriesRequest): google.cloud.osconfig.v1alpha.ListInventoriesRequest; + public static create(properties?: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; /** - * Encodes the specified ListInventoriesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. - * @param message ListInventoriesRequest message or plain object to encode + * Encodes the specified DeleteOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @param message DeleteOSPolicyAssignmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.IListInventoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListInventoriesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. - * @param message ListInventoriesRequest message or plain object to encode + * Encodes the specified DeleteOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @param message DeleteOSPolicyAssignmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInventoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListInventoriesRequest message from the specified reader or buffer. + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListInventoriesRequest + * @returns DeleteOSPolicyAssignmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInventoriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; /** - * Decodes a ListInventoriesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListInventoriesRequest + * @returns DeleteOSPolicyAssignmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInventoriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; /** - * Verifies a ListInventoriesRequest message. + * Verifies a DeleteOSPolicyAssignmentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListInventoriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListInventoriesRequest + * @returns DeleteOSPolicyAssignmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInventoriesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; /** - * Creates a plain object from a ListInventoriesRequest message. Also converts values to other types if specified. - * @param message ListInventoriesRequest + * Creates a plain object from a DeleteOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message DeleteOSPolicyAssignmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListInventoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListInventoriesRequest to JSON. + * Converts this DeleteOSPolicyAssignmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListInventoriesResponse. */ - interface IListInventoriesResponse { + /** Properties of a FixedOrPercent. */ + interface IFixedOrPercent { - /** ListInventoriesResponse inventories */ - inventories?: (google.cloud.osconfig.v1alpha.IInventory[]|null); + /** FixedOrPercent fixed */ + fixed?: (number|null); - /** ListInventoriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** FixedOrPercent percent */ + percent?: (number|null); } - /** Represents a ListInventoriesResponse. */ - class ListInventoriesResponse implements IListInventoriesResponse { + /** Represents a FixedOrPercent. */ + class FixedOrPercent implements IFixedOrPercent { /** - * Constructs a new ListInventoriesResponse. + * Constructs a new FixedOrPercent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListInventoriesResponse); + constructor(properties?: google.cloud.osconfig.v1alpha.IFixedOrPercent); - /** ListInventoriesResponse inventories. */ - public inventories: google.cloud.osconfig.v1alpha.IInventory[]; + /** FixedOrPercent fixed. */ + public fixed?: (number|null); - /** ListInventoriesResponse nextPageToken. */ - public nextPageToken: string; + /** FixedOrPercent percent. */ + public percent?: (number|null); + + /** FixedOrPercent mode. */ + public mode?: ("fixed"|"percent"); /** - * Creates a new ListInventoriesResponse instance using the specified properties. + * Creates a new FixedOrPercent instance using the specified properties. * @param [properties] Properties to set - * @returns ListInventoriesResponse instance + * @returns FixedOrPercent instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListInventoriesResponse): google.cloud.osconfig.v1alpha.ListInventoriesResponse; + public static create(properties?: google.cloud.osconfig.v1alpha.IFixedOrPercent): google.cloud.osconfig.v1alpha.FixedOrPercent; /** - * Encodes the specified ListInventoriesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. - * @param message ListInventoriesResponse message or plain object to encode + * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. + * @param message FixedOrPercent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.IListInventoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListInventoriesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. - * @param message ListInventoriesResponse message or plain object to encode + * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. + * @param message FixedOrPercent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListInventoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListInventoriesResponse message from the specified reader or buffer. + * Decodes a FixedOrPercent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListInventoriesResponse + * @returns FixedOrPercent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListInventoriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.FixedOrPercent; /** - * Decodes a ListInventoriesResponse message from the specified reader or buffer, length delimited. + * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListInventoriesResponse + * @returns FixedOrPercent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListInventoriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.FixedOrPercent; /** - * Verifies a ListInventoriesResponse message. + * Verifies a FixedOrPercent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListInventoriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListInventoriesResponse + * @returns FixedOrPercent */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListInventoriesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.FixedOrPercent; /** - * Creates a plain object from a ListInventoriesResponse message. Also converts values to other types if specified. - * @param message ListInventoriesResponse + * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. + * @param message FixedOrPercent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListInventoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.FixedOrPercent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListInventoriesResponse to JSON. + * Converts this FixedOrPercent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** InventoryView enum. */ - enum InventoryView { - INVENTORY_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 2 - } - - /** Properties of a OSPolicy. */ - interface IOSPolicy { - - /** OSPolicy id */ - id?: (string|null); - - /** OSPolicy description */ - description?: (string|null); - - /** OSPolicy mode */ - mode?: (google.cloud.osconfig.v1alpha.OSPolicy.Mode|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Mode|null); - - /** OSPolicy resourceGroups */ - resourceGroups?: (google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup[]|null); - - /** OSPolicy allowNoResourceGroupMatch */ - allowNoResourceGroupMatch?: (boolean|null); - } - - /** Represents a OSPolicy. */ - class OSPolicy implements IOSPolicy { + /** Represents an OsConfigZonalService */ + class OsConfigZonalService extends $protobuf.rpc.Service { /** - * Constructs a new OSPolicy. - * @param [properties] Properties to set + * Constructs a new OsConfigZonalService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicy); - - /** OSPolicy id. */ - public id: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** OSPolicy description. */ - public description: string; + /** + * Creates new OsConfigZonalService 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): OsConfigZonalService; - /** OSPolicy mode. */ - public mode: (google.cloud.osconfig.v1alpha.OSPolicy.Mode|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Mode); + /** + * Calls CreateOSPolicyAssignment. + * @param request CreateOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignmentCallback): void; - /** OSPolicy resourceGroups. */ - public resourceGroups: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup[]; + /** + * Calls CreateOSPolicyAssignment. + * @param request CreateOSPolicyAssignmentRequest message or plain object + * @returns Promise + */ + public createOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest): Promise; - /** OSPolicy allowNoResourceGroupMatch. */ - public allowNoResourceGroupMatch: boolean; + /** + * Calls UpdateOSPolicyAssignment. + * @param request UpdateOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignmentCallback): void; /** - * Creates a new OSPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns OSPolicy instance + * Calls UpdateOSPolicyAssignment. + * @param request UpdateOSPolicyAssignmentRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicy): google.cloud.osconfig.v1alpha.OSPolicy; + public updateOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest): Promise; /** - * Encodes the specified OSPolicy message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. - * @param message OSPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetOSPolicyAssignment. + * @param request GetOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OSPolicyAssignment */ - public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public getOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentCallback): void; /** - * Encodes the specified OSPolicy message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. - * @param message OSPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetOSPolicyAssignment. + * @param request GetOSPolicyAssignmentRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public getOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest): Promise; /** - * Decodes a OSPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OSPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListOSPolicyAssignments. + * @param request ListOSPolicyAssignmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy; + public listOSPolicyAssignments(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentsCallback): void; /** - * Decodes a OSPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OSPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListOSPolicyAssignments. + * @param request ListOSPolicyAssignmentsRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy; + public listOSPolicyAssignments(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest): Promise; /** - * Verifies a OSPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListOSPolicyAssignmentRevisions. + * @param request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentRevisionsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listOSPolicyAssignmentRevisions(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisionsCallback): void; /** - * Creates a OSPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OSPolicy + * Calls ListOSPolicyAssignmentRevisions. + * @param request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy; + public listOSPolicyAssignmentRevisions(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest): Promise; /** - * Creates a plain object from a OSPolicy message. Also converts values to other types if specified. - * @param message OSPolicy - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteOSPolicyAssignment. + * @param request DeleteOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignmentCallback): void; /** - * Converts this OSPolicy to JSON. - * @returns JSON object + * Calls DeleteOSPolicyAssignment. + * @param request DeleteOSPolicyAssignmentRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - namespace OSPolicy { - - /** Properties of a OSFilter. */ - interface IOSFilter { - - /** OSFilter osShortName */ - osShortName?: (string|null); - - /** OSFilter osVersion */ - osVersion?: (string|null); - } - - /** Represents a OSFilter. */ - class OSFilter implements IOSFilter { - - /** - * Constructs a new OSFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter); - - /** OSFilter osShortName. */ - public osShortName: string; - - /** OSFilter osVersion. */ - public osVersion: string; - - /** - * Creates a new OSFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns OSFilter instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; - - /** - * Encodes the specified OSFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. - * @param message OSFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OSFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. - * @param message OSFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a OSFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OSFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; - - /** - * Decodes a OSFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OSFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; - - /** - * Verifies a OSFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a OSFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OSFilter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.OSFilter; - - /** - * Creates a plain object from a OSFilter message. Also converts values to other types if specified. - * @param message OSFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OSFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Resource. */ - interface IResource { - - /** Resource id */ - id?: (string|null); - - /** Resource pkg */ - pkg?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null); - - /** Resource repository */ - repository?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null); - - /** Resource exec */ - exec?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null); - - /** Resource file */ - file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null); - } - - /** Represents a Resource. */ - class Resource implements IResource { - - /** - * Constructs a new Resource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResource); - - /** Resource id. */ - public id: string; - - /** Resource pkg. */ - public pkg?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null); - - /** Resource repository. */ - public repository?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null); - - /** Resource exec. */ - public exec?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null); - - /** Resource file. */ - public file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null); - - /** Resource resourceType. */ - public resourceType?: ("pkg"|"repository"|"exec"|"file"); - - /** - * Creates a new Resource instance using the specified properties. - * @param [properties] Properties to set - * @returns Resource instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource; - - /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest): Promise; - /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls GetInstanceOSPoliciesCompliance. + * @param request GetInstanceOSPoliciesComplianceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InstanceOSPoliciesCompliance + */ + public getInstanceOSPoliciesCompliance(request: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesComplianceCallback): void; - /** - * 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.osconfig.v1alpha.OSPolicy.Resource; + /** + * Calls GetInstanceOSPoliciesCompliance. + * @param request GetInstanceOSPoliciesComplianceRequest message or plain object + * @returns Promise + */ + public getInstanceOSPoliciesCompliance(request: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest): Promise; - /** - * 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.osconfig.v1alpha.OSPolicy.Resource; + /** + * Calls ListInstanceOSPoliciesCompliances. + * @param request ListInstanceOSPoliciesCompliancesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListInstanceOSPoliciesCompliancesResponse + */ + public listInstanceOSPoliciesCompliances(request: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliancesCallback): void; - /** - * 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); + /** + * Calls ListInstanceOSPoliciesCompliances. + * @param request ListInstanceOSPoliciesCompliancesRequest message or plain object + * @returns Promise + */ + public listInstanceOSPoliciesCompliances(request: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest): Promise; - /** - * 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.osconfig.v1alpha.OSPolicy.Resource; + /** + * Calls GetInventory. + * @param request GetInventoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Inventory + */ + public getInventory(request: google.cloud.osconfig.v1alpha.IGetInventoryRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventoryCallback): void; - /** - * 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.osconfig.v1alpha.OSPolicy.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls GetInventory. + * @param request GetInventoryRequest message or plain object + * @returns Promise + */ + public getInventory(request: google.cloud.osconfig.v1alpha.IGetInventoryRequest): Promise; - /** - * Converts this Resource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Calls ListInventories. + * @param request ListInventoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListInventoriesResponse + */ + public listInventories(request: google.cloud.osconfig.v1alpha.IListInventoriesRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventoriesCallback): void; - namespace Resource { + /** + * Calls ListInventories. + * @param request ListInventoriesRequest message or plain object + * @returns Promise + */ + public listInventories(request: google.cloud.osconfig.v1alpha.IListInventoriesRequest): Promise; - /** Properties of a File. */ - interface IFile { + /** + * Calls GetVulnerabilityReport. + * @param request GetVulnerabilityReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VulnerabilityReport + */ + public getVulnerabilityReport(request: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReportCallback): void; - /** File remote */ - remote?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null); + /** + * Calls GetVulnerabilityReport. + * @param request GetVulnerabilityReportRequest message or plain object + * @returns Promise + */ + public getVulnerabilityReport(request: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest): Promise; - /** File gcs */ - gcs?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null); + /** + * Calls ListVulnerabilityReports. + * @param request ListVulnerabilityReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVulnerabilityReportsResponse + */ + public listVulnerabilityReports(request: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReportsCallback): void; - /** File localPath */ - localPath?: (string|null); + /** + * Calls ListVulnerabilityReports. + * @param request ListVulnerabilityReportsRequest message or plain object + * @returns Promise + */ + public listVulnerabilityReports(request: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest): Promise; + } - /** File allowInsecure */ - allowInsecure?: (boolean|null); - } + namespace OsConfigZonalService { - /** Represents a File. */ - class File implements IFile { + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#createOSPolicyAssignment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Constructs a new File. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile); + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#updateOSPolicyAssignment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** File remote. */ - public remote?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null); + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignment}. + * @param error Error, if any + * @param [response] OSPolicyAssignment + */ + type GetOSPolicyAssignmentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.OSPolicyAssignment) => void; - /** File gcs. */ - public gcs?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null); + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignments}. + * @param error Error, if any + * @param [response] ListOSPolicyAssignmentsResponse + */ + type ListOSPolicyAssignmentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) => void; - /** File localPath. */ - public localPath?: (string|null); + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * @param error Error, if any + * @param [response] ListOSPolicyAssignmentRevisionsResponse + */ + type ListOSPolicyAssignmentRevisionsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) => void; - /** File allowInsecure. */ - public allowInsecure: boolean; + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#deleteOSPolicyAssignment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** File type. */ - public type?: ("remote"|"gcs"|"localPath"); + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInstanceOSPoliciesCompliance}. + * @param error Error, if any + * @param [response] InstanceOSPoliciesCompliance + */ + type GetInstanceOSPoliciesComplianceCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) => void; - /** - * Creates a new File instance using the specified properties. - * @param [properties] Properties to set - * @returns File instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInstanceOSPoliciesCompliances}. + * @param error Error, if any + * @param [response] ListInstanceOSPoliciesCompliancesResponse + */ + type ListInstanceOSPoliciesCompliancesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) => void; - /** - * Encodes the specified File message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. - * @param message File message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. + * @param error Error, if any + * @param [response] Inventory + */ + type GetInventoryCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.Inventory) => void; - /** - * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. - * @param message File message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInventories}. + * @param error Error, if any + * @param [response] ListInventoriesResponse + */ + type ListInventoriesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListInventoriesResponse) => void; - /** - * Decodes a File message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getVulnerabilityReport}. + * @param error Error, if any + * @param [response] VulnerabilityReport + */ + type GetVulnerabilityReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.VulnerabilityReport) => void; - /** - * Decodes a File message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listVulnerabilityReports}. + * @param error Error, if any + * @param [response] ListVulnerabilityReportsResponse + */ + type ListVulnerabilityReportsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) => void; + } - /** - * Verifies a File message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a VulnerabilityReport. */ + interface IVulnerabilityReport { - /** - * Creates a File message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns File - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File; + /** VulnerabilityReport name */ + name?: (string|null); + + /** VulnerabilityReport vulnerabilities */ + vulnerabilities?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability[]|null); - /** - * Creates a plain object from a File message. Also converts values to other types if specified. - * @param message File - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** VulnerabilityReport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** - * Converts this File to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a VulnerabilityReport. */ + class VulnerabilityReport implements IVulnerabilityReport { - namespace File { + /** + * Constructs a new VulnerabilityReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IVulnerabilityReport); - /** Properties of a Remote. */ - interface IRemote { + /** VulnerabilityReport name. */ + public name: string; - /** Remote uri */ - uri?: (string|null); + /** VulnerabilityReport vulnerabilities. */ + public vulnerabilities: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability[]; - /** Remote sha256Checksum */ - sha256Checksum?: (string|null); - } + /** VulnerabilityReport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** Represents a Remote. */ - class Remote implements IRemote { + /** + * Creates a new VulnerabilityReport instance using the specified properties. + * @param [properties] Properties to set + * @returns VulnerabilityReport instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IVulnerabilityReport): google.cloud.osconfig.v1alpha.VulnerabilityReport; - /** - * Constructs a new Remote. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote); + /** + * Encodes the specified VulnerabilityReport message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. + * @param message VulnerabilityReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IVulnerabilityReport, writer?: $protobuf.Writer): $protobuf.Writer; - /** Remote uri. */ - public uri: string; + /** + * Encodes the specified VulnerabilityReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. + * @param message VulnerabilityReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IVulnerabilityReport, writer?: $protobuf.Writer): $protobuf.Writer; - /** Remote sha256Checksum. */ - public sha256Checksum: string; + /** + * Decodes a VulnerabilityReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VulnerabilityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport; - /** - * Creates a new Remote instance using the specified properties. - * @param [properties] Properties to set - * @returns Remote instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; + /** + * Decodes a VulnerabilityReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VulnerabilityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport; - /** - * Encodes the specified Remote message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. - * @param message Remote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a VulnerabilityReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified Remote message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. - * @param message Remote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a VulnerabilityReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VulnerabilityReport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport; - /** - * Decodes a Remote message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Remote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; + /** + * Creates a plain object from a VulnerabilityReport message. Also converts values to other types if specified. + * @param message VulnerabilityReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a Remote message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Remote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; + /** + * Converts this VulnerabilityReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies a Remote message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + namespace VulnerabilityReport { - /** - * Creates a Remote message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Remote - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote; + /** Properties of a Vulnerability. */ + interface IVulnerability { - /** - * Creates a plain object from a Remote message. Also converts values to other types if specified. - * @param message Remote - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Vulnerability details */ + details?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null); - /** - * Converts this Remote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Vulnerability installedInventoryItemIds */ + installedInventoryItemIds?: (string[]|null); - /** Properties of a Gcs. */ - interface IGcs { + /** Vulnerability availableInventoryItemIds */ + availableInventoryItemIds?: (string[]|null); - /** Gcs bucket */ - bucket?: (string|null); + /** Vulnerability createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Gcs object */ - object?: (string|null); + /** Vulnerability updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** Gcs generation */ - generation?: (number|Long|string|null); - } + /** Represents a Vulnerability. */ + class Vulnerability implements IVulnerability { - /** Represents a Gcs. */ - class Gcs implements IGcs { + /** + * Constructs a new Vulnerability. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability); - /** - * Constructs a new Gcs. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs); + /** Vulnerability details. */ + public details?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null); - /** Gcs bucket. */ - public bucket: string; + /** Vulnerability installedInventoryItemIds. */ + public installedInventoryItemIds: string[]; - /** Gcs object. */ - public object: string; + /** Vulnerability availableInventoryItemIds. */ + public availableInventoryItemIds: string[]; - /** Gcs generation. */ - public generation: (number|Long|string); + /** Vulnerability createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a new Gcs instance using the specified properties. - * @param [properties] Properties to set - * @returns Gcs instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; + /** Vulnerability updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified Gcs message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. - * @param message Gcs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new Vulnerability instance using the specified properties. + * @param [properties] Properties to set + * @returns Vulnerability instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; - /** - * Encodes the specified Gcs message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. - * @param message Gcs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Gcs message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Gcs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; + /** + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Gcs message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Gcs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; + /** + * Decodes a Vulnerability message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; - /** - * Verifies a Gcs message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; - /** - * Creates a Gcs message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Gcs - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs; + /** + * Verifies a Vulnerability message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a Gcs message. Also converts values to other types if specified. - * @param message Gcs - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Vulnerability + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; - /** - * Converts this Gcs to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * @param message Vulnerability + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a PackageResource. */ - interface IPackageResource { + /** + * Converts this Vulnerability to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** PackageResource desiredState */ - desiredState?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|null); + namespace Vulnerability { - /** PackageResource apt */ - apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null); + /** Properties of a Details. */ + interface IDetails { - /** PackageResource deb */ - deb?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null); + /** Details cve */ + cve?: (string|null); - /** PackageResource yum */ - yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null); + /** Details cvssV2Score */ + cvssV2Score?: (number|null); - /** PackageResource zypper */ - zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null); + /** Details cvssV3 */ + cvssV3?: (google.cloud.osconfig.v1alpha.ICVSSv3|null); - /** PackageResource rpm */ - rpm?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null); + /** Details severity */ + severity?: (string|null); - /** PackageResource googet */ - googet?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null); + /** Details description */ + description?: (string|null); - /** PackageResource msi */ - msi?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null); + /** Details references */ + references?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference[]|null); } - /** Represents a PackageResource. */ - class PackageResource implements IPackageResource { + /** Represents a Details. */ + class Details implements IDetails { /** - * Constructs a new PackageResource. + * Constructs a new Details. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource); - - /** PackageResource desiredState. */ - public desiredState: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState); - - /** PackageResource apt. */ - public apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null); - - /** PackageResource deb. */ - public deb?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null); + constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails); - /** PackageResource yum. */ - public yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null); + /** Details cve. */ + public cve: string; - /** PackageResource zypper. */ - public zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null); + /** Details cvssV2Score. */ + public cvssV2Score: number; - /** PackageResource rpm. */ - public rpm?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null); + /** Details cvssV3. */ + public cvssV3?: (google.cloud.osconfig.v1alpha.ICVSSv3|null); - /** PackageResource googet. */ - public googet?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null); + /** Details severity. */ + public severity: string; - /** PackageResource msi. */ - public msi?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null); + /** Details description. */ + public description: string; - /** PackageResource systemPackage. */ - public systemPackage?: ("apt"|"deb"|"yum"|"zypper"|"rpm"|"googet"|"msi"); + /** Details references. */ + public references: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference[]; /** - * Creates a new PackageResource instance using the specified properties. + * Creates a new Details instance using the specified properties. * @param [properties] Properties to set - * @returns PackageResource instance + * @returns Details instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; + public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; /** - * Encodes the specified PackageResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. - * @param message PackageResource message or plain object to encode + * Encodes the specified Details message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @param message Details message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PackageResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. - * @param message PackageResource message or plain object to encode + * Encodes the specified Details message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @param message Details message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PackageResource message from the specified reader or buffer. + * Decodes a Details message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PackageResource + * @returns Details * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; /** - * Decodes a PackageResource message from the specified reader or buffer, length delimited. + * Decodes a Details message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PackageResource + * @returns Details * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; /** - * Verifies a PackageResource message. + * Verifies a Details message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PackageResource message from a plain object. Also converts values to their respective internal types. + * Creates a Details message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PackageResource + * @returns Details */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; /** - * Creates a plain object from a PackageResource message. Also converts values to other types if specified. - * @param message PackageResource + * Creates a plain object from a Details message. Also converts values to other types if specified. + * @param message Details * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PackageResource to JSON. + * Converts this Details to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace PackageResource { - - /** Properties of a Deb. */ - interface IDeb { + namespace Details { - /** Deb source */ - source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + /** Properties of a Reference. */ + interface IReference { - /** Deb pullDeps */ - pullDeps?: (boolean|null); + /** Reference url */ + url?: (string|null); } - /** Represents a Deb. */ - class Deb implements IDeb { + /** Represents a Reference. */ + class Reference implements IReference { /** - * Constructs a new Deb. + * Constructs a new Reference. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb); - - /** Deb source. */ - public source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference); - /** Deb pullDeps. */ - public pullDeps: boolean; + /** Reference url. */ + public url: string; /** - * Creates a new Deb instance using the specified properties. + * Creates a new Reference instance using the specified properties. * @param [properties] Properties to set - * @returns Deb instance + * @returns Reference instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; + public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; /** - * Encodes the specified Deb message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. - * @param message Deb message or plain object to encode + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Deb message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. - * @param message Deb message or plain object to encode + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Deb message from the specified reader or buffer. + * Decodes a Reference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Deb + * @returns Reference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; /** - * Decodes a Deb message from the specified reader or buffer, length delimited. + * Decodes a Reference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Deb + * @returns Reference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; /** - * Verifies a Deb message. + * Verifies a Reference message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Deb message from a plain object. Also converts values to their respective internal types. + * Creates a Reference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Deb + * @returns Reference */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; /** - * Creates a plain object from a Deb message. Also converts values to other types if specified. - * @param message Deb + * Creates a plain object from a Reference message. Also converts values to other types if specified. + * @param message Reference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Reference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Properties of a GetVulnerabilityReportRequest. */ + interface IGetVulnerabilityReportRequest { + + /** GetVulnerabilityReportRequest name */ + name?: (string|null); + } + + /** Represents a GetVulnerabilityReportRequest. */ + class GetVulnerabilityReportRequest implements IGetVulnerabilityReportRequest { + + /** + * Constructs a new GetVulnerabilityReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest); + + /** GetVulnerabilityReportRequest name. */ + public name: string; + + /** + * Creates a new GetVulnerabilityReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVulnerabilityReportRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + + /** + * Encodes the specified GetVulnerabilityReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. + * @param message GetVulnerabilityReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVulnerabilityReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. + * @param message GetVulnerabilityReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVulnerabilityReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + + /** + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVulnerabilityReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + + /** + * Verifies a GetVulnerabilityReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVulnerabilityReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVulnerabilityReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + + /** + * Creates a plain object from a GetVulnerabilityReportRequest message. Also converts values to other types if specified. + * @param message GetVulnerabilityReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVulnerabilityReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListVulnerabilityReportsRequest. */ + interface IListVulnerabilityReportsRequest { + + /** ListVulnerabilityReportsRequest parent */ + parent?: (string|null); + + /** ListVulnerabilityReportsRequest pageSize */ + pageSize?: (number|null); + + /** ListVulnerabilityReportsRequest pageToken */ + pageToken?: (string|null); + + /** ListVulnerabilityReportsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListVulnerabilityReportsRequest. */ + class ListVulnerabilityReportsRequest implements IListVulnerabilityReportsRequest { + + /** + * Constructs a new ListVulnerabilityReportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest); + + /** ListVulnerabilityReportsRequest parent. */ + public parent: string; + + /** ListVulnerabilityReportsRequest pageSize. */ + public pageSize: number; + + /** ListVulnerabilityReportsRequest pageToken. */ + public pageToken: string; + + /** ListVulnerabilityReportsRequest filter. */ + public filter: string; + + /** + * Creates a new ListVulnerabilityReportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVulnerabilityReportsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + + /** + * Encodes the specified ListVulnerabilityReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. + * @param message ListVulnerabilityReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVulnerabilityReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. + * @param message ListVulnerabilityReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVulnerabilityReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + + /** + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVulnerabilityReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + + /** + * Verifies a ListVulnerabilityReportsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVulnerabilityReportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVulnerabilityReportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + + /** + * Creates a plain object from a ListVulnerabilityReportsRequest message. Also converts values to other types if specified. + * @param message ListVulnerabilityReportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVulnerabilityReportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListVulnerabilityReportsResponse. */ + interface IListVulnerabilityReportsResponse { + + /** ListVulnerabilityReportsResponse vulnerabilityReports */ + vulnerabilityReports?: (google.cloud.osconfig.v1alpha.IVulnerabilityReport[]|null); + + /** ListVulnerabilityReportsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListVulnerabilityReportsResponse. */ + class ListVulnerabilityReportsResponse implements IListVulnerabilityReportsResponse { + + /** + * Constructs a new ListVulnerabilityReportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse); - /** - * Converts this Deb to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListVulnerabilityReportsResponse vulnerabilityReports. */ + public vulnerabilityReports: google.cloud.osconfig.v1alpha.IVulnerabilityReport[]; - /** Properties of a APT. */ - interface IAPT { + /** ListVulnerabilityReportsResponse nextPageToken. */ + public nextPageToken: string; - /** APT name */ - name?: (string|null); - } + /** + * Creates a new ListVulnerabilityReportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVulnerabilityReportsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; - /** Represents a APT. */ - class APT implements IAPT { + /** + * Encodes the specified ListVulnerabilityReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. + * @param message ListVulnerabilityReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new APT. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT); + /** + * Encodes the specified ListVulnerabilityReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. + * @param message ListVulnerabilityReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** APT name. */ - public name: string; + /** + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVulnerabilityReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; - /** - * Creates a new APT instance using the specified properties. - * @param [properties] Properties to set - * @returns APT instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + /** + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVulnerabilityReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; - /** - * Encodes the specified APT message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. - * @param message APT message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a ListVulnerabilityReportsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified APT message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. - * @param message APT message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a ListVulnerabilityReportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVulnerabilityReportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; - /** - * Decodes a APT message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns APT - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + /** + * Creates a plain object from a ListVulnerabilityReportsResponse message. Also converts values to other types if specified. + * @param message ListVulnerabilityReportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a APT message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns APT - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + /** + * Converts this ListVulnerabilityReportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies a APT message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a CVSSv3. */ + interface ICVSSv3 { - /** - * Creates a APT message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns APT - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT; + /** CVSSv3 baseScore */ + baseScore?: (number|null); - /** - * Creates a plain object from a APT message. Also converts values to other types if specified. - * @param message APT - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CVSSv3 exploitabilityScore */ + exploitabilityScore?: (number|null); - /** - * Converts this APT to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** CVSSv3 impactScore */ + impactScore?: (number|null); - /** Properties of a RPM. */ - interface IRPM { + /** CVSSv3 attackVector */ + attackVector?: (google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|null); - /** RPM source */ - source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + /** CVSSv3 attackComplexity */ + attackComplexity?: (google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|null); - /** RPM pullDeps */ - pullDeps?: (boolean|null); - } + /** CVSSv3 privilegesRequired */ + privilegesRequired?: (google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|null); - /** Represents a RPM. */ - class RPM implements IRPM { + /** CVSSv3 userInteraction */ + userInteraction?: (google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|null); - /** - * Constructs a new RPM. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM); + /** CVSSv3 scope */ + scope?: (google.cloud.osconfig.v1alpha.CVSSv3.Scope|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Scope|null); - /** RPM source. */ - public source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + /** CVSSv3 confidentialityImpact */ + confidentialityImpact?: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact|null); - /** RPM pullDeps. */ - public pullDeps: boolean; + /** CVSSv3 integrityImpact */ + integrityImpact?: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact|null); - /** - * Creates a new RPM instance using the specified properties. - * @param [properties] Properties to set - * @returns RPM instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + /** CVSSv3 availabilityImpact */ + availabilityImpact?: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact|null); + } - /** - * Encodes the specified RPM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. - * @param message RPM message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a CVSSv3. */ + class CVSSv3 implements ICVSSv3 { - /** - * Encodes the specified RPM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. - * @param message RPM message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new CVSSv3. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.ICVSSv3); - /** - * Decodes a RPM message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RPM - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + /** CVSSv3 baseScore. */ + public baseScore: number; - /** - * Decodes a RPM message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RPM - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + /** CVSSv3 exploitabilityScore. */ + public exploitabilityScore: number; - /** - * Verifies a RPM message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** CVSSv3 impactScore. */ + public impactScore: number; - /** - * Creates a RPM message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RPM - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM; + /** CVSSv3 attackVector. */ + public attackVector: (google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackVector); - /** - * Creates a plain object from a RPM message. Also converts values to other types if specified. - * @param message RPM - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CVSSv3 attackComplexity. */ + public attackComplexity: (google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity); - /** - * Converts this RPM to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** CVSSv3 privilegesRequired. */ + public privilegesRequired: (google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired); - /** Properties of a YUM. */ - interface IYUM { + /** CVSSv3 userInteraction. */ + public userInteraction: (google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction); - /** YUM name */ - name?: (string|null); - } + /** CVSSv3 scope. */ + public scope: (google.cloud.osconfig.v1alpha.CVSSv3.Scope|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Scope); - /** Represents a YUM. */ - class YUM implements IYUM { + /** CVSSv3 confidentialityImpact. */ + public confidentialityImpact: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact); - /** - * Constructs a new YUM. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM); + /** CVSSv3 integrityImpact. */ + public integrityImpact: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact); - /** YUM name. */ - public name: string; + /** CVSSv3 availabilityImpact. */ + public availabilityImpact: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact); - /** - * Creates a new YUM instance using the specified properties. - * @param [properties] Properties to set - * @returns YUM instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + /** + * Creates a new CVSSv3 instance using the specified properties. + * @param [properties] Properties to set + * @returns CVSSv3 instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.ICVSSv3): google.cloud.osconfig.v1alpha.CVSSv3; - /** - * Encodes the specified YUM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. - * @param message YUM message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified CVSSv3 message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. + * @param message CVSSv3 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified YUM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. - * @param message YUM message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. + * @param message CVSSv3 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a YUM message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns YUM - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + /** + * Decodes a CVSSv3 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CVSSv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.CVSSv3; - /** - * Decodes a YUM message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns YUM - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + /** + * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CVSSv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.CVSSv3; - /** - * Verifies a YUM message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a CVSSv3 message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a YUM message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns YUM - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM; + /** + * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CVSSv3 + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.CVSSv3; - /** - * Creates a plain object from a YUM message. Also converts values to other types if specified. - * @param message YUM - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. + * @param message CVSSv3 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.CVSSv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this YUM to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this CVSSv3 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a Zypper. */ - interface IZypper { + namespace CVSSv3 { - /** Zypper name */ - name?: (string|null); - } + /** AttackVector enum. */ + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0, + ATTACK_VECTOR_NETWORK = 1, + ATTACK_VECTOR_ADJACENT = 2, + ATTACK_VECTOR_LOCAL = 3, + ATTACK_VECTOR_PHYSICAL = 4 + } - /** Represents a Zypper. */ - class Zypper implements IZypper { + /** AttackComplexity enum. */ + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0, + ATTACK_COMPLEXITY_LOW = 1, + ATTACK_COMPLEXITY_HIGH = 2 + } - /** - * Constructs a new Zypper. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper); + /** PrivilegesRequired enum. */ + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0, + PRIVILEGES_REQUIRED_NONE = 1, + PRIVILEGES_REQUIRED_LOW = 2, + PRIVILEGES_REQUIRED_HIGH = 3 + } - /** Zypper name. */ - public name: string; + /** UserInteraction enum. */ + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0, + USER_INTERACTION_NONE = 1, + USER_INTERACTION_REQUIRED = 2 + } - /** - * Creates a new Zypper instance using the specified properties. - * @param [properties] Properties to set - * @returns Zypper instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + SCOPE_UNCHANGED = 1, + SCOPE_CHANGED = 2 + } - /** - * Encodes the specified Zypper message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. - * @param message Zypper message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper, writer?: $protobuf.Writer): $protobuf.Writer; + /** Impact enum. */ + enum Impact { + IMPACT_UNSPECIFIED = 0, + IMPACT_HIGH = 1, + IMPACT_LOW = 2, + IMPACT_NONE = 3 + } + } + } + } + } - /** - * Encodes the specified Zypper message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. - * @param message Zypper message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper, writer?: $protobuf.Writer): $protobuf.Writer; + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6 + } - /** - * Decodes a Zypper message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Zypper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** - * Decodes a Zypper message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Zypper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + /** ResourceDescriptor type */ + type?: (string|null); - /** - * Verifies a Zypper message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); - /** - * Creates a Zypper message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Zypper - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper; + /** ResourceDescriptor nameField */ + nameField?: (string|null); - /** - * Creates a plain object from a Zypper message. Also converts values to other types if specified. - * @param message Zypper - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - /** - * Converts this Zypper to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ResourceDescriptor plural */ + plural?: (string|null); - /** Properties of a GooGet. */ - interface IGooGet { + /** ResourceDescriptor singular */ + singular?: (string|null); - /** GooGet name */ - name?: (string|null); - } + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } - /** Represents a GooGet. */ - class GooGet implements IGooGet { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { - /** - * Constructs a new GooGet. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet); + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); - /** GooGet name. */ - public name: string; + /** ResourceDescriptor type. */ + public type: string; - /** - * Creates a new GooGet instance using the specified properties. - * @param [properties] Properties to set - * @returns GooGet instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + /** ResourceDescriptor pattern. */ + public pattern: string[]; - /** - * Encodes the specified GooGet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. - * @param message GooGet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet, writer?: $protobuf.Writer): $protobuf.Writer; + /** ResourceDescriptor nameField. */ + public nameField: string; - /** - * Encodes the specified GooGet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. - * @param message GooGet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet, writer?: $protobuf.Writer): $protobuf.Writer; + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - /** - * Decodes a GooGet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GooGet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + /** ResourceDescriptor plural. */ + public plural: string; - /** - * Decodes a GooGet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GooGet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + /** ResourceDescriptor singular. */ + public singular: string; - /** - * Verifies a GooGet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; - /** - * Creates a GooGet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GooGet - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet; + /** + * 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; - /** - * Creates a plain object from a GooGet message. Also converts values to other types if specified. - * @param message GooGet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this GooGet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a MSI. */ - interface IMSI { + /** + * 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; - /** MSI source */ - source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + /** + * 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; - /** MSI properties */ - properties?: (string[]|null); - } + /** + * 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); - /** Represents a MSI. */ - class MSI implements IMSI { + /** + * 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; - /** - * Constructs a new MSI. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI); + /** + * 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 }; - /** MSI source. */ - public source?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** MSI properties. */ - public properties: string[]; + namespace ResourceDescriptor { - /** - * Creates a new MSI instance using the specified properties. - * @param [properties] Properties to set - * @returns MSI instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + /** 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 + } + } - /** - * Encodes the specified MSI message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. - * @param message MSI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** - * Encodes the specified MSI message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. - * @param message MSI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI, writer?: $protobuf.Writer): $protobuf.Writer; + /** ResourceReference type */ + type?: (string|null); - /** - * Decodes a MSI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MSI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + /** ResourceReference childType */ + childType?: (string|null); + } - /** - * Decodes a MSI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MSI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { - /** - * Verifies a MSI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); - /** - * Creates a MSI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MSI - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI; + /** ResourceReference type. */ + public type: string; - /** - * Creates a plain object from a MSI message. Also converts values to other types if specified. - * @param message MSI - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ResourceReference childType. */ + public childType: string; - /** - * Converts this MSI to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** DesiredState enum. */ - enum DesiredState { - DESIRED_STATE_UNSPECIFIED = 0, - INSTALLED = 1, - REMOVED = 2 - } - } + /** + * 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; - /** Properties of a RepositoryResource. */ - interface IRepositoryResource { + /** + * 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; - /** RepositoryResource apt */ - apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null); + /** + * 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; - /** RepositoryResource yum */ - yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null); + /** + * 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; - /** RepositoryResource zypper */ - zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null); + /** + * 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); - /** RepositoryResource goo */ - goo?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|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; - /** Represents a RepositoryResource. */ - class RepositoryResource implements IRepositoryResource { + /** + * 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 }; - /** - * Constructs a new RepositoryResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource); + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** RepositoryResource apt. */ - public apt?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null); + /** Properties of a Http. */ + interface IHttp { - /** RepositoryResource yum. */ - public yum?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null); + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** RepositoryResource zypper. */ - public zypper?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null); + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } - /** RepositoryResource goo. */ - public goo?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null); + /** Represents a Http. */ + class Http implements IHttp { - /** RepositoryResource repository. */ - public repository?: ("apt"|"yum"|"zypper"|"goo"); + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); - /** - * Creates a new RepositoryResource instance using the specified properties. - * @param [properties] Properties to set - * @returns RepositoryResource instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** - * Encodes the specified RepositoryResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. - * @param message RepositoryResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; - /** - * Encodes the specified RepositoryResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. - * @param message RepositoryResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a RepositoryResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RepositoryResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + /** + * 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; - /** - * Decodes a RepositoryResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RepositoryResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + /** + * 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; - /** - * Verifies a RepositoryResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a 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; - /** - * Creates a RepositoryResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RepositoryResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource; + /** + * 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 plain object from a RepositoryResource message. Also converts values to other types if specified. - * @param message RepositoryResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this RepositoryResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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 }; - namespace RepositoryResource { + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of an AptRepository. */ - interface IAptRepository { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** AptRepository archiveType */ - archiveType?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|null); + /** HttpRule selector */ + selector?: (string|null); - /** AptRepository uri */ - uri?: (string|null); + /** HttpRule get */ + get?: (string|null); - /** AptRepository distribution */ - distribution?: (string|null); + /** HttpRule put */ + put?: (string|null); - /** AptRepository components */ - components?: (string[]|null); + /** HttpRule post */ + post?: (string|null); - /** AptRepository gpgKey */ - gpgKey?: (string|null); - } + /** HttpRule delete */ + "delete"?: (string|null); - /** Represents an AptRepository. */ - class AptRepository implements IAptRepository { + /** HttpRule patch */ + patch?: (string|null); - /** - * Constructs a new AptRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository); + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** AptRepository archiveType. */ - public archiveType: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType); + /** HttpRule body */ + body?: (string|null); - /** AptRepository uri. */ - public uri: string; + /** HttpRule responseBody */ + responseBody?: (string|null); - /** AptRepository distribution. */ - public distribution: string; + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } - /** AptRepository components. */ - public components: string[]; + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { - /** AptRepository gpgKey. */ - public gpgKey: string; + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); - /** - * Creates a new AptRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns AptRepository instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + /** HttpRule selector. */ + public selector: string; - /** - * Encodes the specified AptRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. - * @param message AptRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule get. */ + public get?: (string|null); - /** - * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. - * @param message AptRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule put. */ + public put?: (string|null); - /** - * Decodes an AptRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AptRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + /** HttpRule post. */ + public post?: (string|null); - /** - * Decodes an AptRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AptRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + /** HttpRule delete. */ + public delete?: (string|null); - /** - * Verifies an AptRepository message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** HttpRule patch. */ + public patch?: (string|null); - /** - * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AptRepository - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository; + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); - /** - * Creates a plain object from an AptRepository message. Also converts values to other types if specified. - * @param message AptRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** HttpRule body. */ + public body: string; - /** - * Converts this AptRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** HttpRule responseBody. */ + public responseBody: string; - namespace AptRepository { + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; - /** ArchiveType enum. */ - enum ArchiveType { - ARCHIVE_TYPE_UNSPECIFIED = 0, - DEB = 1, - DEB_SRC = 2 - } - } + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - /** Properties of a YumRepository. */ - interface IYumRepository { + /** + * 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; - /** YumRepository id */ - id?: (string|null); + /** + * 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; - /** YumRepository displayName */ - displayName?: (string|null); + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - /** YumRepository baseUrl */ - baseUrl?: (string|null); + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - /** YumRepository gpgKeys */ - gpgKeys?: (string[]|null); - } + /** + * 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; - /** Represents a YumRepository. */ - class YumRepository implements IYumRepository { + /** + * 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); - /** - * Constructs a new YumRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository); + /** + * 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; - /** YumRepository id. */ - public id: string; + /** + * 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 }; - /** YumRepository displayName. */ - public displayName: string; + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** YumRepository baseUrl. */ - public baseUrl: string; + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** YumRepository gpgKeys. */ - public gpgKeys: string[]; + /** CustomHttpPattern kind */ + kind?: (string|null); - /** - * Creates a new YumRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns YumRepository instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + /** CustomHttpPattern path */ + path?: (string|null); + } - /** - * Encodes the specified YumRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. - * @param message YumRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { - /** - * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. - * @param message YumRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); - /** - * Decodes a YumRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns YumRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + /** CustomHttpPattern kind. */ + public kind: string; - /** - * Decodes a YumRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns YumRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + /** CustomHttpPattern path. */ + public path: string; - /** - * Verifies a YumRepository message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - /** - * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns YumRepository - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository; + /** + * 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; - /** - * Creates a plain object from a YumRepository message. Also converts values to other types if specified. - * @param message YumRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this YumRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a ZypperRepository. */ - interface IZypperRepository { + /** + * 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; - /** ZypperRepository id */ - id?: (string|null); + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ZypperRepository displayName */ - displayName?: (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; - /** ZypperRepository baseUrl */ - baseUrl?: (string|null); + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ZypperRepository gpgKeys */ - gpgKeys?: (string[]|null); - } + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Represents a ZypperRepository. */ - class ZypperRepository implements IZypperRepository { + /** Namespace protobuf. */ + namespace protobuf { - /** - * Constructs a new ZypperRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository); + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** ZypperRepository id. */ - public id: string; + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } - /** ZypperRepository displayName. */ - public displayName: string; + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { - /** ZypperRepository baseUrl. */ - public baseUrl: string; + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** ZypperRepository gpgKeys. */ - public gpgKeys: string[]; + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; - /** - * Creates a new ZypperRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns ZypperRepository instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; + /** + * 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 ZypperRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. - * @param message ZypperRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 ZypperRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. - * @param message ZypperRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository, 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 ZypperRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ZypperRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; + /** + * 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 ZypperRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ZypperRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; + /** + * 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 ZypperRepository message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a 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 ZypperRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ZypperRepository - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository; + /** + * 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 ZypperRepository message. Also converts values to other types if specified. - * @param message ZypperRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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 ZypperRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a GooRepository. */ - interface IGooRepository { + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** GooRepository name */ - name?: (string|null); + /** FileDescriptorProto name */ + name?: (string|null); - /** GooRepository url */ - url?: (string|null); - } + /** FileDescriptorProto package */ + "package"?: (string|null); - /** Represents a GooRepository. */ - class GooRepository implements IGooRepository { + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** - * Constructs a new GooRepository. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository); + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** GooRepository name. */ - public name: string; + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** GooRepository url. */ - public url: string; + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** - * Creates a new GooRepository instance using the specified properties. - * @param [properties] Properties to set - * @returns GooRepository instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** - * Encodes the specified GooRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. - * @param message GooRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** - * Encodes the specified GooRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. - * @param message GooRepository message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Decodes a GooRepository message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GooRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); - /** - * Decodes a GooRepository message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GooRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * Verifies a GooRepository message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } - /** - * Creates a GooRepository message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GooRepository - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository; + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { - /** - * Creates a plain object from a GooRepository message. Also converts values to other types if specified. - * @param message GooRepository - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** - * Converts this GooRepository to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** FileDescriptorProto name. */ + public name: string; - /** Properties of an ExecResource. */ - interface IExecResource { + /** FileDescriptorProto package. */ + public package: string; - /** ExecResource validate */ - validate?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** ExecResource enforce */ - enforce?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); - } + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** Represents an ExecResource. */ - class ExecResource implements IExecResource { + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** - * Constructs a new ExecResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource); + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** ExecResource validate. */ - public validate?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** ExecResource enforce. */ - public enforce?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null); + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** - * Creates a new ExecResource instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecResource instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** - * Encodes the specified ExecResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. - * @param message ExecResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** - * Encodes the specified ExecResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. - * @param message ExecResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * Decodes an ExecResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; + /** FileDescriptorProto syntax. */ + public syntax: string; - /** - * Decodes an ExecResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - /** - * Verifies an ExecResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an ExecResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource; + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an ExecResource message. Also converts values to other types if specified. - * @param message ExecResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - /** - * Converts this ExecResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - namespace ExecResource { + /** + * 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); - /** Properties of an Exec. */ - interface IExec { + /** + * 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; - /** Exec file */ - file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + /** + * 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 }; - /** Exec script */ - script?: (string|null); + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Exec args */ - args?: (string[]|null); + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** Exec interpreter */ - interpreter?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|null); + /** DescriptorProto name */ + name?: (string|null); - /** Exec outputFilePath */ - outputFilePath?: (string|null); - } + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** Represents an Exec. */ - class Exec implements IExec { + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Constructs a new Exec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec); + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** Exec file. */ - public file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** Exec script. */ - public script?: (string|null); + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** Exec args. */ - public args: string[]; + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** Exec interpreter. */ - public interpreter: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter); + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - /** Exec outputFilePath. */ - public outputFilePath: string; + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - /** Exec source. */ - public source?: ("file"|"script"); + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** - * Creates a new Exec instance using the specified properties. - * @param [properties] Properties to set - * @returns Exec instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { - /** - * Encodes the specified Exec message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. - * @param message Exec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); - /** - * Encodes the specified Exec message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. - * @param message Exec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec, writer?: $protobuf.Writer): $protobuf.Writer; + /** DescriptorProto name. */ + public name: string; - /** - * Decodes an Exec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** - * Decodes an Exec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** - * Verifies an Exec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; - /** - * Creates an Exec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec; + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** - * Creates a plain object from an Exec message. Also converts values to other types if specified. - * @param message Exec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** - * Converts this Exec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - namespace Exec { + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** Interpreter enum. */ - enum Interpreter { - INTERPRETER_UNSPECIFIED = 0, - NONE = 1, - SHELL = 2, - POWERSHELL = 3 - } - } - } + /** DescriptorProto reservedName. */ + public reservedName: string[]; - /** Properties of a FileResource. */ - interface IFileResource { + /** + * 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; - /** FileResource file */ - file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileResource content */ - content?: (string|null); + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileResource path */ - path?: (string|null); + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - /** FileResource state */ - state?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|null); + /** + * 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; - /** FileResource permissions */ - permissions?: (string|null); - } + /** + * 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); - /** Represents a FileResource. */ - class FileResource implements IFileResource { + /** + * 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; - /** - * Constructs a new FileResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource); + /** + * 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 }; - /** FileResource file. */ - public file?: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null); + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileResource content. */ - public content?: (string|null); + namespace DescriptorProto { - /** FileResource path. */ - public path: string; + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** FileResource state. */ - public state: (google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState); + /** ExtensionRange start */ + start?: (number|null); - /** FileResource permissions. */ - public permissions: string; + /** ExtensionRange end */ + end?: (number|null); - /** FileResource source. */ - public source?: ("file"|"content"); + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** - * Creates a new FileResource instance using the specified properties. - * @param [properties] Properties to set - * @returns FileResource instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** - * Encodes the specified FileResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. - * @param message FileResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** - * Encodes the specified FileResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. - * @param message FileResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** ExtensionRange start. */ + public start: number; - /** - * Decodes a FileResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; + /** ExtensionRange end. */ + public end: number; - /** - * Decodes a FileResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** - * Verifies a FileResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new 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; - /** - * Creates a FileResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource; + /** + * 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; - /** - * Creates a plain object from a FileResource message. Also converts values to other types if specified. - * @param message FileResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this FileResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - namespace FileResource { + /** + * 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; - /** DesiredState enum. */ - enum DesiredState { - DESIRED_STATE_UNSPECIFIED = 0, - PRESENT = 1, - ABSENT = 2, - CONTENTS_MATCH = 3 - } - } - } + /** + * 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); - /** Properties of a ResourceGroup. */ - interface IResourceGroup { + /** + * 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; - /** ResourceGroup osFilter */ - osFilter?: (google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null); + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ResourceGroup resources */ - resources?: (google.cloud.osconfig.v1alpha.OSPolicy.IResource[]|null); - } + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a ResourceGroup. */ - class ResourceGroup implements IResourceGroup { + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** - * Constructs a new ResourceGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup); + /** ReservedRange start */ + start?: (number|null); - /** ResourceGroup osFilter. */ - public osFilter?: (google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null); + /** ReservedRange end */ + end?: (number|null); + } - /** ResourceGroup resources. */ - public resources: google.cloud.osconfig.v1alpha.OSPolicy.IResource[]; + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** - * Creates a new ResourceGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceGroup instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** - * Encodes the specified ResourceGroup message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. - * @param message ResourceGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + /** ReservedRange start. */ + public start: number; - /** - * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. - * @param message ResourceGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + /** ReservedRange end. */ + public end: number; - /** - * Decodes a ResourceGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - /** - * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ResourceGroup message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceGroup - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup; + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - /** - * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. - * @param message ResourceGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - /** - * Converts this ResourceGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - VALIDATION = 1, - ENFORCEMENT = 2 - } - } + /** + * 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; - /** Properties of a OSPolicyAssignment. */ - interface IOSPolicyAssignment { + /** + * 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 }; - /** OSPolicyAssignment name */ - name?: (string|null); + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** OSPolicyAssignment description */ - description?: (string|null); + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** OSPolicyAssignment osPolicies */ - osPolicies?: (google.cloud.osconfig.v1alpha.IOSPolicy[]|null); + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** OSPolicyAssignment instanceFilter */ - instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { - /** OSPolicyAssignment rollout */ - rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** OSPolicyAssignment revisionId */ - revisionId?: (string|null); + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** OSPolicyAssignment revisionCreateTime */ - revisionCreateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - /** OSPolicyAssignment rolloutState */ - rolloutState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null); + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** OSPolicyAssignment baseline */ - baseline?: (boolean|null); + /** + * 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; - /** OSPolicyAssignment deleted */ - deleted?: (boolean|null); + /** + * 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); - /** OSPolicyAssignment reconciling */ - reconciling?: (boolean|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; - /** OSPolicyAssignment uid */ - uid?: (string|null); - } + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a OSPolicyAssignment. */ - class OSPolicyAssignment implements IOSPolicyAssignment { + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new OSPolicyAssignment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment); + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** OSPolicyAssignment name. */ - public name: string; + /** FieldDescriptorProto name */ + name?: (string|null); - /** OSPolicyAssignment description. */ - public description: string; + /** FieldDescriptorProto number */ + number?: (number|null); - /** OSPolicyAssignment osPolicies. */ - public osPolicies: google.cloud.osconfig.v1alpha.IOSPolicy[]; + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - /** OSPolicyAssignment instanceFilter. */ - public instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - /** OSPolicyAssignment rollout. */ - public rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); + /** FieldDescriptorProto typeName */ + typeName?: (string|null); - /** OSPolicyAssignment revisionId. */ - public revisionId: string; + /** FieldDescriptorProto extendee */ + extendee?: (string|null); - /** OSPolicyAssignment revisionCreateTime. */ - public revisionCreateTime?: (google.protobuf.ITimestamp|null); + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); - /** OSPolicyAssignment rolloutState. */ - public rolloutState: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState); + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); - /** OSPolicyAssignment baseline. */ - public baseline: boolean; + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); - /** OSPolicyAssignment deleted. */ - public deleted: boolean; + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); - /** OSPolicyAssignment reconciling. */ - public reconciling: boolean; + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } - /** OSPolicyAssignment uid. */ - public uid: string; + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { - /** - * Creates a new OSPolicyAssignment instance using the specified properties. - * @param [properties] Properties to set - * @returns OSPolicyAssignment instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** - * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. - * @param message OSPolicyAssignment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto name. */ + public name: string; - /** - * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. - * @param message OSPolicyAssignment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto number. */ + public number: number; - /** - * Decodes a OSPolicyAssignment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OSPolicyAssignment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - /** - * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OSPolicyAssignment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - /** - * Verifies a OSPolicyAssignment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** - * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OSPolicyAssignment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** - * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. - * @param message OSPolicyAssignment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; - /** - * Converts this OSPolicyAssignment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; - namespace OSPolicyAssignment { + /** FieldDescriptorProto jsonName. */ + public jsonName: string; - /** Properties of a LabelSet. */ - interface ILabelSet { + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); - /** LabelSet labels */ - labels?: ({ [k: string]: string }|null); - } + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; - /** Represents a LabelSet. */ - class LabelSet implements ILabelSet { + /** + * 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; - /** - * Constructs a new LabelSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet); + /** + * 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; - /** LabelSet labels. */ - public labels: { [k: string]: string }; + /** + * 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; - /** - * Creates a new LabelSet instance using the specified properties. - * @param [properties] Properties to set - * @returns LabelSet instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; + /** + * 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; - /** - * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. - * @param message LabelSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Encodes the specified LabelSet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. - * @param message LabelSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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); - /** - * Decodes a LabelSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LabelSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; + /** + * 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; - /** - * Decodes a LabelSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LabelSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; + /** + * 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 }; - /** - * Verifies a LabelSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a LabelSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LabelSet - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet; + namespace FieldDescriptorProto { - /** - * Creates a plain object from a LabelSet message. Also converts values to other types if specified. - * @param message LabelSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** 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 + } - /** - * Converts this LabelSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } - /** Properties of an InstanceFilter. */ - interface IInstanceFilter { + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** InstanceFilter all */ - all?: (boolean|null); + /** OneofDescriptorProto name */ + name?: (string|null); - /** InstanceFilter osShortNames */ - osShortNames?: (string[]|null); + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } - /** InstanceFilter inclusionLabels */ - inclusionLabels?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]|null); + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { - /** InstanceFilter exclusionLabels */ - exclusionLabels?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]|null); - } + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** Represents an InstanceFilter. */ - class InstanceFilter implements IInstanceFilter { + /** OneofDescriptorProto name. */ + public name: string; - /** - * Constructs a new InstanceFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter); + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); - /** InstanceFilter all. */ - public all: boolean; + /** + * 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; - /** InstanceFilter osShortNames. */ - public osShortNames: string[]; + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** InstanceFilter inclusionLabels. */ - public inclusionLabels: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]; + /** + * 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; - /** InstanceFilter exclusionLabels. */ - public exclusionLabels: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - /** - * Creates a new InstanceFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceFilter instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - /** - * Encodes the specified InstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. - * @param message InstanceFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified InstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. - * @param message InstanceFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - /** - * Decodes an InstanceFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; + /** + * 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 }; - /** - * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies an InstanceFilter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** - * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceFilter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter; + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** - * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. - * @param message InstanceFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** - * Converts this InstanceFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** Properties of a Rollout. */ - interface IRollout { + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** Rollout disruptionBudget */ - disruptionBudget?: (google.cloud.osconfig.v1alpha.IFixedOrPercent|null); + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { - /** Rollout minWaitDuration */ - minWaitDuration?: (google.protobuf.IDuration|null); - } + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** Represents a Rollout. */ - class Rollout implements IRollout { + /** EnumDescriptorProto name. */ + public name: string; - /** - * Constructs a new Rollout. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout); + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; - /** Rollout disruptionBudget. */ - public disruptionBudget?: (google.cloud.osconfig.v1alpha.IFixedOrPercent|null); + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); - /** Rollout minWaitDuration. */ - public minWaitDuration?: (google.protobuf.IDuration|null); + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - /** - * Creates a new Rollout instance using the specified properties. - * @param [properties] Properties to set - * @returns Rollout instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; - /** - * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. - * @param message Rollout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - /** - * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. - * @param message Rollout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Rollout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Rollout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Rollout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Rollout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; + /** + * 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; - /** - * Verifies a Rollout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - /** - * Creates a Rollout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Rollout - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout; + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a Rollout message. Also converts values to other types if specified. - * @param message Rollout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - /** - * Converts this Rollout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** RolloutState enum. */ - enum RolloutState { - ROLLOUT_STATE_UNSPECIFIED = 0, - IN_PROGRESS = 1, - CANCELLING = 2, - CANCELLED = 3, - SUCCEEDED = 4 - } - } + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a OSPolicyAssignmentOperationMetadata. */ - interface IOSPolicyAssignmentOperationMetadata { + namespace EnumDescriptorProto { - /** OSPolicyAssignmentOperationMetadata osPolicyAssignment */ - osPolicyAssignment?: (string|null); + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { - /** OSPolicyAssignmentOperationMetadata apiMethod */ - apiMethod?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|null); + /** EnumReservedRange start */ + start?: (number|null); - /** OSPolicyAssignmentOperationMetadata rolloutState */ - rolloutState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|null); + /** EnumReservedRange end */ + end?: (number|null); + } - /** OSPolicyAssignmentOperationMetadata rolloutStartTime */ - rolloutStartTime?: (google.protobuf.ITimestamp|null); + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { - /** OSPolicyAssignmentOperationMetadata rolloutUpdateTime */ - rolloutUpdateTime?: (google.protobuf.ITimestamp|null); - } + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - /** Represents a OSPolicyAssignmentOperationMetadata. */ - class OSPolicyAssignmentOperationMetadata implements IOSPolicyAssignmentOperationMetadata { + /** EnumReservedRange start. */ + public start: number; - /** - * Constructs a new OSPolicyAssignmentOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata); + /** EnumReservedRange end. */ + public end: number; - /** OSPolicyAssignmentOperationMetadata osPolicyAssignment. */ - public osPolicyAssignment: string; + /** + * 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; - /** OSPolicyAssignmentOperationMetadata apiMethod. */ - public apiMethod: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod); + /** + * 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; - /** OSPolicyAssignmentOperationMetadata rolloutState. */ - public rolloutState: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState); + /** + * 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; - /** OSPolicyAssignmentOperationMetadata rolloutStartTime. */ - public rolloutStartTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** OSPolicyAssignmentOperationMetadata rolloutUpdateTime. */ - public rolloutUpdateTime?: (google.protobuf.ITimestamp|null); + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new OSPolicyAssignmentOperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OSPolicyAssignmentOperationMetadata instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** - * Encodes the specified OSPolicyAssignmentOperationMetadata message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. - * @param message OSPolicyAssignmentOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified OSPolicyAssignmentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. - * @param message OSPolicyAssignmentOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OSPolicyAssignmentOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { - /** - * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OSPolicyAssignmentOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** - * Verifies a OSPolicyAssignmentOperationMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** EnumValueDescriptorProto number */ + number?: (number|null); - /** - * Creates a OSPolicyAssignmentOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OSPolicyAssignmentOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } - /** - * Creates a plain object from a OSPolicyAssignmentOperationMetadata message. Also converts values to other types if specified. - * @param message OSPolicyAssignmentOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - /** - * Converts this OSPolicyAssignmentOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - namespace OSPolicyAssignmentOperationMetadata { + /** EnumValueDescriptorProto name. */ + public name: string; - /** APIMethod enum. */ - enum APIMethod { - API_METHOD_UNSPECIFIED = 0, - CREATE = 1, - UPDATE = 2, - DELETE = 3 - } + /** EnumValueDescriptorProto number. */ + public number: number; - /** RolloutState enum. */ - enum RolloutState { - ROLLOUT_STATE_UNSPECIFIED = 0, - IN_PROGRESS = 1, - CANCELLING = 2, - CANCELLED = 3, - SUCCEEDED = 4 - } - } + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); - /** Properties of a CreateOSPolicyAssignmentRequest. */ - interface ICreateOSPolicyAssignmentRequest { + /** + * 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; - /** CreateOSPolicyAssignmentRequest parent */ - parent?: (string|null); + /** + * 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; - /** CreateOSPolicyAssignmentRequest osPolicyAssignment */ - osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); + /** + * 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; - /** CreateOSPolicyAssignmentRequest osPolicyAssignmentId */ - osPolicyAssignmentId?: (string|null); - } + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - /** Represents a CreateOSPolicyAssignmentRequest. */ - class CreateOSPolicyAssignmentRequest implements ICreateOSPolicyAssignmentRequest { + /** + * 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; - /** - * Constructs a new CreateOSPolicyAssignmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest); + /** + * 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); - /** CreateOSPolicyAssignmentRequest parent. */ - public parent: string; + /** + * 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; - /** CreateOSPolicyAssignmentRequest osPolicyAssignment. */ - public osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); + /** + * 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 }; - /** CreateOSPolicyAssignmentRequest osPolicyAssignmentId. */ - public osPolicyAssignmentId: string; + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new CreateOSPolicyAssignmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateOSPolicyAssignmentRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** - * Encodes the specified CreateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. - * @param message CreateOSPolicyAssignmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ServiceDescriptorProto name */ + name?: (string|null); - /** - * Encodes the specified CreateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. - * @param message CreateOSPolicyAssignmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** - * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } - /** - * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { - /** - * Verifies a CreateOSPolicyAssignmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** - * Creates a CreateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateOSPolicyAssignmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; + /** ServiceDescriptorProto name. */ + public name: string; - /** - * Creates a plain object from a CreateOSPolicyAssignmentRequest message. Also converts values to other types if specified. - * @param message CreateOSPolicyAssignmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** - * Converts this CreateOSPolicyAssignmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); - /** Properties of an UpdateOSPolicyAssignmentRequest. */ - interface IUpdateOSPolicyAssignmentRequest { + /** + * 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; - /** UpdateOSPolicyAssignmentRequest osPolicyAssignment */ - osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); + /** + * 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; - /** UpdateOSPolicyAssignmentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** + * 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; - /** Represents an UpdateOSPolicyAssignmentRequest. */ - class UpdateOSPolicyAssignmentRequest implements IUpdateOSPolicyAssignmentRequest { + /** + * 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; - /** - * Constructs a new UpdateOSPolicyAssignmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest); + /** + * 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; - /** UpdateOSPolicyAssignmentRequest osPolicyAssignment. */ - public osPolicyAssignment?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null); + /** + * 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); - /** UpdateOSPolicyAssignmentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|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 new UpdateOSPolicyAssignmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateOSPolicyAssignmentRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified UpdateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. - * @param message UpdateOSPolicyAssignmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified UpdateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. - * @param message UpdateOSPolicyAssignmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** - * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; + /** MethodDescriptorProto name */ + name?: (string|null); - /** - * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** - * Verifies an UpdateOSPolicyAssignmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** - * Creates an UpdateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateOSPolicyAssignmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** - * Creates a plain object from an UpdateOSPolicyAssignmentRequest message. Also converts values to other types if specified. - * @param message UpdateOSPolicyAssignmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** - * Converts this UpdateOSPolicyAssignmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } - /** Properties of a GetOSPolicyAssignmentRequest. */ - interface IGetOSPolicyAssignmentRequest { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { - /** GetOSPolicyAssignmentRequest name */ - name?: (string|null); - } + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** Represents a GetOSPolicyAssignmentRequest. */ - class GetOSPolicyAssignmentRequest implements IGetOSPolicyAssignmentRequest { + /** MethodDescriptorProto name. */ + public name: string; - /** - * Constructs a new GetOSPolicyAssignmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest); + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** GetOSPolicyAssignmentRequest name. */ - public name: string; + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** - * Creates a new GetOSPolicyAssignmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOSPolicyAssignmentRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; - /** - * Encodes the specified GetOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. - * @param message GetOSPolicyAssignmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 GetOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. - * @param message GetOSPolicyAssignmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; + /** + * 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 GetOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; + /** + * 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; - /** - * Verifies a GetOSPolicyAssignmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a 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; - /** - * Creates a GetOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOSPolicyAssignmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; + /** + * 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 plain object from a GetOSPolicyAssignmentRequest message. Also converts values to other types if specified. - * @param message GetOSPolicyAssignmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this GetOSPolicyAssignmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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 }; - /** Properties of a ListOSPolicyAssignmentsRequest. */ - interface IListOSPolicyAssignmentsRequest { + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ListOSPolicyAssignmentsRequest parent */ - parent?: (string|null); + /** Properties of a FileOptions. */ + interface IFileOptions { - /** ListOSPolicyAssignmentsRequest pageSize */ - pageSize?: (number|null); + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** ListOSPolicyAssignmentsRequest pageToken */ - pageToken?: (string|null); - } + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** Represents a ListOSPolicyAssignmentsRequest. */ - class ListOSPolicyAssignmentsRequest implements IListOSPolicyAssignmentsRequest { + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** - * Constructs a new ListOSPolicyAssignmentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest); + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** ListOSPolicyAssignmentsRequest parent. */ - public parent: string; + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** ListOSPolicyAssignmentsRequest pageSize. */ - public pageSize: number; + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - /** ListOSPolicyAssignmentsRequest pageToken. */ - public pageToken: string; + /** FileOptions goPackage */ + goPackage?: (string|null); - /** - * Creates a new ListOSPolicyAssignmentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOSPolicyAssignmentsRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); - /** - * Encodes the specified ListOSPolicyAssignmentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. - * @param message ListOSPolicyAssignmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); - /** - * Encodes the specified ListOSPolicyAssignmentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. - * @param message ListOSPolicyAssignmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); - /** - * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOSPolicyAssignmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); - /** - * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOSPolicyAssignmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** - * Verifies a ListOSPolicyAssignmentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - /** - * Creates a ListOSPolicyAssignmentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOSPolicyAssignmentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** - * Creates a plain object from a ListOSPolicyAssignmentsRequest message. Also converts values to other types if specified. - * @param message ListOSPolicyAssignmentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** - * Converts this ListOSPolicyAssignmentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** Properties of a ListOSPolicyAssignmentsResponse. */ - interface IListOSPolicyAssignmentsResponse { + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** ListOSPolicyAssignmentsResponse osPolicyAssignments */ - osPolicyAssignments?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]|null); + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); - /** ListOSPolicyAssignmentsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); - /** Represents a ListOSPolicyAssignmentsResponse. */ - class ListOSPolicyAssignmentsResponse implements IListOSPolicyAssignmentsResponse { + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Constructs a new ListOSPolicyAssignmentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse); + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } - /** ListOSPolicyAssignmentsResponse osPolicyAssignments. */ - public osPolicyAssignments: google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]; + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { - /** ListOSPolicyAssignmentsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); - /** - * Creates a new ListOSPolicyAssignmentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOSPolicyAssignmentsResponse instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; + /** FileOptions javaPackage. */ + public javaPackage: string; - /** - * Encodes the specified ListOSPolicyAssignmentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. - * @param message ListOSPolicyAssignmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** - * Encodes the specified ListOSPolicyAssignmentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. - * @param message ListOSPolicyAssignmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** - * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOSPolicyAssignmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - /** - * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOSPolicyAssignmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** - * Verifies a ListOSPolicyAssignmentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - /** - * Creates a ListOSPolicyAssignmentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOSPolicyAssignmentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; + /** FileOptions goPackage. */ + public goPackage: string; - /** - * Creates a plain object from a ListOSPolicyAssignmentsResponse message. Also converts values to other types if specified. - * @param message ListOSPolicyAssignmentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** - * Converts this ListOSPolicyAssignmentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** Properties of a ListOSPolicyAssignmentRevisionsRequest. */ - interface IListOSPolicyAssignmentRevisionsRequest { + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** ListOSPolicyAssignmentRevisionsRequest name */ - name?: (string|null); + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; - /** ListOSPolicyAssignmentRevisionsRequest pageSize */ - pageSize?: (number|null); + /** FileOptions deprecated. */ + public deprecated: boolean; - /** ListOSPolicyAssignmentRevisionsRequest pageToken */ - pageToken?: (string|null); - } + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** Represents a ListOSPolicyAssignmentRevisionsRequest. */ - class ListOSPolicyAssignmentRevisionsRequest implements IListOSPolicyAssignmentRevisionsRequest { + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** - * Constructs a new ListOSPolicyAssignmentRevisionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest); + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** ListOSPolicyAssignmentRevisionsRequest name. */ - public name: string; + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** ListOSPolicyAssignmentRevisionsRequest pageSize. */ - public pageSize: number; + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** ListOSPolicyAssignmentRevisionsRequest pageToken. */ - public pageToken: string; + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** - * Creates a new ListOSPolicyAssignmentRevisionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOSPolicyAssignmentRevisionsRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** - * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. - * @param message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions rubyPackage. */ + public rubyPackage: string; - /** - * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. - * @param message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOSPolicyAssignmentRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; + /** + * 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; - /** - * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOSPolicyAssignmentRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; + /** + * 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; - /** - * Verifies a ListOSPolicyAssignmentRevisionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ListOSPolicyAssignmentRevisionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOSPolicyAssignmentRevisionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; + /** + * 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; - /** - * Creates a plain object from a ListOSPolicyAssignmentRevisionsRequest message. Also converts values to other types if specified. - * @param message ListOSPolicyAssignmentRevisionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - /** - * Converts this ListOSPolicyAssignmentRevisionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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); - /** Properties of a ListOSPolicyAssignmentRevisionsResponse. */ - interface IListOSPolicyAssignmentRevisionsResponse { + /** + * 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; - /** ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments */ - osPolicyAssignments?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]|null); + /** + * 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 }; - /** ListOSPolicyAssignmentRevisionsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a ListOSPolicyAssignmentRevisionsResponse. */ - class ListOSPolicyAssignmentRevisionsResponse implements IListOSPolicyAssignmentRevisionsResponse { + namespace FileOptions { - /** - * Constructs a new ListOSPolicyAssignmentRevisionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse); + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } - /** ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments. */ - public osPolicyAssignments: google.cloud.osconfig.v1alpha.IOSPolicyAssignment[]; + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** ListOSPolicyAssignmentRevisionsResponse nextPageToken. */ - public nextPageToken: string; + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** - * Creates a new ListOSPolicyAssignmentRevisionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOSPolicyAssignmentRevisionsResponse instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** - * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. - * @param message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** - * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. - * @param message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** - * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOSPolicyAssignmentRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOSPolicyAssignmentRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } - /** - * Verifies a ListOSPolicyAssignmentRevisionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { - /** - * Creates a ListOSPolicyAssignmentRevisionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOSPolicyAssignmentRevisionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); - /** - * Creates a plain object from a ListOSPolicyAssignmentRevisionsResponse message. Also converts values to other types if specified. - * @param message ListOSPolicyAssignmentRevisionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** - * Converts this ListOSPolicyAssignmentRevisionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; - /** Properties of a DeleteOSPolicyAssignmentRequest. */ - interface IDeleteOSPolicyAssignmentRequest { + /** MessageOptions deprecated. */ + public deprecated: boolean; - /** DeleteOSPolicyAssignmentRequest name */ - name?: (string|null); - } + /** MessageOptions mapEntry. */ + public mapEntry: boolean; - /** Represents a DeleteOSPolicyAssignmentRequest. */ - class DeleteOSPolicyAssignmentRequest implements IDeleteOSPolicyAssignmentRequest { + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Constructs a new DeleteOSPolicyAssignmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest); + /** + * 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; - /** DeleteOSPolicyAssignmentRequest name. */ - public name: string; + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new DeleteOSPolicyAssignmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOSPolicyAssignmentRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DeleteOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. - * @param message DeleteOSPolicyAssignmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - /** - * Encodes the specified DeleteOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. - * @param message DeleteOSPolicyAssignmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - /** - * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - /** - * Verifies a DeleteOSPolicyAssignmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a DeleteOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOSPolicyAssignmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a DeleteOSPolicyAssignmentRequest message. Also converts values to other types if specified. - * @param message DeleteOSPolicyAssignmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** - * Converts this DeleteOSPolicyAssignmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** Properties of a FixedOrPercent. */ - interface IFixedOrPercent { + /** FieldOptions packed */ + packed?: (boolean|null); - /** FixedOrPercent fixed */ - fixed?: (number|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** FixedOrPercent percent */ - percent?: (number|null); - } + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** Represents a FixedOrPercent. */ - class FixedOrPercent implements IFixedOrPercent { + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** - * Constructs a new FixedOrPercent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IFixedOrPercent); + /** FieldOptions weak */ + weak?: (boolean|null); - /** FixedOrPercent fixed. */ - public fixed?: (number|null); + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FixedOrPercent percent. */ - public percent?: (number|null); + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - /** FixedOrPercent mode. */ - public mode?: ("fixed"|"percent"); + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } - /** - * Creates a new FixedOrPercent instance using the specified properties. - * @param [properties] Properties to set - * @returns FixedOrPercent instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IFixedOrPercent): google.cloud.osconfig.v1alpha.FixedOrPercent; + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { - /** - * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. - * @param message FixedOrPercent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); - /** - * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. - * @param message FixedOrPercent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IFixedOrPercent, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - /** - * Decodes a FixedOrPercent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FixedOrPercent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.FixedOrPercent; + /** FieldOptions packed. */ + public packed: boolean; - /** - * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FixedOrPercent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.FixedOrPercent; + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - /** - * Verifies a FixedOrPercent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FieldOptions lazy. */ + public lazy: boolean; - /** - * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FixedOrPercent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.FixedOrPercent; + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** - * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. - * @param message FixedOrPercent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.FixedOrPercent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldOptions weak. */ + public weak: boolean; - /** - * Converts this FixedOrPercent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** Represents an OsConfigZonalService */ - class OsConfigZonalService extends $protobuf.rpc.Service { + /** + * 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; - /** - * Constructs a new OsConfigZonalService 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); + /** + * 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; - /** - * Creates new OsConfigZonalService 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): OsConfigZonalService; + /** + * 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; - /** - * Calls CreateOSPolicyAssignment. - * @param request CreateOSPolicyAssignmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignmentCallback): void; + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - /** - * Calls CreateOSPolicyAssignment. - * @param request CreateOSPolicyAssignmentRequest message or plain object - * @returns Promise - */ - public createOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest): Promise; + /** + * 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; - /** - * Calls UpdateOSPolicyAssignment. - * @param request UpdateOSPolicyAssignmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignmentCallback): void; + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Calls UpdateOSPolicyAssignment. - * @param request UpdateOSPolicyAssignmentRequest message or plain object - * @returns Promise - */ - public updateOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest): Promise; + /** + * 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; - /** - * Calls GetOSPolicyAssignment. - * @param request GetOSPolicyAssignmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OSPolicyAssignment - */ - public getOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentCallback): void; + /** + * 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 }; - /** - * Calls GetOSPolicyAssignment. - * @param request GetOSPolicyAssignmentRequest message or plain object - * @returns Promise - */ - public getOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest): Promise; + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { - /** - * Calls ListOSPolicyAssignments. - * @param request ListOSPolicyAssignmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentsResponse - */ - public listOSPolicyAssignments(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentsCallback): void; + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } - /** - * Calls ListOSPolicyAssignments. - * @param request ListOSPolicyAssignmentsRequest message or plain object - * @returns Promise - */ - public listOSPolicyAssignments(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest): Promise; + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } - /** - * Calls ListOSPolicyAssignmentRevisions. - * @param request ListOSPolicyAssignmentRevisionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentRevisionsResponse - */ - public listOSPolicyAssignmentRevisions(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisionsCallback): void; + /** Properties of an OneofOptions. */ + interface IOneofOptions { - /** - * Calls ListOSPolicyAssignmentRevisions. - * @param request ListOSPolicyAssignmentRevisionsRequest message or plain object - * @returns Promise - */ - public listOSPolicyAssignmentRevisions(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest): Promise; + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * Calls DeleteOSPolicyAssignment. - * @param request DeleteOSPolicyAssignmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignmentCallback): void; + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { - /** - * Calls DeleteOSPolicyAssignment. - * @param request DeleteOSPolicyAssignmentRequest message or plain object - * @returns Promise - */ - public deleteOSPolicyAssignment(request: google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest): Promise; + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); - /** - * Calls GetInstanceOSPoliciesCompliance. - * @param request GetInstanceOSPoliciesComplianceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and InstanceOSPoliciesCompliance - */ - public getInstanceOSPoliciesCompliance(request: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesComplianceCallback): void; + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Calls GetInstanceOSPoliciesCompliance. - * @param request GetInstanceOSPoliciesComplianceRequest message or plain object - * @returns Promise - */ - public getInstanceOSPoliciesCompliance(request: google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest): Promise; + /** + * 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; - /** - * Calls ListInstanceOSPoliciesCompliances. - * @param request ListInstanceOSPoliciesCompliancesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListInstanceOSPoliciesCompliancesResponse - */ - public listInstanceOSPoliciesCompliances(request: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliancesCallback): void; + /** + * 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; - /** - * Calls ListInstanceOSPoliciesCompliances. - * @param request ListInstanceOSPoliciesCompliancesRequest message or plain object - * @returns Promise - */ - public listInstanceOSPoliciesCompliances(request: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest): Promise; + /** + * 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; - /** - * Calls GetInventory. - * @param request GetInventoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Inventory - */ - public getInventory(request: google.cloud.osconfig.v1alpha.IGetInventoryRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventoryCallback): void; + /** + * 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; - /** - * Calls GetInventory. - * @param request GetInventoryRequest message or plain object - * @returns Promise - */ - public getInventory(request: google.cloud.osconfig.v1alpha.IGetInventoryRequest): Promise; + /** + * 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; - /** - * Calls ListInventories. - * @param request ListInventoriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListInventoriesResponse - */ - public listInventories(request: google.cloud.osconfig.v1alpha.IListInventoriesRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventoriesCallback): void; + /** + * 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); - /** - * Calls ListInventories. - * @param request ListInventoriesRequest message or plain object - * @returns Promise - */ - public listInventories(request: google.cloud.osconfig.v1alpha.IListInventoriesRequest): Promise; + /** + * 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; - /** - * Calls GetVulnerabilityReport. - * @param request GetVulnerabilityReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and VulnerabilityReport - */ - public getVulnerabilityReport(request: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReportCallback): void; + /** + * 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 }; - /** - * Calls GetVulnerabilityReport. - * @param request GetVulnerabilityReportRequest message or plain object - * @returns Promise - */ - public getVulnerabilityReport(request: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest): Promise; + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Calls ListVulnerabilityReports. - * @param request ListVulnerabilityReportsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListVulnerabilityReportsResponse - */ - public listVulnerabilityReports(request: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReportsCallback): void; + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** - * Calls ListVulnerabilityReports. - * @param request ListVulnerabilityReportsRequest message or plain object - * @returns Promise - */ - public listVulnerabilityReports(request: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest): Promise; - } + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - namespace OsConfigZonalService { + /** EnumOptions deprecated */ + deprecated?: (boolean|null); - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#createOSPolicyAssignment}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#updateOSPolicyAssignment}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignment}. - * @param error Error, if any - * @param [response] OSPolicyAssignment - */ - type GetOSPolicyAssignmentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.OSPolicyAssignment) => void; + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignments}. - * @param error Error, if any - * @param [response] ListOSPolicyAssignmentsResponse - */ - type ListOSPolicyAssignmentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) => void; + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentRevisions}. - * @param error Error, if any - * @param [response] ListOSPolicyAssignmentRevisionsResponse - */ - type ListOSPolicyAssignmentRevisionsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) => void; + /** EnumOptions deprecated. */ + public deprecated: boolean; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#deleteOSPolicyAssignment}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInstanceOSPoliciesCompliance}. - * @param error Error, if any - * @param [response] InstanceOSPoliciesCompliance - */ - type GetInstanceOSPoliciesComplianceCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) => void; + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInstanceOSPoliciesCompliances}. - * @param error Error, if any - * @param [response] ListInstanceOSPoliciesCompliancesResponse - */ - type ListInstanceOSPoliciesCompliancesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) => void; + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. - * @param error Error, if any - * @param [response] Inventory - */ - type GetInventoryCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.Inventory) => void; + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInventories}. - * @param error Error, if any - * @param [response] ListInventoriesResponse - */ - type ListInventoriesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListInventoriesResponse) => void; + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getVulnerabilityReport}. - * @param error Error, if any - * @param [response] VulnerabilityReport - */ - type GetVulnerabilityReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.VulnerabilityReport) => void; + /** + * 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; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listVulnerabilityReports}. - * @param error Error, if any - * @param [response] ListVulnerabilityReportsResponse - */ - type ListVulnerabilityReportsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) => void; - } + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a VulnerabilityReport. */ - interface IVulnerabilityReport { + /** + * 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; - /** VulnerabilityReport name */ - name?: (string|null); + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** VulnerabilityReport vulnerabilities */ - vulnerabilities?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability[]|null); + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** VulnerabilityReport updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** Represents a VulnerabilityReport. */ - class VulnerabilityReport implements IVulnerabilityReport { + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); - /** - * Constructs a new VulnerabilityReport. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IVulnerabilityReport); + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** VulnerabilityReport name. */ - public name: string; + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { - /** VulnerabilityReport vulnerabilities. */ - public vulnerabilities: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability[]; + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); - /** VulnerabilityReport updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** - * Creates a new VulnerabilityReport instance using the specified properties. - * @param [properties] Properties to set - * @returns VulnerabilityReport instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IVulnerabilityReport): google.cloud.osconfig.v1alpha.VulnerabilityReport; + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Encodes the specified VulnerabilityReport message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. - * @param message VulnerabilityReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IVulnerabilityReport, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 VulnerabilityReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. - * @param message VulnerabilityReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IVulnerabilityReport, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a VulnerabilityReport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VulnerabilityReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport; + /** + * 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 a VulnerabilityReport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VulnerabilityReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport; + /** + * 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; - /** - * Verifies a VulnerabilityReport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - /** - * Creates a VulnerabilityReport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VulnerabilityReport - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport; + /** + * 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 a plain object from a VulnerabilityReport message. Also converts values to other types if specified. - * @param message VulnerabilityReport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - /** - * Converts this VulnerabilityReport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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 }; - namespace VulnerabilityReport { + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a Vulnerability. */ - interface IVulnerability { + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** Vulnerability details */ - details?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** Vulnerability installedInventoryItemIds */ - installedInventoryItemIds?: (string[]|null); + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** Vulnerability availableInventoryItemIds */ - availableInventoryItemIds?: (string[]|null); + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); - /** Vulnerability createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } - /** Vulnerability updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { - /** Represents a Vulnerability. */ - class Vulnerability implements IVulnerability { + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); - /** - * Constructs a new Vulnerability. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability); + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** Vulnerability details. */ - public details?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null); + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** Vulnerability installedInventoryItemIds. */ - public installedInventoryItemIds: string[]; + /** + * 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; - /** Vulnerability availableInventoryItemIds. */ - public availableInventoryItemIds: string[]; + /** + * 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; - /** Vulnerability createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** Vulnerability updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * 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; - /** - * Creates a new Vulnerability instance using the specified properties. - * @param [properties] Properties to set - * @returns Vulnerability instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; + /** + * 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; - /** - * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. - * @param message Vulnerability message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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); - /** - * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. - * @param message Vulnerability message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a Vulnerability message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Vulnerability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; + /** + * 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 }; - /** - * Decodes a Vulnerability message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Vulnerability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies a Vulnerability message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** - * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Vulnerability - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability; + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** - * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. - * @param message Vulnerability - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - /** - * Converts this Vulnerability to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - namespace Vulnerability { + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); - /** Properties of a Details. */ - interface IDetails { + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); - /** Details cve */ - cve?: (string|null); + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } - /** Details cvssV2Score */ - cvssV2Score?: (number|null); + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { - /** Details cvssV3 */ - cvssV3?: (google.cloud.osconfig.v1alpha.ICVSSv3|null); + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); - /** Details severity */ - severity?: (string|null); + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** Details description */ - description?: (string|null); + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - /** Details references */ - references?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference[]|null); - } + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** Represents a Details. */ - class Details implements IDetails { + /** + * 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; - /** - * Constructs a new Details. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails); + /** + * 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; - /** Details cve. */ - public cve: string; + /** + * 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; - /** Details cvssV2Score. */ - public cvssV2Score: number; + /** + * 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; - /** Details cvssV3. */ - public cvssV3?: (google.cloud.osconfig.v1alpha.ICVSSv3|null); + /** + * 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); - /** Details severity. */ - public severity: string; + /** + * 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; - /** Details description. */ - public description: string; + /** + * 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 }; - /** Details references. */ - public references: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference[]; + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new Details instance using the specified properties. - * @param [properties] Properties to set - * @returns Details instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; + namespace MethodOptions { - /** - * Encodes the specified Details message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. - * @param message Details message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } - /** - * Encodes the specified Details message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. - * @param message Details message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** - * Decodes a Details message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - /** - * Decodes a Details message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); - /** - * Verifies a Details message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); - /** - * Creates a Details message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Details - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details; + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); - /** - * Creates a plain object from a Details message. Also converts values to other types if specified. - * @param message Details - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); - /** - * Converts this Details to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); - namespace Details { + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } - /** Properties of a Reference. */ - interface IReference { + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { - /** Reference url */ - url?: (string|null); - } + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); - /** Represents a Reference. */ - class Reference implements IReference { + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; - /** - * Constructs a new Reference. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference); + /** UninterpretedOption identifierValue. */ + public identifierValue: string; - /** Reference url. */ - public url: string; + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); - /** - * Creates a new Reference instance using the specified properties. - * @param [properties] Properties to set - * @returns Reference instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); - /** - * Encodes the specified Reference message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. - * @param message Reference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + /** UninterpretedOption doubleValue. */ + public doubleValue: number; - /** - * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. - * @param message Reference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); - /** - * Decodes a Reference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Reference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; - /** - * Decodes a Reference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Reference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; + /** + * 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; - /** - * Verifies a Reference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified 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; - /** - * Creates a Reference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Reference - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference; + /** + * 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; - /** - * Creates a plain object from a Reference message. Also converts values to other types if specified. - * @param message Reference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this Reference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } + /** + * 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); - /** Properties of a GetVulnerabilityReportRequest. */ - interface IGetVulnerabilityReportRequest { + /** + * 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; - /** GetVulnerabilityReportRequest name */ - name?: (string|null); - } + /** + * 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 }; - /** Represents a GetVulnerabilityReportRequest. */ - class GetVulnerabilityReportRequest implements IGetVulnerabilityReportRequest { + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new GetVulnerabilityReportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest); + namespace UninterpretedOption { - /** GetVulnerabilityReportRequest name. */ - public name: string; + /** Properties of a NamePart. */ + interface INamePart { - /** - * Creates a new GetVulnerabilityReportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVulnerabilityReportRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + /** NamePart namePart */ + namePart: string; - /** - * Encodes the specified GetVulnerabilityReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. - * @param message GetVulnerabilityReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** NamePart isExtension */ + isExtension: boolean; + } - /** - * Encodes the specified GetVulnerabilityReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. - * @param message GetVulnerabilityReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a NamePart. */ + class NamePart implements INamePart { - /** - * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVulnerabilityReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - /** - * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVulnerabilityReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + /** NamePart namePart. */ + public namePart: string; - /** - * Verifies a GetVulnerabilityReportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** NamePart isExtension. */ + public isExtension: boolean; - /** - * Creates a GetVulnerabilityReportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVulnerabilityReportRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; + /** + * 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; - /** - * Creates a plain object from a GetVulnerabilityReportRequest message. Also converts values to other types if specified. - * @param message GetVulnerabilityReportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this GetVulnerabilityReportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a ListVulnerabilityReportsRequest. */ - interface IListVulnerabilityReportsRequest { + /** + * 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; - /** ListVulnerabilityReportsRequest parent */ - parent?: (string|null); + /** + * 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; - /** ListVulnerabilityReportsRequest pageSize */ - pageSize?: (number|null); + /** + * 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); - /** ListVulnerabilityReportsRequest pageToken */ - pageToken?: (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; - /** ListVulnerabilityReportsRequest filter */ - filter?: (string|null); - } + /** + * 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 }; - /** Represents a ListVulnerabilityReportsRequest. */ - class ListVulnerabilityReportsRequest implements IListVulnerabilityReportsRequest { + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Constructs a new ListVulnerabilityReportsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest); + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { - /** ListVulnerabilityReportsRequest parent. */ - public parent: string; + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } - /** ListVulnerabilityReportsRequest pageSize. */ - public pageSize: number; + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { - /** ListVulnerabilityReportsRequest pageToken. */ - public pageToken: string; + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** ListVulnerabilityReportsRequest filter. */ - public filter: string; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; - /** - * Creates a new ListVulnerabilityReportsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVulnerabilityReportsRequest instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + /** + * 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 ListVulnerabilityReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. - * @param message ListVulnerabilityReportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 ListVulnerabilityReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. - * @param message ListVulnerabilityReportsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, 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 ListVulnerabilityReportsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVulnerabilityReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + /** + * 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 ListVulnerabilityReportsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVulnerabilityReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + /** + * 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 ListVulnerabilityReportsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a 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 ListVulnerabilityReportsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVulnerabilityReportsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; + /** + * 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 ListVulnerabilityReportsRequest message. Also converts values to other types if specified. - * @param message ListVulnerabilityReportsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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 ListVulnerabilityReportsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a ListVulnerabilityReportsResponse. */ - interface IListVulnerabilityReportsResponse { + namespace SourceCodeInfo { - /** ListVulnerabilityReportsResponse vulnerabilityReports */ - vulnerabilityReports?: (google.cloud.osconfig.v1alpha.IVulnerabilityReport[]|null); + /** Properties of a Location. */ + interface ILocation { - /** ListVulnerabilityReportsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Location path */ + path?: (number[]|null); - /** Represents a ListVulnerabilityReportsResponse. */ - class ListVulnerabilityReportsResponse implements IListVulnerabilityReportsResponse { + /** Location span */ + span?: (number[]|null); - /** - * Constructs a new ListVulnerabilityReportsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse); + /** Location leadingComments */ + leadingComments?: (string|null); - /** ListVulnerabilityReportsResponse vulnerabilityReports. */ - public vulnerabilityReports: google.cloud.osconfig.v1alpha.IVulnerabilityReport[]; + /** Location trailingComments */ + trailingComments?: (string|null); - /** ListVulnerabilityReportsResponse nextPageToken. */ - public nextPageToken: string; + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } - /** - * Creates a new ListVulnerabilityReportsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVulnerabilityReportsResponse instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; + /** Represents a Location. */ + class Location implements ILocation { - /** - * Encodes the specified ListVulnerabilityReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. - * @param message ListVulnerabilityReportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** - * Encodes the specified ListVulnerabilityReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. - * @param message ListVulnerabilityReportsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Location path. */ + public path: number[]; - /** - * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVulnerabilityReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; + /** Location span. */ + public span: number[]; - /** - * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVulnerabilityReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; + /** Location leadingComments. */ + public leadingComments: string; - /** - * Verifies a ListVulnerabilityReportsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Location trailingComments. */ + public trailingComments: string; - /** - * Creates a ListVulnerabilityReportsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVulnerabilityReportsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; - /** - * Creates a plain object from a ListVulnerabilityReportsResponse message. Also converts values to other types if specified. - * @param message ListVulnerabilityReportsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this ListVulnerabilityReportsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a CVSSv3. */ - interface ICVSSv3 { + /** + * 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; - /** CVSSv3 baseScore */ - baseScore?: (number|null); + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - /** CVSSv3 exploitabilityScore */ - exploitabilityScore?: (number|null); + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - /** CVSSv3 impactScore */ - impactScore?: (number|null); + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** CVSSv3 attackVector */ - attackVector?: (google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|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; - /** CVSSv3 attackComplexity */ - attackComplexity?: (google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|null); + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** CVSSv3 privilegesRequired */ - privilegesRequired?: (google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|null); + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** CVSSv3 userInteraction */ - userInteraction?: (google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|null); + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { - /** CVSSv3 scope */ - scope?: (google.cloud.osconfig.v1alpha.CVSSv3.Scope|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Scope|null); + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } - /** CVSSv3 confidentialityImpact */ - confidentialityImpact?: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact|null); + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { - /** CVSSv3 integrityImpact */ - integrityImpact?: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact|null); + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** CVSSv3 availabilityImpact */ - availabilityImpact?: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact|null); - } + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - /** Represents a CVSSv3. */ - class CVSSv3 implements ICVSSv3 { + /** + * 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; - /** - * Constructs a new CVSSv3. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.osconfig.v1alpha.ICVSSv3); + /** + * 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; - /** CVSSv3 baseScore. */ - public baseScore: number; + /** + * 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; - /** CVSSv3 exploitabilityScore. */ - public exploitabilityScore: number; + /** + * 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; - /** CVSSv3 impactScore. */ - public impactScore: number; + /** + * 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; - /** CVSSv3 attackVector. */ - public attackVector: (google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackVector); + /** + * 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); - /** CVSSv3 attackComplexity. */ - public attackComplexity: (google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity); + /** + * 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; - /** CVSSv3 privilegesRequired. */ - public privilegesRequired: (google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired); + /** + * 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 }; - /** CVSSv3 userInteraction. */ - public userInteraction: (google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction); + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** CVSSv3 scope. */ - public scope: (google.cloud.osconfig.v1alpha.CVSSv3.Scope|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Scope); + namespace GeneratedCodeInfo { - /** CVSSv3 confidentialityImpact. */ - public confidentialityImpact: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact); + /** Properties of an Annotation. */ + interface IAnnotation { - /** CVSSv3 integrityImpact. */ - public integrityImpact: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact); + /** Annotation path */ + path?: (number[]|null); - /** CVSSv3 availabilityImpact. */ - public availabilityImpact: (google.cloud.osconfig.v1alpha.CVSSv3.Impact|keyof typeof google.cloud.osconfig.v1alpha.CVSSv3.Impact); + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** - * Creates a new CVSSv3 instance using the specified properties. - * @param [properties] Properties to set - * @returns CVSSv3 instance - */ - public static create(properties?: google.cloud.osconfig.v1alpha.ICVSSv3): google.cloud.osconfig.v1alpha.CVSSv3; + /** Annotation begin */ + begin?: (number|null); - /** - * Encodes the specified CVSSv3 message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. - * @param message CVSSv3 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.osconfig.v1alpha.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; + /** Annotation end */ + end?: (number|null); + } - /** - * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. - * @param message CVSSv3 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.ICVSSv3, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents an Annotation. */ + class Annotation implements IAnnotation { - /** - * Decodes a CVSSv3 message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CVSSv3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.CVSSv3; + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** - * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CVSSv3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.CVSSv3; + /** Annotation path. */ + public path: number[]; - /** - * Verifies a CVSSv3 message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Annotation sourceFile. */ + public sourceFile: string; - /** - * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CVSSv3 - */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.CVSSv3; + /** Annotation begin. */ + public begin: number; - /** - * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. - * @param message CVSSv3 - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.osconfig.v1alpha.CVSSv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Annotation end. */ + public end: number; - /** - * Converts this CVSSv3 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - namespace CVSSv3 { + /** + * 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; - /** AttackVector enum. */ - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0, - ATTACK_VECTOR_NETWORK = 1, - ATTACK_VECTOR_ADJACENT = 2, - ATTACK_VECTOR_LOCAL = 3, - ATTACK_VECTOR_PHYSICAL = 4 - } + /** + * 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; - /** AttackComplexity enum. */ - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0, - ATTACK_COMPLEXITY_LOW = 1, - ATTACK_COMPLEXITY_HIGH = 2 - } + /** + * 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; - /** PrivilegesRequired enum. */ - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0, - PRIVILEGES_REQUIRED_NONE = 1, - PRIVILEGES_REQUIRED_LOW = 2, - PRIVILEGES_REQUIRED_HIGH = 3 - } + /** + * 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; - /** UserInteraction enum. */ - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0, - USER_INTERACTION_NONE = 1, - USER_INTERACTION_REQUIRED = 2 - } + /** + * 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); - /** Scope enum. */ - enum Scope { - SCOPE_UNSPECIFIED = 0, - SCOPE_UNCHANGED = 1, - SCOPE_CHANGED = 2 - } + /** + * 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; - /** Impact enum. */ - enum Impact { - IMPACT_UNSPECIFIED = 0, - IMPACT_HIGH = 1, - IMPACT_LOW = 2, - IMPACT_NONE = 3 - } - } + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a Date. */ - interface IDate { - /** Date year */ - year?: (number|null); + /** Properties of a Timestamp. */ + interface ITimestamp { - /** Date month */ - month?: (number|null); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** Date day */ - day?: (number|null); + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents a Date. */ - class Date implements IDate { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new Date. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.type.IDate); - - /** Date year. */ - public year: number; + constructor(properties?: google.protobuf.ITimestamp); - /** Date month. */ - public month: number; + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** Date day. */ - public day: number; + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new Date instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns Date instance + * @returns Timestamp instance */ - public static create(properties?: google.type.IDate): google.type.Date; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode + * 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.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Date message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Date + * @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.type.Date; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a Date message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Date + * @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.type.Date; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a Date message. + * Verifies a Timestamp message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Date + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.type.Date; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @param message Date + * 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.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Date to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DateTime. */ - interface IDateTime { - - /** DateTime year */ - year?: (number|null); - - /** DateTime month */ - month?: (number|null); - - /** DateTime day */ - day?: (number|null); - - /** DateTime hours */ - hours?: (number|null); - - /** DateTime minutes */ - minutes?: (number|null); + /** Properties of a Duration. */ + interface IDuration { - /** DateTime seconds */ - seconds?: (number|null); + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** DateTime nanos */ + /** Duration nanos */ nanos?: (number|null); - - /** DateTime utcOffset */ - utcOffset?: (google.protobuf.IDuration|null); - - /** DateTime timeZone */ - timeZone?: (google.type.ITimeZone|null); } - /** Represents a DateTime. */ - class DateTime implements IDateTime { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new DateTime. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.type.IDateTime); - - /** DateTime year. */ - public year: number; - - /** DateTime month. */ - public month: number; - - /** DateTime day. */ - public day: number; - - /** DateTime hours. */ - public hours: number; - - /** DateTime minutes. */ - public minutes: number; - - /** DateTime seconds. */ - public seconds: number; - - /** DateTime nanos. */ - public nanos: number; - - /** DateTime utcOffset. */ - public utcOffset?: (google.protobuf.IDuration|null); - - /** DateTime timeZone. */ - public timeZone?: (google.type.ITimeZone|null); + constructor(properties?: google.protobuf.IDuration); - /** DateTime timeOffset. */ - public timeOffset?: ("utcOffset"|"timeZone"); + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; /** - * Creates a new DateTime instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns DateTime instance + * @returns Duration instance */ - public static create(properties?: google.type.IDateTime): google.type.DateTime; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. - * @param message DateTime message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. - * @param message DateTime message or plain object to encode + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DateTime message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DateTime + * @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.type.DateTime; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a DateTime message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DateTime + * @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.type.DateTime; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a DateTime message. + * Verifies a Duration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DateTime + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.type.DateTime; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a DateTime message. Also converts values to other types if specified. - * @param message DateTime + * 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.type.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DateTime to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TimeZone. */ - interface ITimeZone { - - /** TimeZone id */ - id?: (string|null); - - /** TimeZone version */ - version?: (string|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a TimeZone. */ - class TimeZone implements ITimeZone { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new TimeZone. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.type.ITimeZone); - - /** TimeZone id. */ - public id: string; - - /** TimeZone version. */ - public version: string; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new TimeZone instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns TimeZone instance + * @returns Empty instance */ - public static create(properties?: google.type.ITimeZone): google.type.TimeZone; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. - * @param message TimeZone message or plain object to encode + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. - * @param message TimeZone message or plain object to encode + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeZone message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeZone + * @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.type.TimeZone; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeZone + * @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.type.TimeZone; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a TimeZone message. + * Verifies an Empty message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeZone + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.type.TimeZone; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a TimeZone message. Also converts values to other types if specified. - * @param message TimeZone + * 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.type.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeZone to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** DayOfWeek enum. */ - enum DayOfWeek { - DAY_OF_WEEK_UNSPECIFIED = 0, - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6, - SUNDAY = 7 - } - - /** Properties of a TimeOfDay. */ - interface ITimeOfDay { - - /** TimeOfDay hours */ - hours?: (number|null); - - /** TimeOfDay minutes */ - minutes?: (number|null); - - /** TimeOfDay seconds */ - seconds?: (number|null); + /** Properties of a FieldMask. */ + interface IFieldMask { - /** TimeOfDay nanos */ - nanos?: (number|null); + /** FieldMask paths */ + paths?: (string[]|null); } - /** Represents a TimeOfDay. */ - class TimeOfDay implements ITimeOfDay { + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new TimeOfDay. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.type.ITimeOfDay); - - /** TimeOfDay hours. */ - public hours: number; - - /** TimeOfDay minutes. */ - public minutes: number; - - /** TimeOfDay seconds. */ - public seconds: number; + constructor(properties?: google.protobuf.IFieldMask); - /** TimeOfDay nanos. */ - public nanos: number; + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new TimeOfDay instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns TimeOfDay instance + * @returns FieldMask instance */ - public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. - * @param message TimeOfDay message or plain object to encode + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. - * @param message TimeOfDay message or plain object to encode + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeOfDay message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeOfDay + * @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.type.TimeOfDay; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeOfDay + * @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.type.TimeOfDay; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies a TimeOfDay message. + * Verifies a FieldMask message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeOfDay + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. - * @param message TimeOfDay + * 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.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeOfDay to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { + /** Properties of an Any. */ + interface IAny { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** Any type_url */ + type_url?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new Http. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.protobuf.IAny); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** Any type_url. */ + public type_url: string; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new Http instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns Any instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a Http message. + * Verifies an Any message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); + /** Namespace type. */ + namespace type { - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** Properties of a Date. */ + interface IDate { - /** HttpRule body */ - body?: (string|null); + /** Date year */ + year?: (number|null); - /** HttpRule responseBody */ - responseBody?: (string|null); + /** Date month */ + month?: (number|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** Date day */ + day?: (number|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a Date. */ + class Date implements IDate { /** - * Constructs a new HttpRule. + * Constructs a new Date. * @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; + constructor(properties?: google.type.IDate); - /** HttpRule responseBody. */ - public responseBody: string; + /** Date year. */ + public year: number; - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** Date month. */ + public month: number; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** Date day. */ + public day: number; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new Date instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns Date instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.type.IDate): google.type.Date; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a Date message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a Date message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; /** - * Verifies a HttpRule message. + * Verifies a Date message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a Date message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns Date */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.type.Date; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this Date to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Properties of a DateTime. */ + interface IDateTime { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** DateTime year */ + year?: (number|null); - /** CustomHttpPattern path */ - path?: (string|null); + /** DateTime month */ + month?: (number|null); + + /** DateTime day */ + day?: (number|null); + + /** DateTime hours */ + hours?: (number|null); + + /** DateTime minutes */ + minutes?: (number|null); + + /** DateTime seconds */ + seconds?: (number|null); + + /** DateTime nanos */ + nanos?: (number|null); + + /** DateTime utcOffset */ + utcOffset?: (google.protobuf.IDuration|null); + + /** DateTime timeZone */ + timeZone?: (google.type.ITimeZone|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a DateTime. */ + class DateTime implements IDateTime { /** - * Constructs a new CustomHttpPattern. + * Constructs a new DateTime. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.type.IDateTime); - /** CustomHttpPattern kind. */ - public kind: string; + /** DateTime year. */ + public year: number; - /** CustomHttpPattern path. */ - public path: string; + /** DateTime month. */ + public month: number; + + /** DateTime day. */ + public day: number; + + /** DateTime hours. */ + public hours: number; + + /** DateTime minutes. */ + public minutes: number; + + /** DateTime seconds. */ + public seconds: number; + + /** DateTime nanos. */ + public nanos: number; + + /** DateTime utcOffset. */ + public utcOffset?: (google.protobuf.IDuration|null); + + /** DateTime timeZone. */ + public timeZone?: (google.type.ITimeZone|null); + + /** DateTime timeOffset. */ + public timeOffset?: ("utcOffset"|"timeZone"); /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new DateTime instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns DateTime instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.type.IDateTime): google.type.DateTime; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + /** + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a DateTime message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns DateTime * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.DateTime; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a DateTime message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns DateTime * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.DateTime; /** - * Verifies a CustomHttpPattern message. + * Verifies a DateTime message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns DateTime */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.type.DateTime; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @param message DateTime * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this DateTime to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); + /** Properties of a TimeZone. */ + interface ITimeZone { - /** ResourceDescriptor singular */ - singular?: (string|null); + /** TimeZone id */ + id?: (string|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** TimeZone version */ + version?: (string|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a TimeZone. */ + class TimeZone implements ITimeZone { /** - * Constructs a new ResourceDescriptor. + * Constructs a new TimeZone. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; + constructor(properties?: google.type.ITimeZone); - /** ResourceDescriptor singular. */ - public singular: string; + /** TimeZone id. */ + public id: string; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** TimeZone version. */ + public version: string; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new TimeZone instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns TimeZone instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.type.ITimeZone): google.type.TimeZone; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a TimeZone message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceDescriptor + * @returns TimeZone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeZone; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a TimeZone message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @returns TimeZone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeZone; /** - * Verifies a ResourceDescriptor message. + * Verifies a TimeZone message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns TimeZone */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.type.TimeZone; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @param message TimeZone * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this TimeZone to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ResourceDescriptor { + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } + /** Properties of a TimeOfDay. */ + interface ITimeOfDay { - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** TimeOfDay hours */ + hours?: (number|null); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** TimeOfDay minutes */ + minutes?: (number|null); - /** ResourceReference type */ - type?: (string|null); + /** TimeOfDay seconds */ + seconds?: (number|null); - /** ResourceReference childType */ - childType?: (string|null); + /** TimeOfDay nanos */ + nanos?: (number|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a TimeOfDay. */ + class TimeOfDay implements ITimeOfDay { /** - * Constructs a new ResourceReference. + * Constructs a new TimeOfDay. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.type.ITimeOfDay); - /** ResourceReference type. */ - public type: string; + /** TimeOfDay hours. */ + public hours: number; - /** ResourceReference childType. */ - public childType: string; + /** TimeOfDay minutes. */ + public minutes: number; + + /** TimeOfDay seconds. */ + public seconds: number; + + /** TimeOfDay nanos. */ + public nanos: number; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new TimeOfDay instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns TimeOfDay instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a TimeOfDay message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceReference + * @returns TimeOfDay * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeOfDay; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @returns TimeOfDay * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeOfDay; /** - * Verifies a ResourceReference message. + * Verifies a TimeOfDay message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns TimeOfDay */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. + * @param message TimeOfDay * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this TimeOfDay to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6 - } } /** Namespace longrunning. */ diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 0764b66c924..1909b83ad0c 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -39,9913 +39,7712 @@ */ var google = {}; - google.protobuf = (function() { + google.cloud = (function() { /** - * Namespace protobuf. + * Namespace cloud. * @memberof google * @namespace */ - var protobuf = {}; - - 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 - */ + var cloud = {}; - /** - * 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]]; - } + cloud.osconfig = (function() { /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance + * Namespace osconfig. + * @memberof google.cloud + * @namespace */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + var osconfig = {}; - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; + osconfig.v1 = (function() { - /** - * 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); - }; + /** + * Namespace v1. + * @memberof google.cloud.osconfig + * @namespace + */ + var v1 = {}; - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; + v1.Inventory = (function() { - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an Inventory. + * @memberof google.cloud.osconfig.v1 + * @interface IInventory + * @property {string|null} [name] Inventory name + * @property {google.cloud.osconfig.v1.Inventory.IOsInfo|null} [osInfo] Inventory osInfo + * @property {Object.|null} [items] Inventory items + * @property {google.protobuf.ITimestamp|null} [updateTime] Inventory updateTime + */ - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new Inventory. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an Inventory. + * @implements IInventory + * @constructor + * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set + */ + function Inventory(properties) { + this.items = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Inventory name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.Inventory + * @instance + */ + Inventory.prototype.name = ""; - /** - * 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; - }; + /** + * Inventory osInfo. + * @member {google.cloud.osconfig.v1.Inventory.IOsInfo|null|undefined} osInfo + * @memberof google.cloud.osconfig.v1.Inventory + * @instance + */ + Inventory.prototype.osInfo = 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; - }; + /** + * Inventory items. + * @member {Object.} items + * @memberof google.cloud.osconfig.v1.Inventory + * @instance + */ + Inventory.prototype.items = $util.emptyObject; - /** - * 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; - }; + /** + * Inventory updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.Inventory + * @instance + */ + Inventory.prototype.updateTime = null; - /** - * 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); - }; + /** + * Creates a new Inventory instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory} Inventory instance + */ + Inventory.create = function create(properties) { + return new Inventory(properties); + }; - return Timestamp; - })(); + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osInfo != null && Object.hasOwnProperty.call(message, "osInfo")) + $root.google.cloud.osconfig.v1.Inventory.OsInfo.encode(message.osInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.items != null && Object.hasOwnProperty.call(message, "items")) + for (var keys = Object.keys(message.items), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.osconfig.v1.Inventory.Item.encode(message.items[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - protobuf.FileDescriptorSet = (function() { + /** + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ + /** + * Decodes an Inventory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 1: + message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.decode(reader, reader.uint32()); + break; + case 2: + if (message.items === $util.emptyObject) + message.items = {}; + 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.osconfig.v1.Inventory.Item.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.items[key] = value; + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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]]; - } + /** + * Decodes an Inventory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; + /** + * Verifies an Inventory message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Inventory.verify = function verify(message) { + if (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.osInfo != null && message.hasOwnProperty("osInfo")) { + var error = $root.google.cloud.osconfig.v1.Inventory.OsInfo.verify(message.osInfo); + if (error) + return "osInfo." + error; + } + if (message.items != null && message.hasOwnProperty("items")) { + if (!$util.isObject(message.items)) + return "items: object expected"; + var key = Object.keys(message.items); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.osconfig.v1.Inventory.Item.verify(message.items[key[i]]); + if (error) + return "items." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; - /** - * Creates a 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); - }; + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory} Inventory + */ + Inventory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory(); + if (object.name != null) + message.name = String(object.name); + if (object.osInfo != null) { + if (typeof object.osInfo !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.osInfo: object expected"); + message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.fromObject(object.osInfo); + } + if (object.items) { + if (typeof object.items !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.items: object expected"); + message.items = {}; + for (var keys = Object.keys(object.items), i = 0; i < keys.length; ++i) { + if (typeof object.items[keys[i]] !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.items: object expected"); + message.items[keys[i]] = $root.google.cloud.osconfig.v1.Inventory.Item.fromObject(object.items[keys[i]]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; + /** + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {google.cloud.osconfig.v1.Inventory} message Inventory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Inventory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.items = {}; + if (options.defaults) { + object.osInfo = null; + object.name = ""; + object.updateTime = null; + } + if (message.osInfo != null && message.hasOwnProperty("osInfo")) + object.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.toObject(message.osInfo, options); + var keys2; + if (message.items && (keys2 = Object.keys(message.items)).length) { + object.items = {}; + for (var j = 0; j < keys2.length; ++j) + object.items[keys2[j]] = $root.google.cloud.osconfig.v1.Inventory.Item.toObject(message.items[keys2[j]], options); + } + 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); + return object; + }; - /** - * 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; - }; + /** + * Converts this Inventory to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory + * @instance + * @returns {Object.} JSON object + */ + Inventory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + Inventory.OsInfo = (function() { - /** - * 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); - }; + /** + * Properties of an OsInfo. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IOsInfo + * @property {string|null} [hostname] OsInfo hostname + * @property {string|null} [longName] OsInfo longName + * @property {string|null} [shortName] OsInfo shortName + * @property {string|null} [version] OsInfo version + * @property {string|null} [architecture] OsInfo architecture + * @property {string|null} [kernelVersion] OsInfo kernelVersion + * @property {string|null} [kernelRelease] OsInfo kernelRelease + * @property {string|null} [osconfigAgentVersion] OsInfo osconfigAgentVersion + */ - return FileDescriptorSet; - })(); + /** + * Constructs a new OsInfo. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents an OsInfo. + * @implements IOsInfo + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IOsInfo=} [properties] Properties to set + */ + function OsInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - protobuf.FileDescriptorProto = (function() { + /** + * OsInfo hostname. + * @member {string} hostname + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.hostname = ""; - /** - * 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 - */ + /** + * OsInfo longName. + * @member {string} longName + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.longName = ""; - /** - * 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]]; - } + /** + * OsInfo shortName. + * @member {string} shortName + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.shortName = ""; - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; + /** + * OsInfo version. + * @member {string} version + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.version = ""; - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; + /** + * OsInfo architecture. + * @member {string} architecture + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.architecture = ""; - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + /** + * OsInfo kernelVersion. + * @member {string} kernelVersion + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.kernelVersion = ""; - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + /** + * OsInfo kernelRelease. + * @member {string} kernelRelease + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.kernelRelease = ""; - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * OsInfo osconfigAgentVersion. + * @member {string} osconfigAgentVersion + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.osconfigAgentVersion = ""; - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + /** + * Creates a new OsInfo instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1.Inventory.IOsInfo=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo instance + */ + OsInfo.create = function create(properties) { + return new OsInfo(properties); + }; - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + /** + * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.longName != null && Object.hasOwnProperty.call(message, "longName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.longName); + if (message.shortName != null && Object.hasOwnProperty.call(message, "shortName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shortName); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.architecture); + if (message.kernelVersion != null && Object.hasOwnProperty.call(message, "kernelVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.kernelVersion); + if (message.kernelRelease != null && Object.hasOwnProperty.call(message, "kernelRelease")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.kernelRelease); + if (message.osconfigAgentVersion != null && Object.hasOwnProperty.call(message, "osconfigAgentVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.osconfigAgentVersion); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.hostname); + return writer; + }; - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; + /** + * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + /** + * Decodes an OsInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.OsInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 9: + message.hostname = reader.string(); + break; + case 2: + message.longName = reader.string(); + break; + case 3: + message.shortName = reader.string(); + break; + case 4: + message.version = reader.string(); + break; + case 5: + message.architecture = reader.string(); + break; + case 6: + message.kernelVersion = reader.string(); + break; + case 7: + message.kernelRelease = reader.string(); + break; + case 8: + message.osconfigAgentVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; + /** + * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + /** + * Verifies an OsInfo message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OsInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.longName != null && message.hasOwnProperty("longName")) + if (!$util.isString(message.longName)) + return "longName: string expected"; + if (message.shortName != null && message.hasOwnProperty("shortName")) + if (!$util.isString(message.shortName)) + return "shortName: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) + if (!$util.isString(message.kernelVersion)) + return "kernelVersion: string expected"; + if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) + if (!$util.isString(message.kernelRelease)) + return "kernelRelease: string expected"; + if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) + if (!$util.isString(message.osconfigAgentVersion)) + return "osconfigAgentVersion: string expected"; + return null; + }; - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; + /** + * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo + */ + OsInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.OsInfo) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.OsInfo(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.longName != null) + message.longName = String(object.longName); + if (object.shortName != null) + message.shortName = String(object.shortName); + if (object.version != null) + message.version = String(object.version); + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.kernelVersion != null) + message.kernelVersion = String(object.kernelVersion); + if (object.kernelRelease != null) + message.kernelRelease = String(object.kernelRelease); + if (object.osconfigAgentVersion != null) + message.osconfigAgentVersion = String(object.osconfigAgentVersion); + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from an OsInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1.Inventory.OsInfo} message OsInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OsInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.longName = ""; + object.shortName = ""; + object.version = ""; + object.architecture = ""; + object.kernelVersion = ""; + object.kernelRelease = ""; + object.osconfigAgentVersion = ""; + object.hostname = ""; + } + if (message.longName != null && message.hasOwnProperty("longName")) + object.longName = message.longName; + if (message.shortName != null && message.hasOwnProperty("shortName")) + object.shortName = message.shortName; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) + object.kernelVersion = message.kernelVersion; + if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) + object.kernelRelease = message.kernelRelease; + if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) + object.osconfigAgentVersion = message.osconfigAgentVersion; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + return object; + }; - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - return writer; - }; + /** + * Converts this OsInfo to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @instance + * @returns {Object.} JSON object + */ + OsInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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(); - }; + return OsInfo; + })(); - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Inventory.Item = (function() { - /** - * 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()); - }; + /** + * Properties of an Item. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IItem + * @property {string|null} [id] Item id + * @property {google.cloud.osconfig.v1.Inventory.Item.OriginType|null} [originType] Item originType + * @property {google.protobuf.ITimestamp|null} [createTime] Item createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Item updateTime + * @property {google.cloud.osconfig.v1.Inventory.Item.Type|null} [type] Item type + * @property {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null} [installedPackage] Item installedPackage + * @property {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null} [availablePackage] Item availablePackage + */ - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - return null; - }; + /** + * Constructs a new Item. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents an Item. + * @implements IItem + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IItem=} [properties] Properties to set + */ + function Item(properties) { + if (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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - return message; - }; + /** + * Item id. + * @member {string} id + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.id = ""; - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FileDescriptorProto; - })(); + /** + * Item originType. + * @member {google.cloud.osconfig.v1.Inventory.Item.OriginType} originType + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.originType = 0; - protobuf.DescriptorProto = (function() { + /** + * Item createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.createTime = null; - /** - * 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 - */ + /** + * Item updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.updateTime = null; - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Item type. + * @member {google.cloud.osconfig.v1.Inventory.Item.Type} type + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.type = 0; - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; + /** + * Item installedPackage. + * @member {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null|undefined} installedPackage + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.installedPackage = null; - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; + /** + * Item availablePackage. + * @member {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null|undefined} availablePackage + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Item.prototype.availablePackage = null; - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; + /** + * Item details. + * @member {"installedPackage"|"availablePackage"|undefined} details + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + */ + Object.defineProperty(Item.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["installedPackage", "availablePackage"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; + /** + * Creates a new Item instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1.Inventory.IItem=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.Item} Item instance + */ + Item.create = function create(properties) { + return new Item(properties); + }; - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1.Inventory.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.originType != null && Object.hasOwnProperty.call(message, "originType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.originType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.installedPackage != null && Object.hasOwnProperty.call(message, "installedPackage")) + $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.encode(message.installedPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.availablePackage != null && Object.hasOwnProperty.call(message, "availablePackage")) + $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.encode(message.availablePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1.Inventory.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; + /** + * Decodes an Item message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.Item(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.originType = reader.int32(); + break; + case 8: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + case 7: + message.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * Verifies an Item message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Item.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.originType != null && message.hasOwnProperty("originType")) + switch (message.originType) { + default: + return "originType: enum value expected"; + case 0: + case 1: + break; + } + 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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify(message.installedPackage); + if (error) + return "installedPackage." + error; + } + } + if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify(message.availablePackage); + if (error) + return "availablePackage." + error; + } + } + return null; + }; - /** - * 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); - }; + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.Item} Item + */ + Item.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.Item) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.Item(); + if (object.id != null) + message.id = String(object.id); + switch (object.originType) { + case "ORIGIN_TYPE_UNSPECIFIED": + case 0: + message.originType = 0; + break; + case "INVENTORY_REPORT": + case 1: + message.originType = 1; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.Item.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.osconfig.v1.Inventory.Item.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INSTALLED_PACKAGE": + case 1: + message.type = 1; + break; + case "AVAILABLE_PACKAGE": + case 2: + message.type = 2; + break; + } + if (object.installedPackage != null) { + if (typeof object.installedPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.Item.installedPackage: object expected"); + message.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.fromObject(object.installedPackage); + } + if (object.availablePackage != null) { + if (typeof object.availablePackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.Item.availablePackage: object expected"); + message.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.fromObject(object.availablePackage); + } + return message; + }; - /** - * 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(); - }; + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1.Inventory.Item} message Item + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Item.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.originType = options.enums === String ? "ORIGIN_TYPE_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.originType != null && message.hasOwnProperty("originType")) + object.originType = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.OriginType[message.originType] : message.originType; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.Type[message.type] : message.type; + if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { + object.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.toObject(message.installedPackage, options); + if (options.oneofs) + object.details = "installedPackage"; + } + if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { + object.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.toObject(message.availablePackage, options); + if (options.oneofs) + object.details = "availablePackage"; + } + 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); + return object; + }; - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this Item to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @instance + * @returns {Object.} JSON object + */ + Item.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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()); - }; + /** + * OriginType enum. + * @name google.cloud.osconfig.v1.Inventory.Item.OriginType + * @enum {number} + * @property {number} ORIGIN_TYPE_UNSPECIFIED=0 ORIGIN_TYPE_UNSPECIFIED value + * @property {number} INVENTORY_REPORT=1 INVENTORY_REPORT value + */ + Item.OriginType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORIGIN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INVENTORY_REPORT"] = 1; + return values; + })(); - /** - * 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; - }; + /** + * Type enum. + * @name google.cloud.osconfig.v1.Inventory.Item.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INSTALLED_PACKAGE=1 INSTALLED_PACKAGE value + * @property {number} AVAILABLE_PACKAGE=2 AVAILABLE_PACKAGE value + */ + Item.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLED_PACKAGE"] = 1; + values[valuesById[2] = "AVAILABLE_PACKAGE"] = 2; + return values; + })(); - /** - * 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; - }; + return Item; + })(); - /** - * 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; - }; + Inventory.SoftwarePackage = (function() { - /** - * 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); - }; + /** + * Properties of a SoftwarePackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface ISoftwarePackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [yumPackage] SoftwarePackage yumPackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [aptPackage] SoftwarePackage aptPackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [zypperPackage] SoftwarePackage zypperPackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [googetPackage] SoftwarePackage googetPackage + * @property {google.cloud.osconfig.v1.Inventory.IZypperPatch|null} [zypperPatch] SoftwarePackage zypperPatch + * @property {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null} [wuaPackage] SoftwarePackage wuaPackage + * @property {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null} [qfePackage] SoftwarePackage qfePackage + * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [cosPackage] SoftwarePackage cosPackage + * @property {google.cloud.osconfig.v1.Inventory.IWindowsApplication|null} [windowsApplication] SoftwarePackage windowsApplication + */ - DescriptorProto.ExtensionRange = (function() { + /** + * Constructs a new SoftwarePackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a SoftwarePackage. + * @implements ISoftwarePackage + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage=} [properties] Properties to set + */ + function SoftwarePackage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of an 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(); - }; + /** + * SoftwarePackage yumPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} yumPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.yumPackage = null; - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * SoftwarePackage aptPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} aptPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.aptPackage = null; - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * SoftwarePackage zypperPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} zypperPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.zypperPackage = null; - /** - * 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; - }; + /** + * SoftwarePackage googetPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} googetPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.googetPackage = 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; - }; + /** + * SoftwarePackage zypperPatch. + * @member {google.cloud.osconfig.v1.Inventory.IZypperPatch|null|undefined} zypperPatch + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.zypperPatch = null; - /** - * 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; - }; + /** + * SoftwarePackage wuaPackage. + * @member {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null|undefined} wuaPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.wuaPackage = null; - /** - * 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); - }; + /** + * SoftwarePackage qfePackage. + * @member {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null|undefined} qfePackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.qfePackage = null; - return ExtensionRange; - })(); + /** + * SoftwarePackage cosPackage. + * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} cosPackage + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.cosPackage = null; - DescriptorProto.ReservedRange = (function() { + /** + * SoftwarePackage windowsApplication. + * @member {google.cloud.osconfig.v1.Inventory.IWindowsApplication|null|undefined} windowsApplication + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.windowsApplication = null; - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * 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]]; - } + /** + * SoftwarePackage details. + * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"|undefined} details + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + */ + Object.defineProperty(SoftwarePackage.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage", "windowsApplication"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; + /** + * Creates a new SoftwarePackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage instance + */ + SoftwarePackage.create = function create(properties) { + return new SoftwarePackage(properties); + }; - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; + /** + * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwarePackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yumPackage != null && Object.hasOwnProperty.call(message, "yumPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.yumPackage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.aptPackage != null && Object.hasOwnProperty.call(message, "aptPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.aptPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zypperPackage != null && Object.hasOwnProperty.call(message, "zypperPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.zypperPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.googetPackage != null && Object.hasOwnProperty.call(message, "googetPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.googetPackage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.zypperPatch != null && Object.hasOwnProperty.call(message, "zypperPatch")) + $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.encode(message.zypperPatch, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.wuaPackage != null && Object.hasOwnProperty.call(message, "wuaPackage")) + $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.encode(message.wuaPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.qfePackage != null && Object.hasOwnProperty.call(message, "qfePackage")) + $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.encode(message.qfePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.cosPackage != null && Object.hasOwnProperty.call(message, "cosPackage")) + $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.cosPackage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.windowsApplication != null && Object.hasOwnProperty.call(message, "windowsApplication")) + $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.encode(message.windowsApplication, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; - /** - * 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 SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwarePackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a SoftwarePackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwarePackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 2: + message.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 3: + message.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 4: + message.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 5: + message.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.decode(reader, reader.uint32()); + break; + case 6: + message.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); + break; + case 7: + message.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); + break; + case 8: + message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 9: + message.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 SoftwarePackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwarePackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Verifies a SoftwarePackage message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwarePackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.yumPackage); + if (error) + return "yumPackage." + error; + } + } + if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.aptPackage); + if (error) + return "aptPackage." + error; + } + } + if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.zypperPackage); + if (error) + return "zypperPackage." + error; + } + } + if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.googetPackage); + if (error) + return "googetPackage." + error; + } + } + if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.verify(message.zypperPatch); + if (error) + return "zypperPatch." + error; + } + } + if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify(message.wuaPackage); + if (error) + return "wuaPackage." + error; + } + } + if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify(message.qfePackage); + if (error) + return "qfePackage." + error; + } + } + if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.cosPackage); + if (error) + return "cosPackage." + error; + } + } + if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.verify(message.windowsApplication); + if (error) + return "windowsApplication." + error; + } + } + return null; + }; - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; + /** + * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage + */ + SoftwarePackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage(); + if (object.yumPackage != null) { + if (typeof object.yumPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.yumPackage: object expected"); + message.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.yumPackage); + } + if (object.aptPackage != null) { + if (typeof object.aptPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.aptPackage: object expected"); + message.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.aptPackage); + } + if (object.zypperPackage != null) { + if (typeof object.zypperPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.zypperPackage: object expected"); + message.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.zypperPackage); + } + if (object.googetPackage != null) { + if (typeof object.googetPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.googetPackage: object expected"); + message.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.googetPackage); + } + if (object.zypperPatch != null) { + if (typeof object.zypperPatch !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.zypperPatch: object expected"); + message.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.fromObject(object.zypperPatch); + } + if (object.wuaPackage != null) { + if (typeof object.wuaPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.wuaPackage: object expected"); + message.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.fromObject(object.wuaPackage); + } + if (object.qfePackage != null) { + if (typeof object.qfePackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.qfePackage: object expected"); + message.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.fromObject(object.qfePackage); + } + if (object.cosPackage != null) { + if (typeof object.cosPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.cosPackage: object expected"); + message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.cosPackage); + } + if (object.windowsApplication != null) { + if (typeof object.windowsApplication !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.windowsApplication: object expected"); + message.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.fromObject(object.windowsApplication); + } + return message; + }; - /** - * 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 SoftwarePackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.SoftwarePackage} message SoftwarePackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwarePackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { + object.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.yumPackage, options); + if (options.oneofs) + object.details = "yumPackage"; + } + if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { + object.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.aptPackage, options); + if (options.oneofs) + object.details = "aptPackage"; + } + if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { + object.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.zypperPackage, options); + if (options.oneofs) + object.details = "zypperPackage"; + } + if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { + object.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.googetPackage, options); + if (options.oneofs) + object.details = "googetPackage"; + } + if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { + object.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.toObject(message.zypperPatch, options); + if (options.oneofs) + object.details = "zypperPatch"; + } + if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { + object.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.toObject(message.wuaPackage, options); + if (options.oneofs) + object.details = "wuaPackage"; + } + if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { + object.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.toObject(message.qfePackage, options); + if (options.oneofs) + object.details = "qfePackage"; + } + if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { + object.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.cosPackage, options); + if (options.oneofs) + object.details = "cosPackage"; + } + if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { + object.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.toObject(message.windowsApplication, options); + if (options.oneofs) + object.details = "windowsApplication"; + } + return object; + }; - /** - * 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 SoftwarePackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @instance + * @returns {Object.} JSON object + */ + SoftwarePackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return SoftwarePackage; + })(); - return ReservedRange; - })(); + Inventory.VersionedPackage = (function() { - return DescriptorProto; - })(); + /** + * Properties of a VersionedPackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IVersionedPackage + * @property {string|null} [packageName] VersionedPackage packageName + * @property {string|null} [architecture] VersionedPackage architecture + * @property {string|null} [version] VersionedPackage version + */ - protobuf.ExtensionRangeOptions = (function() { + /** + * Constructs a new VersionedPackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a VersionedPackage. + * @implements IVersionedPackage + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage=} [properties] Properties to set + */ + function VersionedPackage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - */ + /** + * VersionedPackage packageName. + * @member {string} packageName + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.packageName = ""; - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * VersionedPackage architecture. + * @member {string} architecture + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.architecture = ""; - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * VersionedPackage version. + * @member {string} version + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.version = ""; - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; + /** + * Creates a new VersionedPackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage instance + */ + VersionedPackage.create = function create(properties) { + return new VersionedPackage(properties); + }; - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionedPackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.architecture); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageName); + return writer; + }; - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionedPackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * Decodes a VersionedPackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionedPackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.VersionedPackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.packageName = reader.string(); + break; + case 2: + message.architecture = reader.string(); + break; + case 3: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + 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.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionedPackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a VersionedPackage message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionedPackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; - return ExtensionRangeOptions; - })(); + /** + * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage + */ + VersionedPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.VersionedPackage) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.VersionedPackage(); + if (object.packageName != null) + message.packageName = String(object.packageName); + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.version != null) + message.version = String(object.version); + return message; + }; - protobuf.FieldDescriptorProto = (function() { + /** + * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.VersionedPackage} message VersionedPackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionedPackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.architecture = ""; + object.version = ""; + object.packageName = ""; + } + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + return object; + }; - /** - * 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 - */ + /** + * Converts this VersionedPackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @instance + * @returns {Object.} JSON object + */ + VersionedPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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]]; - } + return VersionedPackage; + })(); - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; + Inventory.ZypperPatch = (function() { - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; + /** + * Properties of a ZypperPatch. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IZypperPatch + * @property {string|null} [patchName] ZypperPatch patchName + * @property {string|null} [category] ZypperPatch category + * @property {string|null} [severity] ZypperPatch severity + * @property {string|null} [summary] ZypperPatch summary + */ - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; + /** + * Constructs a new ZypperPatch. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a ZypperPatch. + * @implements IZypperPatch + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch=} [properties] Properties to set + */ + function ZypperPatch(properties) { + if (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 type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; + /** + * ZypperPatch patchName. + * @member {string} patchName + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.patchName = ""; - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; + /** + * ZypperPatch category. + * @member {string} category + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.category = ""; - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; + /** + * ZypperPatch severity. + * @member {string} severity + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.severity = ""; - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; + /** + * ZypperPatch summary. + * @member {string} summary + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.summary = ""; - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; + /** + * Creates a new ZypperPatch instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch instance + */ + ZypperPatch.create = function create(properties) { + return new ZypperPatch(properties); + }; - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; + /** + * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperPatch.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.category); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.severity); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.summary); + if (message.patchName != null && Object.hasOwnProperty.call(message, "patchName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.patchName); + return writer; + }; - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; + /** + * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperPatch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; + /** + * Decodes a ZypperPatch message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperPatch.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.ZypperPatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.patchName = reader.string(); + break; + case 2: + message.category = reader.string(); + break; + case 3: + message.severity = reader.string(); + break; + case 4: + message.summary = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperPatch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a ZypperPatch message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ZypperPatch.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchName != null && message.hasOwnProperty("patchName")) + if (!$util.isString(message.patchName)) + return "patchName: string expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + return null; + }; - /** - * 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(); - }; + /** + * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch + */ + ZypperPatch.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.ZypperPatch) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.ZypperPatch(); + if (object.patchName != null) + message.patchName = String(object.patchName); + if (object.category != null) + message.category = String(object.category); + if (object.severity != null) + message.severity = String(object.severity); + if (object.summary != null) + message.summary = String(object.summary); + return message; + }; - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1.Inventory.ZypperPatch} message ZypperPatch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ZypperPatch.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.category = ""; + object.severity = ""; + object.summary = ""; + object.patchName = ""; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + if (message.patchName != null && message.hasOwnProperty("patchName")) + object.patchName = message.patchName; + return object; + }; - /** - * 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()); - }; + /** + * Converts this ZypperPatch to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @instance + * @returns {Object.} JSON object + */ + ZypperPatch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; + return ZypperPatch; + })(); - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; + Inventory.WindowsUpdatePackage = (function() { - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; + /** + * Properties of a WindowsUpdatePackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IWindowsUpdatePackage + * @property {string|null} [title] WindowsUpdatePackage title + * @property {string|null} [description] WindowsUpdatePackage description + * @property {Array.|null} [categories] WindowsUpdatePackage categories + * @property {Array.|null} [kbArticleIds] WindowsUpdatePackage kbArticleIds + * @property {string|null} [supportUrl] WindowsUpdatePackage supportUrl + * @property {Array.|null} [moreInfoUrls] WindowsUpdatePackage moreInfoUrls + * @property {string|null} [updateId] WindowsUpdatePackage updateId + * @property {number|null} [revisionNumber] WindowsUpdatePackage revisionNumber + * @property {google.protobuf.ITimestamp|null} [lastDeploymentChangeTime] WindowsUpdatePackage lastDeploymentChangeTime + */ - /** - * 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); - }; + /** + * Constructs a new WindowsUpdatePackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a WindowsUpdatePackage. + * @implements IWindowsUpdatePackage + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage=} [properties] Properties to set + */ + function WindowsUpdatePackage(properties) { + this.categories = []; + this.kbArticleIds = []; + this.moreInfoUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ + /** + * WindowsUpdatePackage title. + * @member {string} title + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.title = ""; - /** - * 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]]; - } + /** + * WindowsUpdatePackage description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.description = ""; - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; + /** + * WindowsUpdatePackage categories. + * @member {Array.} categories + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.categories = $util.emptyArray; - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; + /** + * WindowsUpdatePackage kbArticleIds. + * @member {Array.} kbArticleIds + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.kbArticleIds = $util.emptyArray; - /** - * 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); - }; + /** + * WindowsUpdatePackage supportUrl. + * @member {string} supportUrl + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.supportUrl = ""; - /** - * 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; - }; + /** + * WindowsUpdatePackage moreInfoUrls. + * @member {Array.} moreInfoUrls + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.moreInfoUrls = $util.emptyArray; - /** - * 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(); - }; + /** + * WindowsUpdatePackage updateId. + * @member {string} updateId + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.updateId = ""; - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * WindowsUpdatePackage revisionNumber. + * @member {number} revisionNumber + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.revisionNumber = 0; - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * WindowsUpdatePackage lastDeploymentChangeTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastDeploymentChangeTime + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.lastDeploymentChangeTime = null; - /** - * 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 a new WindowsUpdatePackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage instance + */ + WindowsUpdatePackage.create = function create(properties) { + return new WindowsUpdatePackage(properties); + }; - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; + /** + * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdatePackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.encode(message.categories[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.kbArticleIds != null && message.kbArticleIds.length) + for (var i = 0; i < message.kbArticleIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kbArticleIds[i]); + if (message.moreInfoUrls != null && message.moreInfoUrls.length) + for (var i = 0; i < message.moreInfoUrls.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.moreInfoUrls[i]); + if (message.updateId != null && Object.hasOwnProperty.call(message, "updateId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.updateId); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.revisionNumber); + if (message.lastDeploymentChangeTime != null && Object.hasOwnProperty.call(message, "lastDeploymentChangeTime")) + $root.google.protobuf.Timestamp.encode(message.lastDeploymentChangeTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.supportUrl != null && Object.hasOwnProperty.call(message, "supportUrl")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.supportUrl); + return writer; + }; - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; + /** + * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdatePackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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); - }; + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdatePackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.kbArticleIds && message.kbArticleIds.length)) + message.kbArticleIds = []; + message.kbArticleIds.push(reader.string()); + break; + case 11: + message.supportUrl = reader.string(); + break; + case 5: + if (!(message.moreInfoUrls && message.moreInfoUrls.length)) + message.moreInfoUrls = []; + message.moreInfoUrls.push(reader.string()); + break; + case 6: + message.updateId = reader.string(); + break; + case 7: + message.revisionNumber = reader.int32(); + break; + case 10: + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return OneofDescriptorProto; - })(); + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdatePackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - protobuf.EnumDescriptorProto = (function() { + /** + * Verifies a WindowsUpdatePackage message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdatePackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } + if (message.kbArticleIds != null && message.hasOwnProperty("kbArticleIds")) { + if (!Array.isArray(message.kbArticleIds)) + return "kbArticleIds: array expected"; + for (var i = 0; i < message.kbArticleIds.length; ++i) + if (!$util.isString(message.kbArticleIds[i])) + return "kbArticleIds: string[] expected"; + } + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + if (!$util.isString(message.supportUrl)) + return "supportUrl: string expected"; + if (message.moreInfoUrls != null && message.hasOwnProperty("moreInfoUrls")) { + if (!Array.isArray(message.moreInfoUrls)) + return "moreInfoUrls: array expected"; + for (var i = 0; i < message.moreInfoUrls.length; ++i) + if (!$util.isString(message.moreInfoUrls[i])) + return "moreInfoUrls: string[] expected"; + } + if (message.updateId != null && message.hasOwnProperty("updateId")) + if (!$util.isString(message.updateId)) + return "updateId: string expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber)) + return "revisionNumber: integer expected"; + if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastDeploymentChangeTime); + if (error) + return "lastDeploymentChangeTime." + error; + } + return null; + }; - /** - * 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]]; - } + /** + * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + */ + WindowsUpdatePackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.categories: object expected"); + message.categories[i] = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.fromObject(object.categories[i]); + } + } + if (object.kbArticleIds) { + if (!Array.isArray(object.kbArticleIds)) + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.kbArticleIds: array expected"); + message.kbArticleIds = []; + for (var i = 0; i < object.kbArticleIds.length; ++i) + message.kbArticleIds[i] = String(object.kbArticleIds[i]); + } + if (object.supportUrl != null) + message.supportUrl = String(object.supportUrl); + if (object.moreInfoUrls) { + if (!Array.isArray(object.moreInfoUrls)) + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.moreInfoUrls: array expected"); + message.moreInfoUrls = []; + for (var i = 0; i < object.moreInfoUrls.length; ++i) + message.moreInfoUrls[i] = String(object.moreInfoUrls[i]); + } + if (object.updateId != null) + message.updateId = String(object.updateId); + if (object.revisionNumber != null) + message.revisionNumber = object.revisionNumber | 0; + if (object.lastDeploymentChangeTime != null) { + if (typeof object.lastDeploymentChangeTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.lastDeploymentChangeTime: object expected"); + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.fromObject(object.lastDeploymentChangeTime); + } + return message; + }; - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; + /** + * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} message WindowsUpdatePackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdatePackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.categories = []; + object.kbArticleIds = []; + object.moreInfoUrls = []; + } + if (options.defaults) { + object.title = ""; + object.description = ""; + object.updateId = ""; + object.revisionNumber = 0; + object.lastDeploymentChangeTime = null; + object.supportUrl = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.toObject(message.categories[j], options); + } + if (message.kbArticleIds && message.kbArticleIds.length) { + object.kbArticleIds = []; + for (var j = 0; j < message.kbArticleIds.length; ++j) + object.kbArticleIds[j] = message.kbArticleIds[j]; + } + if (message.moreInfoUrls && message.moreInfoUrls.length) { + object.moreInfoUrls = []; + for (var j = 0; j < message.moreInfoUrls.length; ++j) + object.moreInfoUrls[j] = message.moreInfoUrls[j]; + } + if (message.updateId != null && message.hasOwnProperty("updateId")) + object.updateId = message.updateId; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + object.revisionNumber = message.revisionNumber; + if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) + object.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.toObject(message.lastDeploymentChangeTime, options); + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + object.supportUrl = message.supportUrl; + return object; + }; - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + /** + * Converts this WindowsUpdatePackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdatePackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; + WindowsUpdatePackage.WindowsUpdateCategory = (function() { - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * Properties of a WindowsUpdateCategory. + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @interface IWindowsUpdateCategory + * @property {string|null} [id] WindowsUpdateCategory id + * @property {string|null} [name] WindowsUpdateCategory name + */ - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * Constructs a new WindowsUpdateCategory. + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @classdesc Represents a WindowsUpdateCategory. + * @implements IWindowsUpdateCategory + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set + */ + function WindowsUpdateCategory(properties) { + if (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 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); - }; + /** + * WindowsUpdateCategory id. + * @member {string} id + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + */ + WindowsUpdateCategory.prototype.id = ""; - /** - * 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; - }; + /** + * WindowsUpdateCategory name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + */ + WindowsUpdateCategory.prototype.name = ""; - /** - * 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(); - }; + /** + * Creates a new WindowsUpdateCategory instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory instance + */ + WindowsUpdateCategory.create = function create(properties) { + return new WindowsUpdateCategory(properties); + }; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateCategory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; - /** - * 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()); - }; + /** + * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateCategory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateCategory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateCategory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - EnumDescriptorProto.EnumReservedRange = (function() { + /** + * Verifies a WindowsUpdateCategory message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdateCategory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ + /** + * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + */ + WindowsUpdateCategory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * 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]]; - } + /** + * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} message WindowsUpdateCategory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdateCategory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; + /** + * Converts this WindowsUpdateCategory to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdateCategory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; + return WindowsUpdateCategory; + })(); - /** - * 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); - }; + return WindowsUpdatePackage; + })(); - /** - * 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; - }; + Inventory.WindowsQuickFixEngineeringPackage = (function() { - /** - * 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(); - }; + /** + * Properties of a WindowsQuickFixEngineeringPackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IWindowsQuickFixEngineeringPackage + * @property {string|null} [caption] WindowsQuickFixEngineeringPackage caption + * @property {string|null} [description] WindowsQuickFixEngineeringPackage description + * @property {string|null} [hotFixId] WindowsQuickFixEngineeringPackage hotFixId + * @property {google.protobuf.ITimestamp|null} [installTime] WindowsQuickFixEngineeringPackage installTime + */ - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new WindowsQuickFixEngineeringPackage. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a WindowsQuickFixEngineeringPackage. + * @implements IWindowsQuickFixEngineeringPackage + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set + */ + function WindowsQuickFixEngineeringPackage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes an 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()); - }; + /** + * WindowsQuickFixEngineeringPackage caption. + * @member {string} caption + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.caption = ""; - /** - * 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; - }; + /** + * WindowsQuickFixEngineeringPackage description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.description = ""; - /** - * 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; - }; + /** + * WindowsQuickFixEngineeringPackage hotFixId. + * @member {string} hotFixId + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.hotFixId = ""; - /** - * 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; - }; + /** + * WindowsQuickFixEngineeringPackage installTime. + * @member {google.protobuf.ITimestamp|null|undefined} installTime + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.installTime = null; - /** - * 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); - }; + /** + * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage instance + */ + WindowsQuickFixEngineeringPackage.create = function create(properties) { + return new WindowsQuickFixEngineeringPackage(properties); + }; - return EnumReservedRange; - })(); + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsQuickFixEngineeringPackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caption); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.hotFixId != null && Object.hasOwnProperty.call(message, "hotFixId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.hotFixId); + if (message.installTime != null && Object.hasOwnProperty.call(message, "installTime")) + $root.google.protobuf.Timestamp.encode(message.installTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - return EnumDescriptorProto; - })(); + /** + * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsQuickFixEngineeringPackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.EnumValueDescriptorProto = (function() { + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsQuickFixEngineeringPackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.caption = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.hotFixId = reader.string(); + break; + case 5: + message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 - */ + /** + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsQuickFixEngineeringPackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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]]; - } + /** + * Verifies a WindowsQuickFixEngineeringPackage message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsQuickFixEngineeringPackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) + if (!$util.isString(message.hotFixId)) + return "hotFixId: string expected"; + if (message.installTime != null && message.hasOwnProperty("installTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.installTime); + if (error) + return "installTime." + error; + } + return null; + }; - /** - * 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 WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage + */ + WindowsQuickFixEngineeringPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage(); + if (object.caption != null) + message.caption = String(object.caption); + if (object.description != null) + message.description = String(object.description); + if (object.hotFixId != null) + message.hotFixId = String(object.hotFixId); + if (object.installTime != null) { + if (typeof object.installTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.installTime: object expected"); + message.installTime = $root.google.protobuf.Timestamp.fromObject(object.installTime); + } + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsQuickFixEngineeringPackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.caption = ""; + object.description = ""; + object.hotFixId = ""; + object.installTime = null; + } + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) + object.hotFixId = message.hotFixId; + if (message.installTime != null && message.hasOwnProperty("installTime")) + object.installTime = $root.google.protobuf.Timestamp.toObject(message.installTime, options); + return object; + }; - /** - * 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; - }; + /** + * Converts this WindowsQuickFixEngineeringPackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @instance + * @returns {Object.} JSON object + */ + WindowsQuickFixEngineeringPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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(); - }; + return WindowsQuickFixEngineeringPackage; + })(); - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Inventory.WindowsApplication = (function() { - /** - * 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()); - }; + /** + * Properties of a WindowsApplication. + * @memberof google.cloud.osconfig.v1.Inventory + * @interface IWindowsApplication + * @property {string|null} [displayName] WindowsApplication displayName + * @property {string|null} [displayVersion] WindowsApplication displayVersion + * @property {string|null} [publisher] WindowsApplication publisher + * @property {google.type.IDate|null} [installDate] WindowsApplication installDate + * @property {string|null} [helpLink] WindowsApplication helpLink + */ - /** - * 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; - }; + /** + * Constructs a new WindowsApplication. + * @memberof google.cloud.osconfig.v1.Inventory + * @classdesc Represents a WindowsApplication. + * @implements IWindowsApplication + * @constructor + * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication=} [properties] Properties to set + */ + function WindowsApplication(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates an 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; - }; + /** + * WindowsApplication displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.displayName = ""; - /** - * 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; - }; + /** + * WindowsApplication displayVersion. + * @member {string} displayVersion + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.displayVersion = ""; - /** - * 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); - }; + /** + * WindowsApplication publisher. + * @member {string} publisher + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.publisher = ""; - return EnumValueDescriptorProto; - })(); + /** + * WindowsApplication installDate. + * @member {google.type.IDate|null|undefined} installDate + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.installDate = null; - protobuf.ServiceDescriptorProto = (function() { + /** + * WindowsApplication helpLink. + * @member {string} helpLink + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.helpLink = ""; - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ + /** + * Creates a new WindowsApplication instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication instance + */ + WindowsApplication.create = function create(properties) { + return new WindowsApplication(properties); + }; - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsApplication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.displayVersion != null && Object.hasOwnProperty.call(message, "displayVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayVersion); + if (message.publisher != null && Object.hasOwnProperty.call(message, "publisher")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.publisher); + if (message.installDate != null && Object.hasOwnProperty.call(message, "installDate")) + $root.google.type.Date.encode(message.installDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.helpLink != null && Object.hasOwnProperty.call(message, "helpLink")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.helpLink); + return writer; + }; - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; + /** + * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsApplication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + /** + * Decodes a WindowsApplication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsApplication.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsApplication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 2: + message.displayVersion = reader.string(); + break; + case 3: + message.publisher = reader.string(); + break; + case 4: + message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + case 5: + message.helpLink = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; + /** + * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsApplication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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); - }; + /** + * Verifies a WindowsApplication message. + * @function verify + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsApplication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) + if (!$util.isString(message.displayVersion)) + return "displayVersion: string expected"; + if (message.publisher != null && message.hasOwnProperty("publisher")) + if (!$util.isString(message.publisher)) + return "publisher: string expected"; + if (message.installDate != null && message.hasOwnProperty("installDate")) { + var error = $root.google.type.Date.verify(message.installDate); + if (error) + return "installDate." + error; + } + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + if (!$util.isString(message.helpLink)) + return "helpLink: string expected"; + return null; + }; - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication + */ + WindowsApplication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsApplication) + return object; + var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsApplication(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.displayVersion != null) + message.displayVersion = String(object.displayVersion); + if (object.publisher != null) + message.publisher = String(object.publisher); + if (object.installDate != null) { + if (typeof object.installDate !== "object") + throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsApplication.installDate: object expected"); + message.installDate = $root.google.type.Date.fromObject(object.installDate); + } + if (object.helpLink != null) + message.helpLink = String(object.helpLink); + return message; + }; - /** - * 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(); - }; + /** + * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1.Inventory.WindowsApplication} message WindowsApplication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsApplication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.displayVersion = ""; + object.publisher = ""; + object.installDate = null; + object.helpLink = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) + object.displayVersion = message.displayVersion; + if (message.publisher != null && message.hasOwnProperty("publisher")) + object.publisher = message.publisher; + if (message.installDate != null && message.hasOwnProperty("installDate")) + object.installDate = $root.google.type.Date.toObject(message.installDate, options); + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + object.helpLink = message.helpLink; + return object; + }; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this WindowsApplication to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @instance + * @returns {Object.} JSON object + */ + WindowsApplication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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()); - }; + return WindowsApplication; + })(); - /** - * 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; - }; + return Inventory; + })(); - /** - * 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]); + v1.GetInventoryRequest = (function() { + + /** + * Properties of a GetInventoryRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IGetInventoryRequest + * @property {string|null} [name] GetInventoryRequest name + * @property {google.cloud.osconfig.v1.InventoryView|null} [view] GetInventoryRequest view + */ + + /** + * Constructs a new GetInventoryRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GetInventoryRequest. + * @implements IGetInventoryRequest + * @constructor + * @param {google.cloud.osconfig.v1.IGetInventoryRequest=} [properties] Properties to set + */ + function GetInventoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (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; - }; + /** + * GetInventoryRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @instance + */ + GetInventoryRequest.prototype.name = ""; - /** - * 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); - }; + /** + * GetInventoryRequest view. + * @member {google.cloud.osconfig.v1.InventoryView} view + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @instance + */ + GetInventoryRequest.prototype.view = 0; - return ServiceDescriptorProto; - })(); + /** + * Creates a new GetInventoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @static + * @param {google.cloud.osconfig.v1.IGetInventoryRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetInventoryRequest} GetInventoryRequest instance + */ + GetInventoryRequest.create = function create(properties) { + return new GetInventoryRequest(properties); + }; - protobuf.MethodDescriptorProto = (function() { + /** + * Encodes the specified GetInventoryRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetInventoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @static + * @param {google.cloud.osconfig.v1.IGetInventoryRequest} message GetInventoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInventoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; - /** - * 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 - */ + /** + * Encodes the specified GetInventoryRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetInventoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @static + * @param {google.cloud.osconfig.v1.IGetInventoryRequest} message GetInventoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInventoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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]]; - } + /** + * Decodes a GetInventoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GetInventoryRequest} GetInventoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInventoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetInventoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; + /** + * Decodes a GetInventoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GetInventoryRequest} GetInventoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInventoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; + /** + * Verifies a GetInventoryRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetInventoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; + /** + * Creates a GetInventoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GetInventoryRequest} GetInventoryRequest + */ + GetInventoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetInventoryRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.GetInventoryRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "INVENTORY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + return message; + }; - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; + /** + * Creates a plain object from a GetInventoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @static + * @param {google.cloud.osconfig.v1.GetInventoryRequest} message GetInventoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetInventoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "INVENTORY_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.osconfig.v1.InventoryView[message.view] : message.view; + return object; + }; - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; + /** + * Converts this GetInventoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetInventoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; + return GetInventoryRequest; + })(); - /** - * 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; - }; + v1.ListInventoriesRequest = (function() { - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ListInventoriesRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListInventoriesRequest + * @property {string|null} [parent] ListInventoriesRequest parent + * @property {google.cloud.osconfig.v1.InventoryView|null} [view] ListInventoriesRequest view + * @property {number|null} [pageSize] ListInventoriesRequest pageSize + * @property {string|null} [pageToken] ListInventoriesRequest pageToken + * @property {string|null} [filter] ListInventoriesRequest filter + */ - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new ListInventoriesRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListInventoriesRequest. + * @implements IListInventoriesRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListInventoriesRequest=} [properties] Properties to set + */ + function ListInventoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - - /** - * Decodes a 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; - }; + /** + * ListInventoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.parent = ""; - /** - * 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); - }; + /** + * ListInventoriesRequest view. + * @member {google.cloud.osconfig.v1.InventoryView} view + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.view = 0; - return MethodDescriptorProto; - })(); + /** + * ListInventoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.pageSize = 0; - protobuf.FileOptions = (function() { + /** + * ListInventoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.pageToken = ""; - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ + /** + * ListInventoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.filter = ""; - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new ListInventoriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @static + * @param {google.cloud.osconfig.v1.IListInventoriesRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListInventoriesRequest} ListInventoriesRequest instance + */ + ListInventoriesRequest.create = function create(properties) { + return new ListInventoriesRequest(properties); + }; - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; + /** + * Encodes the specified ListInventoriesRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListInventoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @static + * @param {google.cloud.osconfig.v1.IListInventoriesRequest} message ListInventoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInventoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; + /** + * Encodes the specified ListInventoriesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListInventoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @static + * @param {google.cloud.osconfig.v1.IListInventoriesRequest} message ListInventoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInventoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; + /** + * Decodes a ListInventoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListInventoriesRequest} ListInventoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInventoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListInventoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * Decodes a ListInventoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListInventoriesRequest} ListInventoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInventoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * Verifies a ListInventoriesRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInventoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * Creates a ListInventoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListInventoriesRequest} ListInventoriesRequest + */ + ListInventoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListInventoriesRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListInventoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.view) { + case "INVENTORY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; + /** + * Creates a plain object from a ListInventoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @static + * @param {google.cloud.osconfig.v1.ListInventoriesRequest} message ListInventoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInventoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = options.enums === String ? "INVENTORY_VIEW_UNSPECIFIED" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.osconfig.v1.InventoryView[message.view] : message.view; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; + /** + * Converts this ListInventoriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListInventoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; + return ListInventoriesRequest; + })(); - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; + v1.ListInventoriesResponse = (function() { - /** - * FileOptions phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpGenericServices = false; + /** + * Properties of a ListInventoriesResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListInventoriesResponse + * @property {Array.|null} [inventories] ListInventoriesResponse inventories + * @property {string|null} [nextPageToken] ListInventoriesResponse nextPageToken + */ - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + /** + * Constructs a new ListInventoriesResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListInventoriesResponse. + * @implements IListInventoriesResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListInventoriesResponse=} [properties] Properties to set + */ + function ListInventoriesResponse(properties) { + this.inventories = []; + if (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 ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; + /** + * ListInventoriesResponse inventories. + * @member {Array.} inventories + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @instance + */ + ListInventoriesResponse.prototype.inventories = $util.emptyArray; - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + /** + * ListInventoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @instance + */ + ListInventoriesResponse.prototype.nextPageToken = ""; - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + /** + * Creates a new ListInventoriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @static + * @param {google.cloud.osconfig.v1.IListInventoriesResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListInventoriesResponse} ListInventoriesResponse instance + */ + ListInventoriesResponse.create = function create(properties) { + return new ListInventoriesResponse(properties); + }; - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; + /** + * Encodes the specified ListInventoriesResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListInventoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @static + * @param {google.cloud.osconfig.v1.IListInventoriesResponse} message ListInventoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInventoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inventories != null && message.inventories.length) + for (var i = 0; i < message.inventories.length; ++i) + $root.google.cloud.osconfig.v1.Inventory.encode(message.inventories[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; + }; - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; + /** + * Encodes the specified ListInventoriesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListInventoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @static + * @param {google.cloud.osconfig.v1.IListInventoriesResponse} message ListInventoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInventoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; + /** + * Decodes a ListInventoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListInventoriesResponse} ListInventoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInventoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListInventoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inventories && message.inventories.length)) + message.inventories = []; + message.inventories.push($root.google.cloud.osconfig.v1.Inventory.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; + /** + * Decodes a ListInventoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListInventoriesResponse} ListInventoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInventoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; + /** + * Verifies a ListInventoriesResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInventoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inventories != null && message.hasOwnProperty("inventories")) { + if (!Array.isArray(message.inventories)) + return "inventories: array expected"; + for (var i = 0; i < message.inventories.length; ++i) { + var error = $root.google.cloud.osconfig.v1.Inventory.verify(message.inventories[i]); + if (error) + return "inventories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Creates a ListInventoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListInventoriesResponse} ListInventoriesResponse + */ + ListInventoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListInventoriesResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListInventoriesResponse(); + if (object.inventories) { + if (!Array.isArray(object.inventories)) + throw TypeError(".google.cloud.osconfig.v1.ListInventoriesResponse.inventories: array expected"); + message.inventories = []; + for (var i = 0; i < object.inventories.length; ++i) { + if (typeof object.inventories[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListInventoriesResponse.inventories: object expected"); + message.inventories[i] = $root.google.cloud.osconfig.v1.Inventory.fromObject(object.inventories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + /** + * Creates a plain object from a ListInventoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @static + * @param {google.cloud.osconfig.v1.ListInventoriesResponse} message ListInventoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInventoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.inventories = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.inventories && message.inventories.length) { + object.inventories = []; + for (var j = 0; j < message.inventories.length; ++j) + object.inventories[j] = $root.google.cloud.osconfig.v1.Inventory.toObject(message.inventories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * 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); - }; + /** + * Converts this ListInventoriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListInventoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; + return ListInventoriesResponse; + })(); - /** - * 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(); - }; + /** + * InventoryView enum. + * @name google.cloud.osconfig.v1.InventoryView + * @enum {number} + * @property {number} INVENTORY_VIEW_UNSPECIFIED=0 INVENTORY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + v1.InventoryView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INVENTORY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + v1.FixedOrPercent = (function() { - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - if (typeof message.phpGenericServices !== "boolean") - return "phpGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; + /** + * Properties of a FixedOrPercent. + * @memberof google.cloud.osconfig.v1 + * @interface IFixedOrPercent + * @property {number|null} [fixed] FixedOrPercent fixed + * @property {number|null} [percent] FixedOrPercent percent + */ - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.phpGenericServices != null) - message.phpGenericServices = Boolean(object.phpGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + /** + * Constructs a new FixedOrPercent. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a FixedOrPercent. + * @implements IFixedOrPercent + * @constructor + * @param {google.cloud.osconfig.v1.IFixedOrPercent=} [properties] Properties to set + */ + function FixedOrPercent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpGenericServices = false; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - object.phpGenericServices = message.phpGenericServices; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FixedOrPercent fixed. + * @member {number|null|undefined} fixed + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @instance + */ + FixedOrPercent.prototype.fixed = null; - /** - * 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; - })(); + /** + * FixedOrPercent percent. + * @member {number|null|undefined} percent + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @instance + */ + FixedOrPercent.prototype.percent = null; - return FileOptions; - })(); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - protobuf.MessageOptions = (function() { + /** + * FixedOrPercent mode. + * @member {"fixed"|"percent"|undefined} mode + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @instance + */ + Object.defineProperty(FixedOrPercent.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["fixed", "percent"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ + /** + * Creates a new FixedOrPercent instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1.IFixedOrPercent=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent instance + */ + FixedOrPercent.create = function create(properties) { + return new FixedOrPercent(properties); + }; - /** - * 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]]; - } + /** + * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedOrPercent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fixed != null && Object.hasOwnProperty.call(message, "fixed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fixed); + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.percent); + return writer; + }; - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + /** + * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedOrPercent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + /** + * Decodes a FixedOrPercent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedOrPercent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.FixedOrPercent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fixed = reader.int32(); + break; + case 2: + message.percent = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedOrPercent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; + /** + * Verifies a FixedOrPercent message. + * @function verify + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FixedOrPercent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + properties.mode = 1; + if (!$util.isInteger(message.fixed)) + return "fixed: integer expected"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + if (!$util.isInteger(message.percent)) + return "percent: integer expected"; + } + return null; + }; - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent + */ + FixedOrPercent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.FixedOrPercent) + return object; + var message = new $root.google.cloud.osconfig.v1.FixedOrPercent(); + if (object.fixed != null) + message.fixed = object.fixed | 0; + if (object.percent != null) + message.percent = object.percent | 0; + return message; + }; - /** - * 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 plain object from a FixedOrPercent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1.FixedOrPercent} message FixedOrPercent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FixedOrPercent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + object.fixed = message.fixed; + if (options.oneofs) + object.mode = "fixed"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + object.percent = message.percent; + if (options.oneofs) + object.mode = "percent"; + } + return object; + }; - /** - * 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); - }; + /** + * Converts this FixedOrPercent to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @instance + * @returns {Object.} JSON object + */ + FixedOrPercent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; + return FixedOrPercent; + })(); - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v1.OsConfigService = (function() { - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new OsConfigService service. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an OsConfigService + * @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 OsConfigService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - } - 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()); - }; + (OsConfigService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsConfigService; - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; + /** + * Creates new OsConfigService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.osconfig.v1.OsConfigService + * @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 {OsConfigService} RPC service. Useful where requests and/or responses are streamed. + */ + OsConfigService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ExecutePatchJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + */ - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; + /** + * Calls ExecutePatchJob. + * @function executePatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.executePatchJob = function executePatchJob(request, callback) { + return this.rpcCall(executePatchJob, $root.google.cloud.osconfig.v1.ExecutePatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); + }, "name", { value: "ExecutePatchJob" }); - /** - * 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); - }; + /** + * Calls ExecutePatchJob. + * @function executePatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return MessageOptions; - })(); + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef GetPatchJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + */ - protobuf.FieldOptions = (function() { + /** + * Calls GetPatchJob. + * @function getPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.getPatchJob = function getPatchJob(request, callback) { + return this.rpcCall(getPatchJob, $root.google.cloud.osconfig.v1.GetPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); + }, "name", { value: "GetPatchJob" }); - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - */ + /** + * Calls GetPatchJob. + * @function getPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef CancelPatchJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + */ - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; + /** + * Calls CancelPatchJob. + * @function cancelPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.cancelPatchJob = function cancelPatchJob(request, callback) { + return this.rpcCall(cancelPatchJob, $root.google.cloud.osconfig.v1.CancelPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); + }, "name", { value: "CancelPatchJob" }); - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; + /** + * Calls CancelPatchJob. + * @function cancelPatchJob + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ListPatchJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} [response] ListPatchJobsResponse + */ - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; + /** + * Calls ListPatchJobs. + * @function listPatchJobs + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback} callback Node-style callback called with the error, if any, and ListPatchJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.listPatchJobs = function listPatchJobs(request, callback) { + return this.rpcCall(listPatchJobs, $root.google.cloud.osconfig.v1.ListPatchJobsRequest, $root.google.cloud.osconfig.v1.ListPatchJobsResponse, request, callback); + }, "name", { value: "ListPatchJobs" }); - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; + /** + * Calls ListPatchJobs. + * @function listPatchJobs + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ListPatchJobInstanceDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} [response] ListPatchJobInstanceDetailsResponse + */ - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Calls ListPatchJobInstanceDetails. + * @function listPatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback} callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.listPatchJobInstanceDetails = function listPatchJobInstanceDetails(request, callback) { + return this.rpcCall(listPatchJobInstanceDetails, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, request, callback); + }, "name", { value: "ListPatchJobInstanceDetails" }); - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + /** + * Calls ListPatchJobInstanceDetails. + * @function listPatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef CreatePatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + */ - /** - * 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); - }; + /** + * Calls CreatePatchDeployment. + * @function createPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.createPatchDeployment = function createPatchDeployment(request, callback) { + return this.rpcCall(createPatchDeployment, $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); + }, "name", { value: "CreatePatchDeployment" }); - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; + /** + * Calls CreatePatchDeployment. + * @function createPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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(); - }; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef GetPatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + */ - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls GetPatchDeployment. + * @function getPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.getPatchDeployment = function getPatchDeployment(request, callback) { + return this.rpcCall(getPatchDeployment, $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); + }, "name", { value: "GetPatchDeployment" }); - /** - * 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()); - }; + /** + * Calls GetPatchDeployment. + * @function getPatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.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; - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - } - return null; - }; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ListPatchDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} [response] ListPatchDeploymentsResponse + */ - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.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"]); - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - } - } - return message; - }; + /** + * Calls ListPatchDeployments. + * @function listPatchDeployments + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback} callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.listPatchDeployments = function listPatchDeployments(request, callback) { + return this.rpcCall(listPatchDeployments, $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest, $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse, request, callback); + }, "name", { value: "ListPatchDeployments" }); - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls ListPatchDeployments. + * @function listPatchDeployments + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - })(); + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef DeletePatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * 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; - })(); + /** + * Calls DeletePatchDeployment. + * @function deletePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.deletePatchDeployment = function deletePatchDeployment(request, callback) { + return this.rpcCall(deletePatchDeployment, $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePatchDeployment" }); - return FieldOptions; - })(); + /** + * Calls DeletePatchDeployment. + * @function deletePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - protobuf.OneofOptions = (function() { + return OsConfigService; + })(); - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ + v1.PatchDeployment = (function() { - /** - * 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]]; - } + /** + * Properties of a PatchDeployment. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchDeployment + * @property {string|null} [name] PatchDeployment name + * @property {string|null} [description] PatchDeployment description + * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchDeployment instanceFilter + * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchDeployment patchConfig + * @property {google.protobuf.IDuration|null} [duration] PatchDeployment duration + * @property {google.cloud.osconfig.v1.IOneTimeSchedule|null} [oneTimeSchedule] PatchDeployment oneTimeSchedule + * @property {google.cloud.osconfig.v1.IRecurringSchedule|null} [recurringSchedule] PatchDeployment recurringSchedule + * @property {google.protobuf.ITimestamp|null} [createTime] PatchDeployment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PatchDeployment updateTime + * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] PatchDeployment lastExecuteTime + * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] PatchDeployment rollout + */ - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Constructs a new PatchDeployment. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchDeployment. + * @implements IPatchDeployment + * @constructor + * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set + */ + function PatchDeployment(properties) { + if (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 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); - }; + /** + * PatchDeployment name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.name = ""; - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * PatchDeployment description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.description = ""; - /** - * 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(); - }; + /** + * PatchDeployment instanceFilter. + * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.instanceFilter = null; - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * PatchDeployment patchConfig. + * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.patchConfig = null; - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * PatchDeployment duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.duration = null; - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * PatchDeployment oneTimeSchedule. + * @member {google.cloud.osconfig.v1.IOneTimeSchedule|null|undefined} oneTimeSchedule + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.oneTimeSchedule = null; - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * PatchDeployment recurringSchedule. + * @member {google.cloud.osconfig.v1.IRecurringSchedule|null|undefined} recurringSchedule + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.recurringSchedule = null; - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * PatchDeployment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.createTime = null; - /** - * 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); - }; + /** + * PatchDeployment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.updateTime = null; - return OneofOptions; - })(); + /** + * PatchDeployment lastExecuteTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.lastExecuteTime = null; - protobuf.EnumOptions = (function() { + /** + * PatchDeployment rollout. + * @member {google.cloud.osconfig.v1.IPatchRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.rollout = null; - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * 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]]; - } + /** + * PatchDeployment schedule. + * @member {"oneTimeSchedule"|"recurringSchedule"|undefined} schedule + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + Object.defineProperty(PatchDeployment.prototype, "schedule", { + get: $util.oneOfGetter($oneOfFields = ["oneTimeSchedule", "recurringSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; + /** + * Creates a new PatchDeployment instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment instance + */ + PatchDeployment.create = function create(properties) { + return new PatchDeployment(properties); + }; - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; + /** + * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchDeployment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) + $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.oneTimeSchedule != null && Object.hasOwnProperty.call(message, "oneTimeSchedule")) + $root.google.cloud.osconfig.v1.OneTimeSchedule.encode(message.oneTimeSchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.recurringSchedule != null && Object.hasOwnProperty.call(message, "recurringSchedule")) + $root.google.cloud.osconfig.v1.RecurringSchedule.encode(message.recurringSchedule, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) + $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Encodes the specified PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchDeployment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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); - }; + /** + * Decodes a PatchDeployment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchDeployment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchDeployment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + case 4: + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + case 5: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.decode(reader, reader.uint32()); + break; + case 7: + message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.decode(reader, reader.uint32()); + break; + case 8: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Decodes a PatchDeployment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchDeployment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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(); - }; + /** + * Verifies a PatchDeployment message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchDeployment.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { + var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); + if (error) + return "patchConfig." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { + properties.schedule = 1; + { + var error = $root.google.cloud.osconfig.v1.OneTimeSchedule.verify(message.oneTimeSchedule); + if (error) + return "oneTimeSchedule." + error; + } + } + if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { + if (properties.schedule === 1) + return "schedule: multiple values"; + properties.schedule = 1; + { + var error = $root.google.cloud.osconfig.v1.RecurringSchedule.verify(message.recurringSchedule); + if (error) + return "recurringSchedule." + error; + } + } + 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.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); + if (error) + return "lastExecuteTime." + error; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1.PatchRollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + return null; + }; - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + */ + PatchDeployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchDeployment) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchDeployment(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); + } + if (object.patchConfig != null) { + if (typeof object.patchConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.patchConfig: object expected"); + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.oneTimeSchedule != null) { + if (typeof object.oneTimeSchedule !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.oneTimeSchedule: object expected"); + message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.fromObject(object.oneTimeSchedule); + } + if (object.recurringSchedule != null) { + if (typeof object.recurringSchedule !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.recurringSchedule: object expected"); + message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.fromObject(object.recurringSchedule); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.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.osconfig.v1.PatchDeployment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastExecuteTime != null) { + if (typeof object.lastExecuteTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.lastExecuteTime: object expected"); + message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); + } + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); + } + 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()); - }; + /** + * Creates a plain object from a PatchDeployment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {google.cloud.osconfig.v1.PatchDeployment} message PatchDeployment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchDeployment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.instanceFilter = null; + object.patchConfig = null; + object.duration = null; + object.createTime = null; + object.updateTime = null; + object.lastExecuteTime = null; + object.rollout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) + object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { + object.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.toObject(message.oneTimeSchedule, options); + if (options.oneofs) + object.schedule = "oneTimeSchedule"; + } + if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { + object.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.toObject(message.recurringSchedule, options); + if (options.oneofs) + object.schedule = "recurringSchedule"; + } + 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.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) + object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); + return object; + }; - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Converts this PatchDeployment to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + * @returns {Object.} JSON object + */ + PatchDeployment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + return PatchDeployment; + })(); - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + v1.OneTimeSchedule = (function() { - /** - * 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); - }; + /** + * Properties of an OneTimeSchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IOneTimeSchedule + * @property {google.protobuf.ITimestamp|null} [executeTime] OneTimeSchedule executeTime + */ - return EnumOptions; - })(); + /** + * Constructs a new OneTimeSchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an OneTimeSchedule. + * @implements IOneTimeSchedule + * @constructor + * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set + */ + function OneTimeSchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - protobuf.EnumValueOptions = (function() { + /** + * OneTimeSchedule executeTime. + * @member {google.protobuf.ITimestamp|null|undefined} executeTime + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @instance + */ + OneTimeSchedule.prototype.executeTime = null; - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ + /** + * Creates a new OneTimeSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule instance + */ + OneTimeSchedule.create = function create(properties) { + return new OneTimeSchedule(properties); + }; - /** - * 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]]; - } + /** + * Encodes the specified OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneTimeSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executeTime != null && Object.hasOwnProperty.call(message, "executeTime")) + $root.google.protobuf.Timestamp.encode(message.executeTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; + /** + * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneTimeSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneTimeSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.executeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneTimeSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Verifies an OneTimeSchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneTimeSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executeTime != null && message.hasOwnProperty("executeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.executeTime); + if (error) + return "executeTime." + error; + } + return null; + }; - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + */ + OneTimeSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OneTimeSchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); + if (object.executeTime != null) { + if (typeof object.executeTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.OneTimeSchedule.executeTime: object expected"); + message.executeTime = $root.google.protobuf.Timestamp.fromObject(object.executeTime); + } + return message; + }; - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {google.cloud.osconfig.v1.OneTimeSchedule} message OneTimeSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneTimeSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.executeTime = null; + if (message.executeTime != null && message.hasOwnProperty("executeTime")) + object.executeTime = $root.google.protobuf.Timestamp.toObject(message.executeTime, options); + return object; + }; - /** - * 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()); - }; + /** + * Converts this OneTimeSchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @instance + * @returns {Object.} JSON object + */ + OneTimeSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + return OneTimeSchedule; + })(); - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + v1.RecurringSchedule = (function() { + + /** + * Properties of a RecurringSchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IRecurringSchedule + * @property {google.type.ITimeZone|null} [timeZone] RecurringSchedule timeZone + * @property {google.protobuf.ITimestamp|null} [startTime] RecurringSchedule startTime + * @property {google.protobuf.ITimestamp|null} [endTime] RecurringSchedule endTime + * @property {google.type.ITimeOfDay|null} [timeOfDay] RecurringSchedule timeOfDay + * @property {google.cloud.osconfig.v1.RecurringSchedule.Frequency|null} [frequency] RecurringSchedule frequency + * @property {google.cloud.osconfig.v1.IWeeklySchedule|null} [weekly] RecurringSchedule weekly + * @property {google.cloud.osconfig.v1.IMonthlySchedule|null} [monthly] RecurringSchedule monthly + * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] RecurringSchedule lastExecuteTime + * @property {google.protobuf.ITimestamp|null} [nextExecuteTime] RecurringSchedule nextExecuteTime + */ + + /** + * Constructs a new RecurringSchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a RecurringSchedule. + * @implements IRecurringSchedule + * @constructor + * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set + */ + function RecurringSchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * RecurringSchedule timeZone. + * @member {google.type.ITimeZone|null|undefined} timeZone + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.timeZone = null; - /** - * 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); - }; + /** + * RecurringSchedule startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.startTime = null; - return EnumValueOptions; - })(); + /** + * RecurringSchedule endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.endTime = null; - protobuf.ServiceOptions = (function() { + /** + * RecurringSchedule timeOfDay. + * @member {google.type.ITimeOfDay|null|undefined} timeOfDay + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.timeOfDay = null; - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - */ + /** + * RecurringSchedule frequency. + * @member {google.cloud.osconfig.v1.RecurringSchedule.Frequency} frequency + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.frequency = 0; - /** - * 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]]; - } + /** + * RecurringSchedule weekly. + * @member {google.cloud.osconfig.v1.IWeeklySchedule|null|undefined} weekly + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.weekly = null; - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; + /** + * RecurringSchedule monthly. + * @member {google.cloud.osconfig.v1.IMonthlySchedule|null|undefined} monthly + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.monthly = null; - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * RecurringSchedule lastExecuteTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.lastExecuteTime = null; - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + /** + * RecurringSchedule nextExecuteTime. + * @member {google.protobuf.ITimestamp|null|undefined} nextExecuteTime + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + RecurringSchedule.prototype.nextExecuteTime = null; - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - return null; - }; + /** + * RecurringSchedule scheduleConfig. + * @member {"weekly"|"monthly"|undefined} scheduleConfig + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + */ + Object.defineProperty(RecurringSchedule.prototype, "scheduleConfig", { + get: $util.oneOfGetter($oneOfFields = ["weekly", "monthly"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - return message; - }; + /** + * Creates a new RecurringSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule instance + */ + RecurringSchedule.create = function create(properties) { + return new RecurringSchedule(properties); + }; - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - return object; - }; + /** + * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timeOfDay != null && Object.hasOwnProperty.call(message, "timeOfDay")) + $root.google.type.TimeOfDay.encode(message.timeOfDay, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frequency); + if (message.weekly != null && Object.hasOwnProperty.call(message, "weekly")) + $root.google.cloud.osconfig.v1.WeeklySchedule.encode(message.weekly, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.monthly != null && Object.hasOwnProperty.call(message, "monthly")) + $root.google.cloud.osconfig.v1.MonthlySchedule.encode(message.monthly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) + $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.nextExecuteTime != null && Object.hasOwnProperty.call(message, "nextExecuteTime")) + $root.google.protobuf.Timestamp.encode(message.nextExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; - /** - * 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); - }; + /** + * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecurringSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return ServiceOptions; - })(); + /** + * Decodes a RecurringSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringSchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + break; + case 2: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.timeOfDay = $root.google.type.TimeOfDay.decode(reader, reader.uint32()); + break; + case 5: + message.frequency = reader.int32(); + break; + case 6: + message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.decode(reader, reader.uint32()); + break; + case 7: + message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.decode(reader, reader.uint32()); + break; + case 9: + message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.nextExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - protobuf.MethodOptions = (function() { + /** + * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecurringSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ + /** + * Verifies a RecurringSchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecurringSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + var error = $root.google.type.TimeZone.verify(message.timeZone); + if (error) + return "timeZone." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) { + var error = $root.google.type.TimeOfDay.verify(message.timeOfDay); + if (error) + return "timeOfDay." + error; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.weekly != null && message.hasOwnProperty("weekly")) { + properties.scheduleConfig = 1; + { + var error = $root.google.cloud.osconfig.v1.WeeklySchedule.verify(message.weekly); + if (error) + return "weekly." + error; + } + } + if (message.monthly != null && message.hasOwnProperty("monthly")) { + if (properties.scheduleConfig === 1) + return "scheduleConfig: multiple values"; + properties.scheduleConfig = 1; + { + var error = $root.google.cloud.osconfig.v1.MonthlySchedule.verify(message.monthly); + if (error) + return "monthly." + error; + } + } + if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); + if (error) + return "lastExecuteTime." + error; + } + if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.nextExecuteTime); + if (error) + return "nextExecuteTime." + error; + } + return null; + }; - /** - * 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]]; - } + /** + * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + */ + RecurringSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.RecurringSchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); + if (object.timeZone != null) { + if (typeof object.timeZone !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeZone: object expected"); + message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.timeOfDay != null) { + if (typeof object.timeOfDay !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeOfDay: object expected"); + message.timeOfDay = $root.google.type.TimeOfDay.fromObject(object.timeOfDay); + } + switch (object.frequency) { + case "FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "WEEKLY": + case 1: + message.frequency = 1; + break; + case "MONTHLY": + case 2: + message.frequency = 2; + break; + } + if (object.weekly != null) { + if (typeof object.weekly !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.weekly: object expected"); + message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.fromObject(object.weekly); + } + if (object.monthly != null) { + if (typeof object.monthly !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.monthly: object expected"); + message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.fromObject(object.monthly); + } + if (object.lastExecuteTime != null) { + if (typeof object.lastExecuteTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.lastExecuteTime: object expected"); + message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); + } + if (object.nextExecuteTime != null) { + if (typeof object.nextExecuteTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.nextExecuteTime: object expected"); + message.nextExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.nextExecuteTime); + } + return message; + }; - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; + /** + * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {google.cloud.osconfig.v1.RecurringSchedule} message RecurringSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecurringSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeZone = null; + object.startTime = null; + object.endTime = null; + object.timeOfDay = null; + object.frequency = options.enums === String ? "FREQUENCY_UNSPECIFIED" : 0; + object.lastExecuteTime = null; + object.nextExecuteTime = null; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) + object.timeOfDay = $root.google.type.TimeOfDay.toObject(message.timeOfDay, options); + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.cloud.osconfig.v1.RecurringSchedule.Frequency[message.frequency] : message.frequency; + if (message.weekly != null && message.hasOwnProperty("weekly")) { + object.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.toObject(message.weekly, options); + if (options.oneofs) + object.scheduleConfig = "weekly"; + } + if (message.monthly != null && message.hasOwnProperty("monthly")) { + object.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.toObject(message.monthly, options); + if (options.oneofs) + object.scheduleConfig = "monthly"; + } + if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) + object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); + if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) + object.nextExecuteTime = $root.google.protobuf.Timestamp.toObject(message.nextExecuteTime, options); + return object; + }; - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; + /** + * Converts this RecurringSchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @instance + * @returns {Object.} JSON object + */ + RecurringSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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(); - }; + /** + * Frequency enum. + * @name google.cloud.osconfig.v1.RecurringSchedule.Frequency + * @enum {number} + * @property {number} FREQUENCY_UNSPECIFIED=0 FREQUENCY_UNSPECIFIED value + * @property {number} WEEKLY=1 WEEKLY value + * @property {number} MONTHLY=2 MONTHLY value + */ + RecurringSchedule.Frequency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FREQUENCY_UNSPECIFIED"] = 0; + values[valuesById[1] = "WEEKLY"] = 1; + values[valuesById[2] = "MONTHLY"] = 2; + return values; + })(); - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return RecurringSchedule; + })(); - /** - * 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()); - }; + v1.WeeklySchedule = (function() { - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } - return null; - }; + /** + * Properties of a WeeklySchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IWeeklySchedule + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeeklySchedule dayOfWeek + */ - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Constructs a new WeeklySchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a WeeklySchedule. + * @implements IWeeklySchedule + * @constructor + * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set + */ + function WeeklySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - return message; - }; - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; + /** + * WeeklySchedule dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.dayOfWeek = 0; - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule instance + */ + WeeklySchedule.create = function create(properties) { + return new WeeklySchedule(properties); + }; - /** - * 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; - })(); + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dayOfWeek); + return writer; + }; - return MethodOptions; - })(); + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.UninterpretedOption = (function() { + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dayOfWeek = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 - */ + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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]]; - } + /** + * Verifies a WeeklySchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeeklySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; + /** + * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + */ + WeeklySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.WeeklySchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); + switch (object.dayOfWeek) { + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {google.cloud.osconfig.v1.WeeklySchedule} message WeeklySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeeklySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * Converts this WeeklySchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @instance + * @returns {Object.} JSON object + */ + WeeklySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + return WeeklySchedule; + })(); - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; + v1.MonthlySchedule = (function() { - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + /** + * Properties of a MonthlySchedule. + * @memberof google.cloud.osconfig.v1 + * @interface IMonthlySchedule + * @property {google.cloud.osconfig.v1.IWeekDayOfMonth|null} [weekDayOfMonth] MonthlySchedule weekDayOfMonth + * @property {number|null} [monthDay] MonthlySchedule monthDay + */ - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; + /** + * Constructs a new MonthlySchedule. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a MonthlySchedule. + * @implements IMonthlySchedule + * @constructor + * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set + */ + function MonthlySchedule(properties) { + if (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 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); - }; + /** + * MonthlySchedule weekDayOfMonth. + * @member {google.cloud.osconfig.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.weekDayOfMonth = null; - /** - * 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; - }; + /** + * MonthlySchedule monthDay. + * @member {number|null|undefined} monthDay + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.monthDay = null; - /** - * 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(); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MonthlySchedule dayOfMonth. + * @member {"weekDayOfMonth"|"monthDay"|undefined} dayOfMonth + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + */ + Object.defineProperty(MonthlySchedule.prototype, "dayOfMonth", { + get: $util.oneOfGetter($oneOfFields = ["weekDayOfMonth", "monthDay"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule instance + */ + MonthlySchedule.create = function create(properties) { + return new MonthlySchedule(properties); + }; - /** - * 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; - }; + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) + $root.google.cloud.osconfig.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.monthDay != null && Object.hasOwnProperty.call(message, "monthDay")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.monthDay); + return writer; + }; - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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); - }; + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.decode(reader, reader.uint32()); + break; + case 2: + message.monthDay = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - UninterpretedOption.NamePart = (function() { + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ + /** + * Verifies a MonthlySchedule message. + * @function verify + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonthlySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + properties.dayOfMonth = 1; + { + var error = $root.google.cloud.osconfig.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); + if (error) + return "weekDayOfMonth." + error; + } + } + if (message.monthDay != null && message.hasOwnProperty("monthDay")) { + if (properties.dayOfMonth === 1) + return "dayOfMonth: multiple values"; + properties.dayOfMonth = 1; + if (!$util.isInteger(message.monthDay)) + return "monthDay: integer expected"; + } + return null; + }; - /** - * 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]]; - } + /** + * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + */ + MonthlySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.MonthlySchedule) + return object; + var message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); + if (object.weekDayOfMonth != null) { + if (typeof object.weekDayOfMonth !== "object") + throw TypeError(".google.cloud.osconfig.v1.MonthlySchedule.weekDayOfMonth: object expected"); + message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); + } + if (object.monthDay != null) + message.monthDay = object.monthDay | 0; + return message; + }; - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {google.cloud.osconfig.v1.MonthlySchedule} message MonthlySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonthlySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + object.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); + if (options.oneofs) + object.dayOfMonth = "weekDayOfMonth"; + } + if (message.monthDay != null && message.hasOwnProperty("monthDay")) { + object.monthDay = message.monthDay; + if (options.oneofs) + object.dayOfMonth = "monthDay"; + } + return object; + }; - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; + /** + * Converts this MonthlySchedule to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @instance + * @returns {Object.} JSON object + */ + MonthlySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - }; + return MonthlySchedule; + })(); - /** - * 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; - }; + v1.WeekDayOfMonth = (function() { - /** - * 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(); - }; + /** + * Properties of a WeekDayOfMonth. + * @memberof google.cloud.osconfig.v1 + * @interface IWeekDayOfMonth + * @property {number|null} [weekOrdinal] WeekDayOfMonth weekOrdinal + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek + */ - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new WeekDayOfMonth. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a WeekDayOfMonth. + * @implements IWeekDayOfMonth + * @constructor + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set + */ + function WeekDayOfMonth(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (!message.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; - }; + /** + * WeekDayOfMonth weekOrdinal. + * @member {number} weekOrdinal + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.weekOrdinal = 0; - /** - * 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; - }; + /** + * WeekDayOfMonth dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.dayOfWeek = 0; - /** - * 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); - }; + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth instance + */ + WeekDayOfMonth.create = function create(properties) { + return new WeekDayOfMonth(properties); + }; - return NamePart; - })(); + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekOrdinal != null && Object.hasOwnProperty.call(message, "weekOrdinal")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOrdinal); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + return writer; + }; - return UninterpretedOption; - })(); + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.SourceCodeInfo = (function() { + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weekOrdinal = reader.int32(); + break; + case 2: + message.dayOfWeek = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; + /** + * Verifies a WeekDayOfMonth message. + * @function verify + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeekDayOfMonth.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) + if (!$util.isInteger(message.weekOrdinal)) + return "weekOrdinal: integer expected"; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; - /** - * 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); - }; + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + */ + WeekDayOfMonth.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.WeekDayOfMonth) + return object; + var message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); + if (object.weekOrdinal != null) + message.weekOrdinal = object.weekOrdinal | 0; + switch (object.dayOfWeek) { + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; - /** - * 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; - }; + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {google.cloud.osconfig.v1.WeekDayOfMonth} message WeekDayOfMonth + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeekDayOfMonth.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.weekOrdinal = 0; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + } + if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) + object.weekOrdinal = message.weekOrdinal; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; - /** - * 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(); - }; + /** + * Converts this WeekDayOfMonth to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + * @returns {Object.} JSON object + */ + WeekDayOfMonth.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return WeekDayOfMonth; + })(); - /** - * 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()); - }; + v1.CreatePatchDeploymentRequest = (function() { - /** - * 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; - }; + /** + * Properties of a CreatePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface ICreatePatchDeploymentRequest + * @property {string|null} [parent] CreatePatchDeploymentRequest parent + * @property {string|null} [patchDeploymentId] CreatePatchDeploymentRequest patchDeploymentId + * @property {google.cloud.osconfig.v1.IPatchDeployment|null} [patchDeployment] CreatePatchDeploymentRequest patchDeployment + */ - /** - * 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]); + /** + * Constructs a new CreatePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a CreatePatchDeploymentRequest. + * @implements ICreatePatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set + */ + function CreatePatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Creates a plain object from 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; - }; + /** + * CreatePatchDeploymentRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + */ + CreatePatchDeploymentRequest.prototype.parent = ""; - /** - * 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); - }; + /** + * CreatePatchDeploymentRequest patchDeploymentId. + * @member {string} patchDeploymentId + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + */ + CreatePatchDeploymentRequest.prototype.patchDeploymentId = ""; - SourceCodeInfo.Location = (function() { + /** + * CreatePatchDeploymentRequest patchDeployment. + * @member {google.cloud.osconfig.v1.IPatchDeployment|null|undefined} patchDeployment + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + */ + CreatePatchDeploymentRequest.prototype.patchDeployment = null; - /** - * 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 - */ + /** + * Creates a new CreatePatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest instance + */ + CreatePatchDeploymentRequest.create = function create(properties) { + return new CreatePatchDeploymentRequest(properties); + }; - /** - * 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]]; - } + /** + * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePatchDeploymentRequest.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.patchDeploymentId != null && Object.hasOwnProperty.call(message, "patchDeploymentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.patchDeploymentId); + if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) + $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; + /** + * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.patchDeploymentId = reader.string(); + break; + case 3: + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; + /** + * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; + /** + * Verifies a CreatePatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePatchDeploymentRequest.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.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) + if (!$util.isString(message.patchDeploymentId)) + return "patchDeploymentId: string expected"; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) { + var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployment); + if (error) + return "patchDeployment." + error; + } + return null; + }; - /** - * 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); - }; + /** + * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + */ + CreatePatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.patchDeploymentId != null) + message.patchDeploymentId = String(object.patchDeploymentId); + if (object.patchDeployment != null) { + if (typeof object.patchDeployment !== "object") + throw TypeError(".google.cloud.osconfig.v1.CreatePatchDeploymentRequest.patchDeployment: object expected"); + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployment); + } + return message; + }; - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; + /** + * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} message CreatePatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePatchDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.patchDeploymentId = ""; + object.patchDeployment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) + object.patchDeploymentId = message.patchDeploymentId; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + object.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployment, options); + return object; + }; - /** - * 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(); - }; + /** + * Converts this CreatePatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return CreatePatchDeploymentRequest; + })(); - /** - * 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()); - }; + v1.GetPatchDeploymentRequest = (function() { - /** - * 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; - }; + /** + * Properties of a GetPatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IGetPatchDeploymentRequest + * @property {string|null} [name] GetPatchDeploymentRequest name + */ - /** - * 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]); + /** + * Constructs a new GetPatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GetPatchDeploymentRequest. + * @implements IGetPatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set + */ + function GetPatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Creates a plain object from 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; - }; + /** + * GetPatchDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @instance + */ + GetPatchDeploymentRequest.prototype.name = ""; - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new GetPatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest instance + */ + GetPatchDeploymentRequest.create = function create(properties) { + return new GetPatchDeploymentRequest(properties); + }; - return Location; - })(); + /** + * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchDeploymentRequest.encode = function encode(message, writer) { + 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; + }; - return SourceCodeInfo; - })(); + /** + * Encodes the specified GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.GeneratedCodeInfo = (function() { + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ + /** + * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a GetPatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPatchDeploymentRequest.verify = function verify(message) { + if (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; + }; - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + /** + * Creates a GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + */ + GetPatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; + /** + * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.GetPatchDeploymentRequest} message GetPatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPatchDeploymentRequest.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; + }; - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Converts this GetPatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + GetPatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return GetPatchDeploymentRequest; + })(); - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.ListPatchDeploymentsRequest = (function() { - /** - * 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()); - }; + /** + * Properties of a ListPatchDeploymentsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchDeploymentsRequest + * @property {string|null} [parent] ListPatchDeploymentsRequest parent + * @property {number|null} [pageSize] ListPatchDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListPatchDeploymentsRequest pageToken + */ - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; + /** + * Constructs a new ListPatchDeploymentsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchDeploymentsRequest. + * @implements IListPatchDeploymentsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set + */ + function ListPatchDeploymentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return 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; - }; + /** + * ListPatchDeploymentsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + */ + ListPatchDeploymentsRequest.prototype.parent = ""; - /** - * 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; - }; + /** + * ListPatchDeploymentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + */ + ListPatchDeploymentsRequest.prototype.pageSize = 0; - /** - * 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); - }; + /** + * ListPatchDeploymentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + */ + ListPatchDeploymentsRequest.prototype.pageToken = ""; - GeneratedCodeInfo.Annotation = (function() { + /** + * Creates a new ListPatchDeploymentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest instance + */ + ListPatchDeploymentsRequest.create = function create(properties) { + return new ListPatchDeploymentsRequest(properties); + }; - /** - * 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 - */ + /** + * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; - /** - * 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]]; - } + /** + * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; + /** + * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; + /** + * Verifies a ListPatchDeploymentsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchDeploymentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; + /** + * Creates a ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + */ + ListPatchDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Creates a 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); - }; + /** + * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} message ListPatchDeploymentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchDeploymentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - return writer; - }; + /** + * Converts this ListPatchDeploymentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPatchDeploymentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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(); - }; + return ListPatchDeploymentsRequest; + })(); - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.ListPatchDeploymentsResponse = (function() { - /** - * 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()); - }; + /** + * Properties of a ListPatchDeploymentsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchDeploymentsResponse + * @property {Array.|null} [patchDeployments] ListPatchDeploymentsResponse patchDeployments + * @property {string|null} [nextPageToken] ListPatchDeploymentsResponse nextPageToken + */ - /** - * 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"; + /** + * Constructs a new ListPatchDeploymentsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchDeploymentsResponse. + * @implements IListPatchDeploymentsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set + */ + function ListPatchDeploymentsResponse(properties) { + this.patchDeployments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * ListPatchDeploymentsResponse patchDeployments. + * @member {Array.} patchDeployments + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @instance + */ + ListPatchDeploymentsResponse.prototype.patchDeployments = $util.emptyArray; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; + /** + * ListPatchDeploymentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @instance + */ + ListPatchDeploymentsResponse.prototype.nextPageToken = ""; - /** - * 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); - }; + /** + * Creates a new ListPatchDeploymentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse instance + */ + ListPatchDeploymentsResponse.create = function create(properties) { + return new ListPatchDeploymentsResponse(properties); + }; - return Annotation; - })(); + /** + * Encodes the specified ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchDeployments != null && message.patchDeployments.length) + for (var i = 0; i < message.patchDeployments.length; ++i) + $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - return GeneratedCodeInfo; - })(); + /** + * Encodes the specified ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.Duration = (function() { + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.patchDeployments && message.patchDeployments.length)) + message.patchDeployments = []; + message.patchDeployments.push($root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ + /** + * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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]]; - } + /** + * Verifies a ListPatchDeploymentsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchDeploymentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchDeployments != null && message.hasOwnProperty("patchDeployments")) { + if (!Array.isArray(message.patchDeployments)) + return "patchDeployments: array expected"; + for (var i = 0; i < message.patchDeployments.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployments[i]); + if (error) + return "patchDeployments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse + */ + ListPatchDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); + if (object.patchDeployments) { + if (!Array.isArray(object.patchDeployments)) + throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: array expected"); + message.patchDeployments = []; + for (var i = 0; i < object.patchDeployments.length; ++i) { + if (typeof object.patchDeployments[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: object expected"); + message.patchDeployments[i] = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; + /** + * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} message ListPatchDeploymentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchDeploymentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patchDeployments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.patchDeployments && message.patchDeployments.length) { + object.patchDeployments = []; + for (var j = 0; j < message.patchDeployments.length; ++j) + object.patchDeployments[j] = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * 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); - }; + /** + * Converts this ListPatchDeploymentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPatchDeploymentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + return ListPatchDeploymentsResponse; + })(); - /** - * 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(); - }; + v1.DeletePatchDeploymentRequest = (function() { - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a DeletePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IDeletePatchDeploymentRequest + * @property {string|null} [name] DeletePatchDeploymentRequest name + */ - /** - * 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()); - }; + /** + * Constructs a new DeletePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a DeletePatchDeploymentRequest. + * @implements IDeletePatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set + */ + function DeletePatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Verifies a 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; - }; + /** + * DeletePatchDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @instance + */ + DeletePatchDeploymentRequest.prototype.name = ""; - /** - * 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; - }; + /** + * Creates a new DeletePatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest instance + */ + DeletePatchDeploymentRequest.create = function create(properties) { + return new DeletePatchDeploymentRequest(properties); + }; - /** - * 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); - }; + /** + * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePatchDeploymentRequest.encode = function encode(message, writer) { + 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; + }; - return Duration; - })(); + /** + * Encodes the specified DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.Empty = (function() { + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ + /** + * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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]]; - } + /** + * Verifies a DeletePatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePatchDeploymentRequest.verify = function verify(message) { + if (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 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); - }; + /** + * Creates a DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + */ + DeletePatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} message DeletePatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePatchDeploymentRequest.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; + }; - /** - * 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(); - }; + /** + * Converts this DeletePatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return DeletePatchDeploymentRequest; + })(); - /** - * 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()); - }; + v1.ExecutePatchJobRequest = (function() { - /** - * 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; - }; + /** + * Properties of an ExecutePatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IExecutePatchJobRequest + * @property {string|null} [parent] ExecutePatchJobRequest parent + * @property {string|null} [description] ExecutePatchJobRequest description + * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] ExecutePatchJobRequest instanceFilter + * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] ExecutePatchJobRequest patchConfig + * @property {google.protobuf.IDuration|null} [duration] ExecutePatchJobRequest duration + * @property {boolean|null} [dryRun] ExecutePatchJobRequest dryRun + * @property {string|null} [displayName] ExecutePatchJobRequest displayName + * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] ExecutePatchJobRequest rollout + */ - /** - * 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(); - }; + /** + * Constructs a new ExecutePatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an ExecutePatchJobRequest. + * @implements IExecutePatchJobRequest + * @constructor + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set + */ + function ExecutePatchJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a plain object from 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 {}; - }; + /** + * ExecutePatchJobRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.parent = ""; - /** - * 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); - }; + /** + * ExecutePatchJobRequest description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.description = ""; - return Empty; - })(); + /** + * ExecutePatchJobRequest instanceFilter. + * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.instanceFilter = null; - protobuf.FieldMask = (function() { + /** + * ExecutePatchJobRequest patchConfig. + * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.patchConfig = null; - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ + /** + * ExecutePatchJobRequest duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.duration = null; - /** - * 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]]; - } + /** + * ExecutePatchJobRequest dryRun. + * @member {boolean} dryRun + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.dryRun = false; - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; + /** + * ExecutePatchJobRequest displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.displayName = ""; - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FieldMask; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Any; - })(); - - return protobuf; - })(); - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.osconfig = (function() { - - /** - * Namespace osconfig. - * @memberof google.cloud - * @namespace - */ - var osconfig = {}; - - osconfig.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.osconfig - * @namespace - */ - var v1 = {}; - - v1.Inventory = (function() { - - /** - * Properties of an Inventory. - * @memberof google.cloud.osconfig.v1 - * @interface IInventory - * @property {google.cloud.osconfig.v1.Inventory.IOsInfo|null} [osInfo] Inventory osInfo - * @property {Object.|null} [items] Inventory items - */ - - /** - * Constructs a new Inventory. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an Inventory. - * @implements IInventory - * @constructor - * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set - */ - function Inventory(properties) { - this.items = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Inventory osInfo. - * @member {google.cloud.osconfig.v1.Inventory.IOsInfo|null|undefined} osInfo - * @memberof google.cloud.osconfig.v1.Inventory - * @instance - */ - Inventory.prototype.osInfo = null; - - /** - * Inventory items. - * @member {Object.} items - * @memberof google.cloud.osconfig.v1.Inventory - * @instance - */ - Inventory.prototype.items = $util.emptyObject; + /** + * ExecutePatchJobRequest rollout. + * @member {google.cloud.osconfig.v1.IPatchRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @instance + */ + ExecutePatchJobRequest.prototype.rollout = null; /** - * Creates a new Inventory instance using the specified properties. + * Creates a new ExecutePatchJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.Inventory + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest * @static - * @param {google.cloud.osconfig.v1.IInventory=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory} Inventory instance + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest instance */ - Inventory.create = function create(properties) { - return new Inventory(properties); + ExecutePatchJobRequest.create = function create(properties) { + return new ExecutePatchJobRequest(properties); }; /** - * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.Inventory + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest * @static - * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Inventory.encode = function encode(message, writer) { + ExecutePatchJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.osInfo != null && Object.hasOwnProperty.call(message, "osInfo")) - $root.google.cloud.osconfig.v1.Inventory.OsInfo.encode(message.osInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.items != null && Object.hasOwnProperty.call(message, "items")) - for (var keys = Object.keys(message.items), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.osconfig.v1.Inventory.Item.encode(message.items[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) + $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.verify|verify} messages. + * Encodes the specified ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest * @static - * @param {google.cloud.osconfig.v1.IInventory} message Inventory message or plain object to encode + * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Inventory.encodeDelimited = function encodeDelimited(message, writer) { + ExecutePatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Inventory message from the specified reader or buffer. + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.Inventory + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory} Inventory + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Inventory.decode = function decode(reader, length) { + ExecutePatchJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - if (message.items === $util.emptyObject) - message.items = {}; - 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.osconfig.v1.Inventory.Item.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.items[key] = value; + message.description = reader.string(); + break; + case 7: + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + case 4: + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + case 5: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.dryRun = reader.bool(); + break; + case 8: + message.displayName = reader.string(); + break; + case 9: + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9956,2513 +7755,2299 @@ }; /** - * Decodes an Inventory message from the specified reader or buffer, length delimited. + * Decodes an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory} Inventory + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Inventory.decodeDelimited = function decodeDelimited(reader) { + ExecutePatchJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Inventory message. + * Verifies an ExecutePatchJobRequest message. * @function verify - * @memberof google.cloud.osconfig.v1.Inventory + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Inventory.verify = function verify(message) { + ExecutePatchJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.osInfo != null && message.hasOwnProperty("osInfo")) { - var error = $root.google.cloud.osconfig.v1.Inventory.OsInfo.verify(message.osInfo); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); if (error) - return "osInfo." + error; + return "instanceFilter." + error; } - if (message.items != null && message.hasOwnProperty("items")) { - if (!$util.isObject(message.items)) - return "items: object expected"; - var key = Object.keys(message.items); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.osconfig.v1.Inventory.Item.verify(message.items[key[i]]); - if (error) - return "items." + error; - } + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { + var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); + if (error) + return "patchConfig." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1.PatchRollout.verify(message.rollout); + if (error) + return "rollout." + error; } return null; }; /** - * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory} Inventory + * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest */ - Inventory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory) + ExecutePatchJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ExecutePatchJobRequest) return object; - var message = new $root.google.cloud.osconfig.v1.Inventory(); - if (object.osInfo != null) { - if (typeof object.osInfo !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.osInfo: object expected"); - message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.fromObject(object.osInfo); + var message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.description != null) + message.description = String(object.description); + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); } - if (object.items) { - if (typeof object.items !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.items: object expected"); - message.items = {}; - for (var keys = Object.keys(object.items), i = 0; i < keys.length; ++i) { - if (typeof object.items[keys[i]] !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.items: object expected"); - message.items[keys[i]] = $root.google.cloud.osconfig.v1.Inventory.Item.fromObject(object.items[keys[i]]); - } + if (object.patchConfig != null) { + if (typeof object.patchConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.patchConfig: object expected"); + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); } return message; }; /** - * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * Creates a plain object from an ExecutePatchJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest * @static - * @param {google.cloud.osconfig.v1.Inventory} message Inventory + * @param {google.cloud.osconfig.v1.ExecutePatchJobRequest} message ExecutePatchJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Inventory.toObject = function toObject(message, options) { + ExecutePatchJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.items = {}; - if (options.defaults) - object.osInfo = null; - if (message.osInfo != null && message.hasOwnProperty("osInfo")) - object.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.toObject(message.osInfo, options); - var keys2; - if (message.items && (keys2 = Object.keys(message.items)).length) { - object.items = {}; - for (var j = 0; j < keys2.length; ++j) - object.items[keys2[j]] = $root.google.cloud.osconfig.v1.Inventory.Item.toObject(message.items[keys2[j]], options); + if (options.defaults) { + object.parent = ""; + object.description = ""; + object.patchConfig = null; + object.duration = null; + object.dryRun = false; + object.instanceFilter = null; + object.displayName = ""; + object.rollout = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) + object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); return object; }; /** - * Converts this Inventory to JSON. + * Converts this ExecutePatchJobRequest to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest * @instance * @returns {Object.} JSON object */ - Inventory.prototype.toJSON = function toJSON() { + ExecutePatchJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Inventory.OsInfo = (function() { + return ExecutePatchJobRequest; + })(); - /** - * Properties of an OsInfo. - * @memberof google.cloud.osconfig.v1.Inventory - * @interface IOsInfo - * @property {string|null} [hostname] OsInfo hostname - * @property {string|null} [longName] OsInfo longName - * @property {string|null} [shortName] OsInfo shortName - * @property {string|null} [version] OsInfo version - * @property {string|null} [architecture] OsInfo architecture - * @property {string|null} [kernelVersion] OsInfo kernelVersion - * @property {string|null} [kernelRelease] OsInfo kernelRelease - * @property {string|null} [osconfigAgentVersion] OsInfo osconfigAgentVersion - */ + v1.GetPatchJobRequest = (function() { - /** - * Constructs a new OsInfo. - * @memberof google.cloud.osconfig.v1.Inventory - * @classdesc Represents an OsInfo. - * @implements IOsInfo - * @constructor - * @param {google.cloud.osconfig.v1.Inventory.IOsInfo=} [properties] Properties to set - */ - function OsInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a GetPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IGetPatchJobRequest + * @property {string|null} [name] GetPatchJobRequest name + */ - /** - * OsInfo hostname. - * @member {string} hostname - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.hostname = ""; + /** + * Constructs a new GetPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GetPatchJobRequest. + * @implements IGetPatchJobRequest + * @constructor + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set + */ + function GetPatchJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * OsInfo longName. - * @member {string} longName - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.longName = ""; + /** + * GetPatchJobRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @instance + */ + GetPatchJobRequest.prototype.name = ""; - /** - * OsInfo shortName. - * @member {string} shortName - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.shortName = ""; + /** + * Creates a new GetPatchJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest instance + */ + GetPatchJobRequest.create = function create(properties) { + return new GetPatchJobRequest(properties); + }; - /** - * OsInfo version. - * @member {string} version - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.version = ""; + /** + * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchJobRequest.encode = function encode(message, writer) { + 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; + }; - /** - * OsInfo architecture. - * @member {string} architecture - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.architecture = ""; + /** + * Encodes the specified GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * OsInfo kernelVersion. - * @member {string} kernelVersion - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.kernelVersion = ""; + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * OsInfo kernelRelease. - * @member {string} kernelRelease - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.kernelRelease = ""; + /** + * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * OsInfo osconfigAgentVersion. - * @member {string} osconfigAgentVersion - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.osconfigAgentVersion = ""; + /** + * Verifies a GetPatchJobRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPatchJobRequest.verify = function verify(message) { + if (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 new OsInfo instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @static - * @param {google.cloud.osconfig.v1.Inventory.IOsInfo=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo instance - */ - OsInfo.create = function create(properties) { - return new OsInfo(properties); - }; + /** + * Creates a GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + */ + GetPatchJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetPatchJobRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @static - * @param {google.cloud.osconfig.v1.Inventory.IOsInfo} message OsInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OsInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.longName != null && Object.hasOwnProperty.call(message, "longName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.longName); - if (message.shortName != null && Object.hasOwnProperty.call(message, "shortName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shortName); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); - if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.architecture); - if (message.kernelVersion != null && Object.hasOwnProperty.call(message, "kernelVersion")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.kernelVersion); - if (message.kernelRelease != null && Object.hasOwnProperty.call(message, "kernelRelease")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.kernelRelease); - if (message.osconfigAgentVersion != null && Object.hasOwnProperty.call(message, "osconfigAgentVersion")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.osconfigAgentVersion); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.hostname); - return writer; - }; + /** + * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.GetPatchJobRequest} message GetPatchJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPatchJobRequest.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; + }; - /** - * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.OsInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @static - * @param {google.cloud.osconfig.v1.Inventory.IOsInfo} message OsInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OsInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this GetPatchJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetPatchJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes an OsInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OsInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.OsInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 9: - message.hostname = reader.string(); - break; - case 2: - message.longName = reader.string(); - break; - case 3: - message.shortName = reader.string(); - break; - case 4: - message.version = reader.string(); - break; - case 5: - message.architecture = reader.string(); - break; - case 6: - message.kernelVersion = reader.string(); - break; - case 7: - message.kernelRelease = reader.string(); - break; - case 8: - message.osconfigAgentVersion = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OsInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OsInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return GetPatchJobRequest; + })(); - /** - * Verifies an OsInfo message. - * @function verify - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OsInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.longName != null && message.hasOwnProperty("longName")) - if (!$util.isString(message.longName)) - return "longName: string expected"; - if (message.shortName != null && message.hasOwnProperty("shortName")) - if (!$util.isString(message.shortName)) - return "shortName: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.architecture != null && message.hasOwnProperty("architecture")) - if (!$util.isString(message.architecture)) - return "architecture: string expected"; - if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) - if (!$util.isString(message.kernelVersion)) - return "kernelVersion: string expected"; - if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) - if (!$util.isString(message.kernelRelease)) - return "kernelRelease: string expected"; - if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) - if (!$util.isString(message.osconfigAgentVersion)) - return "osconfigAgentVersion: string expected"; - return null; - }; + v1.ListPatchJobInstanceDetailsRequest = (function() { - /** - * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory.OsInfo} OsInfo - */ - OsInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory.OsInfo) - return object; - var message = new $root.google.cloud.osconfig.v1.Inventory.OsInfo(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.longName != null) - message.longName = String(object.longName); - if (object.shortName != null) - message.shortName = String(object.shortName); - if (object.version != null) - message.version = String(object.version); - if (object.architecture != null) - message.architecture = String(object.architecture); - if (object.kernelVersion != null) - message.kernelVersion = String(object.kernelVersion); - if (object.kernelRelease != null) - message.kernelRelease = String(object.kernelRelease); - if (object.osconfigAgentVersion != null) - message.osconfigAgentVersion = String(object.osconfigAgentVersion); - return message; - }; + /** + * Properties of a ListPatchJobInstanceDetailsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobInstanceDetailsRequest + * @property {string|null} [parent] ListPatchJobInstanceDetailsRequest parent + * @property {number|null} [pageSize] ListPatchJobInstanceDetailsRequest pageSize + * @property {string|null} [pageToken] ListPatchJobInstanceDetailsRequest pageToken + * @property {string|null} [filter] ListPatchJobInstanceDetailsRequest filter + */ - /** - * Creates a plain object from an OsInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @static - * @param {google.cloud.osconfig.v1.Inventory.OsInfo} message OsInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OsInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.longName = ""; - object.shortName = ""; - object.version = ""; - object.architecture = ""; - object.kernelVersion = ""; - object.kernelRelease = ""; - object.osconfigAgentVersion = ""; - object.hostname = ""; - } - if (message.longName != null && message.hasOwnProperty("longName")) - object.longName = message.longName; - if (message.shortName != null && message.hasOwnProperty("shortName")) - object.shortName = message.shortName; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.architecture != null && message.hasOwnProperty("architecture")) - object.architecture = message.architecture; - if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) - object.kernelVersion = message.kernelVersion; - if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) - object.kernelRelease = message.kernelRelease; - if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) - object.osconfigAgentVersion = message.osconfigAgentVersion; - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - return object; - }; + /** + * Constructs a new ListPatchJobInstanceDetailsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobInstanceDetailsRequest. + * @implements IListPatchJobInstanceDetailsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set + */ + function ListPatchJobInstanceDetailsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Converts this OsInfo to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory.OsInfo - * @instance - * @returns {Object.} JSON object - */ - OsInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListPatchJobInstanceDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.parent = ""; - return OsInfo; - })(); + /** + * ListPatchJobInstanceDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.pageSize = 0; - Inventory.Item = (function() { + /** + * ListPatchJobInstanceDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.pageToken = ""; - /** - * Properties of an Item. - * @memberof google.cloud.osconfig.v1.Inventory - * @interface IItem - * @property {string|null} [id] Item id - * @property {google.cloud.osconfig.v1.Inventory.Item.OriginType|null} [originType] Item originType - * @property {google.protobuf.ITimestamp|null} [createTime] Item createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Item updateTime - * @property {google.cloud.osconfig.v1.Inventory.Item.Type|null} [type] Item type - * @property {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null} [installedPackage] Item installedPackage - * @property {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null} [availablePackage] Item availablePackage - */ + /** + * ListPatchJobInstanceDetailsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + */ + ListPatchJobInstanceDetailsRequest.prototype.filter = ""; - /** - * Constructs a new Item. - * @memberof google.cloud.osconfig.v1.Inventory - * @classdesc Represents an Item. - * @implements IItem - * @constructor - * @param {google.cloud.osconfig.v1.Inventory.IItem=} [properties] Properties to set - */ - function Item(properties) { - if (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 ListPatchJobInstanceDetailsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest instance + */ + ListPatchJobInstanceDetailsRequest.create = function create(properties) { + return new ListPatchJobInstanceDetailsRequest(properties); + }; - /** - * Item id. - * @member {string} id - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @instance - */ - Item.prototype.id = ""; + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; - /** - * Item originType. - * @member {google.cloud.osconfig.v1.Inventory.Item.OriginType} originType - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @instance - */ - Item.prototype.originType = 0; + /** + * Encodes the specified ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Item createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @instance - */ - Item.prototype.createTime = null; + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Item updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @instance - */ - Item.prototype.updateTime = null; + /** + * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Item type. - * @member {google.cloud.osconfig.v1.Inventory.Item.Type} type - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @instance - */ - Item.prototype.type = 0; + /** + * Verifies a ListPatchJobInstanceDetailsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobInstanceDetailsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * Item installedPackage. - * @member {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null|undefined} installedPackage - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @instance - */ - Item.prototype.installedPackage = null; + /** + * Creates a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest + */ + ListPatchJobInstanceDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; - /** - * Item availablePackage. - * @member {google.cloud.osconfig.v1.Inventory.ISoftwarePackage|null|undefined} availablePackage - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @instance - */ - Item.prototype.availablePackage = null; + /** + * Creates a plain object from a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobInstanceDetailsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Converts this ListPatchJobInstanceDetailsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobInstanceDetailsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Item details. - * @member {"installedPackage"|"availablePackage"|undefined} details - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @instance - */ - Object.defineProperty(Item.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["installedPackage", "availablePackage"]), - set: $util.oneOfSetter($oneOfFields) - }); + return ListPatchJobInstanceDetailsRequest; + })(); - /** - * Creates a new Item instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @static - * @param {google.cloud.osconfig.v1.Inventory.IItem=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory.Item} Item instance - */ - Item.create = function create(properties) { - return new Item(properties); - }; + v1.ListPatchJobInstanceDetailsResponse = (function() { - /** - * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @static - * @param {google.cloud.osconfig.v1.Inventory.IItem} message Item message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Item.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.originType != null && Object.hasOwnProperty.call(message, "originType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.originType); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.installedPackage != null && Object.hasOwnProperty.call(message, "installedPackage")) - $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.encode(message.installedPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.availablePackage != null && Object.hasOwnProperty.call(message, "availablePackage")) - $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.encode(message.availablePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; + /** + * Properties of a ListPatchJobInstanceDetailsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobInstanceDetailsResponse + * @property {Array.|null} [patchJobInstanceDetails] ListPatchJobInstanceDetailsResponse patchJobInstanceDetails + * @property {string|null} [nextPageToken] ListPatchJobInstanceDetailsResponse nextPageToken + */ - /** - * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.Item.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @static - * @param {google.cloud.osconfig.v1.Inventory.IItem} message Item message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Item.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new ListPatchJobInstanceDetailsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobInstanceDetailsResponse. + * @implements IListPatchJobInstanceDetailsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set + */ + function ListPatchJobInstanceDetailsResponse(properties) { + this.patchJobInstanceDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an Item message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory.Item} Item - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Item.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.Item(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.originType = reader.int32(); - break; - case 8: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); - break; - case 7: - message.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. + * @member {Array.} patchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @instance + */ + ListPatchJobInstanceDetailsResponse.prototype.patchJobInstanceDetails = $util.emptyArray; - /** - * Decodes an Item message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory.Item} Item - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Item.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ListPatchJobInstanceDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @instance + */ + ListPatchJobInstanceDetailsResponse.prototype.nextPageToken = ""; - /** - * Verifies an Item message. - * @function verify - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Item.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.originType != null && message.hasOwnProperty("originType")) - switch (message.originType) { - default: - return "originType: enum value expected"; - case 0: - case 1: - break; - } - 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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify(message.installedPackage); - if (error) - return "installedPackage." + error; - } - } - if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify(message.availablePackage); - if (error) - return "availablePackage." + error; - } - } - return null; - }; + /** + * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse instance + */ + ListPatchJobInstanceDetailsResponse.create = function create(properties) { + return new ListPatchJobInstanceDetailsResponse(properties); + }; - /** - * Creates an Item message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory.Item} Item - */ - Item.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory.Item) - return object; - var message = new $root.google.cloud.osconfig.v1.Inventory.Item(); - if (object.id != null) - message.id = String(object.id); - switch (object.originType) { - case "ORIGIN_TYPE_UNSPECIFIED": - case 0: - message.originType = 0; - break; - case "INVENTORY_REPORT": - case 1: - message.originType = 1; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.Item.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.osconfig.v1.Inventory.Item.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "INSTALLED_PACKAGE": + /** + * Encodes the specified ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchJobInstanceDetails != null && message.patchJobInstanceDetails.length) + for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) + $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.encode(message.patchJobInstanceDetails[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 ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobInstanceDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.type = 1; + if (!(message.patchJobInstanceDetails && message.patchJobInstanceDetails.length)) + message.patchJobInstanceDetails = []; + message.patchJobInstanceDetails.push($root.google.cloud.osconfig.v1.PatchJobInstanceDetails.decode(reader, reader.uint32())); break; - case "AVAILABLE_PACKAGE": case 2: - message.type = 2; + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); break; } - if (object.installedPackage != null) { - if (typeof object.installedPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.Item.installedPackage: object expected"); - message.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.fromObject(object.installedPackage); - } - if (object.availablePackage != null) { - if (typeof object.availablePackage !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.Item.availablePackage: object expected"); - message.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.fromObject(object.availablePackage); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an Item message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @static - * @param {google.cloud.osconfig.v1.Inventory.Item} message Item - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Item.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.originType = options.enums === String ? "ORIGIN_TYPE_UNSPECIFIED" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.createTime = null; - object.updateTime = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.originType != null && message.hasOwnProperty("originType")) - object.originType = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.OriginType[message.originType] : message.originType; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.Type[message.type] : message.type; - if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { - object.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.toObject(message.installedPackage, options); - if (options.oneofs) - object.details = "installedPackage"; - } - if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { - object.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.toObject(message.availablePackage, options); - if (options.oneofs) - object.details = "availablePackage"; + /** + * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobInstanceDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPatchJobInstanceDetailsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobInstanceDetailsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchJobInstanceDetails != null && message.hasOwnProperty("patchJobInstanceDetails")) { + if (!Array.isArray(message.patchJobInstanceDetails)) + return "patchJobInstanceDetails: array expected"; + for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.verify(message.patchJobInstanceDetails[i]); + if (error) + return "patchJobInstanceDetails." + error; } - 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); - return object; - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Converts this Item to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory.Item - * @instance - * @returns {Object.} JSON object - */ - Item.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + */ + ListPatchJobInstanceDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); + if (object.patchJobInstanceDetails) { + if (!Array.isArray(object.patchJobInstanceDetails)) + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: array expected"); + message.patchJobInstanceDetails = []; + for (var i = 0; i < object.patchJobInstanceDetails.length; ++i) { + if (typeof object.patchJobInstanceDetails[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: object expected"); + message.patchJobInstanceDetails[i] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.fromObject(object.patchJobInstanceDetails[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * OriginType enum. - * @name google.cloud.osconfig.v1.Inventory.Item.OriginType - * @enum {number} - * @property {number} ORIGIN_TYPE_UNSPECIFIED=0 ORIGIN_TYPE_UNSPECIFIED value - * @property {number} INVENTORY_REPORT=1 INVENTORY_REPORT value - */ - Item.OriginType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ORIGIN_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INVENTORY_REPORT"] = 1; - return values; - })(); + /** + * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobInstanceDetailsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patchJobInstanceDetails = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.patchJobInstanceDetails && message.patchJobInstanceDetails.length) { + object.patchJobInstanceDetails = []; + for (var j = 0; j < message.patchJobInstanceDetails.length; ++j) + object.patchJobInstanceDetails[j] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.toObject(message.patchJobInstanceDetails[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Type enum. - * @name google.cloud.osconfig.v1.Inventory.Item.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} INSTALLED_PACKAGE=1 INSTALLED_PACKAGE value - * @property {number} AVAILABLE_PACKAGE=2 AVAILABLE_PACKAGE value - */ - Item.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTALLED_PACKAGE"] = 1; - values[valuesById[2] = "AVAILABLE_PACKAGE"] = 2; - return values; - })(); + /** + * Converts this ListPatchJobInstanceDetailsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobInstanceDetailsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Item; - })(); + return ListPatchJobInstanceDetailsResponse; + })(); - Inventory.SoftwarePackage = (function() { + v1.PatchJobInstanceDetails = (function() { - /** - * Properties of a SoftwarePackage. - * @memberof google.cloud.osconfig.v1.Inventory - * @interface ISoftwarePackage - * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [yumPackage] SoftwarePackage yumPackage - * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [aptPackage] SoftwarePackage aptPackage - * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [zypperPackage] SoftwarePackage zypperPackage - * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [googetPackage] SoftwarePackage googetPackage - * @property {google.cloud.osconfig.v1.Inventory.IZypperPatch|null} [zypperPatch] SoftwarePackage zypperPatch - * @property {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null} [wuaPackage] SoftwarePackage wuaPackage - * @property {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null} [qfePackage] SoftwarePackage qfePackage - * @property {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null} [cosPackage] SoftwarePackage cosPackage - * @property {google.cloud.osconfig.v1.Inventory.IWindowsApplication|null} [windowsApplication] SoftwarePackage windowsApplication - */ + /** + * Properties of a PatchJobInstanceDetails. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchJobInstanceDetails + * @property {string|null} [name] PatchJobInstanceDetails name + * @property {string|null} [instanceSystemId] PatchJobInstanceDetails instanceSystemId + * @property {google.cloud.osconfig.v1.Instance.PatchState|null} [state] PatchJobInstanceDetails state + * @property {string|null} [failureReason] PatchJobInstanceDetails failureReason + * @property {number|Long|null} [attemptCount] PatchJobInstanceDetails attemptCount + */ - /** - * Constructs a new SoftwarePackage. - * @memberof google.cloud.osconfig.v1.Inventory - * @classdesc Represents a SoftwarePackage. - * @implements ISoftwarePackage - * @constructor - * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage=} [properties] Properties to set - */ - function SoftwarePackage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new PatchJobInstanceDetails. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchJobInstanceDetails. + * @implements IPatchJobInstanceDetails + * @constructor + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set + */ + function PatchJobInstanceDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SoftwarePackage yumPackage. - * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} yumPackage - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.yumPackage = null; + /** + * PatchJobInstanceDetails name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.name = ""; - /** - * SoftwarePackage aptPackage. - * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} aptPackage - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.aptPackage = null; + /** + * PatchJobInstanceDetails instanceSystemId. + * @member {string} instanceSystemId + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.instanceSystemId = ""; - /** - * SoftwarePackage zypperPackage. - * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} zypperPackage - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.zypperPackage = null; + /** + * PatchJobInstanceDetails state. + * @member {google.cloud.osconfig.v1.Instance.PatchState} state + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.state = 0; - /** - * SoftwarePackage googetPackage. - * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} googetPackage - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.googetPackage = null; + /** + * PatchJobInstanceDetails failureReason. + * @member {string} failureReason + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.failureReason = ""; - /** - * SoftwarePackage zypperPatch. - * @member {google.cloud.osconfig.v1.Inventory.IZypperPatch|null|undefined} zypperPatch - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.zypperPatch = null; + /** + * PatchJobInstanceDetails attemptCount. + * @member {number|Long} attemptCount + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + */ + PatchJobInstanceDetails.prototype.attemptCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * SoftwarePackage wuaPackage. - * @member {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage|null|undefined} wuaPackage - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.wuaPackage = null; + /** + * Creates a new PatchJobInstanceDetails instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails instance + */ + PatchJobInstanceDetails.create = function create(properties) { + return new PatchJobInstanceDetails(properties); + }; - /** - * SoftwarePackage qfePackage. - * @member {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage|null|undefined} qfePackage - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.qfePackage = null; + /** + * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJobInstanceDetails.encode = function encode(message, writer) { + 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.instanceSystemId != null && Object.hasOwnProperty.call(message, "instanceSystemId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceSystemId); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.failureReason); + if (message.attemptCount != null && Object.hasOwnProperty.call(message, "attemptCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.attemptCount); + return writer; + }; - /** - * SoftwarePackage cosPackage. - * @member {google.cloud.osconfig.v1.Inventory.IVersionedPackage|null|undefined} cosPackage - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.cosPackage = null; + /** + * Encodes the specified PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJobInstanceDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * SoftwarePackage windowsApplication. - * @member {google.cloud.osconfig.v1.Inventory.IWindowsApplication|null|undefined} windowsApplication - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.windowsApplication = null; + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJobInstanceDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.instanceSystemId = reader.string(); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.failureReason = reader.string(); + break; + case 5: + message.attemptCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJobInstanceDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * SoftwarePackage details. - * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"|undefined} details - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - */ - Object.defineProperty(SoftwarePackage.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage", "windowsApplication"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Verifies a PatchJobInstanceDetails message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchJobInstanceDetails.verify = function verify(message) { + if (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.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) + if (!$util.isString(message.instanceSystemId)) + return "instanceSystemId: 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: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) + if (!$util.isInteger(message.attemptCount) && !(message.attemptCount && $util.isInteger(message.attemptCount.low) && $util.isInteger(message.attemptCount.high))) + return "attemptCount: integer|Long expected"; + return null; + }; - /** - * Creates a new SoftwarePackage instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage instance - */ - SoftwarePackage.create = function create(properties) { - return new SoftwarePackage(properties); - }; + /** + * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + */ + PatchJobInstanceDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchJobInstanceDetails) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); + if (object.name != null) + message.name = String(object.name); + if (object.instanceSystemId != null) + message.instanceSystemId = String(object.instanceSystemId); + switch (object.state) { + case "PATCH_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "INACTIVE": + case 2: + message.state = 2; + break; + case "NOTIFIED": + case 3: + message.state = 3; + break; + case "STARTED": + case 4: + message.state = 4; + break; + case "DOWNLOADING_PATCHES": + case 5: + message.state = 5; + break; + case "APPLYING_PATCHES": + case 6: + message.state = 6; + break; + case "REBOOTING": + case 7: + message.state = 7; + break; + case "SUCCEEDED": + case 8: + message.state = 8; + break; + case "SUCCEEDED_REBOOT_REQUIRED": + case 9: + message.state = 9; + break; + case "FAILED": + case 10: + message.state = 10; + break; + case "ACKED": + case 11: + message.state = 11; + break; + case "TIMED_OUT": + case 12: + message.state = 12; + break; + case "RUNNING_PRE_PATCH_STEP": + case 13: + message.state = 13; + break; + case "RUNNING_POST_PATCH_STEP": + case 14: + message.state = 14; + break; + case "NO_AGENT_DETECTED": + case 15: + message.state = 15; + break; + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.attemptCount != null) + if ($util.Long) + (message.attemptCount = $util.Long.fromValue(object.attemptCount)).unsigned = false; + else if (typeof object.attemptCount === "string") + message.attemptCount = parseInt(object.attemptCount, 10); + else if (typeof object.attemptCount === "number") + message.attemptCount = object.attemptCount; + else if (typeof object.attemptCount === "object") + message.attemptCount = new $util.LongBits(object.attemptCount.low >>> 0, object.attemptCount.high >>> 0).toNumber(); + return message; + }; - /** - * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwarePackage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.yumPackage != null && Object.hasOwnProperty.call(message, "yumPackage")) - $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.yumPackage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.aptPackage != null && Object.hasOwnProperty.call(message, "aptPackage")) - $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.aptPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.zypperPackage != null && Object.hasOwnProperty.call(message, "zypperPackage")) - $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.zypperPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.googetPackage != null && Object.hasOwnProperty.call(message, "googetPackage")) - $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.googetPackage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.zypperPatch != null && Object.hasOwnProperty.call(message, "zypperPatch")) - $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.encode(message.zypperPatch, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.wuaPackage != null && Object.hasOwnProperty.call(message, "wuaPackage")) - $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.encode(message.wuaPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.qfePackage != null && Object.hasOwnProperty.call(message, "qfePackage")) - $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.encode(message.qfePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.cosPackage != null && Object.hasOwnProperty.call(message, "cosPackage")) - $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.encode(message.cosPackage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.windowsApplication != null && Object.hasOwnProperty.call(message, "windowsApplication")) - $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.encode(message.windowsApplication, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; + /** + * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {google.cloud.osconfig.v1.PatchJobInstanceDetails} message PatchJobInstanceDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchJobInstanceDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.instanceSystemId = ""; + object.state = options.enums === String ? "PATCH_STATE_UNSPECIFIED" : 0; + object.failureReason = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.attemptCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.attemptCount = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) + object.instanceSystemId = message.instanceSystemId; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.Instance.PatchState[message.state] : message.state; + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) + if (typeof message.attemptCount === "number") + object.attemptCount = options.longs === String ? String(message.attemptCount) : message.attemptCount; + else + object.attemptCount = options.longs === String ? $util.Long.prototype.toString.call(message.attemptCount) : options.longs === Number ? new $util.LongBits(message.attemptCount.low >>> 0, message.attemptCount.high >>> 0).toNumber() : message.attemptCount; + return object; + }; - /** - * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.SoftwarePackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwarePackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this PatchJobInstanceDetails to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @instance + * @returns {Object.} JSON object + */ + PatchJobInstanceDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a SoftwarePackage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwarePackage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 2: - message.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 3: - message.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 4: - message.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 5: - message.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.decode(reader, reader.uint32()); - break; - case 6: - message.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); - break; - case 7: - message.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); - break; - case 8: - message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 9: - message.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwarePackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return PatchJobInstanceDetails; + })(); - /** - * Verifies a SoftwarePackage message. - * @function verify - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SoftwarePackage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.yumPackage); - if (error) - return "yumPackage." + error; - } - } - if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.aptPackage); - if (error) - return "aptPackage." + error; - } - } - if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.zypperPackage); - if (error) - return "zypperPackage." + error; - } - } - if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.googetPackage); - if (error) - return "googetPackage." + error; - } - } - if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.verify(message.zypperPatch); - if (error) - return "zypperPatch." + error; - } - } - if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify(message.wuaPackage); - if (error) - return "wuaPackage." + error; - } - } - if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify(message.qfePackage); - if (error) - return "qfePackage." + error; - } - } - if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.verify(message.cosPackage); - if (error) - return "cosPackage." + error; - } - } - if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.verify(message.windowsApplication); - if (error) - return "windowsApplication." + error; - } - } - return null; - }; + v1.ListPatchJobsRequest = (function() { - /** - * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory.SoftwarePackage} SoftwarePackage - */ - SoftwarePackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage) - return object; - var message = new $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage(); - if (object.yumPackage != null) { - if (typeof object.yumPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.yumPackage: object expected"); - message.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.yumPackage); - } - if (object.aptPackage != null) { - if (typeof object.aptPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.aptPackage: object expected"); - message.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.aptPackage); - } - if (object.zypperPackage != null) { - if (typeof object.zypperPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.zypperPackage: object expected"); - message.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.zypperPackage); - } - if (object.googetPackage != null) { - if (typeof object.googetPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.googetPackage: object expected"); - message.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.googetPackage); - } - if (object.zypperPatch != null) { - if (typeof object.zypperPatch !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.zypperPatch: object expected"); - message.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.fromObject(object.zypperPatch); - } - if (object.wuaPackage != null) { - if (typeof object.wuaPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.wuaPackage: object expected"); - message.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.fromObject(object.wuaPackage); - } - if (object.qfePackage != null) { - if (typeof object.qfePackage !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.qfePackage: object expected"); - message.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.fromObject(object.qfePackage); - } - if (object.cosPackage != null) { - if (typeof object.cosPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.cosPackage: object expected"); - message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.fromObject(object.cosPackage); - } - if (object.windowsApplication != null) { - if (typeof object.windowsApplication !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.SoftwarePackage.windowsApplication: object expected"); - message.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.fromObject(object.windowsApplication); - } - return message; - }; + /** + * Properties of a ListPatchJobsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobsRequest + * @property {string|null} [parent] ListPatchJobsRequest parent + * @property {number|null} [pageSize] ListPatchJobsRequest pageSize + * @property {string|null} [pageToken] ListPatchJobsRequest pageToken + * @property {string|null} [filter] ListPatchJobsRequest filter + */ - /** - * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.SoftwarePackage} message SoftwarePackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SoftwarePackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { - object.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.yumPackage, options); - if (options.oneofs) - object.details = "yumPackage"; - } - if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { - object.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.aptPackage, options); - if (options.oneofs) - object.details = "aptPackage"; - } - if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { - object.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.zypperPackage, options); - if (options.oneofs) - object.details = "zypperPackage"; - } - if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { - object.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.googetPackage, options); - if (options.oneofs) - object.details = "googetPackage"; - } - if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { - object.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.toObject(message.zypperPatch, options); - if (options.oneofs) - object.details = "zypperPatch"; - } - if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { - object.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.toObject(message.wuaPackage, options); - if (options.oneofs) - object.details = "wuaPackage"; - } - if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { - object.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.toObject(message.qfePackage, options); - if (options.oneofs) - object.details = "qfePackage"; - } - if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { - object.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.toObject(message.cosPackage, options); - if (options.oneofs) - object.details = "cosPackage"; - } - if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { - object.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.toObject(message.windowsApplication, options); - if (options.oneofs) - object.details = "windowsApplication"; - } - return object; - }; + /** + * Constructs a new ListPatchJobsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobsRequest. + * @implements IListPatchJobsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set + */ + function ListPatchJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Converts this SoftwarePackage to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage - * @instance - * @returns {Object.} JSON object - */ - SoftwarePackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListPatchJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.parent = ""; - return SoftwarePackage; - })(); + /** + * ListPatchJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.pageSize = 0; - Inventory.VersionedPackage = (function() { + /** + * ListPatchJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.pageToken = ""; - /** - * Properties of a VersionedPackage. - * @memberof google.cloud.osconfig.v1.Inventory - * @interface IVersionedPackage - * @property {string|null} [packageName] VersionedPackage packageName - * @property {string|null} [architecture] VersionedPackage architecture - * @property {string|null} [version] VersionedPackage version - */ + /** + * ListPatchJobsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + */ + ListPatchJobsRequest.prototype.filter = ""; - /** - * Constructs a new VersionedPackage. - * @memberof google.cloud.osconfig.v1.Inventory - * @classdesc Represents a VersionedPackage. - * @implements IVersionedPackage - * @constructor - * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage=} [properties] Properties to set - */ - function VersionedPackage(properties) { - if (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 ListPatchJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest instance + */ + ListPatchJobsRequest.create = function create(properties) { + return new ListPatchJobsRequest(properties); + }; - /** - * VersionedPackage packageName. - * @member {string} packageName - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @instance - */ - VersionedPackage.prototype.packageName = ""; + /** + * Encodes the specified ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; - /** - * VersionedPackage architecture. - * @member {string} architecture - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @instance - */ - VersionedPackage.prototype.architecture = ""; + /** + * Encodes the specified ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * VersionedPackage version. - * @member {string} version - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @instance - */ - VersionedPackage.prototype.version = ""; + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new VersionedPackage instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage instance - */ - VersionedPackage.create = function create(properties) { - return new VersionedPackage(properties); - }; + /** + * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionedPackage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.architecture); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); - if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageName); - return writer; - }; - - /** - * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.VersionedPackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionedPackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VersionedPackage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionedPackage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.VersionedPackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.packageName = reader.string(); - break; - case 2: - message.architecture = reader.string(); - break; - case 3: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionedPackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VersionedPackage message. - * @function verify - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VersionedPackage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packageName != null && message.hasOwnProperty("packageName")) - if (!$util.isString(message.packageName)) - return "packageName: string expected"; - if (message.architecture != null && message.hasOwnProperty("architecture")) - if (!$util.isString(message.architecture)) - return "architecture: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory.VersionedPackage} VersionedPackage - */ - VersionedPackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory.VersionedPackage) - return object; - var message = new $root.google.cloud.osconfig.v1.Inventory.VersionedPackage(); - if (object.packageName != null) - message.packageName = String(object.packageName); - if (object.architecture != null) - message.architecture = String(object.architecture); - if (object.version != null) - message.version = String(object.version); - return message; - }; + /** + * Verifies a ListPatchJobsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.VersionedPackage} message VersionedPackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VersionedPackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.architecture = ""; - object.version = ""; - object.packageName = ""; - } - if (message.architecture != null && message.hasOwnProperty("architecture")) - object.architecture = message.architecture; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.packageName != null && message.hasOwnProperty("packageName")) - object.packageName = message.packageName; + /** + * Creates a ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + */ + ListPatchJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsRequest) return object; - }; - - /** - * Converts this VersionedPackage to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage - * @instance - * @returns {Object.} JSON object - */ - VersionedPackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; - return VersionedPackage; - })(); + /** + * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobsRequest} message ListPatchJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; - Inventory.WindowsUpdatePackage = (function() { + /** + * Converts this ListPatchJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a WindowsUpdatePackage. - * @memberof google.cloud.osconfig.v1.Inventory - * @interface IWindowsUpdatePackage - * @property {string|null} [title] WindowsUpdatePackage title - * @property {string|null} [description] WindowsUpdatePackage description - * @property {Array.|null} [categories] WindowsUpdatePackage categories - * @property {Array.|null} [kbArticleIds] WindowsUpdatePackage kbArticleIds - * @property {string|null} [supportUrl] WindowsUpdatePackage supportUrl - * @property {Array.|null} [moreInfoUrls] WindowsUpdatePackage moreInfoUrls - * @property {string|null} [updateId] WindowsUpdatePackage updateId - * @property {number|null} [revisionNumber] WindowsUpdatePackage revisionNumber - * @property {google.protobuf.ITimestamp|null} [lastDeploymentChangeTime] WindowsUpdatePackage lastDeploymentChangeTime - */ + return ListPatchJobsRequest; + })(); - /** - * Constructs a new WindowsUpdatePackage. - * @memberof google.cloud.osconfig.v1.Inventory - * @classdesc Represents a WindowsUpdatePackage. - * @implements IWindowsUpdatePackage - * @constructor - * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage=} [properties] Properties to set - */ - function WindowsUpdatePackage(properties) { - this.categories = []; - this.kbArticleIds = []; - this.moreInfoUrls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.ListPatchJobsResponse = (function() { - /** - * WindowsUpdatePackage title. - * @member {string} title - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.title = ""; + /** + * Properties of a ListPatchJobsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListPatchJobsResponse + * @property {Array.|null} [patchJobs] ListPatchJobsResponse patchJobs + * @property {string|null} [nextPageToken] ListPatchJobsResponse nextPageToken + */ - /** - * WindowsUpdatePackage description. - * @member {string} description - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.description = ""; + /** + * Constructs a new ListPatchJobsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListPatchJobsResponse. + * @implements IListPatchJobsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set + */ + function ListPatchJobsResponse(properties) { + this.patchJobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * WindowsUpdatePackage categories. - * @member {Array.} categories - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.categories = $util.emptyArray; + /** + * ListPatchJobsResponse patchJobs. + * @member {Array.} patchJobs + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @instance + */ + ListPatchJobsResponse.prototype.patchJobs = $util.emptyArray; - /** - * WindowsUpdatePackage kbArticleIds. - * @member {Array.} kbArticleIds - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.kbArticleIds = $util.emptyArray; + /** + * ListPatchJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @instance + */ + ListPatchJobsResponse.prototype.nextPageToken = ""; - /** - * WindowsUpdatePackage supportUrl. - * @member {string} supportUrl - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.supportUrl = ""; + /** + * Creates a new ListPatchJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse instance + */ + ListPatchJobsResponse.create = function create(properties) { + return new ListPatchJobsResponse(properties); + }; - /** - * WindowsUpdatePackage moreInfoUrls. - * @member {Array.} moreInfoUrls - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.moreInfoUrls = $util.emptyArray; + /** + * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchJobs != null && message.patchJobs.length) + for (var i = 0; i < message.patchJobs.length; ++i) + $root.google.cloud.osconfig.v1.PatchJob.encode(message.patchJobs[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; + }; - /** - * WindowsUpdatePackage updateId. - * @member {string} updateId - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.updateId = ""; + /** + * Encodes the specified ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPatchJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * WindowsUpdatePackage revisionNumber. - * @member {number} revisionNumber - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.revisionNumber = 0; + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.patchJobs && message.patchJobs.length)) + message.patchJobs = []; + message.patchJobs.push($root.google.cloud.osconfig.v1.PatchJob.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * WindowsUpdatePackage lastDeploymentChangeTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastDeploymentChangeTime - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.lastDeploymentChangeTime = null; + /** + * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPatchJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new WindowsUpdatePackage instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage instance - */ - WindowsUpdatePackage.create = function create(properties) { - return new WindowsUpdatePackage(properties); - }; + /** + * Verifies a ListPatchJobsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPatchJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchJobs != null && message.hasOwnProperty("patchJobs")) { + if (!Array.isArray(message.patchJobs)) + return "patchJobs: array expected"; + for (var i = 0; i < message.patchJobs.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchJob.verify(message.patchJobs[i]); + if (error) + return "patchJobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdatePackage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.categories != null && message.categories.length) - for (var i = 0; i < message.categories.length; ++i) - $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.encode(message.categories[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.kbArticleIds != null && message.kbArticleIds.length) - for (var i = 0; i < message.kbArticleIds.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kbArticleIds[i]); - if (message.moreInfoUrls != null && message.moreInfoUrls.length) - for (var i = 0; i < message.moreInfoUrls.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.moreInfoUrls[i]); - if (message.updateId != null && Object.hasOwnProperty.call(message, "updateId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.updateId); - if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.revisionNumber); - if (message.lastDeploymentChangeTime != null && Object.hasOwnProperty.call(message, "lastDeploymentChangeTime")) - $root.google.protobuf.Timestamp.encode(message.lastDeploymentChangeTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.supportUrl != null && Object.hasOwnProperty.call(message, "supportUrl")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.supportUrl); - return writer; - }; - - /** - * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdatePackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WindowsUpdatePackage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdatePackage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.kbArticleIds && message.kbArticleIds.length)) - message.kbArticleIds = []; - message.kbArticleIds.push(reader.string()); - break; - case 11: - message.supportUrl = reader.string(); - break; - case 5: - if (!(message.moreInfoUrls && message.moreInfoUrls.length)) - message.moreInfoUrls = []; - message.moreInfoUrls.push(reader.string()); - break; - case 6: - message.updateId = reader.string(); - break; - case 7: - message.revisionNumber = reader.int32(); - break; - case 10: - message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + */ + ListPatchJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); + if (object.patchJobs) { + if (!Array.isArray(object.patchJobs)) + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: array expected"); + message.patchJobs = []; + for (var i = 0; i < object.patchJobs.length; ++i) { + if (typeof object.patchJobs[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: object expected"); + message.patchJobs[i] = $root.google.cloud.osconfig.v1.PatchJob.fromObject(object.patchJobs[i]); } - return message; - }; + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdatePackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} message ListPatchJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPatchJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patchJobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.patchJobs && message.patchJobs.length) { + object.patchJobs = []; + for (var j = 0; j < message.patchJobs.length; ++j) + object.patchJobs[j] = $root.google.cloud.osconfig.v1.PatchJob.toObject(message.patchJobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Verifies a WindowsUpdatePackage message. - * @function verify - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsUpdatePackage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) - return "categories: array expected"; - for (var i = 0; i < message.categories.length; ++i) { - var error = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify(message.categories[i]); - if (error) - return "categories." + error; - } - } - if (message.kbArticleIds != null && message.hasOwnProperty("kbArticleIds")) { - if (!Array.isArray(message.kbArticleIds)) - return "kbArticleIds: array expected"; - for (var i = 0; i < message.kbArticleIds.length; ++i) - if (!$util.isString(message.kbArticleIds[i])) - return "kbArticleIds: string[] expected"; - } - if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) - if (!$util.isString(message.supportUrl)) - return "supportUrl: string expected"; - if (message.moreInfoUrls != null && message.hasOwnProperty("moreInfoUrls")) { - if (!Array.isArray(message.moreInfoUrls)) - return "moreInfoUrls: array expected"; - for (var i = 0; i < message.moreInfoUrls.length; ++i) - if (!$util.isString(message.moreInfoUrls[i])) - return "moreInfoUrls: string[] expected"; - } - if (message.updateId != null && message.hasOwnProperty("updateId")) - if (!$util.isString(message.updateId)) - return "updateId: string expected"; - if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) - if (!$util.isInteger(message.revisionNumber)) - return "revisionNumber: integer expected"; - if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastDeploymentChangeTime); - if (error) - return "lastDeploymentChangeTime." + error; - } - return null; - }; + /** + * Converts this ListPatchJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPatchJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} WindowsUpdatePackage - */ - WindowsUpdatePackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage) - return object; - var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.categories: array expected"); - message.categories = []; - for (var i = 0; i < object.categories.length; ++i) { - if (typeof object.categories[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.categories: object expected"); - message.categories[i] = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.fromObject(object.categories[i]); - } - } - if (object.kbArticleIds) { - if (!Array.isArray(object.kbArticleIds)) - throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.kbArticleIds: array expected"); - message.kbArticleIds = []; - for (var i = 0; i < object.kbArticleIds.length; ++i) - message.kbArticleIds[i] = String(object.kbArticleIds[i]); - } - if (object.supportUrl != null) - message.supportUrl = String(object.supportUrl); - if (object.moreInfoUrls) { - if (!Array.isArray(object.moreInfoUrls)) - throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.moreInfoUrls: array expected"); - message.moreInfoUrls = []; - for (var i = 0; i < object.moreInfoUrls.length; ++i) - message.moreInfoUrls[i] = String(object.moreInfoUrls[i]); - } - if (object.updateId != null) - message.updateId = String(object.updateId); - if (object.revisionNumber != null) - message.revisionNumber = object.revisionNumber | 0; - if (object.lastDeploymentChangeTime != null) { - if (typeof object.lastDeploymentChangeTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.lastDeploymentChangeTime: object expected"); - message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.fromObject(object.lastDeploymentChangeTime); - } - return message; - }; + return ListPatchJobsResponse; + })(); - /** - * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage} message WindowsUpdatePackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsUpdatePackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.categories = []; - object.kbArticleIds = []; - object.moreInfoUrls = []; - } - if (options.defaults) { - object.title = ""; - object.description = ""; - object.updateId = ""; - object.revisionNumber = 0; - object.lastDeploymentChangeTime = null; - object.supportUrl = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.categories && message.categories.length) { - object.categories = []; - for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.toObject(message.categories[j], options); - } - if (message.kbArticleIds && message.kbArticleIds.length) { - object.kbArticleIds = []; - for (var j = 0; j < message.kbArticleIds.length; ++j) - object.kbArticleIds[j] = message.kbArticleIds[j]; - } - if (message.moreInfoUrls && message.moreInfoUrls.length) { - object.moreInfoUrls = []; - for (var j = 0; j < message.moreInfoUrls.length; ++j) - object.moreInfoUrls[j] = message.moreInfoUrls[j]; - } - if (message.updateId != null && message.hasOwnProperty("updateId")) - object.updateId = message.updateId; - if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) - object.revisionNumber = message.revisionNumber; - if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) - object.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.toObject(message.lastDeploymentChangeTime, options); - if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) - object.supportUrl = message.supportUrl; - return object; - }; + v1.PatchJob = (function() { - /** - * Converts this WindowsUpdatePackage to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @instance - * @returns {Object.} JSON object - */ - WindowsUpdatePackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a PatchJob. + * @memberof google.cloud.osconfig.v1 + * @interface IPatchJob + * @property {string|null} [name] PatchJob name + * @property {string|null} [displayName] PatchJob displayName + * @property {string|null} [description] PatchJob description + * @property {google.protobuf.ITimestamp|null} [createTime] PatchJob createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PatchJob updateTime + * @property {google.cloud.osconfig.v1.PatchJob.State|null} [state] PatchJob state + * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchJob instanceFilter + * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchJob patchConfig + * @property {google.protobuf.IDuration|null} [duration] PatchJob duration + * @property {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null} [instanceDetailsSummary] PatchJob instanceDetailsSummary + * @property {boolean|null} [dryRun] PatchJob dryRun + * @property {string|null} [errorMessage] PatchJob errorMessage + * @property {number|null} [percentComplete] PatchJob percentComplete + * @property {string|null} [patchDeployment] PatchJob patchDeployment + * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] PatchJob rollout + */ - WindowsUpdatePackage.WindowsUpdateCategory = (function() { + /** + * Constructs a new PatchJob. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PatchJob. + * @implements IPatchJob + * @constructor + * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set + */ + function PatchJob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a WindowsUpdateCategory. - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @interface IWindowsUpdateCategory - * @property {string|null} [id] WindowsUpdateCategory id - * @property {string|null} [name] WindowsUpdateCategory name - */ + /** + * PatchJob name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.name = ""; - /** - * Constructs a new WindowsUpdateCategory. - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - * @classdesc Represents a WindowsUpdateCategory. - * @implements IWindowsUpdateCategory - * @constructor - * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set - */ - function WindowsUpdateCategory(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * PatchJob displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.displayName = ""; - /** - * WindowsUpdateCategory id. - * @member {string} id - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @instance - */ - WindowsUpdateCategory.prototype.id = ""; + /** + * PatchJob description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.description = ""; - /** - * WindowsUpdateCategory name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @instance - */ - WindowsUpdateCategory.prototype.name = ""; + /** + * PatchJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.createTime = null; - /** - * Creates a new WindowsUpdateCategory instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory instance - */ - WindowsUpdateCategory.create = function create(properties) { - return new WindowsUpdateCategory(properties); - }; + /** + * PatchJob updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.updateTime = null; - /** - * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdateCategory.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - return writer; - }; + /** + * PatchJob state. + * @member {google.cloud.osconfig.v1.PatchJob.State} state + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.state = 0; - /** - * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdateCategory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * PatchJob instanceFilter. + * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.instanceFilter = null; - /** - * Decodes a WindowsUpdateCategory message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdateCategory.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdateCategory.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WindowsUpdateCategory message. - * @function verify - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsUpdateCategory.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory - */ - WindowsUpdateCategory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) - return object; - var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} message WindowsUpdateCategory - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsUpdateCategory.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.name = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this WindowsUpdateCategory to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @instance - * @returns {Object.} JSON object - */ - WindowsUpdateCategory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WindowsUpdateCategory; - })(); - - return WindowsUpdatePackage; - })(); + /** + * PatchJob patchConfig. + * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.patchConfig = null; - Inventory.ZypperPatch = (function() { + /** + * PatchJob duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.duration = null; - /** - * Properties of a ZypperPatch. - * @memberof google.cloud.osconfig.v1.Inventory - * @interface IZypperPatch - * @property {string|null} [patchName] ZypperPatch patchName - * @property {string|null} [category] ZypperPatch category - * @property {string|null} [severity] ZypperPatch severity - * @property {string|null} [summary] ZypperPatch summary - */ + /** + * PatchJob instanceDetailsSummary. + * @member {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null|undefined} instanceDetailsSummary + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.instanceDetailsSummary = null; - /** - * Constructs a new ZypperPatch. - * @memberof google.cloud.osconfig.v1.Inventory - * @classdesc Represents a ZypperPatch. - * @implements IZypperPatch - * @constructor - * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch=} [properties] Properties to set - */ - function ZypperPatch(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * PatchJob dryRun. + * @member {boolean} dryRun + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.dryRun = false; - /** - * ZypperPatch patchName. - * @member {string} patchName - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @instance - */ - ZypperPatch.prototype.patchName = ""; + /** + * PatchJob errorMessage. + * @member {string} errorMessage + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.errorMessage = ""; - /** - * ZypperPatch category. - * @member {string} category - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @instance - */ - ZypperPatch.prototype.category = ""; + /** + * PatchJob percentComplete. + * @member {number} percentComplete + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.percentComplete = 0; - /** - * ZypperPatch severity. - * @member {string} severity - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @instance - */ - ZypperPatch.prototype.severity = ""; + /** + * PatchJob patchDeployment. + * @member {string} patchDeployment + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.patchDeployment = ""; - /** - * ZypperPatch summary. - * @member {string} summary - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @instance - */ - ZypperPatch.prototype.summary = ""; + /** + * PatchJob rollout. + * @member {google.cloud.osconfig.v1.IPatchRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + */ + PatchJob.prototype.rollout = null; - /** - * Creates a new ZypperPatch instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @static - * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch instance - */ - ZypperPatch.create = function create(properties) { - return new ZypperPatch(properties); - }; + /** + * Creates a new PatchJob instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob instance + */ + PatchJob.create = function create(properties) { + return new PatchJob(properties); + }; - /** - * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @static - * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ZypperPatch.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.category); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.severity); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.summary); - if (message.patchName != null && Object.hasOwnProperty.call(message, "patchName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.patchName); - return writer; - }; + /** + * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) + $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.instanceDetailsSummary != null && Object.hasOwnProperty.call(message, "instanceDetailsSummary")) + $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.encode(message.instanceDetailsSummary, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.dryRun); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.errorMessage); + if (message.percentComplete != null && Object.hasOwnProperty.call(message, "percentComplete")) + writer.uint32(/* id 12, wireType 1 =*/97).double(message.percentComplete); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.displayName); + if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.patchDeployment); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.ZypperPatch.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @static - * @param {google.cloud.osconfig.v1.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ZypperPatch.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PatchJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ZypperPatch message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ZypperPatch.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.ZypperPatch(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: - message.patchName = reader.string(); - break; - case 2: - message.category = reader.string(); - break; - case 3: - message.severity = reader.string(); - break; - case 4: - message.summary = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a PatchJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 14: + message.displayName = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.state = reader.int32(); + break; + case 13: + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + case 7: + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + case 8: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 9: + message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.decode(reader, reader.uint32()); + break; + case 10: + message.dryRun = reader.bool(); + break; + case 11: + message.errorMessage = reader.string(); + break; + case 12: + message.percentComplete = reader.double(); + break; + case 15: + message.patchDeployment = reader.string(); + break; + case 16: + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ZypperPatch.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a ZypperPatch message. - * @function verify - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ZypperPatch.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.patchName != null && message.hasOwnProperty("patchName")) - if (!$util.isString(message.patchName)) - return "patchName: string expected"; - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - if (message.severity != null && message.hasOwnProperty("severity")) - if (!$util.isString(message.severity)) - return "severity: string expected"; - if (message.summary != null && message.hasOwnProperty("summary")) - if (!$util.isString(message.summary)) - return "summary: string expected"; - return null; - }; + /** + * Decodes a PatchJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PatchJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory.ZypperPatch} ZypperPatch - */ - ZypperPatch.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory.ZypperPatch) - return object; - var message = new $root.google.cloud.osconfig.v1.Inventory.ZypperPatch(); - if (object.patchName != null) - message.patchName = String(object.patchName); - if (object.category != null) - message.category = String(object.category); - if (object.severity != null) - message.severity = String(object.severity); - if (object.summary != null) - message.summary = String(object.summary); - return message; - }; - - /** - * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @static - * @param {google.cloud.osconfig.v1.Inventory.ZypperPatch} message ZypperPatch - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ZypperPatch.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.category = ""; - object.severity = ""; - object.summary = ""; - object.patchName = ""; + /** + * Verifies a PatchJob message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PatchJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + 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.category != null && message.hasOwnProperty("category")) - object.category = message.category; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = message.severity; - if (message.summary != null && message.hasOwnProperty("summary")) - object.summary = message.summary; - if (message.patchName != null && message.hasOwnProperty("patchName")) - object.patchName = message.patchName; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { + var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); + if (error) + return "patchConfig." + error; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) { + var error = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify(message.instanceDetailsSummary); + if (error) + return "instanceDetailsSummary." + error; + } + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) + if (typeof message.percentComplete !== "number") + return "percentComplete: number expected"; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + if (!$util.isString(message.patchDeployment)) + return "patchDeployment: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1.PatchRollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + return null; + }; + + /** + * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + */ + PatchJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchJob) return object; - }; + var message = new $root.google.cloud.osconfig.v1.PatchJob(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.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.osconfig.v1.PatchJob.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STARTED": + case 1: + message.state = 1; + break; + case "INSTANCE_LOOKUP": + case 2: + message.state = 2; + break; + case "PATCHING": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "COMPLETED_WITH_ERRORS": + case 5: + message.state = 5; + break; + case "CANCELED": + case 6: + message.state = 6; + break; + case "TIMED_OUT": + case 7: + message.state = 7; + break; + } + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); + } + if (object.patchConfig != null) { + if (typeof object.patchConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.patchConfig: object expected"); + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.instanceDetailsSummary != null) { + if (typeof object.instanceDetailsSummary !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceDetailsSummary: object expected"); + message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.fromObject(object.instanceDetailsSummary); + } + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.percentComplete != null) + message.percentComplete = Number(object.percentComplete); + if (object.patchDeployment != null) + message.patchDeployment = String(object.patchDeployment); + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchJob.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); + } + return message; + }; - /** - * Converts this ZypperPatch to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch - * @instance - * @returns {Object.} JSON object - */ - ZypperPatch.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a PatchJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {google.cloud.osconfig.v1.PatchJob} message PatchJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PatchJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.patchConfig = null; + object.duration = null; + object.instanceDetailsSummary = null; + object.dryRun = false; + object.errorMessage = ""; + object.percentComplete = 0; + object.instanceFilter = null; + object.displayName = ""; + object.patchDeployment = ""; + object.rollout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchJob.State[message.state] : message.state; + if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) + object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) + object.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.toObject(message.instanceDetailsSummary, options); + if (message.dryRun != null && message.hasOwnProperty("dryRun")) + object.dryRun = message.dryRun; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) + object.percentComplete = options.json && !isFinite(message.percentComplete) ? String(message.percentComplete) : message.percentComplete; + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + object.patchDeployment = message.patchDeployment; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); + return object; + }; - return ZypperPatch; - })(); + /** + * Converts this PatchJob to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchJob + * @instance + * @returns {Object.} JSON object + */ + PatchJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Inventory.WindowsQuickFixEngineeringPackage = (function() { + PatchJob.InstanceDetailsSummary = (function() { /** - * Properties of a WindowsQuickFixEngineeringPackage. - * @memberof google.cloud.osconfig.v1.Inventory - * @interface IWindowsQuickFixEngineeringPackage - * @property {string|null} [caption] WindowsQuickFixEngineeringPackage caption - * @property {string|null} [description] WindowsQuickFixEngineeringPackage description - * @property {string|null} [hotFixId] WindowsQuickFixEngineeringPackage hotFixId - * @property {google.protobuf.ITimestamp|null} [installTime] WindowsQuickFixEngineeringPackage installTime + * Properties of an InstanceDetailsSummary. + * @memberof google.cloud.osconfig.v1.PatchJob + * @interface IInstanceDetailsSummary + * @property {number|Long|null} [pendingInstanceCount] InstanceDetailsSummary pendingInstanceCount + * @property {number|Long|null} [inactiveInstanceCount] InstanceDetailsSummary inactiveInstanceCount + * @property {number|Long|null} [notifiedInstanceCount] InstanceDetailsSummary notifiedInstanceCount + * @property {number|Long|null} [startedInstanceCount] InstanceDetailsSummary startedInstanceCount + * @property {number|Long|null} [downloadingPatchesInstanceCount] InstanceDetailsSummary downloadingPatchesInstanceCount + * @property {number|Long|null} [applyingPatchesInstanceCount] InstanceDetailsSummary applyingPatchesInstanceCount + * @property {number|Long|null} [rebootingInstanceCount] InstanceDetailsSummary rebootingInstanceCount + * @property {number|Long|null} [succeededInstanceCount] InstanceDetailsSummary succeededInstanceCount + * @property {number|Long|null} [succeededRebootRequiredInstanceCount] InstanceDetailsSummary succeededRebootRequiredInstanceCount + * @property {number|Long|null} [failedInstanceCount] InstanceDetailsSummary failedInstanceCount + * @property {number|Long|null} [ackedInstanceCount] InstanceDetailsSummary ackedInstanceCount + * @property {number|Long|null} [timedOutInstanceCount] InstanceDetailsSummary timedOutInstanceCount + * @property {number|Long|null} [prePatchStepInstanceCount] InstanceDetailsSummary prePatchStepInstanceCount + * @property {number|Long|null} [postPatchStepInstanceCount] InstanceDetailsSummary postPatchStepInstanceCount + * @property {number|Long|null} [noAgentDetectedInstanceCount] InstanceDetailsSummary noAgentDetectedInstanceCount */ /** - * Constructs a new WindowsQuickFixEngineeringPackage. - * @memberof google.cloud.osconfig.v1.Inventory - * @classdesc Represents a WindowsQuickFixEngineeringPackage. - * @implements IWindowsQuickFixEngineeringPackage + * Constructs a new InstanceDetailsSummary. + * @memberof google.cloud.osconfig.v1.PatchJob + * @classdesc Represents an InstanceDetailsSummary. + * @implements IInstanceDetailsSummary * @constructor - * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set */ - function WindowsQuickFixEngineeringPackage(properties) { + function InstanceDetailsSummary(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12470,387 +10055,257 @@ } /** - * WindowsQuickFixEngineeringPackage caption. - * @member {string} caption - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * InstanceDetailsSummary pendingInstanceCount. + * @member {number|Long} pendingInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance */ - WindowsQuickFixEngineeringPackage.prototype.caption = ""; + InstanceDetailsSummary.prototype.pendingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * WindowsQuickFixEngineeringPackage description. - * @member {string} description - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * InstanceDetailsSummary inactiveInstanceCount. + * @member {number|Long} inactiveInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance */ - WindowsQuickFixEngineeringPackage.prototype.description = ""; + InstanceDetailsSummary.prototype.inactiveInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * WindowsQuickFixEngineeringPackage hotFixId. - * @member {string} hotFixId - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * InstanceDetailsSummary notifiedInstanceCount. + * @member {number|Long} notifiedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance */ - WindowsQuickFixEngineeringPackage.prototype.hotFixId = ""; + InstanceDetailsSummary.prototype.notifiedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * WindowsQuickFixEngineeringPackage installTime. - * @member {google.protobuf.ITimestamp|null|undefined} installTime - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * InstanceDetailsSummary startedInstanceCount. + * @member {number|Long} startedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance */ - WindowsQuickFixEngineeringPackage.prototype.installTime = null; + InstanceDetailsSummary.prototype.startedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage instance + * InstanceDetailsSummary downloadingPatchesInstanceCount. + * @member {number|Long} downloadingPatchesInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance */ - WindowsQuickFixEngineeringPackage.create = function create(properties) { - return new WindowsQuickFixEngineeringPackage(properties); - }; + InstanceDetailsSummary.prototype.downloadingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * InstanceDetailsSummary applyingPatchesInstanceCount. + * @member {number|Long} applyingPatchesInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance */ - WindowsQuickFixEngineeringPackage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.caption); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.hotFixId != null && Object.hasOwnProperty.call(message, "hotFixId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.hotFixId); - if (message.installTime != null && Object.hasOwnProperty.call(message, "installTime")) - $root.google.protobuf.Timestamp.encode(message.installTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + InstanceDetailsSummary.prototype.applyingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * InstanceDetailsSummary rebootingInstanceCount. + * @member {number|Long} rebootingInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance */ - WindowsQuickFixEngineeringPackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + InstanceDetailsSummary.prototype.rebootingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * InstanceDetailsSummary succeededInstanceCount. + * @member {number|Long} succeededInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance */ - WindowsQuickFixEngineeringPackage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.caption = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.hotFixId = reader.string(); - break; - case 5: - message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + InstanceDetailsSummary.prototype.succeededInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * InstanceDetailsSummary succeededRebootRequiredInstanceCount. + * @member {number|Long} succeededRebootRequiredInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance */ - WindowsQuickFixEngineeringPackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + InstanceDetailsSummary.prototype.succeededRebootRequiredInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Verifies a WindowsQuickFixEngineeringPackage message. - * @function verify - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * InstanceDetailsSummary failedInstanceCount. + * @member {number|Long} failedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @instance */ - WindowsQuickFixEngineeringPackage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) - if (!$util.isString(message.hotFixId)) - return "hotFixId: string expected"; - if (message.installTime != null && message.hasOwnProperty("installTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.installTime); - if (error) - return "installTime." + error; - } - return null; - }; - - /** - * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage - */ - WindowsQuickFixEngineeringPackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage) - return object; - var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage(); - if (object.caption != null) - message.caption = String(object.caption); - if (object.description != null) - message.description = String(object.description); - if (object.hotFixId != null) - message.hotFixId = String(object.hotFixId); - if (object.installTime != null) { - if (typeof object.installTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.installTime: object expected"); - message.installTime = $root.google.protobuf.Timestamp.fromObject(object.installTime); - } - return message; - }; - - /** - * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsQuickFixEngineeringPackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.caption = ""; - object.description = ""; - object.hotFixId = ""; - object.installTime = null; - } - if (message.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) - object.hotFixId = message.hotFixId; - if (message.installTime != null && message.hasOwnProperty("installTime")) - object.installTime = $root.google.protobuf.Timestamp.toObject(message.installTime, options); - return object; - }; - - /** - * Converts this WindowsQuickFixEngineeringPackage to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - * @instance - * @returns {Object.} JSON object - */ - WindowsQuickFixEngineeringPackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WindowsQuickFixEngineeringPackage; - })(); - - Inventory.WindowsApplication = (function() { - - /** - * Properties of a WindowsApplication. - * @memberof google.cloud.osconfig.v1.Inventory - * @interface IWindowsApplication - * @property {string|null} [displayName] WindowsApplication displayName - * @property {string|null} [displayVersion] WindowsApplication displayVersion - * @property {string|null} [publisher] WindowsApplication publisher - * @property {google.type.IDate|null} [installDate] WindowsApplication installDate - * @property {string|null} [helpLink] WindowsApplication helpLink - */ - - /** - * Constructs a new WindowsApplication. - * @memberof google.cloud.osconfig.v1.Inventory - * @classdesc Represents a WindowsApplication. - * @implements IWindowsApplication - * @constructor - * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication=} [properties] Properties to set - */ - function WindowsApplication(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + InstanceDetailsSummary.prototype.failedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * WindowsApplication displayName. - * @member {string} displayName - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * InstanceDetailsSummary ackedInstanceCount. + * @member {number|Long} ackedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance */ - WindowsApplication.prototype.displayName = ""; + InstanceDetailsSummary.prototype.ackedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * WindowsApplication displayVersion. - * @member {string} displayVersion - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * InstanceDetailsSummary timedOutInstanceCount. + * @member {number|Long} timedOutInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance */ - WindowsApplication.prototype.displayVersion = ""; + InstanceDetailsSummary.prototype.timedOutInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * WindowsApplication publisher. - * @member {string} publisher - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * InstanceDetailsSummary prePatchStepInstanceCount. + * @member {number|Long} prePatchStepInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance */ - WindowsApplication.prototype.publisher = ""; + InstanceDetailsSummary.prototype.prePatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * WindowsApplication installDate. - * @member {google.type.IDate|null|undefined} installDate - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * InstanceDetailsSummary postPatchStepInstanceCount. + * @member {number|Long} postPatchStepInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance */ - WindowsApplication.prototype.installDate = null; + InstanceDetailsSummary.prototype.postPatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * WindowsApplication helpLink. - * @member {string} helpLink - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * InstanceDetailsSummary noAgentDetectedInstanceCount. + * @member {number|Long} noAgentDetectedInstanceCount + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance */ - WindowsApplication.prototype.helpLink = ""; + InstanceDetailsSummary.prototype.noAgentDetectedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new WindowsApplication instance using the specified properties. + * Creates a new InstanceDetailsSummary instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @static - * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication instance + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary instance */ - WindowsApplication.create = function create(properties) { - return new WindowsApplication(properties); + InstanceDetailsSummary.create = function create(properties) { + return new InstanceDetailsSummary(properties); }; /** - * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @static - * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WindowsApplication.encode = function encode(message, writer) { + InstanceDetailsSummary.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.displayVersion != null && Object.hasOwnProperty.call(message, "displayVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayVersion); - if (message.publisher != null && Object.hasOwnProperty.call(message, "publisher")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.publisher); - if (message.installDate != null && Object.hasOwnProperty.call(message, "installDate")) - $root.google.type.Date.encode(message.installDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.helpLink != null && Object.hasOwnProperty.call(message, "helpLink")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.helpLink); + if (message.pendingInstanceCount != null && Object.hasOwnProperty.call(message, "pendingInstanceCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pendingInstanceCount); + if (message.inactiveInstanceCount != null && Object.hasOwnProperty.call(message, "inactiveInstanceCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.inactiveInstanceCount); + if (message.notifiedInstanceCount != null && Object.hasOwnProperty.call(message, "notifiedInstanceCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.notifiedInstanceCount); + if (message.startedInstanceCount != null && Object.hasOwnProperty.call(message, "startedInstanceCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.startedInstanceCount); + if (message.downloadingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "downloadingPatchesInstanceCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.downloadingPatchesInstanceCount); + if (message.applyingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "applyingPatchesInstanceCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.applyingPatchesInstanceCount); + if (message.rebootingInstanceCount != null && Object.hasOwnProperty.call(message, "rebootingInstanceCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.rebootingInstanceCount); + if (message.succeededInstanceCount != null && Object.hasOwnProperty.call(message, "succeededInstanceCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.succeededInstanceCount); + if (message.succeededRebootRequiredInstanceCount != null && Object.hasOwnProperty.call(message, "succeededRebootRequiredInstanceCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.succeededRebootRequiredInstanceCount); + if (message.failedInstanceCount != null && Object.hasOwnProperty.call(message, "failedInstanceCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.failedInstanceCount); + if (message.ackedInstanceCount != null && Object.hasOwnProperty.call(message, "ackedInstanceCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.ackedInstanceCount); + if (message.timedOutInstanceCount != null && Object.hasOwnProperty.call(message, "timedOutInstanceCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.timedOutInstanceCount); + if (message.prePatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "prePatchStepInstanceCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.prePatchStepInstanceCount); + if (message.postPatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "postPatchStepInstanceCount")) + writer.uint32(/* id 14, wireType 0 =*/112).int64(message.postPatchStepInstanceCount); + if (message.noAgentDetectedInstanceCount != null && Object.hasOwnProperty.call(message, "noAgentDetectedInstanceCount")) + writer.uint32(/* id 15, wireType 0 =*/120).int64(message.noAgentDetectedInstanceCount); return writer; }; /** - * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Inventory.WindowsApplication.verify|verify} messages. + * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @static - * @param {google.cloud.osconfig.v1.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WindowsApplication.encodeDelimited = function encodeDelimited(message, writer) { + InstanceDetailsSummary.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WindowsApplication message from the specified reader or buffer. + * Decodes an InstanceDetailsSummary message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WindowsApplication.decode = function decode(reader, length) { + InstanceDetailsSummary.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Inventory.WindowsApplication(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.displayName = reader.string(); + message.pendingInstanceCount = reader.int64(); break; case 2: - message.displayVersion = reader.string(); + message.inactiveInstanceCount = reader.int64(); break; case 3: - message.publisher = reader.string(); + message.notifiedInstanceCount = reader.int64(); break; case 4: - message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); + message.startedInstanceCount = reader.int64(); break; case 5: - message.helpLink = reader.string(); + message.downloadingPatchesInstanceCount = reader.int64(); + break; + case 6: + message.applyingPatchesInstanceCount = reader.int64(); + break; + case 7: + message.rebootingInstanceCount = reader.int64(); + break; + case 8: + message.succeededInstanceCount = reader.int64(); + break; + case 9: + message.succeededRebootRequiredInstanceCount = reader.int64(); + break; + case 10: + message.failedInstanceCount = reader.int64(); + break; + case 11: + message.ackedInstanceCount = reader.int64(); + break; + case 12: + message.timedOutInstanceCount = reader.int64(); + break; + case 13: + message.prePatchStepInstanceCount = reader.int64(); + break; + case 14: + message.postPatchStepInstanceCount = reader.int64(); + break; + case 15: + message.noAgentDetectedInstanceCount = reader.int64(); break; default: reader.skipType(tag & 7); @@ -12861,149 +10316,466 @@ }; /** - * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. + * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WindowsApplication.decodeDelimited = function decodeDelimited(reader) { + InstanceDetailsSummary.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WindowsApplication message. + * Verifies an InstanceDetailsSummary message. * @function verify - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WindowsApplication.verify = function verify(message) { + InstanceDetailsSummary.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) - if (!$util.isString(message.displayVersion)) - return "displayVersion: string expected"; - if (message.publisher != null && message.hasOwnProperty("publisher")) - if (!$util.isString(message.publisher)) - return "publisher: string expected"; - if (message.installDate != null && message.hasOwnProperty("installDate")) { - var error = $root.google.type.Date.verify(message.installDate); - if (error) - return "installDate." + error; - } - if (message.helpLink != null && message.hasOwnProperty("helpLink")) - if (!$util.isString(message.helpLink)) - return "helpLink: string expected"; + if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) + if (!$util.isInteger(message.pendingInstanceCount) && !(message.pendingInstanceCount && $util.isInteger(message.pendingInstanceCount.low) && $util.isInteger(message.pendingInstanceCount.high))) + return "pendingInstanceCount: integer|Long expected"; + if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) + if (!$util.isInteger(message.inactiveInstanceCount) && !(message.inactiveInstanceCount && $util.isInteger(message.inactiveInstanceCount.low) && $util.isInteger(message.inactiveInstanceCount.high))) + return "inactiveInstanceCount: integer|Long expected"; + if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) + if (!$util.isInteger(message.notifiedInstanceCount) && !(message.notifiedInstanceCount && $util.isInteger(message.notifiedInstanceCount.low) && $util.isInteger(message.notifiedInstanceCount.high))) + return "notifiedInstanceCount: integer|Long expected"; + if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) + if (!$util.isInteger(message.startedInstanceCount) && !(message.startedInstanceCount && $util.isInteger(message.startedInstanceCount.low) && $util.isInteger(message.startedInstanceCount.high))) + return "startedInstanceCount: integer|Long expected"; + if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) + if (!$util.isInteger(message.downloadingPatchesInstanceCount) && !(message.downloadingPatchesInstanceCount && $util.isInteger(message.downloadingPatchesInstanceCount.low) && $util.isInteger(message.downloadingPatchesInstanceCount.high))) + return "downloadingPatchesInstanceCount: integer|Long expected"; + if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) + if (!$util.isInteger(message.applyingPatchesInstanceCount) && !(message.applyingPatchesInstanceCount && $util.isInteger(message.applyingPatchesInstanceCount.low) && $util.isInteger(message.applyingPatchesInstanceCount.high))) + return "applyingPatchesInstanceCount: integer|Long expected"; + if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) + if (!$util.isInteger(message.rebootingInstanceCount) && !(message.rebootingInstanceCount && $util.isInteger(message.rebootingInstanceCount.low) && $util.isInteger(message.rebootingInstanceCount.high))) + return "rebootingInstanceCount: integer|Long expected"; + if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) + if (!$util.isInteger(message.succeededInstanceCount) && !(message.succeededInstanceCount && $util.isInteger(message.succeededInstanceCount.low) && $util.isInteger(message.succeededInstanceCount.high))) + return "succeededInstanceCount: integer|Long expected"; + if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) + if (!$util.isInteger(message.succeededRebootRequiredInstanceCount) && !(message.succeededRebootRequiredInstanceCount && $util.isInteger(message.succeededRebootRequiredInstanceCount.low) && $util.isInteger(message.succeededRebootRequiredInstanceCount.high))) + return "succeededRebootRequiredInstanceCount: integer|Long expected"; + if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) + if (!$util.isInteger(message.failedInstanceCount) && !(message.failedInstanceCount && $util.isInteger(message.failedInstanceCount.low) && $util.isInteger(message.failedInstanceCount.high))) + return "failedInstanceCount: integer|Long expected"; + if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) + if (!$util.isInteger(message.ackedInstanceCount) && !(message.ackedInstanceCount && $util.isInteger(message.ackedInstanceCount.low) && $util.isInteger(message.ackedInstanceCount.high))) + return "ackedInstanceCount: integer|Long expected"; + if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) + if (!$util.isInteger(message.timedOutInstanceCount) && !(message.timedOutInstanceCount && $util.isInteger(message.timedOutInstanceCount.low) && $util.isInteger(message.timedOutInstanceCount.high))) + return "timedOutInstanceCount: integer|Long expected"; + if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) + if (!$util.isInteger(message.prePatchStepInstanceCount) && !(message.prePatchStepInstanceCount && $util.isInteger(message.prePatchStepInstanceCount.low) && $util.isInteger(message.prePatchStepInstanceCount.high))) + return "prePatchStepInstanceCount: integer|Long expected"; + if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) + if (!$util.isInteger(message.postPatchStepInstanceCount) && !(message.postPatchStepInstanceCount && $util.isInteger(message.postPatchStepInstanceCount.low) && $util.isInteger(message.postPatchStepInstanceCount.high))) + return "postPatchStepInstanceCount: integer|Long expected"; + if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) + if (!$util.isInteger(message.noAgentDetectedInstanceCount) && !(message.noAgentDetectedInstanceCount && $util.isInteger(message.noAgentDetectedInstanceCount.low) && $util.isInteger(message.noAgentDetectedInstanceCount.high))) + return "noAgentDetectedInstanceCount: integer|Long expected"; return null; }; /** - * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. + * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Inventory.WindowsApplication} WindowsApplication + * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary */ - WindowsApplication.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Inventory.WindowsApplication) + InstanceDetailsSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary) return object; - var message = new $root.google.cloud.osconfig.v1.Inventory.WindowsApplication(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.displayVersion != null) - message.displayVersion = String(object.displayVersion); - if (object.publisher != null) - message.publisher = String(object.publisher); - if (object.installDate != null) { - if (typeof object.installDate !== "object") - throw TypeError(".google.cloud.osconfig.v1.Inventory.WindowsApplication.installDate: object expected"); - message.installDate = $root.google.type.Date.fromObject(object.installDate); - } - if (object.helpLink != null) - message.helpLink = String(object.helpLink); + var message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); + if (object.pendingInstanceCount != null) + if ($util.Long) + (message.pendingInstanceCount = $util.Long.fromValue(object.pendingInstanceCount)).unsigned = false; + else if (typeof object.pendingInstanceCount === "string") + message.pendingInstanceCount = parseInt(object.pendingInstanceCount, 10); + else if (typeof object.pendingInstanceCount === "number") + message.pendingInstanceCount = object.pendingInstanceCount; + else if (typeof object.pendingInstanceCount === "object") + message.pendingInstanceCount = new $util.LongBits(object.pendingInstanceCount.low >>> 0, object.pendingInstanceCount.high >>> 0).toNumber(); + if (object.inactiveInstanceCount != null) + if ($util.Long) + (message.inactiveInstanceCount = $util.Long.fromValue(object.inactiveInstanceCount)).unsigned = false; + else if (typeof object.inactiveInstanceCount === "string") + message.inactiveInstanceCount = parseInt(object.inactiveInstanceCount, 10); + else if (typeof object.inactiveInstanceCount === "number") + message.inactiveInstanceCount = object.inactiveInstanceCount; + else if (typeof object.inactiveInstanceCount === "object") + message.inactiveInstanceCount = new $util.LongBits(object.inactiveInstanceCount.low >>> 0, object.inactiveInstanceCount.high >>> 0).toNumber(); + if (object.notifiedInstanceCount != null) + if ($util.Long) + (message.notifiedInstanceCount = $util.Long.fromValue(object.notifiedInstanceCount)).unsigned = false; + else if (typeof object.notifiedInstanceCount === "string") + message.notifiedInstanceCount = parseInt(object.notifiedInstanceCount, 10); + else if (typeof object.notifiedInstanceCount === "number") + message.notifiedInstanceCount = object.notifiedInstanceCount; + else if (typeof object.notifiedInstanceCount === "object") + message.notifiedInstanceCount = new $util.LongBits(object.notifiedInstanceCount.low >>> 0, object.notifiedInstanceCount.high >>> 0).toNumber(); + if (object.startedInstanceCount != null) + if ($util.Long) + (message.startedInstanceCount = $util.Long.fromValue(object.startedInstanceCount)).unsigned = false; + else if (typeof object.startedInstanceCount === "string") + message.startedInstanceCount = parseInt(object.startedInstanceCount, 10); + else if (typeof object.startedInstanceCount === "number") + message.startedInstanceCount = object.startedInstanceCount; + else if (typeof object.startedInstanceCount === "object") + message.startedInstanceCount = new $util.LongBits(object.startedInstanceCount.low >>> 0, object.startedInstanceCount.high >>> 0).toNumber(); + if (object.downloadingPatchesInstanceCount != null) + if ($util.Long) + (message.downloadingPatchesInstanceCount = $util.Long.fromValue(object.downloadingPatchesInstanceCount)).unsigned = false; + else if (typeof object.downloadingPatchesInstanceCount === "string") + message.downloadingPatchesInstanceCount = parseInt(object.downloadingPatchesInstanceCount, 10); + else if (typeof object.downloadingPatchesInstanceCount === "number") + message.downloadingPatchesInstanceCount = object.downloadingPatchesInstanceCount; + else if (typeof object.downloadingPatchesInstanceCount === "object") + message.downloadingPatchesInstanceCount = new $util.LongBits(object.downloadingPatchesInstanceCount.low >>> 0, object.downloadingPatchesInstanceCount.high >>> 0).toNumber(); + if (object.applyingPatchesInstanceCount != null) + if ($util.Long) + (message.applyingPatchesInstanceCount = $util.Long.fromValue(object.applyingPatchesInstanceCount)).unsigned = false; + else if (typeof object.applyingPatchesInstanceCount === "string") + message.applyingPatchesInstanceCount = parseInt(object.applyingPatchesInstanceCount, 10); + else if (typeof object.applyingPatchesInstanceCount === "number") + message.applyingPatchesInstanceCount = object.applyingPatchesInstanceCount; + else if (typeof object.applyingPatchesInstanceCount === "object") + message.applyingPatchesInstanceCount = new $util.LongBits(object.applyingPatchesInstanceCount.low >>> 0, object.applyingPatchesInstanceCount.high >>> 0).toNumber(); + if (object.rebootingInstanceCount != null) + if ($util.Long) + (message.rebootingInstanceCount = $util.Long.fromValue(object.rebootingInstanceCount)).unsigned = false; + else if (typeof object.rebootingInstanceCount === "string") + message.rebootingInstanceCount = parseInt(object.rebootingInstanceCount, 10); + else if (typeof object.rebootingInstanceCount === "number") + message.rebootingInstanceCount = object.rebootingInstanceCount; + else if (typeof object.rebootingInstanceCount === "object") + message.rebootingInstanceCount = new $util.LongBits(object.rebootingInstanceCount.low >>> 0, object.rebootingInstanceCount.high >>> 0).toNumber(); + if (object.succeededInstanceCount != null) + if ($util.Long) + (message.succeededInstanceCount = $util.Long.fromValue(object.succeededInstanceCount)).unsigned = false; + else if (typeof object.succeededInstanceCount === "string") + message.succeededInstanceCount = parseInt(object.succeededInstanceCount, 10); + else if (typeof object.succeededInstanceCount === "number") + message.succeededInstanceCount = object.succeededInstanceCount; + else if (typeof object.succeededInstanceCount === "object") + message.succeededInstanceCount = new $util.LongBits(object.succeededInstanceCount.low >>> 0, object.succeededInstanceCount.high >>> 0).toNumber(); + if (object.succeededRebootRequiredInstanceCount != null) + if ($util.Long) + (message.succeededRebootRequiredInstanceCount = $util.Long.fromValue(object.succeededRebootRequiredInstanceCount)).unsigned = false; + else if (typeof object.succeededRebootRequiredInstanceCount === "string") + message.succeededRebootRequiredInstanceCount = parseInt(object.succeededRebootRequiredInstanceCount, 10); + else if (typeof object.succeededRebootRequiredInstanceCount === "number") + message.succeededRebootRequiredInstanceCount = object.succeededRebootRequiredInstanceCount; + else if (typeof object.succeededRebootRequiredInstanceCount === "object") + message.succeededRebootRequiredInstanceCount = new $util.LongBits(object.succeededRebootRequiredInstanceCount.low >>> 0, object.succeededRebootRequiredInstanceCount.high >>> 0).toNumber(); + if (object.failedInstanceCount != null) + if ($util.Long) + (message.failedInstanceCount = $util.Long.fromValue(object.failedInstanceCount)).unsigned = false; + else if (typeof object.failedInstanceCount === "string") + message.failedInstanceCount = parseInt(object.failedInstanceCount, 10); + else if (typeof object.failedInstanceCount === "number") + message.failedInstanceCount = object.failedInstanceCount; + else if (typeof object.failedInstanceCount === "object") + message.failedInstanceCount = new $util.LongBits(object.failedInstanceCount.low >>> 0, object.failedInstanceCount.high >>> 0).toNumber(); + if (object.ackedInstanceCount != null) + if ($util.Long) + (message.ackedInstanceCount = $util.Long.fromValue(object.ackedInstanceCount)).unsigned = false; + else if (typeof object.ackedInstanceCount === "string") + message.ackedInstanceCount = parseInt(object.ackedInstanceCount, 10); + else if (typeof object.ackedInstanceCount === "number") + message.ackedInstanceCount = object.ackedInstanceCount; + else if (typeof object.ackedInstanceCount === "object") + message.ackedInstanceCount = new $util.LongBits(object.ackedInstanceCount.low >>> 0, object.ackedInstanceCount.high >>> 0).toNumber(); + if (object.timedOutInstanceCount != null) + if ($util.Long) + (message.timedOutInstanceCount = $util.Long.fromValue(object.timedOutInstanceCount)).unsigned = false; + else if (typeof object.timedOutInstanceCount === "string") + message.timedOutInstanceCount = parseInt(object.timedOutInstanceCount, 10); + else if (typeof object.timedOutInstanceCount === "number") + message.timedOutInstanceCount = object.timedOutInstanceCount; + else if (typeof object.timedOutInstanceCount === "object") + message.timedOutInstanceCount = new $util.LongBits(object.timedOutInstanceCount.low >>> 0, object.timedOutInstanceCount.high >>> 0).toNumber(); + if (object.prePatchStepInstanceCount != null) + if ($util.Long) + (message.prePatchStepInstanceCount = $util.Long.fromValue(object.prePatchStepInstanceCount)).unsigned = false; + else if (typeof object.prePatchStepInstanceCount === "string") + message.prePatchStepInstanceCount = parseInt(object.prePatchStepInstanceCount, 10); + else if (typeof object.prePatchStepInstanceCount === "number") + message.prePatchStepInstanceCount = object.prePatchStepInstanceCount; + else if (typeof object.prePatchStepInstanceCount === "object") + message.prePatchStepInstanceCount = new $util.LongBits(object.prePatchStepInstanceCount.low >>> 0, object.prePatchStepInstanceCount.high >>> 0).toNumber(); + if (object.postPatchStepInstanceCount != null) + if ($util.Long) + (message.postPatchStepInstanceCount = $util.Long.fromValue(object.postPatchStepInstanceCount)).unsigned = false; + else if (typeof object.postPatchStepInstanceCount === "string") + message.postPatchStepInstanceCount = parseInt(object.postPatchStepInstanceCount, 10); + else if (typeof object.postPatchStepInstanceCount === "number") + message.postPatchStepInstanceCount = object.postPatchStepInstanceCount; + else if (typeof object.postPatchStepInstanceCount === "object") + message.postPatchStepInstanceCount = new $util.LongBits(object.postPatchStepInstanceCount.low >>> 0, object.postPatchStepInstanceCount.high >>> 0).toNumber(); + if (object.noAgentDetectedInstanceCount != null) + if ($util.Long) + (message.noAgentDetectedInstanceCount = $util.Long.fromValue(object.noAgentDetectedInstanceCount)).unsigned = false; + else if (typeof object.noAgentDetectedInstanceCount === "string") + message.noAgentDetectedInstanceCount = parseInt(object.noAgentDetectedInstanceCount, 10); + else if (typeof object.noAgentDetectedInstanceCount === "number") + message.noAgentDetectedInstanceCount = object.noAgentDetectedInstanceCount; + else if (typeof object.noAgentDetectedInstanceCount === "object") + message.noAgentDetectedInstanceCount = new $util.LongBits(object.noAgentDetectedInstanceCount.low >>> 0, object.noAgentDetectedInstanceCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. + * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @static - * @param {google.cloud.osconfig.v1.Inventory.WindowsApplication} message WindowsApplication + * @param {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} message InstanceDetailsSummary * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WindowsApplication.toObject = function toObject(message, options) { + InstanceDetailsSummary.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.displayName = ""; - object.displayVersion = ""; - object.publisher = ""; - object.installDate = null; - object.helpLink = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.pendingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pendingInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.inactiveInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.inactiveInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.notifiedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.notifiedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.downloadingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.downloadingPatchesInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applyingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applyingPatchesInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rebootingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rebootingInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.succeededInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.succeededInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.succeededRebootRequiredInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.succeededRebootRequiredInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.ackedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ackedInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timedOutInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timedOutInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.prePatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.prePatchStepInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.postPatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.postPatchStepInstanceCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.noAgentDetectedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.noAgentDetectedInstanceCount = options.longs === String ? "0" : 0; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) - object.displayVersion = message.displayVersion; - if (message.publisher != null && message.hasOwnProperty("publisher")) - object.publisher = message.publisher; - if (message.installDate != null && message.hasOwnProperty("installDate")) - object.installDate = $root.google.type.Date.toObject(message.installDate, options); - if (message.helpLink != null && message.hasOwnProperty("helpLink")) - object.helpLink = message.helpLink; + if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) + if (typeof message.pendingInstanceCount === "number") + object.pendingInstanceCount = options.longs === String ? String(message.pendingInstanceCount) : message.pendingInstanceCount; + else + object.pendingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.pendingInstanceCount) : options.longs === Number ? new $util.LongBits(message.pendingInstanceCount.low >>> 0, message.pendingInstanceCount.high >>> 0).toNumber() : message.pendingInstanceCount; + if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) + if (typeof message.inactiveInstanceCount === "number") + object.inactiveInstanceCount = options.longs === String ? String(message.inactiveInstanceCount) : message.inactiveInstanceCount; + else + object.inactiveInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.inactiveInstanceCount) : options.longs === Number ? new $util.LongBits(message.inactiveInstanceCount.low >>> 0, message.inactiveInstanceCount.high >>> 0).toNumber() : message.inactiveInstanceCount; + if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) + if (typeof message.notifiedInstanceCount === "number") + object.notifiedInstanceCount = options.longs === String ? String(message.notifiedInstanceCount) : message.notifiedInstanceCount; + else + object.notifiedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.notifiedInstanceCount) : options.longs === Number ? new $util.LongBits(message.notifiedInstanceCount.low >>> 0, message.notifiedInstanceCount.high >>> 0).toNumber() : message.notifiedInstanceCount; + if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) + if (typeof message.startedInstanceCount === "number") + object.startedInstanceCount = options.longs === String ? String(message.startedInstanceCount) : message.startedInstanceCount; + else + object.startedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.startedInstanceCount) : options.longs === Number ? new $util.LongBits(message.startedInstanceCount.low >>> 0, message.startedInstanceCount.high >>> 0).toNumber() : message.startedInstanceCount; + if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) + if (typeof message.downloadingPatchesInstanceCount === "number") + object.downloadingPatchesInstanceCount = options.longs === String ? String(message.downloadingPatchesInstanceCount) : message.downloadingPatchesInstanceCount; + else + object.downloadingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.downloadingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.downloadingPatchesInstanceCount.low >>> 0, message.downloadingPatchesInstanceCount.high >>> 0).toNumber() : message.downloadingPatchesInstanceCount; + if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) + if (typeof message.applyingPatchesInstanceCount === "number") + object.applyingPatchesInstanceCount = options.longs === String ? String(message.applyingPatchesInstanceCount) : message.applyingPatchesInstanceCount; + else + object.applyingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.applyingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.applyingPatchesInstanceCount.low >>> 0, message.applyingPatchesInstanceCount.high >>> 0).toNumber() : message.applyingPatchesInstanceCount; + if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) + if (typeof message.rebootingInstanceCount === "number") + object.rebootingInstanceCount = options.longs === String ? String(message.rebootingInstanceCount) : message.rebootingInstanceCount; + else + object.rebootingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.rebootingInstanceCount) : options.longs === Number ? new $util.LongBits(message.rebootingInstanceCount.low >>> 0, message.rebootingInstanceCount.high >>> 0).toNumber() : message.rebootingInstanceCount; + if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) + if (typeof message.succeededInstanceCount === "number") + object.succeededInstanceCount = options.longs === String ? String(message.succeededInstanceCount) : message.succeededInstanceCount; + else + object.succeededInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededInstanceCount.low >>> 0, message.succeededInstanceCount.high >>> 0).toNumber() : message.succeededInstanceCount; + if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) + if (typeof message.succeededRebootRequiredInstanceCount === "number") + object.succeededRebootRequiredInstanceCount = options.longs === String ? String(message.succeededRebootRequiredInstanceCount) : message.succeededRebootRequiredInstanceCount; + else + object.succeededRebootRequiredInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededRebootRequiredInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededRebootRequiredInstanceCount.low >>> 0, message.succeededRebootRequiredInstanceCount.high >>> 0).toNumber() : message.succeededRebootRequiredInstanceCount; + if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) + if (typeof message.failedInstanceCount === "number") + object.failedInstanceCount = options.longs === String ? String(message.failedInstanceCount) : message.failedInstanceCount; + else + object.failedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedInstanceCount) : options.longs === Number ? new $util.LongBits(message.failedInstanceCount.low >>> 0, message.failedInstanceCount.high >>> 0).toNumber() : message.failedInstanceCount; + if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) + if (typeof message.ackedInstanceCount === "number") + object.ackedInstanceCount = options.longs === String ? String(message.ackedInstanceCount) : message.ackedInstanceCount; + else + object.ackedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.ackedInstanceCount) : options.longs === Number ? new $util.LongBits(message.ackedInstanceCount.low >>> 0, message.ackedInstanceCount.high >>> 0).toNumber() : message.ackedInstanceCount; + if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) + if (typeof message.timedOutInstanceCount === "number") + object.timedOutInstanceCount = options.longs === String ? String(message.timedOutInstanceCount) : message.timedOutInstanceCount; + else + object.timedOutInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.timedOutInstanceCount) : options.longs === Number ? new $util.LongBits(message.timedOutInstanceCount.low >>> 0, message.timedOutInstanceCount.high >>> 0).toNumber() : message.timedOutInstanceCount; + if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) + if (typeof message.prePatchStepInstanceCount === "number") + object.prePatchStepInstanceCount = options.longs === String ? String(message.prePatchStepInstanceCount) : message.prePatchStepInstanceCount; + else + object.prePatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.prePatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.prePatchStepInstanceCount.low >>> 0, message.prePatchStepInstanceCount.high >>> 0).toNumber() : message.prePatchStepInstanceCount; + if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) + if (typeof message.postPatchStepInstanceCount === "number") + object.postPatchStepInstanceCount = options.longs === String ? String(message.postPatchStepInstanceCount) : message.postPatchStepInstanceCount; + else + object.postPatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.postPatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.postPatchStepInstanceCount.low >>> 0, message.postPatchStepInstanceCount.high >>> 0).toNumber() : message.postPatchStepInstanceCount; + if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) + if (typeof message.noAgentDetectedInstanceCount === "number") + object.noAgentDetectedInstanceCount = options.longs === String ? String(message.noAgentDetectedInstanceCount) : message.noAgentDetectedInstanceCount; + else + object.noAgentDetectedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.noAgentDetectedInstanceCount) : options.longs === Number ? new $util.LongBits(message.noAgentDetectedInstanceCount.low >>> 0, message.noAgentDetectedInstanceCount.high >>> 0).toNumber() : message.noAgentDetectedInstanceCount; return object; }; /** - * Converts this WindowsApplication to JSON. + * Converts this InstanceDetailsSummary to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary * @instance * @returns {Object.} JSON object */ - WindowsApplication.prototype.toJSON = function toJSON() { + InstanceDetailsSummary.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WindowsApplication; + return InstanceDetailsSummary; })(); - return Inventory; + /** + * State enum. + * @name google.cloud.osconfig.v1.PatchJob.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTED=1 STARTED value + * @property {number} INSTANCE_LOOKUP=2 INSTANCE_LOOKUP value + * @property {number} PATCHING=3 PATCHING value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} COMPLETED_WITH_ERRORS=5 COMPLETED_WITH_ERRORS value + * @property {number} CANCELED=6 CANCELED value + * @property {number} TIMED_OUT=7 TIMED_OUT value + */ + PatchJob.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STARTED"] = 1; + values[valuesById[2] = "INSTANCE_LOOKUP"] = 2; + values[valuesById[3] = "PATCHING"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "COMPLETED_WITH_ERRORS"] = 5; + values[valuesById[6] = "CANCELED"] = 6; + values[valuesById[7] = "TIMED_OUT"] = 7; + return values; + })(); + + return PatchJob; })(); - v1.FixedOrPercent = (function() { + v1.PatchConfig = (function() { /** - * Properties of a FixedOrPercent. + * Properties of a PatchConfig. * @memberof google.cloud.osconfig.v1 - * @interface IFixedOrPercent - * @property {number|null} [fixed] FixedOrPercent fixed - * @property {number|null} [percent] FixedOrPercent percent + * @interface IPatchConfig + * @property {google.cloud.osconfig.v1.PatchConfig.RebootConfig|null} [rebootConfig] PatchConfig rebootConfig + * @property {google.cloud.osconfig.v1.IAptSettings|null} [apt] PatchConfig apt + * @property {google.cloud.osconfig.v1.IYumSettings|null} [yum] PatchConfig yum + * @property {google.cloud.osconfig.v1.IGooSettings|null} [goo] PatchConfig goo + * @property {google.cloud.osconfig.v1.IZypperSettings|null} [zypper] PatchConfig zypper + * @property {google.cloud.osconfig.v1.IWindowsUpdateSettings|null} [windowsUpdate] PatchConfig windowsUpdate + * @property {google.cloud.osconfig.v1.IExecStep|null} [preStep] PatchConfig preStep + * @property {google.cloud.osconfig.v1.IExecStep|null} [postStep] PatchConfig postStep */ /** - * Constructs a new FixedOrPercent. + * Constructs a new PatchConfig. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a FixedOrPercent. - * @implements IFixedOrPercent + * @classdesc Represents a PatchConfig. + * @implements IPatchConfig * @constructor - * @param {google.cloud.osconfig.v1.IFixedOrPercent=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set */ - function FixedOrPercent(properties) { + function PatchConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13011,102 +10783,166 @@ } /** - * FixedOrPercent fixed. - * @member {number|null|undefined} fixed - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * PatchConfig rebootConfig. + * @member {google.cloud.osconfig.v1.PatchConfig.RebootConfig} rebootConfig + * @memberof google.cloud.osconfig.v1.PatchConfig * @instance */ - FixedOrPercent.prototype.fixed = null; + PatchConfig.prototype.rebootConfig = 0; /** - * FixedOrPercent percent. - * @member {number|null|undefined} percent - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * PatchConfig apt. + * @member {google.cloud.osconfig.v1.IAptSettings|null|undefined} apt + * @memberof google.cloud.osconfig.v1.PatchConfig * @instance */ - FixedOrPercent.prototype.percent = null; + PatchConfig.prototype.apt = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * PatchConfig yum. + * @member {google.cloud.osconfig.v1.IYumSettings|null|undefined} yum + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.yum = null; /** - * FixedOrPercent mode. - * @member {"fixed"|"percent"|undefined} mode - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * PatchConfig goo. + * @member {google.cloud.osconfig.v1.IGooSettings|null|undefined} goo + * @memberof google.cloud.osconfig.v1.PatchConfig * @instance */ - Object.defineProperty(FixedOrPercent.prototype, "mode", { - get: $util.oneOfGetter($oneOfFields = ["fixed", "percent"]), - set: $util.oneOfSetter($oneOfFields) - }); + PatchConfig.prototype.goo = null; /** - * Creates a new FixedOrPercent instance using the specified properties. + * PatchConfig zypper. + * @member {google.cloud.osconfig.v1.IZypperSettings|null|undefined} zypper + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.zypper = null; + + /** + * PatchConfig windowsUpdate. + * @member {google.cloud.osconfig.v1.IWindowsUpdateSettings|null|undefined} windowsUpdate + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.windowsUpdate = null; + + /** + * PatchConfig preStep. + * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} preStep + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.preStep = null; + + /** + * PatchConfig postStep. + * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} postStep + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.postStep = null; + + /** + * Creates a new PatchConfig instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @memberof google.cloud.osconfig.v1.PatchConfig * @static - * @param {google.cloud.osconfig.v1.IFixedOrPercent=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent instance + * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig instance */ - FixedOrPercent.create = function create(properties) { - return new FixedOrPercent(properties); + PatchConfig.create = function create(properties) { + return new PatchConfig(properties); }; /** - * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @memberof google.cloud.osconfig.v1.PatchConfig * @static - * @param {google.cloud.osconfig.v1.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FixedOrPercent.encode = function encode(message, writer) { + PatchConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fixed != null && Object.hasOwnProperty.call(message, "fixed")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fixed); - if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.percent); + if (message.rebootConfig != null && Object.hasOwnProperty.call(message, "rebootConfig")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rebootConfig); + if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) + $root.google.cloud.osconfig.v1.AptSettings.encode(message.apt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) + $root.google.cloud.osconfig.v1.YumSettings.encode(message.yum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.goo != null && Object.hasOwnProperty.call(message, "goo")) + $root.google.cloud.osconfig.v1.GooSettings.encode(message.goo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) + $root.google.cloud.osconfig.v1.ZypperSettings.encode(message.zypper, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.windowsUpdate != null && Object.hasOwnProperty.call(message, "windowsUpdate")) + $root.google.cloud.osconfig.v1.WindowsUpdateSettings.encode(message.windowsUpdate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.preStep != null && Object.hasOwnProperty.call(message, "preStep")) + $root.google.cloud.osconfig.v1.ExecStep.encode(message.preStep, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.postStep != null && Object.hasOwnProperty.call(message, "postStep")) + $root.google.cloud.osconfig.v1.ExecStep.encode(message.postStep, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.FixedOrPercent.verify|verify} messages. + * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @memberof google.cloud.osconfig.v1.PatchConfig * @static - * @param {google.cloud.osconfig.v1.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FixedOrPercent.encodeDelimited = function encodeDelimited(message, writer) { + PatchConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FixedOrPercent message from the specified reader or buffer. + * Decodes a PatchConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @memberof google.cloud.osconfig.v1.PatchConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FixedOrPercent.decode = function decode(reader, length) { + PatchConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.FixedOrPercent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.fixed = reader.int32(); + message.rebootConfig = reader.int32(); break; - case 2: - message.percent = reader.int32(); + case 3: + message.apt = $root.google.cloud.osconfig.v1.AptSettings.decode(reader, reader.uint32()); + break; + case 4: + message.yum = $root.google.cloud.osconfig.v1.YumSettings.decode(reader, reader.uint32()); + break; + case 5: + message.goo = $root.google.cloud.osconfig.v1.GooSettings.decode(reader, reader.uint32()); + break; + case 6: + message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.decode(reader, reader.uint32()); + break; + case 7: + message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.decode(reader, reader.uint32()); + break; + case 8: + message.preStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); + break; + case 9: + message.postStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -13117,467 +10953,633 @@ }; /** - * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. + * Decodes a PatchConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @memberof google.cloud.osconfig.v1.PatchConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FixedOrPercent.decodeDelimited = function decodeDelimited(reader) { + PatchConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FixedOrPercent message. + * Verifies a PatchConfig message. * @function verify - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @memberof google.cloud.osconfig.v1.PatchConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FixedOrPercent.verify = function verify(message) { + PatchConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.fixed != null && message.hasOwnProperty("fixed")) { - properties.mode = 1; - if (!$util.isInteger(message.fixed)) - return "fixed: integer expected"; + if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) + switch (message.rebootConfig) { + default: + return "rebootConfig: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.apt != null && message.hasOwnProperty("apt")) { + var error = $root.google.cloud.osconfig.v1.AptSettings.verify(message.apt); + if (error) + return "apt." + error; } - if (message.percent != null && message.hasOwnProperty("percent")) { - if (properties.mode === 1) - return "mode: multiple values"; - properties.mode = 1; - if (!$util.isInteger(message.percent)) - return "percent: integer expected"; + if (message.yum != null && message.hasOwnProperty("yum")) { + var error = $root.google.cloud.osconfig.v1.YumSettings.verify(message.yum); + if (error) + return "yum." + error; + } + if (message.goo != null && message.hasOwnProperty("goo")) { + var error = $root.google.cloud.osconfig.v1.GooSettings.verify(message.goo); + if (error) + return "goo." + error; + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + var error = $root.google.cloud.osconfig.v1.ZypperSettings.verify(message.zypper); + if (error) + return "zypper." + error; + } + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { + var error = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.verify(message.windowsUpdate); + if (error) + return "windowsUpdate." + error; + } + if (message.preStep != null && message.hasOwnProperty("preStep")) { + var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.preStep); + if (error) + return "preStep." + error; + } + if (message.postStep != null && message.hasOwnProperty("postStep")) { + var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.postStep); + if (error) + return "postStep." + error; } return null; }; /** - * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. + * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @memberof google.cloud.osconfig.v1.PatchConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.FixedOrPercent} FixedOrPercent + * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig */ - FixedOrPercent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.FixedOrPercent) + PatchConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchConfig) return object; - var message = new $root.google.cloud.osconfig.v1.FixedOrPercent(); - if (object.fixed != null) - message.fixed = object.fixed | 0; - if (object.percent != null) - message.percent = object.percent | 0; + var message = new $root.google.cloud.osconfig.v1.PatchConfig(); + switch (object.rebootConfig) { + case "REBOOT_CONFIG_UNSPECIFIED": + case 0: + message.rebootConfig = 0; + break; + case "DEFAULT": + case 1: + message.rebootConfig = 1; + break; + case "ALWAYS": + case 2: + message.rebootConfig = 2; + break; + case "NEVER": + case 3: + message.rebootConfig = 3; + break; + } + if (object.apt != null) { + if (typeof object.apt !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.apt: object expected"); + message.apt = $root.google.cloud.osconfig.v1.AptSettings.fromObject(object.apt); + } + if (object.yum != null) { + if (typeof object.yum !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.yum: object expected"); + message.yum = $root.google.cloud.osconfig.v1.YumSettings.fromObject(object.yum); + } + if (object.goo != null) { + if (typeof object.goo !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.goo: object expected"); + message.goo = $root.google.cloud.osconfig.v1.GooSettings.fromObject(object.goo); + } + if (object.zypper != null) { + if (typeof object.zypper !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.zypper: object expected"); + message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.fromObject(object.zypper); + } + if (object.windowsUpdate != null) { + if (typeof object.windowsUpdate !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.windowsUpdate: object expected"); + message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.fromObject(object.windowsUpdate); + } + if (object.preStep != null) { + if (typeof object.preStep !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.preStep: object expected"); + message.preStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.preStep); + } + if (object.postStep != null) { + if (typeof object.postStep !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchConfig.postStep: object expected"); + message.postStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.postStep); + } return message; }; /** - * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. + * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @memberof google.cloud.osconfig.v1.PatchConfig * @static - * @param {google.cloud.osconfig.v1.FixedOrPercent} message FixedOrPercent + * @param {google.cloud.osconfig.v1.PatchConfig} message PatchConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FixedOrPercent.toObject = function toObject(message, options) { + PatchConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.fixed != null && message.hasOwnProperty("fixed")) { - object.fixed = message.fixed; - if (options.oneofs) - object.mode = "fixed"; - } - if (message.percent != null && message.hasOwnProperty("percent")) { - object.percent = message.percent; - if (options.oneofs) - object.mode = "percent"; + if (options.defaults) { + object.rebootConfig = options.enums === String ? "REBOOT_CONFIG_UNSPECIFIED" : 0; + object.apt = null; + object.yum = null; + object.goo = null; + object.zypper = null; + object.windowsUpdate = null; + object.preStep = null; + object.postStep = null; } + if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) + object.rebootConfig = options.enums === String ? $root.google.cloud.osconfig.v1.PatchConfig.RebootConfig[message.rebootConfig] : message.rebootConfig; + if (message.apt != null && message.hasOwnProperty("apt")) + object.apt = $root.google.cloud.osconfig.v1.AptSettings.toObject(message.apt, options); + if (message.yum != null && message.hasOwnProperty("yum")) + object.yum = $root.google.cloud.osconfig.v1.YumSettings.toObject(message.yum, options); + if (message.goo != null && message.hasOwnProperty("goo")) + object.goo = $root.google.cloud.osconfig.v1.GooSettings.toObject(message.goo, options); + if (message.zypper != null && message.hasOwnProperty("zypper")) + object.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.toObject(message.zypper, options); + if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) + object.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.toObject(message.windowsUpdate, options); + if (message.preStep != null && message.hasOwnProperty("preStep")) + object.preStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.preStep, options); + if (message.postStep != null && message.hasOwnProperty("postStep")) + object.postStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.postStep, options); return object; }; /** - * Converts this FixedOrPercent to JSON. + * Converts this PatchConfig to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @memberof google.cloud.osconfig.v1.PatchConfig * @instance * @returns {Object.} JSON object */ - FixedOrPercent.prototype.toJSON = function toJSON() { + PatchConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FixedOrPercent; + /** + * RebootConfig enum. + * @name google.cloud.osconfig.v1.PatchConfig.RebootConfig + * @enum {number} + * @property {number} REBOOT_CONFIG_UNSPECIFIED=0 REBOOT_CONFIG_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} ALWAYS=2 ALWAYS value + * @property {number} NEVER=3 NEVER value + */ + PatchConfig.RebootConfig = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REBOOT_CONFIG_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "ALWAYS"] = 2; + values[valuesById[3] = "NEVER"] = 3; + return values; + })(); + + return PatchConfig; })(); - v1.OsConfigService = (function() { + v1.Instance = (function() { /** - * Constructs a new OsConfigService service. + * Properties of an Instance. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an OsConfigService - * @extends $protobuf.rpc.Service + * @interface IInstance + */ + + /** + * Constructs a new Instance. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an Instance. + * @implements IInstance * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set */ - function OsConfigService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function Instance(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (OsConfigService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsConfigService; - /** - * Creates new OsConfigService service using the specified rpc implementation. + * Creates a new Instance instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.OsConfigService + * @memberof google.cloud.osconfig.v1.Instance * @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 {OsConfigService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.Instance} Instance instance */ - OsConfigService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + Instance.create = function create(properties) { + return new Instance(properties); }; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef ExecutePatchJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + Instance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Calls ExecutePatchJob. - * @function executePatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.ExecutePatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob - * @returns {undefined} - * @variation 1 + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(OsConfigService.prototype.executePatchJob = function executePatchJob(request, callback) { - return this.rpcCall(executePatchJob, $root.google.cloud.osconfig.v1.ExecutePatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); - }, "name", { value: "ExecutePatchJob" }); + Instance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ExecutePatchJob. - * @function executePatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} request ExecutePatchJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an Instance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + Instance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Instance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef GetPatchJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + Instance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetPatchJob. - * @function getPatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob - * @returns {undefined} - * @variation 1 + * Verifies an Instance message. + * @function verify + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(OsConfigService.prototype.getPatchJob = function getPatchJob(request, callback) { - return this.rpcCall(getPatchJob, $root.google.cloud.osconfig.v1.GetPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); - }, "name", { value: "GetPatchJob" }); + Instance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * Calls GetPatchJob. - * @function getPatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} request GetPatchJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.Instance} Instance */ + Instance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.Instance) + return object; + return new $root.google.cloud.osconfig.v1.Instance(); + }; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef CancelPatchJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchJob} [response] PatchJob + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {google.cloud.osconfig.v1.Instance} message Instance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + Instance.toObject = function toObject() { + return {}; + }; /** - * Calls CancelPatchJob. - * @function cancelPatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService + * Converts this Instance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.Instance * @instance - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.CancelPatchJobCallback} callback Node-style callback called with the error, if any, and PatchJob - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(OsConfigService.prototype.cancelPatchJob = function cancelPatchJob(request, callback) { - return this.rpcCall(cancelPatchJob, $root.google.cloud.osconfig.v1.CancelPatchJobRequest, $root.google.cloud.osconfig.v1.PatchJob, request, callback); - }, "name", { value: "CancelPatchJob" }); + Instance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls CancelPatchJob. - * @function cancelPatchJob - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} request CancelPatchJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * PatchState enum. + * @name google.cloud.osconfig.v1.Instance.PatchState + * @enum {number} + * @property {number} PATCH_STATE_UNSPECIFIED=0 PATCH_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} INACTIVE=2 INACTIVE value + * @property {number} NOTIFIED=3 NOTIFIED value + * @property {number} STARTED=4 STARTED value + * @property {number} DOWNLOADING_PATCHES=5 DOWNLOADING_PATCHES value + * @property {number} APPLYING_PATCHES=6 APPLYING_PATCHES value + * @property {number} REBOOTING=7 REBOOTING value + * @property {number} SUCCEEDED=8 SUCCEEDED value + * @property {number} SUCCEEDED_REBOOT_REQUIRED=9 SUCCEEDED_REBOOT_REQUIRED value + * @property {number} FAILED=10 FAILED value + * @property {number} ACKED=11 ACKED value + * @property {number} TIMED_OUT=12 TIMED_OUT value + * @property {number} RUNNING_PRE_PATCH_STEP=13 RUNNING_PRE_PATCH_STEP value + * @property {number} RUNNING_POST_PATCH_STEP=14 RUNNING_POST_PATCH_STEP value + * @property {number} NO_AGENT_DETECTED=15 NO_AGENT_DETECTED value */ + Instance.PatchState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PATCH_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + values[valuesById[3] = "NOTIFIED"] = 3; + values[valuesById[4] = "STARTED"] = 4; + values[valuesById[5] = "DOWNLOADING_PATCHES"] = 5; + values[valuesById[6] = "APPLYING_PATCHES"] = 6; + values[valuesById[7] = "REBOOTING"] = 7; + values[valuesById[8] = "SUCCEEDED"] = 8; + values[valuesById[9] = "SUCCEEDED_REBOOT_REQUIRED"] = 9; + values[valuesById[10] = "FAILED"] = 10; + values[valuesById[11] = "ACKED"] = 11; + values[valuesById[12] = "TIMED_OUT"] = 12; + values[valuesById[13] = "RUNNING_PRE_PATCH_STEP"] = 13; + values[valuesById[14] = "RUNNING_POST_PATCH_STEP"] = 14; + values[valuesById[15] = "NO_AGENT_DETECTED"] = 15; + return values; + })(); + + return Instance; + })(); + + v1.CancelPatchJobRequest = (function() { /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef ListPatchJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} [response] ListPatchJobsResponse + * Properties of a CancelPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @interface ICancelPatchJobRequest + * @property {string|null} [name] CancelPatchJobRequest name */ /** - * Calls ListPatchJobs. - * @function listPatchJobs - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobsCallback} callback Node-style callback called with the error, if any, and ListPatchJobsResponse - * @returns {undefined} - * @variation 1 + * Constructs a new CancelPatchJobRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a CancelPatchJobRequest. + * @implements ICancelPatchJobRequest + * @constructor + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set */ - Object.defineProperty(OsConfigService.prototype.listPatchJobs = function listPatchJobs(request, callback) { - return this.rpcCall(listPatchJobs, $root.google.cloud.osconfig.v1.ListPatchJobsRequest, $root.google.cloud.osconfig.v1.ListPatchJobsResponse, request, callback); - }, "name", { value: "ListPatchJobs" }); + function CancelPatchJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListPatchJobs. - * @function listPatchJobs - * @memberof google.cloud.osconfig.v1.OsConfigService + * CancelPatchJobRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest * @instance - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} request ListPatchJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CancelPatchJobRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef ListPatchJobInstanceDetailsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} [response] ListPatchJobInstanceDetailsResponse + * Creates a new CancelPatchJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest instance */ + CancelPatchJobRequest.create = function create(properties) { + return new CancelPatchJobRequest(properties); + }; /** - * Calls ListPatchJobInstanceDetails. - * @function listPatchJobInstanceDetails - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetailsCallback} callback Node-style callback called with the error, if any, and ListPatchJobInstanceDetailsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(OsConfigService.prototype.listPatchJobInstanceDetails = function listPatchJobInstanceDetails(request, callback) { - return this.rpcCall(listPatchJobInstanceDetails, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest, $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse, request, callback); - }, "name", { value: "ListPatchJobInstanceDetails" }); + CancelPatchJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Calls ListPatchJobInstanceDetails. - * @function listPatchJobInstanceDetails - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} request ListPatchJobInstanceDetailsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CancelPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef CreatePatchDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + * Decodes a CancelPatchJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CancelPatchJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls CreatePatchDeployment. - * @function createPatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.CreatePatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment - * @returns {undefined} - * @variation 1 + * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(OsConfigService.prototype.createPatchDeployment = function createPatchDeployment(request, callback) { - return this.rpcCall(createPatchDeployment, $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); - }, "name", { value: "CreatePatchDeployment" }); + CancelPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreatePatchDeployment. - * @function createPatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} request CreatePatchDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a CancelPatchJobRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + CancelPatchJobRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef GetPatchDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment - */ - - /** - * Calls GetPatchDeployment. - * @function getPatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.GetPatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.getPatchDeployment = function getPatchDeployment(request, callback) { - return this.rpcCall(getPatchDeployment, $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); - }, "name", { value: "GetPatchDeployment" }); - - /** - * Calls GetPatchDeployment. - * @function getPatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} request GetPatchDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef ListPatchDeploymentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} [response] ListPatchDeploymentsResponse - */ - - /** - * Calls ListPatchDeployments. - * @function listPatchDeployments - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.ListPatchDeploymentsCallback} callback Node-style callback called with the error, if any, and ListPatchDeploymentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigService.prototype.listPatchDeployments = function listPatchDeployments(request, callback) { - return this.rpcCall(listPatchDeployments, $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest, $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse, request, callback); - }, "name", { value: "ListPatchDeployments" }); - - /** - * Calls ListPatchDeployments. - * @function listPatchDeployments - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} request ListPatchDeploymentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. - * @memberof google.cloud.osconfig.v1.OsConfigService - * @typedef DeletePatchDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest */ + CancelPatchJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.CancelPatchJobRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Calls DeletePatchDeployment. - * @function deletePatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService - * @instance - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object - * @param {google.cloud.osconfig.v1.OsConfigService.DeletePatchDeploymentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {google.cloud.osconfig.v1.CancelPatchJobRequest} message CancelPatchJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(OsConfigService.prototype.deletePatchDeployment = function deletePatchDeployment(request, callback) { - return this.rpcCall(deletePatchDeployment, $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePatchDeployment" }); + CancelPatchJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls DeletePatchDeployment. - * @function deletePatchDeployment - * @memberof google.cloud.osconfig.v1.OsConfigService + * Converts this CancelPatchJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest * @instance - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} request DeletePatchDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + CancelPatchJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return OsConfigService; + return CancelPatchJobRequest; })(); - v1.PatchDeployment = (function() { + v1.AptSettings = (function() { /** - * Properties of a PatchDeployment. + * Properties of an AptSettings. * @memberof google.cloud.osconfig.v1 - * @interface IPatchDeployment - * @property {string|null} [name] PatchDeployment name - * @property {string|null} [description] PatchDeployment description - * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchDeployment instanceFilter - * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchDeployment patchConfig - * @property {google.protobuf.IDuration|null} [duration] PatchDeployment duration - * @property {google.cloud.osconfig.v1.IOneTimeSchedule|null} [oneTimeSchedule] PatchDeployment oneTimeSchedule - * @property {google.cloud.osconfig.v1.IRecurringSchedule|null} [recurringSchedule] PatchDeployment recurringSchedule - * @property {google.protobuf.ITimestamp|null} [createTime] PatchDeployment createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PatchDeployment updateTime - * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] PatchDeployment lastExecuteTime - * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] PatchDeployment rollout + * @interface IAptSettings + * @property {google.cloud.osconfig.v1.AptSettings.Type|null} [type] AptSettings type + * @property {Array.|null} [excludes] AptSettings excludes + * @property {Array.|null} [exclusivePackages] AptSettings exclusivePackages */ /** - * Constructs a new PatchDeployment. + * Constructs a new AptSettings. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchDeployment. - * @implements IPatchDeployment + * @classdesc Represents an AptSettings. + * @implements IAptSettings * @constructor - * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set */ - function PatchDeployment(properties) { + function AptSettings(properties) { + this.excludes = []; + this.exclusivePackages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13585,219 +11587,107 @@ } /** - * PatchDeployment name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.name = ""; - - /** - * PatchDeployment description. - * @member {string} description - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.description = ""; - - /** - * PatchDeployment instanceFilter. - * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.instanceFilter = null; - - /** - * PatchDeployment patchConfig. - * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.patchConfig = null; - - /** - * PatchDeployment duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.duration = null; - - /** - * PatchDeployment oneTimeSchedule. - * @member {google.cloud.osconfig.v1.IOneTimeSchedule|null|undefined} oneTimeSchedule - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.oneTimeSchedule = null; - - /** - * PatchDeployment recurringSchedule. - * @member {google.cloud.osconfig.v1.IRecurringSchedule|null|undefined} recurringSchedule - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.recurringSchedule = null; - - /** - * PatchDeployment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.createTime = null; - - /** - * PatchDeployment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.osconfig.v1.PatchDeployment - * @instance - */ - PatchDeployment.prototype.updateTime = null; - - /** - * PatchDeployment lastExecuteTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime - * @memberof google.cloud.osconfig.v1.PatchDeployment + * AptSettings type. + * @member {google.cloud.osconfig.v1.AptSettings.Type} type + * @memberof google.cloud.osconfig.v1.AptSettings * @instance */ - PatchDeployment.prototype.lastExecuteTime = null; + AptSettings.prototype.type = 0; /** - * PatchDeployment rollout. - * @member {google.cloud.osconfig.v1.IPatchRollout|null|undefined} rollout - * @memberof google.cloud.osconfig.v1.PatchDeployment + * AptSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.AptSettings * @instance */ - PatchDeployment.prototype.rollout = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + AptSettings.prototype.excludes = $util.emptyArray; /** - * PatchDeployment schedule. - * @member {"oneTimeSchedule"|"recurringSchedule"|undefined} schedule - * @memberof google.cloud.osconfig.v1.PatchDeployment + * AptSettings exclusivePackages. + * @member {Array.} exclusivePackages + * @memberof google.cloud.osconfig.v1.AptSettings * @instance */ - Object.defineProperty(PatchDeployment.prototype, "schedule", { - get: $util.oneOfGetter($oneOfFields = ["oneTimeSchedule", "recurringSchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); + AptSettings.prototype.exclusivePackages = $util.emptyArray; /** - * Creates a new PatchDeployment instance using the specified properties. + * Creates a new AptSettings instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.PatchDeployment + * @memberof google.cloud.osconfig.v1.AptSettings * @static - * @param {google.cloud.osconfig.v1.IPatchDeployment=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment instance + * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings instance */ - PatchDeployment.create = function create(properties) { - return new PatchDeployment(properties); + AptSettings.create = function create(properties) { + return new AptSettings(properties); }; /** - * Encodes the specified PatchDeployment message. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.PatchDeployment + * @memberof google.cloud.osconfig.v1.AptSettings * @static - * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode + * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PatchDeployment.encode = function encode(message, writer) { + AptSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) - $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) - $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.oneTimeSchedule != null && Object.hasOwnProperty.call(message, "oneTimeSchedule")) - $root.google.cloud.osconfig.v1.OneTimeSchedule.encode(message.oneTimeSchedule, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.recurringSchedule != null && Object.hasOwnProperty.call(message, "recurringSchedule")) - $root.google.cloud.osconfig.v1.RecurringSchedule.encode(message.recurringSchedule, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) - $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); + if (message.exclusivePackages != null && message.exclusivePackages.length) + for (var i = 0; i < message.exclusivePackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePackages[i]); return writer; }; /** - * Encodes the specified PatchDeployment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchDeployment.verify|verify} messages. + * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchDeployment + * @memberof google.cloud.osconfig.v1.AptSettings * @static - * @param {google.cloud.osconfig.v1.IPatchDeployment} message PatchDeployment message or plain object to encode + * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PatchDeployment.encodeDelimited = function encodeDelimited(message, writer) { + AptSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PatchDeployment message from the specified reader or buffer. + * Decodes an AptSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.PatchDeployment + * @memberof google.cloud.osconfig.v1.AptSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PatchDeployment.decode = function decode(reader, length) { + AptSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchDeployment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.AptSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.type = reader.int32(); break; case 2: - message.description = reader.string(); + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); break; case 3: - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); - break; - case 4: - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); - break; - case 5: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.decode(reader, reader.uint32()); - break; - case 7: - message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.decode(reader, reader.uint32()); - break; - case 8: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + if (!(message.exclusivePackages && message.exclusivePackages.length)) + message.exclusivePackages = []; + message.exclusivePackages.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -13808,246 +11698,188 @@ }; /** - * Decodes a PatchDeployment message from the specified reader or buffer, length delimited. + * Decodes an AptSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchDeployment + * @memberof google.cloud.osconfig.v1.AptSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PatchDeployment.decodeDelimited = function decodeDelimited(reader) { + AptSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PatchDeployment message. + * Verifies an AptSettings message. * @function verify - * @memberof google.cloud.osconfig.v1.PatchDeployment + * @memberof google.cloud.osconfig.v1.AptSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PatchDeployment.verify = function verify(message) { + AptSettings.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { - var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); - if (error) - return "instanceFilter." + error; - } - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { - var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); - if (error) - return "patchConfig." + error; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { - properties.schedule = 1; - { - var error = $root.google.cloud.osconfig.v1.OneTimeSchedule.verify(message.oneTimeSchedule); - if (error) - return "oneTimeSchedule." + error; - } - } - if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { - if (properties.schedule === 1) - return "schedule: multiple values"; - properties.schedule = 1; - { - var error = $root.google.cloud.osconfig.v1.RecurringSchedule.verify(message.recurringSchedule); - if (error) - return "recurringSchedule." + error; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: 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.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); - if (error) - return "lastExecuteTime." + error; - } - if (message.rollout != null && message.hasOwnProperty("rollout")) { - var error = $root.google.cloud.osconfig.v1.PatchRollout.verify(message.rollout); - if (error) - return "rollout." + error; + if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { + if (!Array.isArray(message.exclusivePackages)) + return "exclusivePackages: array expected"; + for (var i = 0; i < message.exclusivePackages.length; ++i) + if (!$util.isString(message.exclusivePackages[i])) + return "exclusivePackages: string[] expected"; } return null; }; /** - * Creates a PatchDeployment message from a plain object. Also converts values to their respective internal types. + * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchDeployment + * @memberof google.cloud.osconfig.v1.AptSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchDeployment} PatchDeployment + * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings */ - PatchDeployment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchDeployment) + AptSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.AptSettings) return object; - var message = new $root.google.cloud.osconfig.v1.PatchDeployment(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.instanceFilter != null) { - if (typeof object.instanceFilter !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.instanceFilter: object expected"); - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); - } - if (object.patchConfig != null) { - if (typeof object.patchConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.patchConfig: object expected"); - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.oneTimeSchedule != null) { - if (typeof object.oneTimeSchedule !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.oneTimeSchedule: object expected"); - message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.fromObject(object.oneTimeSchedule); + var message = new $root.google.cloud.osconfig.v1.AptSettings(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DIST": + case 1: + message.type = 1; + break; + case "UPGRADE": + case 2: + message.type = 2; + break; } - if (object.recurringSchedule != null) { - if (typeof object.recurringSchedule !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.recurringSchedule: object expected"); - message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.fromObject(object.recurringSchedule); + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.AptSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.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.osconfig.v1.PatchDeployment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastExecuteTime != null) { - if (typeof object.lastExecuteTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.lastExecuteTime: object expected"); - message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); - } - if (object.rollout != null) { - if (typeof object.rollout !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.rollout: object expected"); - message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); + if (object.exclusivePackages) { + if (!Array.isArray(object.exclusivePackages)) + throw TypeError(".google.cloud.osconfig.v1.AptSettings.exclusivePackages: array expected"); + message.exclusivePackages = []; + for (var i = 0; i < object.exclusivePackages.length; ++i) + message.exclusivePackages[i] = String(object.exclusivePackages[i]); } return message; }; /** - * Creates a plain object from a PatchDeployment message. Also converts values to other types if specified. + * Creates a plain object from an AptSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.PatchDeployment + * @memberof google.cloud.osconfig.v1.AptSettings * @static - * @param {google.cloud.osconfig.v1.PatchDeployment} message PatchDeployment + * @param {google.cloud.osconfig.v1.AptSettings} message AptSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PatchDeployment.toObject = function toObject(message, options) { + AptSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.instanceFilter = null; - object.patchConfig = null; - object.duration = null; - object.createTime = null; - object.updateTime = null; - object.lastExecuteTime = null; - object.rollout = null; + if (options.arrays || options.defaults) { + object.excludes = []; + object.exclusivePackages = []; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) - object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) - object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.oneTimeSchedule != null && message.hasOwnProperty("oneTimeSchedule")) { - object.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.toObject(message.oneTimeSchedule, options); - if (options.oneofs) - object.schedule = "oneTimeSchedule"; + if (options.defaults) + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1.AptSettings.Type[message.type] : message.type; + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; } - if (message.recurringSchedule != null && message.hasOwnProperty("recurringSchedule")) { - object.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.toObject(message.recurringSchedule, options); - if (options.oneofs) - object.schedule = "recurringSchedule"; + if (message.exclusivePackages && message.exclusivePackages.length) { + object.exclusivePackages = []; + for (var j = 0; j < message.exclusivePackages.length; ++j) + object.exclusivePackages[j] = message.exclusivePackages[j]; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) - object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); return object; }; /** - * Converts this PatchDeployment to JSON. + * Converts this AptSettings to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchDeployment + * @memberof google.cloud.osconfig.v1.AptSettings * @instance * @returns {Object.} JSON object */ - PatchDeployment.prototype.toJSON = function toJSON() { + AptSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PatchDeployment; + /** + * Type enum. + * @name google.cloud.osconfig.v1.AptSettings.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} DIST=1 DIST value + * @property {number} UPGRADE=2 UPGRADE value + */ + AptSettings.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIST"] = 1; + values[valuesById[2] = "UPGRADE"] = 2; + return values; + })(); + + return AptSettings; })(); - v1.OneTimeSchedule = (function() { + v1.YumSettings = (function() { /** - * Properties of an OneTimeSchedule. + * Properties of a YumSettings. * @memberof google.cloud.osconfig.v1 - * @interface IOneTimeSchedule - * @property {google.protobuf.ITimestamp|null} [executeTime] OneTimeSchedule executeTime + * @interface IYumSettings + * @property {boolean|null} [security] YumSettings security + * @property {boolean|null} [minimal] YumSettings minimal + * @property {Array.|null} [excludes] YumSettings excludes + * @property {Array.|null} [exclusivePackages] YumSettings exclusivePackages */ /** - * Constructs a new OneTimeSchedule. + * Constructs a new YumSettings. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an OneTimeSchedule. - * @implements IOneTimeSchedule + * @classdesc Represents a YumSettings. + * @implements IYumSettings * @constructor - * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set */ - function OneTimeSchedule(properties) { + function YumSettings(properties) { + this.excludes = []; + this.exclusivePackages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14055,75 +11887,120 @@ } /** - * OneTimeSchedule executeTime. - * @member {google.protobuf.ITimestamp|null|undefined} executeTime - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * YumSettings security. + * @member {boolean} security + * @memberof google.cloud.osconfig.v1.YumSettings * @instance */ - OneTimeSchedule.prototype.executeTime = null; + YumSettings.prototype.security = false; /** - * Creates a new OneTimeSchedule instance using the specified properties. + * YumSettings minimal. + * @member {boolean} minimal + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.minimal = false; + + /** + * YumSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.excludes = $util.emptyArray; + + /** + * YumSettings exclusivePackages. + * @member {Array.} exclusivePackages + * @memberof google.cloud.osconfig.v1.YumSettings + * @instance + */ + YumSettings.prototype.exclusivePackages = $util.emptyArray; + + /** + * Creates a new YumSettings instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @memberof google.cloud.osconfig.v1.YumSettings * @static - * @param {google.cloud.osconfig.v1.IOneTimeSchedule=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule instance + * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings instance */ - OneTimeSchedule.create = function create(properties) { - return new OneTimeSchedule(properties); + YumSettings.create = function create(properties) { + return new YumSettings(properties); }; /** - * Encodes the specified OneTimeSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @memberof google.cloud.osconfig.v1.YumSettings * @static - * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode + * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneTimeSchedule.encode = function encode(message, writer) { + YumSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.executeTime != null && Object.hasOwnProperty.call(message, "executeTime")) - $root.google.protobuf.Timestamp.encode(message.executeTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.security != null && Object.hasOwnProperty.call(message, "security")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.security); + if (message.minimal != null && Object.hasOwnProperty.call(message, "minimal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.minimal); + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludes[i]); + if (message.exclusivePackages != null && message.exclusivePackages.length) + for (var i = 0; i < message.exclusivePackages.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.exclusivePackages[i]); return writer; }; /** - * Encodes the specified OneTimeSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OneTimeSchedule.verify|verify} messages. + * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @memberof google.cloud.osconfig.v1.YumSettings * @static - * @param {google.cloud.osconfig.v1.IOneTimeSchedule} message OneTimeSchedule message or plain object to encode + * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneTimeSchedule.encodeDelimited = function encodeDelimited(message, writer) { + YumSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneTimeSchedule message from the specified reader or buffer. + * Decodes a YumSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @memberof google.cloud.osconfig.v1.YumSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneTimeSchedule.decode = function decode(reader, length) { + YumSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.YumSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.executeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.security = reader.bool(); + break; + case 2: + message.minimal = reader.bool(); + break; + case 3: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 4: + if (!(message.exclusivePackages && message.exclusivePackages.length)) + message.exclusivePackages = []; + message.exclusivePackages.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -14134,120 +12011,157 @@ }; /** - * Decodes an OneTimeSchedule message from the specified reader or buffer, length delimited. + * Decodes a YumSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @memberof google.cloud.osconfig.v1.YumSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneTimeSchedule.decodeDelimited = function decodeDelimited(reader) { + YumSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneTimeSchedule message. + * Verifies a YumSettings message. * @function verify - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @memberof google.cloud.osconfig.v1.YumSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OneTimeSchedule.verify = function verify(message) { + YumSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.executeTime != null && message.hasOwnProperty("executeTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.executeTime); - if (error) - return "executeTime." + error; + if (message.security != null && message.hasOwnProperty("security")) + if (typeof message.security !== "boolean") + return "security: boolean expected"; + if (message.minimal != null && message.hasOwnProperty("minimal")) + if (typeof message.minimal !== "boolean") + return "minimal: boolean expected"; + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { + if (!Array.isArray(message.exclusivePackages)) + return "exclusivePackages: array expected"; + for (var i = 0; i < message.exclusivePackages.length; ++i) + if (!$util.isString(message.exclusivePackages[i])) + return "exclusivePackages: string[] expected"; } return null; }; /** - * Creates an OneTimeSchedule message from a plain object. Also converts values to their respective internal types. + * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @memberof google.cloud.osconfig.v1.YumSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.OneTimeSchedule} OneTimeSchedule + * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings */ - OneTimeSchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.OneTimeSchedule) + YumSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.YumSettings) return object; - var message = new $root.google.cloud.osconfig.v1.OneTimeSchedule(); - if (object.executeTime != null) { - if (typeof object.executeTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.OneTimeSchedule.executeTime: object expected"); - message.executeTime = $root.google.protobuf.Timestamp.fromObject(object.executeTime); + var message = new $root.google.cloud.osconfig.v1.YumSettings(); + if (object.security != null) + message.security = Boolean(object.security); + if (object.minimal != null) + message.minimal = Boolean(object.minimal); + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.YumSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePackages) { + if (!Array.isArray(object.exclusivePackages)) + throw TypeError(".google.cloud.osconfig.v1.YumSettings.exclusivePackages: array expected"); + message.exclusivePackages = []; + for (var i = 0; i < object.exclusivePackages.length; ++i) + message.exclusivePackages[i] = String(object.exclusivePackages[i]); } return message; }; /** - * Creates a plain object from an OneTimeSchedule message. Also converts values to other types if specified. + * Creates a plain object from a YumSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @memberof google.cloud.osconfig.v1.YumSettings * @static - * @param {google.cloud.osconfig.v1.OneTimeSchedule} message OneTimeSchedule + * @param {google.cloud.osconfig.v1.YumSettings} message YumSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneTimeSchedule.toObject = function toObject(message, options) { + YumSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.executeTime = null; - if (message.executeTime != null && message.hasOwnProperty("executeTime")) - object.executeTime = $root.google.protobuf.Timestamp.toObject(message.executeTime, options); + if (options.arrays || options.defaults) { + object.excludes = []; + object.exclusivePackages = []; + } + if (options.defaults) { + object.security = false; + object.minimal = false; + } + if (message.security != null && message.hasOwnProperty("security")) + object.security = message.security; + if (message.minimal != null && message.hasOwnProperty("minimal")) + object.minimal = message.minimal; + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePackages && message.exclusivePackages.length) { + object.exclusivePackages = []; + for (var j = 0; j < message.exclusivePackages.length; ++j) + object.exclusivePackages[j] = message.exclusivePackages[j]; + } return object; }; /** - * Converts this OneTimeSchedule to JSON. + * Converts this YumSettings to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @memberof google.cloud.osconfig.v1.YumSettings * @instance * @returns {Object.} JSON object */ - OneTimeSchedule.prototype.toJSON = function toJSON() { + YumSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OneTimeSchedule; + return YumSettings; })(); - v1.RecurringSchedule = (function() { + v1.GooSettings = (function() { /** - * Properties of a RecurringSchedule. + * Properties of a GooSettings. * @memberof google.cloud.osconfig.v1 - * @interface IRecurringSchedule - * @property {google.type.ITimeZone|null} [timeZone] RecurringSchedule timeZone - * @property {google.protobuf.ITimestamp|null} [startTime] RecurringSchedule startTime - * @property {google.protobuf.ITimestamp|null} [endTime] RecurringSchedule endTime - * @property {google.type.ITimeOfDay|null} [timeOfDay] RecurringSchedule timeOfDay - * @property {google.cloud.osconfig.v1.RecurringSchedule.Frequency|null} [frequency] RecurringSchedule frequency - * @property {google.cloud.osconfig.v1.IWeeklySchedule|null} [weekly] RecurringSchedule weekly - * @property {google.cloud.osconfig.v1.IMonthlySchedule|null} [monthly] RecurringSchedule monthly - * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] RecurringSchedule lastExecuteTime - * @property {google.protobuf.ITimestamp|null} [nextExecuteTime] RecurringSchedule nextExecuteTime + * @interface IGooSettings */ /** - * Constructs a new RecurringSchedule. + * Constructs a new GooSettings. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a RecurringSchedule. - * @implements IRecurringSchedule + * @classdesc Represents a GooSettings. + * @implements IGooSettings * @constructor - * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set */ - function RecurringSchedule(properties) { + function GooSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14255,196 +12169,65 @@ } /** - * RecurringSchedule timeZone. - * @member {google.type.ITimeZone|null|undefined} timeZone - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.timeZone = null; - - /** - * RecurringSchedule startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.startTime = null; - - /** - * RecurringSchedule endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.endTime = null; - - /** - * RecurringSchedule timeOfDay. - * @member {google.type.ITimeOfDay|null|undefined} timeOfDay - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.timeOfDay = null; - - /** - * RecurringSchedule frequency. - * @member {google.cloud.osconfig.v1.RecurringSchedule.Frequency} frequency - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.frequency = 0; - - /** - * RecurringSchedule weekly. - * @member {google.cloud.osconfig.v1.IWeeklySchedule|null|undefined} weekly - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.weekly = null; - - /** - * RecurringSchedule monthly. - * @member {google.cloud.osconfig.v1.IMonthlySchedule|null|undefined} monthly - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.monthly = null; - - /** - * RecurringSchedule lastExecuteTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastExecuteTime - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.lastExecuteTime = null; - - /** - * RecurringSchedule nextExecuteTime. - * @member {google.protobuf.ITimestamp|null|undefined} nextExecuteTime - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - RecurringSchedule.prototype.nextExecuteTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RecurringSchedule scheduleConfig. - * @member {"weekly"|"monthly"|undefined} scheduleConfig - * @memberof google.cloud.osconfig.v1.RecurringSchedule - * @instance - */ - Object.defineProperty(RecurringSchedule.prototype, "scheduleConfig", { - get: $util.oneOfGetter($oneOfFields = ["weekly", "monthly"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RecurringSchedule instance using the specified properties. + * Creates a new GooSettings instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @memberof google.cloud.osconfig.v1.GooSettings * @static - * @param {google.cloud.osconfig.v1.IRecurringSchedule=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule instance + * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings instance */ - RecurringSchedule.create = function create(properties) { - return new RecurringSchedule(properties); + GooSettings.create = function create(properties) { + return new GooSettings(properties); }; /** - * Encodes the specified RecurringSchedule message. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * Encodes the specified GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @memberof google.cloud.osconfig.v1.GooSettings * @static - * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode + * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecurringSchedule.encode = function encode(message, writer) { + GooSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.timeOfDay != null && Object.hasOwnProperty.call(message, "timeOfDay")) - $root.google.type.TimeOfDay.encode(message.timeOfDay, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frequency); - if (message.weekly != null && Object.hasOwnProperty.call(message, "weekly")) - $root.google.cloud.osconfig.v1.WeeklySchedule.encode(message.weekly, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.monthly != null && Object.hasOwnProperty.call(message, "monthly")) - $root.google.cloud.osconfig.v1.MonthlySchedule.encode(message.monthly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastExecuteTime != null && Object.hasOwnProperty.call(message, "lastExecuteTime")) - $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.nextExecuteTime != null && Object.hasOwnProperty.call(message, "nextExecuteTime")) - $root.google.protobuf.Timestamp.encode(message.nextExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified RecurringSchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.RecurringSchedule.verify|verify} messages. + * Encodes the specified GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @memberof google.cloud.osconfig.v1.GooSettings * @static - * @param {google.cloud.osconfig.v1.IRecurringSchedule} message RecurringSchedule message or plain object to encode + * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecurringSchedule.encodeDelimited = function encodeDelimited(message, writer) { + GooSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RecurringSchedule message from the specified reader or buffer. + * Decodes a GooSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @memberof google.cloud.osconfig.v1.GooSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RecurringSchedule.decode = function decode(reader, length) { + GooSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GooSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.timeOfDay = $root.google.type.TimeOfDay.decode(reader, reader.uint32()); - break; - case 5: - message.frequency = reader.int32(); - break; - case 6: - message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.decode(reader, reader.uint32()); - break; - case 7: - message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.decode(reader, reader.uint32()); - break; - case 9: - message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.nextExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + default: + reader.skipType(tag & 7); break; } } @@ -14452,259 +12235,103 @@ }; /** - * Decodes a RecurringSchedule message from the specified reader or buffer, length delimited. + * Decodes a GooSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @memberof google.cloud.osconfig.v1.GooSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RecurringSchedule.decodeDelimited = function decodeDelimited(reader) { + GooSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RecurringSchedule message. + * Verifies a GooSettings message. * @function verify - * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @memberof google.cloud.osconfig.v1.GooSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RecurringSchedule.verify = function verify(message) { + GooSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - var error = $root.google.type.TimeZone.verify(message.timeZone); - if (error) - return "timeZone." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) { - var error = $root.google.type.TimeOfDay.verify(message.timeOfDay); - if (error) - return "timeOfDay." + error; - } - if (message.frequency != null && message.hasOwnProperty("frequency")) - switch (message.frequency) { - default: - return "frequency: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.weekly != null && message.hasOwnProperty("weekly")) { - properties.scheduleConfig = 1; - { - var error = $root.google.cloud.osconfig.v1.WeeklySchedule.verify(message.weekly); - if (error) - return "weekly." + error; - } - } - if (message.monthly != null && message.hasOwnProperty("monthly")) { - if (properties.scheduleConfig === 1) - return "scheduleConfig: multiple values"; - properties.scheduleConfig = 1; - { - var error = $root.google.cloud.osconfig.v1.MonthlySchedule.verify(message.monthly); - if (error) - return "monthly." + error; - } - } - if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastExecuteTime); - if (error) - return "lastExecuteTime." + error; - } - if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.nextExecuteTime); - if (error) - return "nextExecuteTime." + error; - } return null; }; /** - * Creates a RecurringSchedule message from a plain object. Also converts values to their respective internal types. + * Creates a GooSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @memberof google.cloud.osconfig.v1.GooSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.RecurringSchedule} RecurringSchedule + * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings */ - RecurringSchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.RecurringSchedule) + GooSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GooSettings) return object; - var message = new $root.google.cloud.osconfig.v1.RecurringSchedule(); - if (object.timeZone != null) { - if (typeof object.timeZone !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeZone: object expected"); - message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.timeOfDay != null) { - if (typeof object.timeOfDay !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.timeOfDay: object expected"); - message.timeOfDay = $root.google.type.TimeOfDay.fromObject(object.timeOfDay); - } - switch (object.frequency) { - case "FREQUENCY_UNSPECIFIED": - case 0: - message.frequency = 0; - break; - case "WEEKLY": - case 1: - message.frequency = 1; - break; - case "MONTHLY": - case 2: - message.frequency = 2; - break; - } - if (object.weekly != null) { - if (typeof object.weekly !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.weekly: object expected"); - message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.fromObject(object.weekly); - } - if (object.monthly != null) { - if (typeof object.monthly !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.monthly: object expected"); - message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.fromObject(object.monthly); - } - if (object.lastExecuteTime != null) { - if (typeof object.lastExecuteTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.lastExecuteTime: object expected"); - message.lastExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.lastExecuteTime); - } - if (object.nextExecuteTime != null) { - if (typeof object.nextExecuteTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.RecurringSchedule.nextExecuteTime: object expected"); - message.nextExecuteTime = $root.google.protobuf.Timestamp.fromObject(object.nextExecuteTime); - } - return message; + return new $root.google.cloud.osconfig.v1.GooSettings(); }; /** - * Creates a plain object from a RecurringSchedule message. Also converts values to other types if specified. + * Creates a plain object from a GooSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @memberof google.cloud.osconfig.v1.GooSettings * @static - * @param {google.cloud.osconfig.v1.RecurringSchedule} message RecurringSchedule + * @param {google.cloud.osconfig.v1.GooSettings} message GooSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecurringSchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.timeZone = null; - object.startTime = null; - object.endTime = null; - object.timeOfDay = null; - object.frequency = options.enums === String ? "FREQUENCY_UNSPECIFIED" : 0; - object.lastExecuteTime = null; - object.nextExecuteTime = null; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) - object.timeOfDay = $root.google.type.TimeOfDay.toObject(message.timeOfDay, options); - if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = options.enums === String ? $root.google.cloud.osconfig.v1.RecurringSchedule.Frequency[message.frequency] : message.frequency; - if (message.weekly != null && message.hasOwnProperty("weekly")) { - object.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.toObject(message.weekly, options); - if (options.oneofs) - object.scheduleConfig = "weekly"; - } - if (message.monthly != null && message.hasOwnProperty("monthly")) { - object.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.toObject(message.monthly, options); - if (options.oneofs) - object.scheduleConfig = "monthly"; - } - if (message.lastExecuteTime != null && message.hasOwnProperty("lastExecuteTime")) - object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); - if (message.nextExecuteTime != null && message.hasOwnProperty("nextExecuteTime")) - object.nextExecuteTime = $root.google.protobuf.Timestamp.toObject(message.nextExecuteTime, options); - return object; + GooSettings.toObject = function toObject() { + return {}; }; /** - * Converts this RecurringSchedule to JSON. + * Converts this GooSettings to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @memberof google.cloud.osconfig.v1.GooSettings * @instance * @returns {Object.} JSON object */ - RecurringSchedule.prototype.toJSON = function toJSON() { + GooSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Frequency enum. - * @name google.cloud.osconfig.v1.RecurringSchedule.Frequency - * @enum {number} - * @property {number} FREQUENCY_UNSPECIFIED=0 FREQUENCY_UNSPECIFIED value - * @property {number} WEEKLY=1 WEEKLY value - * @property {number} MONTHLY=2 MONTHLY value - */ - RecurringSchedule.Frequency = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FREQUENCY_UNSPECIFIED"] = 0; - values[valuesById[1] = "WEEKLY"] = 1; - values[valuesById[2] = "MONTHLY"] = 2; - return values; - })(); - - return RecurringSchedule; + return GooSettings; })(); - v1.WeeklySchedule = (function() { + v1.ZypperSettings = (function() { /** - * Properties of a WeeklySchedule. + * Properties of a ZypperSettings. * @memberof google.cloud.osconfig.v1 - * @interface IWeeklySchedule - * @property {google.type.DayOfWeek|null} [dayOfWeek] WeeklySchedule dayOfWeek + * @interface IZypperSettings + * @property {boolean|null} [withOptional] ZypperSettings withOptional + * @property {boolean|null} [withUpdate] ZypperSettings withUpdate + * @property {Array.|null} [categories] ZypperSettings categories + * @property {Array.|null} [severities] ZypperSettings severities + * @property {Array.|null} [excludes] ZypperSettings excludes + * @property {Array.|null} [exclusivePatches] ZypperSettings exclusivePatches */ /** - * Constructs a new WeeklySchedule. + * Constructs a new ZypperSettings. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a WeeklySchedule. - * @implements IWeeklySchedule + * @classdesc Represents a ZypperSettings. + * @implements IZypperSettings * @constructor - * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set */ - function WeeklySchedule(properties) { + function ZypperSettings(properties) { + this.categories = []; + this.severities = []; + this.excludes = []; + this.exclusivePatches = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14712,75 +12339,152 @@ } /** - * WeeklySchedule dayOfWeek. - * @member {google.type.DayOfWeek} dayOfWeek - * @memberof google.cloud.osconfig.v1.WeeklySchedule + * ZypperSettings withOptional. + * @member {boolean} withOptional + * @memberof google.cloud.osconfig.v1.ZypperSettings * @instance */ - WeeklySchedule.prototype.dayOfWeek = 0; + ZypperSettings.prototype.withOptional = false; /** - * Creates a new WeeklySchedule instance using the specified properties. + * ZypperSettings withUpdate. + * @member {boolean} withUpdate + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.withUpdate = false; + + /** + * ZypperSettings categories. + * @member {Array.} categories + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.categories = $util.emptyArray; + + /** + * ZypperSettings severities. + * @member {Array.} severities + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.severities = $util.emptyArray; + + /** + * ZypperSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.excludes = $util.emptyArray; + + /** + * ZypperSettings exclusivePatches. + * @member {Array.} exclusivePatches + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @instance + */ + ZypperSettings.prototype.exclusivePatches = $util.emptyArray; + + /** + * Creates a new ZypperSettings instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @memberof google.cloud.osconfig.v1.ZypperSettings * @static - * @param {google.cloud.osconfig.v1.IWeeklySchedule=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule instance + * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings instance */ - WeeklySchedule.create = function create(properties) { - return new WeeklySchedule(properties); + ZypperSettings.create = function create(properties) { + return new ZypperSettings(properties); }; /** - * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @memberof google.cloud.osconfig.v1.ZypperSettings * @static - * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WeeklySchedule.encode = function encode(message, writer) { + ZypperSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dayOfWeek); + if (message.withOptional != null && Object.hasOwnProperty.call(message, "withOptional")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.withOptional); + if (message.withUpdate != null && Object.hasOwnProperty.call(message, "withUpdate")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.withUpdate); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.categories[i]); + if (message.severities != null && message.severities.length) + for (var i = 0; i < message.severities.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.severities[i]); + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.excludes[i]); + if (message.exclusivePatches != null && message.exclusivePatches.length) + for (var i = 0; i < message.exclusivePatches.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.exclusivePatches[i]); return writer; }; /** - * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeeklySchedule.verify|verify} messages. + * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @memberof google.cloud.osconfig.v1.ZypperSettings * @static - * @param {google.cloud.osconfig.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WeeklySchedule.encodeDelimited = function encodeDelimited(message, writer) { + ZypperSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WeeklySchedule message from the specified reader or buffer. + * Decodes a ZypperSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @memberof google.cloud.osconfig.v1.ZypperSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WeeklySchedule.decode = function decode(reader, length) { + ZypperSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ZypperSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.dayOfWeek = reader.int32(); + message.withOptional = reader.bool(); + break; + case 2: + message.withUpdate = reader.bool(); + break; + case 3: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push(reader.string()); + break; + case 4: + if (!(message.severities && message.severities.length)) + message.severities = []; + message.severities.push(reader.string()); + break; + case 5: + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 6: + if (!(message.exclusivePatches && message.exclusivePatches.length)) + message.exclusivePatches = []; + message.exclusivePatches.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -14791,151 +12495,203 @@ }; /** - * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @memberof google.cloud.osconfig.v1.ZypperSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WeeklySchedule.decodeDelimited = function decodeDelimited(reader) { + ZypperSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WeeklySchedule message. + * Verifies a ZypperSettings message. * @function verify - * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @memberof google.cloud.osconfig.v1.ZypperSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WeeklySchedule.verify = function verify(message) { + ZypperSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { - default: - return "dayOfWeek: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } + if (message.withOptional != null && message.hasOwnProperty("withOptional")) + if (typeof message.withOptional !== "boolean") + return "withOptional: boolean expected"; + if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) + if (typeof message.withUpdate !== "boolean") + return "withUpdate: boolean expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) + if (!$util.isString(message.categories[i])) + return "categories: string[] expected"; + } + if (message.severities != null && message.hasOwnProperty("severities")) { + if (!Array.isArray(message.severities)) + return "severities: array expected"; + for (var i = 0; i < message.severities.length; ++i) + if (!$util.isString(message.severities[i])) + return "severities: string[] expected"; + } + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { + if (!Array.isArray(message.exclusivePatches)) + return "exclusivePatches: array expected"; + for (var i = 0; i < message.exclusivePatches.length; ++i) + if (!$util.isString(message.exclusivePatches[i])) + return "exclusivePatches: string[] expected"; + } return null; }; /** - * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @memberof google.cloud.osconfig.v1.ZypperSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.WeeklySchedule} WeeklySchedule + * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings */ - WeeklySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.WeeklySchedule) + ZypperSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ZypperSettings) return object; - var message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); - switch (object.dayOfWeek) { - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.dayOfWeek = 0; - break; - case "MONDAY": - case 1: - message.dayOfWeek = 1; - break; - case "TUESDAY": - case 2: - message.dayOfWeek = 2; - break; - case "WEDNESDAY": - case 3: - message.dayOfWeek = 3; - break; - case "THURSDAY": - case 4: - message.dayOfWeek = 4; - break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; - break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; - break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; - break; + var message = new $root.google.cloud.osconfig.v1.ZypperSettings(); + if (object.withOptional != null) + message.withOptional = Boolean(object.withOptional); + if (object.withUpdate != null) + message.withUpdate = Boolean(object.withUpdate); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) + message.categories[i] = String(object.categories[i]); + } + if (object.severities) { + if (!Array.isArray(object.severities)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.severities: array expected"); + message.severities = []; + for (var i = 0; i < object.severities.length; ++i) + message.severities[i] = String(object.severities[i]); + } + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePatches) { + if (!Array.isArray(object.exclusivePatches)) + throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.exclusivePatches: array expected"); + message.exclusivePatches = []; + for (var i = 0; i < object.exclusivePatches.length; ++i) + message.exclusivePatches[i] = String(object.exclusivePatches[i]); + } + return message; + }; + + /** + * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {google.cloud.osconfig.v1.ZypperSettings} message ZypperSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ZypperSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.categories = []; + object.severities = []; + object.excludes = []; + object.exclusivePatches = []; + } + if (options.defaults) { + object.withOptional = false; + object.withUpdate = false; + } + if (message.withOptional != null && message.hasOwnProperty("withOptional")) + object.withOptional = message.withOptional; + if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) + object.withUpdate = message.withUpdate; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = message.categories[j]; + } + if (message.severities && message.severities.length) { + object.severities = []; + for (var j = 0; j < message.severities.length; ++j) + object.severities[j] = message.severities[j]; + } + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePatches && message.exclusivePatches.length) { + object.exclusivePatches = []; + for (var j = 0; j < message.exclusivePatches.length; ++j) + object.exclusivePatches[j] = message.exclusivePatches[j]; } - return message; - }; - - /** - * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.WeeklySchedule - * @static - * @param {google.cloud.osconfig.v1.WeeklySchedule} message WeeklySchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeeklySchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; return object; }; /** - * Converts this WeeklySchedule to JSON. + * Converts this ZypperSettings to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @memberof google.cloud.osconfig.v1.ZypperSettings * @instance * @returns {Object.} JSON object */ - WeeklySchedule.prototype.toJSON = function toJSON() { + ZypperSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WeeklySchedule; + return ZypperSettings; })(); - v1.MonthlySchedule = (function() { + v1.WindowsUpdateSettings = (function() { /** - * Properties of a MonthlySchedule. + * Properties of a WindowsUpdateSettings. * @memberof google.cloud.osconfig.v1 - * @interface IMonthlySchedule - * @property {google.cloud.osconfig.v1.IWeekDayOfMonth|null} [weekDayOfMonth] MonthlySchedule weekDayOfMonth - * @property {number|null} [monthDay] MonthlySchedule monthDay + * @interface IWindowsUpdateSettings + * @property {Array.|null} [classifications] WindowsUpdateSettings classifications + * @property {Array.|null} [excludes] WindowsUpdateSettings excludes + * @property {Array.|null} [exclusivePatches] WindowsUpdateSettings exclusivePatches */ /** - * Constructs a new MonthlySchedule. + * Constructs a new WindowsUpdateSettings. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a MonthlySchedule. - * @implements IMonthlySchedule + * @classdesc Represents a WindowsUpdateSettings. + * @implements IWindowsUpdateSettings * @constructor - * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set */ - function MonthlySchedule(properties) { + function WindowsUpdateSettings(properties) { + this.classifications = []; + this.excludes = []; + this.exclusivePatches = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14943,102 +12699,118 @@ } /** - * MonthlySchedule weekDayOfMonth. - * @member {google.cloud.osconfig.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * WindowsUpdateSettings classifications. + * @member {Array.} classifications + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @instance */ - MonthlySchedule.prototype.weekDayOfMonth = null; + WindowsUpdateSettings.prototype.classifications = $util.emptyArray; /** - * MonthlySchedule monthDay. - * @member {number|null|undefined} monthDay - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * WindowsUpdateSettings excludes. + * @member {Array.} excludes + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @instance */ - MonthlySchedule.prototype.monthDay = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + WindowsUpdateSettings.prototype.excludes = $util.emptyArray; /** - * MonthlySchedule dayOfMonth. - * @member {"weekDayOfMonth"|"monthDay"|undefined} dayOfMonth - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * WindowsUpdateSettings exclusivePatches. + * @member {Array.} exclusivePatches + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @instance */ - Object.defineProperty(MonthlySchedule.prototype, "dayOfMonth", { - get: $util.oneOfGetter($oneOfFields = ["weekDayOfMonth", "monthDay"]), - set: $util.oneOfSetter($oneOfFields) - }); + WindowsUpdateSettings.prototype.exclusivePatches = $util.emptyArray; /** - * Creates a new MonthlySchedule instance using the specified properties. + * Creates a new WindowsUpdateSettings instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @static - * @param {google.cloud.osconfig.v1.IMonthlySchedule=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule instance + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings instance */ - MonthlySchedule.create = function create(properties) { - return new MonthlySchedule(properties); + WindowsUpdateSettings.create = function create(properties) { + return new WindowsUpdateSettings(properties); }; /** - * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @static - * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonthlySchedule.encode = function encode(message, writer) { + WindowsUpdateSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) - $root.google.cloud.osconfig.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.monthDay != null && Object.hasOwnProperty.call(message, "monthDay")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.monthDay); + if (message.classifications != null && message.classifications.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.classifications.length; ++i) + writer.int32(message.classifications[i]); + writer.ldelim(); + } + if (message.excludes != null && message.excludes.length) + for (var i = 0; i < message.excludes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); + if (message.exclusivePatches != null && message.exclusivePatches.length) + for (var i = 0; i < message.exclusivePatches.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePatches[i]); return writer; }; /** - * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.MonthlySchedule.verify|verify} messages. + * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @static - * @param {google.cloud.osconfig.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonthlySchedule.encodeDelimited = function encodeDelimited(message, writer) { + WindowsUpdateSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonthlySchedule message from the specified reader or buffer. + * Decodes a WindowsUpdateSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonthlySchedule.decode = function decode(reader, length) { + WindowsUpdateSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.decode(reader, reader.uint32()); + if (!(message.classifications && message.classifications.length)) + message.classifications = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.classifications.push(reader.int32()); + } else + message.classifications.push(reader.int32()); break; case 2: - message.monthDay = reader.int32(); + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + case 3: + if (!(message.exclusivePatches && message.exclusivePatches.length)) + message.exclusivePatches = []; + message.exclusivePatches.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -15049,132 +12821,246 @@ }; /** - * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * Decodes a WindowsUpdateSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonthlySchedule.decodeDelimited = function decodeDelimited(reader) { + WindowsUpdateSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonthlySchedule message. + * Verifies a WindowsUpdateSettings message. * @function verify - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonthlySchedule.verify = function verify(message) { + WindowsUpdateSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { - properties.dayOfMonth = 1; - { - var error = $root.google.cloud.osconfig.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); - if (error) - return "weekDayOfMonth." + error; - } + if (message.classifications != null && message.hasOwnProperty("classifications")) { + if (!Array.isArray(message.classifications)) + return "classifications: array expected"; + for (var i = 0; i < message.classifications.length; ++i) + switch (message.classifications[i]) { + default: + return "classifications: 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.monthDay != null && message.hasOwnProperty("monthDay")) { - if (properties.dayOfMonth === 1) - return "dayOfMonth: multiple values"; - properties.dayOfMonth = 1; - if (!$util.isInteger(message.monthDay)) - return "monthDay: integer expected"; + if (message.excludes != null && message.hasOwnProperty("excludes")) { + if (!Array.isArray(message.excludes)) + return "excludes: array expected"; + for (var i = 0; i < message.excludes.length; ++i) + if (!$util.isString(message.excludes[i])) + return "excludes: string[] expected"; + } + if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { + if (!Array.isArray(message.exclusivePatches)) + return "exclusivePatches: array expected"; + for (var i = 0; i < message.exclusivePatches.length; ++i) + if (!$util.isString(message.exclusivePatches[i])) + return "exclusivePatches: string[] expected"; } return null; }; /** - * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.MonthlySchedule} MonthlySchedule + * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings */ - MonthlySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.MonthlySchedule) + WindowsUpdateSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.WindowsUpdateSettings) return object; - var message = new $root.google.cloud.osconfig.v1.MonthlySchedule(); - if (object.weekDayOfMonth != null) { - if (typeof object.weekDayOfMonth !== "object") - throw TypeError(".google.cloud.osconfig.v1.MonthlySchedule.weekDayOfMonth: object expected"); - message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); + var message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); + if (object.classifications) { + if (!Array.isArray(object.classifications)) + throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.classifications: array expected"); + message.classifications = []; + for (var i = 0; i < object.classifications.length; ++i) + switch (object.classifications[i]) { + default: + case "CLASSIFICATION_UNSPECIFIED": + case 0: + message.classifications[i] = 0; + break; + case "CRITICAL": + case 1: + message.classifications[i] = 1; + break; + case "SECURITY": + case 2: + message.classifications[i] = 2; + break; + case "DEFINITION": + case 3: + message.classifications[i] = 3; + break; + case "DRIVER": + case 4: + message.classifications[i] = 4; + break; + case "FEATURE_PACK": + case 5: + message.classifications[i] = 5; + break; + case "SERVICE_PACK": + case 6: + message.classifications[i] = 6; + break; + case "TOOL": + case 7: + message.classifications[i] = 7; + break; + case "UPDATE_ROLLUP": + case 8: + message.classifications[i] = 8; + break; + case "UPDATE": + case 9: + message.classifications[i] = 9; + break; + } + } + if (object.excludes) { + if (!Array.isArray(object.excludes)) + throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.excludes: array expected"); + message.excludes = []; + for (var i = 0; i < object.excludes.length; ++i) + message.excludes[i] = String(object.excludes[i]); + } + if (object.exclusivePatches) { + if (!Array.isArray(object.exclusivePatches)) + throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.exclusivePatches: array expected"); + message.exclusivePatches = []; + for (var i = 0; i < object.exclusivePatches.length; ++i) + message.exclusivePatches[i] = String(object.exclusivePatches[i]); } - if (object.monthDay != null) - message.monthDay = object.monthDay | 0; return message; }; /** - * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @static - * @param {google.cloud.osconfig.v1.MonthlySchedule} message MonthlySchedule + * @param {google.cloud.osconfig.v1.WindowsUpdateSettings} message WindowsUpdateSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonthlySchedule.toObject = function toObject(message, options) { + WindowsUpdateSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { - object.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); - if (options.oneofs) - object.dayOfMonth = "weekDayOfMonth"; + if (options.arrays || options.defaults) { + object.classifications = []; + object.excludes = []; + object.exclusivePatches = []; } - if (message.monthDay != null && message.hasOwnProperty("monthDay")) { - object.monthDay = message.monthDay; - if (options.oneofs) - object.dayOfMonth = "monthDay"; + if (message.classifications && message.classifications.length) { + object.classifications = []; + for (var j = 0; j < message.classifications.length; ++j) + object.classifications[j] = options.enums === String ? $root.google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[message.classifications[j]] : message.classifications[j]; + } + if (message.excludes && message.excludes.length) { + object.excludes = []; + for (var j = 0; j < message.excludes.length; ++j) + object.excludes[j] = message.excludes[j]; + } + if (message.exclusivePatches && message.exclusivePatches.length) { + object.exclusivePatches = []; + for (var j = 0; j < message.exclusivePatches.length; ++j) + object.exclusivePatches[j] = message.exclusivePatches[j]; } return object; }; /** - * Converts this MonthlySchedule to JSON. + * Converts this WindowsUpdateSettings to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings * @instance * @returns {Object.} JSON object */ - MonthlySchedule.prototype.toJSON = function toJSON() { + WindowsUpdateSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MonthlySchedule; + /** + * Classification enum. + * @name google.cloud.osconfig.v1.WindowsUpdateSettings.Classification + * @enum {number} + * @property {number} CLASSIFICATION_UNSPECIFIED=0 CLASSIFICATION_UNSPECIFIED value + * @property {number} CRITICAL=1 CRITICAL value + * @property {number} SECURITY=2 SECURITY value + * @property {number} DEFINITION=3 DEFINITION value + * @property {number} DRIVER=4 DRIVER value + * @property {number} FEATURE_PACK=5 FEATURE_PACK value + * @property {number} SERVICE_PACK=6 SERVICE_PACK value + * @property {number} TOOL=7 TOOL value + * @property {number} UPDATE_ROLLUP=8 UPDATE_ROLLUP value + * @property {number} UPDATE=9 UPDATE value + */ + WindowsUpdateSettings.Classification = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLASSIFICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CRITICAL"] = 1; + values[valuesById[2] = "SECURITY"] = 2; + values[valuesById[3] = "DEFINITION"] = 3; + values[valuesById[4] = "DRIVER"] = 4; + values[valuesById[5] = "FEATURE_PACK"] = 5; + values[valuesById[6] = "SERVICE_PACK"] = 6; + values[valuesById[7] = "TOOL"] = 7; + values[valuesById[8] = "UPDATE_ROLLUP"] = 8; + values[valuesById[9] = "UPDATE"] = 9; + return values; + })(); + + return WindowsUpdateSettings; })(); - v1.WeekDayOfMonth = (function() { + v1.ExecStep = (function() { /** - * Properties of a WeekDayOfMonth. + * Properties of an ExecStep. * @memberof google.cloud.osconfig.v1 - * @interface IWeekDayOfMonth - * @property {number|null} [weekOrdinal] WeekDayOfMonth weekOrdinal - * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek + * @interface IExecStep + * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [linuxExecStepConfig] ExecStep linuxExecStepConfig + * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [windowsExecStepConfig] ExecStep windowsExecStepConfig */ /** - * Constructs a new WeekDayOfMonth. + * Constructs a new ExecStep. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a WeekDayOfMonth. - * @implements IWeekDayOfMonth + * @classdesc Represents an ExecStep. + * @implements IExecStep * @constructor - * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set */ - function WeekDayOfMonth(properties) { + function ExecStep(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15182,88 +13068,88 @@ } /** - * WeekDayOfMonth weekOrdinal. - * @member {number} weekOrdinal - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * ExecStep linuxExecStepConfig. + * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} linuxExecStepConfig + * @memberof google.cloud.osconfig.v1.ExecStep * @instance */ - WeekDayOfMonth.prototype.weekOrdinal = 0; + ExecStep.prototype.linuxExecStepConfig = null; /** - * WeekDayOfMonth dayOfWeek. - * @member {google.type.DayOfWeek} dayOfWeek - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * ExecStep windowsExecStepConfig. + * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} windowsExecStepConfig + * @memberof google.cloud.osconfig.v1.ExecStep * @instance */ - WeekDayOfMonth.prototype.dayOfWeek = 0; + ExecStep.prototype.windowsExecStepConfig = null; /** - * Creates a new WeekDayOfMonth instance using the specified properties. + * Creates a new ExecStep instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @memberof google.cloud.osconfig.v1.ExecStep * @static - * @param {google.cloud.osconfig.v1.IWeekDayOfMonth=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth instance + * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep instance */ - WeekDayOfMonth.create = function create(properties) { - return new WeekDayOfMonth(properties); + ExecStep.create = function create(properties) { + return new ExecStep(properties); }; /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @memberof google.cloud.osconfig.v1.ExecStep * @static - * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WeekDayOfMonth.encode = function encode(message, writer) { + ExecStep.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.weekOrdinal != null && Object.hasOwnProperty.call(message, "weekOrdinal")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOrdinal); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + if (message.linuxExecStepConfig != null && Object.hasOwnProperty.call(message, "linuxExecStepConfig")) + $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.linuxExecStepConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.windowsExecStepConfig != null && Object.hasOwnProperty.call(message, "windowsExecStepConfig")) + $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.windowsExecStepConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WeekDayOfMonth.verify|verify} messages. + * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @memberof google.cloud.osconfig.v1.ExecStep * @static - * @param {google.cloud.osconfig.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { + ExecStep.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * Decodes an ExecStep message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @memberof google.cloud.osconfig.v1.ExecStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WeekDayOfMonth.decode = function decode(reader, length) { + ExecStep.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStep(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.weekOrdinal = reader.int32(); + message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); break; case 2: - message.dayOfWeek = reader.int32(); + message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15274,161 +13160,130 @@ }; /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * Decodes an ExecStep message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @memberof google.cloud.osconfig.v1.ExecStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { + ExecStep.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WeekDayOfMonth message. + * Verifies an ExecStep message. * @function verify - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @memberof google.cloud.osconfig.v1.ExecStep * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WeekDayOfMonth.verify = function verify(message) { + ExecStep.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) - if (!$util.isInteger(message.weekOrdinal)) - return "weekOrdinal: integer expected"; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { - default: - return "dayOfWeek: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } + if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) { + var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.linuxExecStepConfig); + if (error) + return "linuxExecStepConfig." + error; + } + if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) { + var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.windowsExecStepConfig); + if (error) + return "windowsExecStepConfig." + error; + } return null; }; /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @memberof google.cloud.osconfig.v1.ExecStep * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.WeekDayOfMonth} WeekDayOfMonth + * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep */ - WeekDayOfMonth.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.WeekDayOfMonth) + ExecStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ExecStep) return object; - var message = new $root.google.cloud.osconfig.v1.WeekDayOfMonth(); - if (object.weekOrdinal != null) - message.weekOrdinal = object.weekOrdinal | 0; - switch (object.dayOfWeek) { - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.dayOfWeek = 0; - break; - case "MONDAY": - case 1: - message.dayOfWeek = 1; - break; - case "TUESDAY": - case 2: - message.dayOfWeek = 2; - break; - case "WEDNESDAY": - case 3: - message.dayOfWeek = 3; - break; - case "THURSDAY": - case 4: - message.dayOfWeek = 4; - break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; - break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; - break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; - break; + var message = new $root.google.cloud.osconfig.v1.ExecStep(); + if (object.linuxExecStepConfig != null) { + if (typeof object.linuxExecStepConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecStep.linuxExecStepConfig: object expected"); + message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.linuxExecStepConfig); + } + if (object.windowsExecStepConfig != null) { + if (typeof object.windowsExecStepConfig !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecStep.windowsExecStepConfig: object expected"); + message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.windowsExecStepConfig); } return message; }; /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * Creates a plain object from an ExecStep message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @memberof google.cloud.osconfig.v1.ExecStep * @static - * @param {google.cloud.osconfig.v1.WeekDayOfMonth} message WeekDayOfMonth + * @param {google.cloud.osconfig.v1.ExecStep} message ExecStep * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WeekDayOfMonth.toObject = function toObject(message, options) { + ExecStep.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.weekOrdinal = 0; - object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + object.linuxExecStepConfig = null; + object.windowsExecStepConfig = null; } - if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) - object.weekOrdinal = message.weekOrdinal; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) + object.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.linuxExecStepConfig, options); + if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) + object.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.windowsExecStepConfig, options); return object; }; /** - * Converts this WeekDayOfMonth to JSON. + * Converts this ExecStep to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @memberof google.cloud.osconfig.v1.ExecStep * @instance * @returns {Object.} JSON object */ - WeekDayOfMonth.prototype.toJSON = function toJSON() { + ExecStep.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WeekDayOfMonth; + return ExecStep; })(); - v1.CreatePatchDeploymentRequest = (function() { + v1.ExecStepConfig = (function() { /** - * Properties of a CreatePatchDeploymentRequest. + * Properties of an ExecStepConfig. * @memberof google.cloud.osconfig.v1 - * @interface ICreatePatchDeploymentRequest - * @property {string|null} [parent] CreatePatchDeploymentRequest parent - * @property {string|null} [patchDeploymentId] CreatePatchDeploymentRequest patchDeploymentId - * @property {google.cloud.osconfig.v1.IPatchDeployment|null} [patchDeployment] CreatePatchDeploymentRequest patchDeployment + * @interface IExecStepConfig + * @property {string|null} [localPath] ExecStepConfig localPath + * @property {google.cloud.osconfig.v1.IGcsObject|null} [gcsObject] ExecStepConfig gcsObject + * @property {Array.|null} [allowedSuccessCodes] ExecStepConfig allowedSuccessCodes + * @property {google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null} [interpreter] ExecStepConfig interpreter */ /** - * Constructs a new CreatePatchDeploymentRequest. + * Constructs a new ExecStepConfig. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a CreatePatchDeploymentRequest. - * @implements ICreatePatchDeploymentRequest + * @classdesc Represents an ExecStepConfig. + * @implements IExecStepConfig * @constructor - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set */ - function CreatePatchDeploymentRequest(properties) { + function ExecStepConfig(properties) { + this.allowedSuccessCodes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15436,101 +13291,139 @@ } /** - * CreatePatchDeploymentRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * ExecStepConfig localPath. + * @member {string|null|undefined} localPath + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @instance */ - CreatePatchDeploymentRequest.prototype.parent = ""; + ExecStepConfig.prototype.localPath = null; /** - * CreatePatchDeploymentRequest patchDeploymentId. - * @member {string} patchDeploymentId - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * ExecStepConfig gcsObject. + * @member {google.cloud.osconfig.v1.IGcsObject|null|undefined} gcsObject + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @instance */ - CreatePatchDeploymentRequest.prototype.patchDeploymentId = ""; + ExecStepConfig.prototype.gcsObject = null; /** - * CreatePatchDeploymentRequest patchDeployment. - * @member {google.cloud.osconfig.v1.IPatchDeployment|null|undefined} patchDeployment - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * ExecStepConfig allowedSuccessCodes. + * @member {Array.} allowedSuccessCodes + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @instance */ - CreatePatchDeploymentRequest.prototype.patchDeployment = null; + ExecStepConfig.prototype.allowedSuccessCodes = $util.emptyArray; /** - * Creates a new CreatePatchDeploymentRequest instance using the specified properties. + * ExecStepConfig interpreter. + * @member {google.cloud.osconfig.v1.ExecStepConfig.Interpreter} interpreter + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + ExecStepConfig.prototype.interpreter = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecStepConfig executable. + * @member {"localPath"|"gcsObject"|undefined} executable + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @instance + */ + Object.defineProperty(ExecStepConfig.prototype, "executable", { + get: $util.oneOfGetter($oneOfFields = ["localPath", "gcsObject"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecStepConfig instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @static - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest instance + * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig instance */ - CreatePatchDeploymentRequest.create = function create(properties) { - return new CreatePatchDeploymentRequest(properties); + ExecStepConfig.create = function create(properties) { + return new ExecStepConfig(properties); }; /** - * Encodes the specified CreatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @static - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePatchDeploymentRequest.encode = function encode(message, writer) { + ExecStepConfig.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.patchDeploymentId != null && Object.hasOwnProperty.call(message, "patchDeploymentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.patchDeploymentId); - if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) - $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath); + if (message.gcsObject != null && Object.hasOwnProperty.call(message, "gcsObject")) + $root.google.cloud.osconfig.v1.GcsObject.encode(message.gcsObject, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowedSuccessCodes != null && message.allowedSuccessCodes.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.allowedSuccessCodes.length; ++i) + writer.int32(message.allowedSuccessCodes[i]); + writer.ldelim(); + } + if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); return writer; }; /** - * Encodes the specified CreatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreatePatchDeploymentRequest.verify|verify} messages. + * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @static - * @param {google.cloud.osconfig.v1.ICreatePatchDeploymentRequest} message CreatePatchDeploymentRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecStepConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer. + * Decodes an ExecStepConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePatchDeploymentRequest.decode = function decode(reader, length) { + ExecStepConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.localPath = reader.string(); break; case 2: - message.patchDeploymentId = reader.string(); + message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.decode(reader, reader.uint32()); break; case 3: - message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); + if (!(message.allowedSuccessCodes && message.allowedSuccessCodes.length)) + message.allowedSuccessCodes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowedSuccessCodes.push(reader.int32()); + } else + message.allowedSuccessCodes.push(reader.int32()); + break; + case 4: + message.interpreter = reader.int32(); break; default: reader.skipType(tag & 7); @@ -15541,129 +13434,197 @@ }; /** - * Decodes a CreatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + ExecStepConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreatePatchDeploymentRequest message. + * Verifies an ExecStepConfig message. * @function verify - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreatePatchDeploymentRequest.verify = function verify(message) { + ExecStepConfig.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.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) - if (!$util.isString(message.patchDeploymentId)) - return "patchDeploymentId: string expected"; - if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) { - var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployment); - if (error) - return "patchDeployment." + error; + var properties = {}; + if (message.localPath != null && message.hasOwnProperty("localPath")) { + properties.executable = 1; + if (!$util.isString(message.localPath)) + return "localPath: string expected"; + } + if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { + if (properties.executable === 1) + return "executable: multiple values"; + properties.executable = 1; + { + var error = $root.google.cloud.osconfig.v1.GcsObject.verify(message.gcsObject); + if (error) + return "gcsObject." + error; + } + } + if (message.allowedSuccessCodes != null && message.hasOwnProperty("allowedSuccessCodes")) { + if (!Array.isArray(message.allowedSuccessCodes)) + return "allowedSuccessCodes: array expected"; + for (var i = 0; i < message.allowedSuccessCodes.length; ++i) + if (!$util.isInteger(message.allowedSuccessCodes[i])) + return "allowedSuccessCodes: integer[] expected"; } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + switch (message.interpreter) { + default: + return "interpreter: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a CreatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} CreatePatchDeploymentRequest + * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig */ - CreatePatchDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest) + ExecStepConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ExecStepConfig) return object; - var message = new $root.google.cloud.osconfig.v1.CreatePatchDeploymentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.patchDeploymentId != null) - message.patchDeploymentId = String(object.patchDeploymentId); - if (object.patchDeployment != null) { - if (typeof object.patchDeployment !== "object") - throw TypeError(".google.cloud.osconfig.v1.CreatePatchDeploymentRequest.patchDeployment: object expected"); - message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployment); + var message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); + if (object.localPath != null) + message.localPath = String(object.localPath); + if (object.gcsObject != null) { + if (typeof object.gcsObject !== "object") + throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.gcsObject: object expected"); + message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.fromObject(object.gcsObject); + } + if (object.allowedSuccessCodes) { + if (!Array.isArray(object.allowedSuccessCodes)) + throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.allowedSuccessCodes: array expected"); + message.allowedSuccessCodes = []; + for (var i = 0; i < object.allowedSuccessCodes.length; ++i) + message.allowedSuccessCodes[i] = object.allowedSuccessCodes[i] | 0; + } + switch (object.interpreter) { + case "INTERPRETER_UNSPECIFIED": + case 0: + message.interpreter = 0; + break; + case "SHELL": + case 1: + message.interpreter = 1; + break; + case "POWERSHELL": + case 2: + message.interpreter = 2; + break; } return message; }; /** - * Creates a plain object from a CreatePatchDeploymentRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @static - * @param {google.cloud.osconfig.v1.CreatePatchDeploymentRequest} message CreatePatchDeploymentRequest + * @param {google.cloud.osconfig.v1.ExecStepConfig} message ExecStepConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePatchDeploymentRequest.toObject = function toObject(message, options) { + ExecStepConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.patchDeploymentId = ""; - object.patchDeployment = null; + if (options.arrays || options.defaults) + object.allowedSuccessCodes = []; + if (options.defaults) + object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; + if (message.localPath != null && message.hasOwnProperty("localPath")) { + object.localPath = message.localPath; + if (options.oneofs) + object.executable = "localPath"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.patchDeploymentId != null && message.hasOwnProperty("patchDeploymentId")) - object.patchDeploymentId = message.patchDeploymentId; - if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) - object.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployment, options); + if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { + object.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.toObject(message.gcsObject, options); + if (options.oneofs) + object.executable = "gcsObject"; + } + if (message.allowedSuccessCodes && message.allowedSuccessCodes.length) { + object.allowedSuccessCodes = []; + for (var j = 0; j < message.allowedSuccessCodes.length; ++j) + object.allowedSuccessCodes[j] = message.allowedSuccessCodes[j]; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.ExecStepConfig.Interpreter[message.interpreter] : message.interpreter; return object; }; /** - * Converts this CreatePatchDeploymentRequest to JSON. + * Converts this ExecStepConfig to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.ExecStepConfig * @instance * @returns {Object.} JSON object */ - CreatePatchDeploymentRequest.prototype.toJSON = function toJSON() { + ExecStepConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreatePatchDeploymentRequest; + /** + * Interpreter enum. + * @name google.cloud.osconfig.v1.ExecStepConfig.Interpreter + * @enum {number} + * @property {number} INTERPRETER_UNSPECIFIED=0 INTERPRETER_UNSPECIFIED value + * @property {number} SHELL=1 SHELL value + * @property {number} POWERSHELL=2 POWERSHELL value + */ + ExecStepConfig.Interpreter = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTERPRETER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SHELL"] = 1; + values[valuesById[2] = "POWERSHELL"] = 2; + return values; + })(); + + return ExecStepConfig; })(); - v1.GetPatchDeploymentRequest = (function() { + v1.GcsObject = (function() { /** - * Properties of a GetPatchDeploymentRequest. + * Properties of a GcsObject. * @memberof google.cloud.osconfig.v1 - * @interface IGetPatchDeploymentRequest - * @property {string|null} [name] GetPatchDeploymentRequest name + * @interface IGcsObject + * @property {string|null} [bucket] GcsObject bucket + * @property {string|null} [object] GcsObject object + * @property {number|Long|null} [generationNumber] GcsObject generationNumber */ /** - * Constructs a new GetPatchDeploymentRequest. + * Constructs a new GcsObject. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a GetPatchDeploymentRequest. - * @implements IGetPatchDeploymentRequest + * @classdesc Represents a GcsObject. + * @implements IGcsObject * @constructor - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set */ - function GetPatchDeploymentRequest(properties) { + function GcsObject(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15671,75 +13632,101 @@ } /** - * GetPatchDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * GcsObject bucket. + * @member {string} bucket + * @memberof google.cloud.osconfig.v1.GcsObject * @instance */ - GetPatchDeploymentRequest.prototype.name = ""; + GcsObject.prototype.bucket = ""; /** - * Creates a new GetPatchDeploymentRequest instance using the specified properties. + * GcsObject object. + * @member {string} object + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + */ + GcsObject.prototype.object = ""; + + /** + * GcsObject generationNumber. + * @member {number|Long} generationNumber + * @memberof google.cloud.osconfig.v1.GcsObject + * @instance + */ + GcsObject.prototype.generationNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GcsObject instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.GcsObject * @static - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest instance + * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject instance */ - GetPatchDeploymentRequest.create = function create(properties) { - return new GetPatchDeploymentRequest(properties); + GcsObject.create = function create(properties) { + return new GcsObject(properties); }; /** - * Encodes the specified GetPatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * Encodes the specified GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.GcsObject * @static - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPatchDeploymentRequest.encode = function encode(message, writer) { + GcsObject.encode = function encode(message, writer) { 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.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.object != null && Object.hasOwnProperty.call(message, "object")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); + if (message.generationNumber != null && Object.hasOwnProperty.call(message, "generationNumber")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generationNumber); return writer; }; /** - * Encodes the specified GetPatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchDeploymentRequest.verify|verify} messages. + * Encodes the specified GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.GcsObject * @static - * @param {google.cloud.osconfig.v1.IGetPatchDeploymentRequest} message GetPatchDeploymentRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GcsObject.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer. + * Decodes a GcsObject message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.GcsObject * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPatchDeploymentRequest.decode = function decode(reader, length) { + GcsObject.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GcsObject(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.bucket = reader.string(); + break; + case 2: + message.object = reader.string(); + break; + case 3: + message.generationNumber = reader.int64(); break; default: reader.skipType(tag & 7); @@ -15750,109 +13737,146 @@ }; /** - * Decodes a GetPatchDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsObject message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.GcsObject * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + GcsObject.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPatchDeploymentRequest message. + * Verifies a GcsObject message. * @function verify - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.GcsObject * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPatchDeploymentRequest.verify = function verify(message) { + GcsObject.verify = function verify(message) { if (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.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.object != null && message.hasOwnProperty("object")) + if (!$util.isString(message.object)) + return "object: string expected"; + if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) + if (!$util.isInteger(message.generationNumber) && !(message.generationNumber && $util.isInteger(message.generationNumber.low) && $util.isInteger(message.generationNumber.high))) + return "generationNumber: integer|Long expected"; return null; }; /** - * Creates a GetPatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.GcsObject * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.GetPatchDeploymentRequest} GetPatchDeploymentRequest + * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject */ - GetPatchDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest) + GcsObject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GcsObject) return object; - var message = new $root.google.cloud.osconfig.v1.GetPatchDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.osconfig.v1.GcsObject(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.object != null) + message.object = String(object.object); + if (object.generationNumber != null) + if ($util.Long) + (message.generationNumber = $util.Long.fromValue(object.generationNumber)).unsigned = false; + else if (typeof object.generationNumber === "string") + message.generationNumber = parseInt(object.generationNumber, 10); + else if (typeof object.generationNumber === "number") + message.generationNumber = object.generationNumber; + else if (typeof object.generationNumber === "object") + message.generationNumber = new $util.LongBits(object.generationNumber.low >>> 0, object.generationNumber.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a GetPatchDeploymentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GcsObject message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.GcsObject * @static - * @param {google.cloud.osconfig.v1.GetPatchDeploymentRequest} message GetPatchDeploymentRequest + * @param {google.cloud.osconfig.v1.GcsObject} message GcsObject * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPatchDeploymentRequest.toObject = function toObject(message, options) { + GcsObject.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.bucket = ""; + object.object = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.generationNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.generationNumber = options.longs === String ? "0" : 0; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.object != null && message.hasOwnProperty("object")) + object.object = message.object; + if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) + if (typeof message.generationNumber === "number") + object.generationNumber = options.longs === String ? String(message.generationNumber) : message.generationNumber; + else + object.generationNumber = options.longs === String ? $util.Long.prototype.toString.call(message.generationNumber) : options.longs === Number ? new $util.LongBits(message.generationNumber.low >>> 0, message.generationNumber.high >>> 0).toNumber() : message.generationNumber; return object; }; /** - * Converts this GetPatchDeploymentRequest to JSON. + * Converts this GcsObject to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.GcsObject * @instance * @returns {Object.} JSON object */ - GetPatchDeploymentRequest.prototype.toJSON = function toJSON() { + GcsObject.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetPatchDeploymentRequest; + return GcsObject; })(); - v1.ListPatchDeploymentsRequest = (function() { + v1.PatchInstanceFilter = (function() { /** - * Properties of a ListPatchDeploymentsRequest. + * Properties of a PatchInstanceFilter. * @memberof google.cloud.osconfig.v1 - * @interface IListPatchDeploymentsRequest - * @property {string|null} [parent] ListPatchDeploymentsRequest parent - * @property {number|null} [pageSize] ListPatchDeploymentsRequest pageSize - * @property {string|null} [pageToken] ListPatchDeploymentsRequest pageToken + * @interface IPatchInstanceFilter + * @property {boolean|null} [all] PatchInstanceFilter all + * @property {Array.|null} [groupLabels] PatchInstanceFilter groupLabels + * @property {Array.|null} [zones] PatchInstanceFilter zones + * @property {Array.|null} [instances] PatchInstanceFilter instances + * @property {Array.|null} [instanceNamePrefixes] PatchInstanceFilter instanceNamePrefixes */ /** - * Constructs a new ListPatchDeploymentsRequest. + * Constructs a new PatchInstanceFilter. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchDeploymentsRequest. - * @implements IListPatchDeploymentsRequest + * @classdesc Represents a PatchInstanceFilter. + * @implements IPatchInstanceFilter * @constructor - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set */ - function ListPatchDeploymentsRequest(properties) { + function PatchInstanceFilter(properties) { + this.groupLabels = []; + this.zones = []; + this.instances = []; + this.instanceNamePrefixes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15860,101 +13884,139 @@ } /** - * ListPatchDeploymentsRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * PatchInstanceFilter all. + * @member {boolean} all + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @instance */ - ListPatchDeploymentsRequest.prototype.parent = ""; + PatchInstanceFilter.prototype.all = false; /** - * ListPatchDeploymentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * PatchInstanceFilter groupLabels. + * @member {Array.} groupLabels + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @instance */ - ListPatchDeploymentsRequest.prototype.pageSize = 0; + PatchInstanceFilter.prototype.groupLabels = $util.emptyArray; /** - * ListPatchDeploymentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * PatchInstanceFilter zones. + * @member {Array.} zones + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @instance */ - ListPatchDeploymentsRequest.prototype.pageToken = ""; + PatchInstanceFilter.prototype.zones = $util.emptyArray; /** - * Creates a new ListPatchDeploymentsRequest instance using the specified properties. + * PatchInstanceFilter instances. + * @member {Array.} instances + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.instances = $util.emptyArray; + + /** + * PatchInstanceFilter instanceNamePrefixes. + * @member {Array.} instanceNamePrefixes + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @instance + */ + PatchInstanceFilter.prototype.instanceNamePrefixes = $util.emptyArray; + + /** + * Creates a new PatchInstanceFilter instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest instance + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter instance */ - ListPatchDeploymentsRequest.create = function create(properties) { - return new ListPatchDeploymentsRequest(properties); + PatchInstanceFilter.create = function create(properties) { + return new PatchInstanceFilter(properties); }; /** - * Encodes the specified ListPatchDeploymentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPatchDeploymentsRequest.encode = function encode(message, writer) { + PatchInstanceFilter.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.all != null && Object.hasOwnProperty.call(message, "all")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all); + if (message.groupLabels != null && message.groupLabels.length) + for (var i = 0; i < message.groupLabels.length; ++i) + $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.encode(message.groupLabels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zones != null && message.zones.length) + for (var i = 0; i < message.zones.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.zones[i]); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instances[i]); + if (message.instanceNamePrefixes != null && message.instanceNamePrefixes.length) + for (var i = 0; i < message.instanceNamePrefixes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.instanceNamePrefixes[i]); return writer; }; /** - * Encodes the specified ListPatchDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsRequest.verify|verify} messages. + * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsRequest} message ListPatchDeploymentsRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPatchDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + PatchInstanceFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer. + * Decodes a PatchInstanceFilter message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPatchDeploymentsRequest.decode = function decode(reader, length) { + PatchInstanceFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.all = reader.bool(); break; case 2: - message.pageSize = reader.int32(); + if (!(message.groupLabels && message.groupLabels.length)) + message.groupLabels = []; + message.groupLabels.push($root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.decode(reader, reader.uint32())); break; case 3: - message.pageToken = reader.string(); + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push(reader.string()); + break; + case 4: + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push(reader.string()); + break; + case 5: + if (!(message.instanceNamePrefixes && message.instanceNamePrefixes.length)) + message.instanceNamePrefixes = []; + message.instanceNamePrefixes.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -15965,355 +14027,417 @@ }; /** - * Decodes a ListPatchDeploymentsRequest message from the specified reader or buffer, length delimited. + * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPatchDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { + PatchInstanceFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPatchDeploymentsRequest message. + * Verifies a PatchInstanceFilter message. * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPatchDeploymentsRequest.verify = function verify(message) { + PatchInstanceFilter.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.all != null && message.hasOwnProperty("all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; + if (message.groupLabels != null && message.hasOwnProperty("groupLabels")) { + if (!Array.isArray(message.groupLabels)) + return "groupLabels: array expected"; + for (var i = 0; i < message.groupLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify(message.groupLabels[i]); + if (error) + return "groupLabels." + error; + } + } + if (message.zones != null && message.hasOwnProperty("zones")) { + if (!Array.isArray(message.zones)) + return "zones: array expected"; + for (var i = 0; i < message.zones.length; ++i) + if (!$util.isString(message.zones[i])) + return "zones: string[] expected"; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) + if (!$util.isString(message.instances[i])) + return "instances: string[] expected"; + } + if (message.instanceNamePrefixes != null && message.hasOwnProperty("instanceNamePrefixes")) { + if (!Array.isArray(message.instanceNamePrefixes)) + return "instanceNamePrefixes: array expected"; + for (var i = 0; i < message.instanceNamePrefixes.length; ++i) + if (!$util.isString(message.instanceNamePrefixes[i])) + return "instanceNamePrefixes: string[] expected"; + } return null; }; /** - * Creates a ListPatchDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} ListPatchDeploymentsRequest + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter */ - ListPatchDeploymentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest) + PatchInstanceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter) return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); + if (object.all != null) + message.all = Boolean(object.all); + if (object.groupLabels) { + if (!Array.isArray(object.groupLabels)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: array expected"); + message.groupLabels = []; + for (var i = 0; i < object.groupLabels.length; ++i) { + if (typeof object.groupLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: object expected"); + message.groupLabels[i] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.fromObject(object.groupLabels[i]); + } + } + if (object.zones) { + if (!Array.isArray(object.zones)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.zones: array expected"); + message.zones = []; + for (var i = 0; i < object.zones.length; ++i) + message.zones[i] = String(object.zones[i]); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) + message.instances[i] = String(object.instances[i]); + } + if (object.instanceNamePrefixes) { + if (!Array.isArray(object.instanceNamePrefixes)) + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instanceNamePrefixes: array expected"); + message.instanceNamePrefixes = []; + for (var i = 0; i < object.instanceNamePrefixes.length; ++i) + message.instanceNamePrefixes[i] = String(object.instanceNamePrefixes[i]); + } return message; }; /** - * Creates a plain object from a ListPatchDeploymentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @static - * @param {google.cloud.osconfig.v1.ListPatchDeploymentsRequest} message ListPatchDeploymentsRequest + * @param {google.cloud.osconfig.v1.PatchInstanceFilter} message PatchInstanceFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPatchDeploymentsRequest.toObject = function toObject(message, options) { + PatchInstanceFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.arrays || options.defaults) { + object.groupLabels = []; + object.zones = []; + object.instances = []; + object.instanceNamePrefixes = []; + } + if (options.defaults) + object.all = false; + if (message.all != null && message.hasOwnProperty("all")) + object.all = message.all; + if (message.groupLabels && message.groupLabels.length) { + object.groupLabels = []; + for (var j = 0; j < message.groupLabels.length; ++j) + object.groupLabels[j] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.toObject(message.groupLabels[j], options); + } + if (message.zones && message.zones.length) { + object.zones = []; + for (var j = 0; j < message.zones.length; ++j) + object.zones[j] = message.zones[j]; + } + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = message.instances[j]; + } + if (message.instanceNamePrefixes && message.instanceNamePrefixes.length) { + object.instanceNamePrefixes = []; + for (var j = 0; j < message.instanceNamePrefixes.length; ++j) + object.instanceNamePrefixes[j] = message.instanceNamePrefixes[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; return object; }; /** - * Converts this ListPatchDeploymentsRequest to JSON. + * Converts this PatchInstanceFilter to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter * @instance * @returns {Object.} JSON object */ - ListPatchDeploymentsRequest.prototype.toJSON = function toJSON() { + PatchInstanceFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListPatchDeploymentsRequest; - })(); + PatchInstanceFilter.GroupLabel = (function() { - v1.ListPatchDeploymentsResponse = (function() { + /** + * Properties of a GroupLabel. + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @interface IGroupLabel + * @property {Object.|null} [labels] GroupLabel labels + */ - /** - * Properties of a ListPatchDeploymentsResponse. - * @memberof google.cloud.osconfig.v1 - * @interface IListPatchDeploymentsResponse - * @property {Array.|null} [patchDeployments] ListPatchDeploymentsResponse patchDeployments - * @property {string|null} [nextPageToken] ListPatchDeploymentsResponse nextPageToken - */ + /** + * Constructs a new GroupLabel. + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @classdesc Represents a GroupLabel. + * @implements IGroupLabel + * @constructor + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set + */ + function GroupLabel(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListPatchDeploymentsResponse. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchDeploymentsResponse. - * @implements IListPatchDeploymentsResponse - * @constructor - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set - */ - function ListPatchDeploymentsResponse(properties) { - this.patchDeployments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * GroupLabel labels. + * @member {Object.} labels + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @instance + */ + GroupLabel.prototype.labels = $util.emptyObject; - /** - * ListPatchDeploymentsResponse patchDeployments. - * @member {Array.} patchDeployments - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @instance - */ - ListPatchDeploymentsResponse.prototype.patchDeployments = $util.emptyArray; + /** + * Creates a new GroupLabel instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel instance + */ + GroupLabel.create = function create(properties) { + return new GroupLabel(properties); + }; - /** - * ListPatchDeploymentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @instance - */ - ListPatchDeploymentsResponse.prototype.nextPageToken = ""; + /** + * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupLabel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; - /** - * Creates a new ListPatchDeploymentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse instance - */ - ListPatchDeploymentsResponse.create = function create(properties) { - return new ListPatchDeploymentsResponse(properties); - }; + /** + * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupLabel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ListPatchDeploymentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchDeploymentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.patchDeployments != null && message.patchDeployments.length) - for (var i = 0; i < message.patchDeployments.length; ++i) - $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployments[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; - }; + /** + * Decodes a GroupLabel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupLabel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListPatchDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchDeploymentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchDeploymentsResponse} message ListPatchDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupLabel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchDeploymentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.patchDeployments && message.patchDeployments.length)) - message.patchDeployments = []; - message.patchDeployments.push($root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Verifies a GroupLabel message. + * @function verify + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupLabel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } - } - return message; - }; - - /** - * Decodes a ListPatchDeploymentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return null; + }; - /** - * Verifies a ListPatchDeploymentsResponse message. - * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPatchDeploymentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.patchDeployments != null && message.hasOwnProperty("patchDeployments")) { - if (!Array.isArray(message.patchDeployments)) - return "patchDeployments: array expected"; - for (var i = 0; i < message.patchDeployments.length; ++i) { - var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployments[i]); - if (error) - return "patchDeployments." + error; + /** + * Creates a GroupLabel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + */ + GroupLabel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel) + return object; + var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + return message; + }; - /** - * Creates a ListPatchDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} ListPatchDeploymentsResponse - */ - ListPatchDeploymentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse) - return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchDeploymentsResponse(); - if (object.patchDeployments) { - if (!Array.isArray(object.patchDeployments)) - throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: array expected"); - message.patchDeployments = []; - for (var i = 0; i < object.patchDeployments.length; ++i) { - if (typeof object.patchDeployments[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1.ListPatchDeploymentsResponse.patchDeployments: object expected"); - message.patchDeployments[i] = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployments[i]); + /** + * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} message GroupLabel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupLabel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + 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 (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + return object; + }; - /** - * Creates a plain object from a ListPatchDeploymentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @static - * @param {google.cloud.osconfig.v1.ListPatchDeploymentsResponse} message ListPatchDeploymentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPatchDeploymentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.patchDeployments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.patchDeployments && message.patchDeployments.length) { - object.patchDeployments = []; - for (var j = 0; j < message.patchDeployments.length; ++j) - object.patchDeployments[j] = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Converts this GroupLabel to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @instance + * @returns {Object.} JSON object + */ + GroupLabel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListPatchDeploymentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPatchDeploymentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return GroupLabel; + })(); - return ListPatchDeploymentsResponse; + return PatchInstanceFilter; })(); - v1.DeletePatchDeploymentRequest = (function() { + v1.PatchRollout = (function() { /** - * Properties of a DeletePatchDeploymentRequest. + * Properties of a PatchRollout. * @memberof google.cloud.osconfig.v1 - * @interface IDeletePatchDeploymentRequest - * @property {string|null} [name] DeletePatchDeploymentRequest name + * @interface IPatchRollout + * @property {google.cloud.osconfig.v1.PatchRollout.Mode|null} [mode] PatchRollout mode + * @property {google.cloud.osconfig.v1.IFixedOrPercent|null} [disruptionBudget] PatchRollout disruptionBudget */ /** - * Constructs a new DeletePatchDeploymentRequest. + * Constructs a new PatchRollout. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a DeletePatchDeploymentRequest. - * @implements IDeletePatchDeploymentRequest + * @classdesc Represents a PatchRollout. + * @implements IPatchRollout * @constructor - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IPatchRollout=} [properties] Properties to set */ - function DeletePatchDeploymentRequest(properties) { + function PatchRollout(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16321,75 +14445,88 @@ } /** - * DeletePatchDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * PatchRollout mode. + * @member {google.cloud.osconfig.v1.PatchRollout.Mode} mode + * @memberof google.cloud.osconfig.v1.PatchRollout * @instance */ - DeletePatchDeploymentRequest.prototype.name = ""; + PatchRollout.prototype.mode = 0; /** - * Creates a new DeletePatchDeploymentRequest instance using the specified properties. + * PatchRollout disruptionBudget. + * @member {google.cloud.osconfig.v1.IFixedOrPercent|null|undefined} disruptionBudget + * @memberof google.cloud.osconfig.v1.PatchRollout + * @instance + */ + PatchRollout.prototype.disruptionBudget = null; + + /** + * Creates a new PatchRollout instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.PatchRollout * @static - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest instance + * @param {google.cloud.osconfig.v1.IPatchRollout=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout instance */ - DeletePatchDeploymentRequest.create = function create(properties) { - return new DeletePatchDeploymentRequest(properties); + PatchRollout.create = function create(properties) { + return new PatchRollout(properties); }; /** - * Encodes the specified DeletePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * Encodes the specified PatchRollout message. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.PatchRollout * @static - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IPatchRollout} message PatchRollout message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePatchDeploymentRequest.encode = function encode(message, writer) { + PatchRollout.encode = function encode(message, writer) { 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.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.disruptionBudget != null && Object.hasOwnProperty.call(message, "disruptionBudget")) + $root.google.cloud.osconfig.v1.FixedOrPercent.encode(message.disruptionBudget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeletePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeletePatchDeploymentRequest.verify|verify} messages. + * Encodes the specified PatchRollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.PatchRollout * @static - * @param {google.cloud.osconfig.v1.IDeletePatchDeploymentRequest} message DeletePatchDeploymentRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IPatchRollout} message PatchRollout message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + PatchRollout.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer. + * Decodes a PatchRollout message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.PatchRollout * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePatchDeploymentRequest.decode = function decode(reader, length) { + PatchRollout.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchRollout(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.mode = reader.int32(); + break; + case 2: + message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -16400,469 +14537,325 @@ }; /** - * Decodes a DeletePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a PatchRollout message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.PatchRollout * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + PatchRollout.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePatchDeploymentRequest message. + * Verifies a PatchRollout message. * @function verify - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.PatchRollout * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeletePatchDeploymentRequest.verify = function verify(message) { + PatchRollout.verify = function verify(message) { if (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.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) { + var error = $root.google.cloud.osconfig.v1.FixedOrPercent.verify(message.disruptionBudget); + if (error) + return "disruptionBudget." + error; + } return null; }; /** - * Creates a DeletePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PatchRollout message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.PatchRollout * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} DeletePatchDeploymentRequest + * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout */ - DeletePatchDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest) + PatchRollout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PatchRollout) return object; - var message = new $root.google.cloud.osconfig.v1.DeletePatchDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.osconfig.v1.PatchRollout(); + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "ZONE_BY_ZONE": + case 1: + message.mode = 1; + break; + case "CONCURRENT_ZONES": + case 2: + message.mode = 2; + break; + } + if (object.disruptionBudget != null) { + if (typeof object.disruptionBudget !== "object") + throw TypeError(".google.cloud.osconfig.v1.PatchRollout.disruptionBudget: object expected"); + message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.fromObject(object.disruptionBudget); + } return message; }; /** - * Creates a plain object from a DeletePatchDeploymentRequest message. Also converts values to other types if specified. + * Creates a plain object from a PatchRollout message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.PatchRollout * @static - * @param {google.cloud.osconfig.v1.DeletePatchDeploymentRequest} message DeletePatchDeploymentRequest + * @param {google.cloud.osconfig.v1.PatchRollout} message PatchRollout * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePatchDeploymentRequest.toObject = function toObject(message, options) { + PatchRollout.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.disruptionBudget = null; + } + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.osconfig.v1.PatchRollout.Mode[message.mode] : message.mode; + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) + object.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.toObject(message.disruptionBudget, options); return object; }; /** - * Converts this DeletePatchDeploymentRequest to JSON. + * Converts this PatchRollout to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @memberof google.cloud.osconfig.v1.PatchRollout * @instance * @returns {Object.} JSON object */ - DeletePatchDeploymentRequest.prototype.toJSON = function toJSON() { + PatchRollout.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeletePatchDeploymentRequest; + /** + * Mode enum. + * @name google.cloud.osconfig.v1.PatchRollout.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} ZONE_BY_ZONE=1 ZONE_BY_ZONE value + * @property {number} CONCURRENT_ZONES=2 CONCURRENT_ZONES value + */ + PatchRollout.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ZONE_BY_ZONE"] = 1; + values[valuesById[2] = "CONCURRENT_ZONES"] = 2; + return values; + })(); + + return PatchRollout; })(); - v1.ExecutePatchJobRequest = (function() { + v1.OsConfigZonalService = (function() { /** - * Properties of an ExecutePatchJobRequest. + * Constructs a new OsConfigZonalService service. * @memberof google.cloud.osconfig.v1 - * @interface IExecutePatchJobRequest - * @property {string|null} [parent] ExecutePatchJobRequest parent - * @property {string|null} [description] ExecutePatchJobRequest description - * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] ExecutePatchJobRequest instanceFilter - * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] ExecutePatchJobRequest patchConfig - * @property {google.protobuf.IDuration|null} [duration] ExecutePatchJobRequest duration - * @property {boolean|null} [dryRun] ExecutePatchJobRequest dryRun - * @property {string|null} [displayName] ExecutePatchJobRequest displayName - * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] ExecutePatchJobRequest rollout - */ - - /** - * Constructs a new ExecutePatchJobRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an ExecutePatchJobRequest. - * @implements IExecutePatchJobRequest + * @classdesc Represents an OsConfigZonalService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set + * @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 ExecutePatchJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function OsConfigZonalService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * ExecutePatchJobRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance - */ - ExecutePatchJobRequest.prototype.parent = ""; + (OsConfigZonalService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsConfigZonalService; /** - * ExecutePatchJobRequest description. - * @member {string} description - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance + * Creates new OsConfigZonalService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @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 {OsConfigZonalService} RPC service. Useful where requests and/or responses are streamed. */ - ExecutePatchJobRequest.prototype.description = ""; + OsConfigZonalService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ExecutePatchJobRequest instanceFilter. - * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getInventory}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef GetInventoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.Inventory} [response] Inventory */ - ExecutePatchJobRequest.prototype.instanceFilter = null; /** - * ExecutePatchJobRequest patchConfig. - * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * Calls GetInventory. + * @function getInventory + * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @instance + * @param {google.cloud.osconfig.v1.IGetInventoryRequest} request GetInventoryRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.GetInventoryCallback} callback Node-style callback called with the error, if any, and Inventory + * @returns {undefined} + * @variation 1 */ - ExecutePatchJobRequest.prototype.patchConfig = null; + Object.defineProperty(OsConfigZonalService.prototype.getInventory = function getInventory(request, callback) { + return this.rpcCall(getInventory, $root.google.cloud.osconfig.v1.GetInventoryRequest, $root.google.cloud.osconfig.v1.Inventory, request, callback); + }, "name", { value: "GetInventory" }); /** - * ExecutePatchJobRequest duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * Calls GetInventory. + * @function getInventory + * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @instance + * @param {google.cloud.osconfig.v1.IGetInventoryRequest} request GetInventoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ExecutePatchJobRequest.prototype.duration = null; /** - * ExecutePatchJobRequest dryRun. - * @member {boolean} dryRun - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @instance + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listInventories}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef ListInventoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListInventoriesResponse} [response] ListInventoriesResponse */ - ExecutePatchJobRequest.prototype.dryRun = false; /** - * ExecutePatchJobRequest displayName. - * @member {string} displayName - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * Calls ListInventories. + * @function listInventories + * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @instance + * @param {google.cloud.osconfig.v1.IListInventoriesRequest} request ListInventoriesRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.ListInventoriesCallback} callback Node-style callback called with the error, if any, and ListInventoriesResponse + * @returns {undefined} + * @variation 1 */ - ExecutePatchJobRequest.prototype.displayName = ""; + Object.defineProperty(OsConfigZonalService.prototype.listInventories = function listInventories(request, callback) { + return this.rpcCall(listInventories, $root.google.cloud.osconfig.v1.ListInventoriesRequest, $root.google.cloud.osconfig.v1.ListInventoriesResponse, request, callback); + }, "name", { value: "ListInventories" }); /** - * ExecutePatchJobRequest rollout. - * @member {google.cloud.osconfig.v1.IPatchRollout|null|undefined} rollout - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * Calls ListInventories. + * @function listInventories + * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @instance + * @param {google.cloud.osconfig.v1.IListInventoriesRequest} request ListInventoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ExecutePatchJobRequest.prototype.rollout = null; - - /** - * Creates a new ExecutePatchJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest instance - */ - ExecutePatchJobRequest.create = function create(properties) { - return new ExecutePatchJobRequest(properties); - }; - - /** - * Encodes the specified ExecutePatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutePatchJobRequest.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) - $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); - if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) - $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecutePatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecutePatchJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.IExecutePatchJobRequest} message ExecutePatchJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutePatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an ExecutePatchJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getVulnerabilityReport}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef GetVulnerabilityReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.VulnerabilityReport} [response] VulnerabilityReport */ - ExecutePatchJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 7: - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); - break; - case 4: - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); - break; - case 5: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.dryRun = reader.bool(); - break; - case 8: - message.displayName = reader.string(); - break; - case 9: - message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an ExecutePatchJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetVulnerabilityReport. + * @function getVulnerabilityReport + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IGetVulnerabilityReportRequest} request GetVulnerabilityReportRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.GetVulnerabilityReportCallback} callback Node-style callback called with the error, if any, and VulnerabilityReport + * @returns {undefined} + * @variation 1 */ - ExecutePatchJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(OsConfigZonalService.prototype.getVulnerabilityReport = function getVulnerabilityReport(request, callback) { + return this.rpcCall(getVulnerabilityReport, $root.google.cloud.osconfig.v1.GetVulnerabilityReportRequest, $root.google.cloud.osconfig.v1.VulnerabilityReport, request, callback); + }, "name", { value: "GetVulnerabilityReport" }); /** - * Verifies an ExecutePatchJobRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetVulnerabilityReport. + * @function getVulnerabilityReport + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IGetVulnerabilityReportRequest} request GetVulnerabilityReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ExecutePatchJobRequest.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { - var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); - if (error) - return "instanceFilter." + error; - } - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { - var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); - if (error) - return "patchConfig." + error; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - if (typeof message.dryRun !== "boolean") - return "dryRun: boolean expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.rollout != null && message.hasOwnProperty("rollout")) { - var error = $root.google.cloud.osconfig.v1.PatchRollout.verify(message.rollout); - if (error) - return "rollout." + error; - } - return null; - }; /** - * Creates an ExecutePatchJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ExecutePatchJobRequest} ExecutePatchJobRequest + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listVulnerabilityReports}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef ListVulnerabilityReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListVulnerabilityReportsResponse} [response] ListVulnerabilityReportsResponse */ - ExecutePatchJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ExecutePatchJobRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.ExecutePatchJobRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.description != null) - message.description = String(object.description); - if (object.instanceFilter != null) { - if (typeof object.instanceFilter !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.instanceFilter: object expected"); - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); - } - if (object.patchConfig != null) { - if (typeof object.patchConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.patchConfig: object expected"); - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.dryRun != null) - message.dryRun = Boolean(object.dryRun); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.rollout != null) { - if (typeof object.rollout !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecutePatchJobRequest.rollout: object expected"); - message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); - } - return message; - }; /** - * Creates a plain object from an ExecutePatchJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest - * @static - * @param {google.cloud.osconfig.v1.ExecutePatchJobRequest} message ExecutePatchJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListVulnerabilityReports. + * @function listVulnerabilityReports + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsRequest} request ListVulnerabilityReportsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.ListVulnerabilityReportsCallback} callback Node-style callback called with the error, if any, and ListVulnerabilityReportsResponse + * @returns {undefined} + * @variation 1 */ - ExecutePatchJobRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.description = ""; - object.patchConfig = null; - object.duration = null; - object.dryRun = false; - object.instanceFilter = null; - object.displayName = ""; - object.rollout = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) - object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - object.dryRun = message.dryRun; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) - object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); - return object; - }; + Object.defineProperty(OsConfigZonalService.prototype.listVulnerabilityReports = function listVulnerabilityReports(request, callback) { + return this.rpcCall(listVulnerabilityReports, $root.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest, $root.google.cloud.osconfig.v1.ListVulnerabilityReportsResponse, request, callback); + }, "name", { value: "ListVulnerabilityReports" }); /** - * Converts this ExecutePatchJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * Calls ListVulnerabilityReports. + * @function listVulnerabilityReports + * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsRequest} request ListVulnerabilityReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ExecutePatchJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return ExecutePatchJobRequest; + return OsConfigZonalService; })(); - v1.GetPatchJobRequest = (function() { + v1.VulnerabilityReport = (function() { /** - * Properties of a GetPatchJobRequest. + * Properties of a VulnerabilityReport. * @memberof google.cloud.osconfig.v1 - * @interface IGetPatchJobRequest - * @property {string|null} [name] GetPatchJobRequest name + * @interface IVulnerabilityReport + * @property {string|null} [name] VulnerabilityReport name + * @property {Array.|null} [vulnerabilities] VulnerabilityReport vulnerabilities + * @property {google.protobuf.ITimestamp|null} [updateTime] VulnerabilityReport updateTime */ /** - * Constructs a new GetPatchJobRequest. + * Constructs a new VulnerabilityReport. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a GetPatchJobRequest. - * @implements IGetPatchJobRequest + * @classdesc Represents a VulnerabilityReport. + * @implements IVulnerabilityReport * @constructor - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IVulnerabilityReport=} [properties] Properties to set */ - function GetPatchJobRequest(properties) { + function VulnerabilityReport(properties) { + this.vulnerabilities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16870,76 +14863,105 @@ } /** - * GetPatchJobRequest name. + * VulnerabilityReport name. * @member {string} name - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @instance */ - GetPatchJobRequest.prototype.name = ""; + VulnerabilityReport.prototype.name = ""; /** - * Creates a new GetPatchJobRequest instance using the specified properties. + * VulnerabilityReport vulnerabilities. + * @member {Array.} vulnerabilities + * @memberof google.cloud.osconfig.v1.VulnerabilityReport + * @instance + */ + VulnerabilityReport.prototype.vulnerabilities = $util.emptyArray; + + /** + * VulnerabilityReport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.VulnerabilityReport + * @instance + */ + VulnerabilityReport.prototype.updateTime = null; + + /** + * Creates a new VulnerabilityReport instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @static - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest instance + * @param {google.cloud.osconfig.v1.IVulnerabilityReport=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.VulnerabilityReport} VulnerabilityReport instance */ - GetPatchJobRequest.create = function create(properties) { - return new GetPatchJobRequest(properties); + VulnerabilityReport.create = function create(properties) { + return new VulnerabilityReport(properties); }; /** - * Encodes the specified GetPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * Encodes the specified VulnerabilityReport message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @static - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IVulnerabilityReport} message VulnerabilityReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPatchJobRequest.encode = function encode(message, writer) { + VulnerabilityReport.encode = function encode(message, writer) { 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.vulnerabilities != null && message.vulnerabilities.length) + for (var i = 0; i < message.vulnerabilities.length; ++i) + $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.encode(message.vulnerabilities[i], 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(); return writer; }; /** - * Encodes the specified GetPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetPatchJobRequest.verify|verify} messages. + * Encodes the specified VulnerabilityReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @static - * @param {google.cloud.osconfig.v1.IGetPatchJobRequest} message GetPatchJobRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IVulnerabilityReport} message VulnerabilityReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + VulnerabilityReport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPatchJobRequest message from the specified reader or buffer. + * Decodes a VulnerabilityReport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + * @returns {google.cloud.osconfig.v1.VulnerabilityReport} VulnerabilityReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPatchJobRequest.decode = function decode(reader, length) { + VulnerabilityReport.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.VulnerabilityReport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + if (!(message.vulnerabilities && message.vulnerabilities.length)) + message.vulnerabilities = []; + message.vulnerabilities.push($root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.decode(reader, reader.uint32())); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -16949,363 +14971,1007 @@ }; /** - * Decodes a GetPatchJobRequest message from the specified reader or buffer, length delimited. + * Decodes a VulnerabilityReport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + * @returns {google.cloud.osconfig.v1.VulnerabilityReport} VulnerabilityReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + VulnerabilityReport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPatchJobRequest message. + * Verifies a VulnerabilityReport message. * @function verify - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPatchJobRequest.verify = function verify(message) { + VulnerabilityReport.verify = function verify(message) { if (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.vulnerabilities != null && message.hasOwnProperty("vulnerabilities")) { + if (!Array.isArray(message.vulnerabilities)) + return "vulnerabilities: array expected"; + for (var i = 0; i < message.vulnerabilities.length; ++i) { + var error = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.verify(message.vulnerabilities[i]); + if (error) + return "vulnerabilities." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a GetPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VulnerabilityReport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.GetPatchJobRequest} GetPatchJobRequest + * @returns {google.cloud.osconfig.v1.VulnerabilityReport} VulnerabilityReport */ - GetPatchJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.GetPatchJobRequest) + VulnerabilityReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.VulnerabilityReport) return object; - var message = new $root.google.cloud.osconfig.v1.GetPatchJobRequest(); + var message = new $root.google.cloud.osconfig.v1.VulnerabilityReport(); if (object.name != null) message.name = String(object.name); + if (object.vulnerabilities) { + if (!Array.isArray(object.vulnerabilities)) + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.vulnerabilities: array expected"); + message.vulnerabilities = []; + for (var i = 0; i < object.vulnerabilities.length; ++i) { + if (typeof object.vulnerabilities[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.vulnerabilities: object expected"); + message.vulnerabilities[i] = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.fromObject(object.vulnerabilities[i]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a GetPatchJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a VulnerabilityReport message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @static - * @param {google.cloud.osconfig.v1.GetPatchJobRequest} message GetPatchJobRequest + * @param {google.cloud.osconfig.v1.VulnerabilityReport} message VulnerabilityReport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPatchJobRequest.toObject = function toObject(message, options) { + VulnerabilityReport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) + object.vulnerabilities = []; + if (options.defaults) { object.name = ""; + object.updateTime = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.vulnerabilities && message.vulnerabilities.length) { + object.vulnerabilities = []; + for (var j = 0; j < message.vulnerabilities.length; ++j) + object.vulnerabilities[j] = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.toObject(message.vulnerabilities[j], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this GetPatchJobRequest to JSON. + * Converts this VulnerabilityReport to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @memberof google.cloud.osconfig.v1.VulnerabilityReport * @instance * @returns {Object.} JSON object */ - GetPatchJobRequest.prototype.toJSON = function toJSON() { + VulnerabilityReport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetPatchJobRequest; - })(); + VulnerabilityReport.Vulnerability = (function() { - v1.ListPatchJobInstanceDetailsRequest = (function() { + /** + * Properties of a Vulnerability. + * @memberof google.cloud.osconfig.v1.VulnerabilityReport + * @interface IVulnerability + * @property {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails|null} [details] Vulnerability details + * @property {Array.|null} [installedInventoryItemIds] Vulnerability installedInventoryItemIds + * @property {Array.|null} [availableInventoryItemIds] Vulnerability availableInventoryItemIds + * @property {google.protobuf.ITimestamp|null} [createTime] Vulnerability createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Vulnerability updateTime + */ - /** - * Properties of a ListPatchJobInstanceDetailsRequest. - * @memberof google.cloud.osconfig.v1 - * @interface IListPatchJobInstanceDetailsRequest - * @property {string|null} [parent] ListPatchJobInstanceDetailsRequest parent - * @property {number|null} [pageSize] ListPatchJobInstanceDetailsRequest pageSize - * @property {string|null} [pageToken] ListPatchJobInstanceDetailsRequest pageToken - * @property {string|null} [filter] ListPatchJobInstanceDetailsRequest filter - */ + /** + * Constructs a new Vulnerability. + * @memberof google.cloud.osconfig.v1.VulnerabilityReport + * @classdesc Represents a Vulnerability. + * @implements IVulnerability + * @constructor + * @param {google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability=} [properties] Properties to set + */ + function Vulnerability(properties) { + this.installedInventoryItemIds = []; + this.availableInventoryItemIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListPatchJobInstanceDetailsRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchJobInstanceDetailsRequest. - * @implements IListPatchJobInstanceDetailsRequest - * @constructor - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set - */ - function ListPatchJobInstanceDetailsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Vulnerability details. + * @member {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails|null|undefined} details + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.details = null; - /** - * ListPatchJobInstanceDetailsRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - */ - ListPatchJobInstanceDetailsRequest.prototype.parent = ""; + /** + * Vulnerability installedInventoryItemIds. + * @member {Array.} installedInventoryItemIds + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.installedInventoryItemIds = $util.emptyArray; - /** - * ListPatchJobInstanceDetailsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - */ - ListPatchJobInstanceDetailsRequest.prototype.pageSize = 0; + /** + * Vulnerability availableInventoryItemIds. + * @member {Array.} availableInventoryItemIds + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.availableInventoryItemIds = $util.emptyArray; - /** - * ListPatchJobInstanceDetailsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - */ - ListPatchJobInstanceDetailsRequest.prototype.pageToken = ""; + /** + * Vulnerability createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.createTime = null; - /** - * ListPatchJobInstanceDetailsRequest filter. - * @member {string} filter - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - */ - ListPatchJobInstanceDetailsRequest.prototype.filter = ""; + /** + * Vulnerability updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.updateTime = null; - /** - * Creates a new ListPatchJobInstanceDetailsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest instance - */ - ListPatchJobInstanceDetailsRequest.create = function create(properties) { - return new ListPatchJobInstanceDetailsRequest(properties); - }; + /** + * Creates a new Vulnerability instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability} Vulnerability instance + */ + Vulnerability.create = function create(properties) { + return new Vulnerability(properties); + }; - /** - * Encodes the specified ListPatchJobInstanceDetailsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobInstanceDetailsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - return writer; - }; + /** + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability} message Vulnerability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vulnerability.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.encode(message.details, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.installedInventoryItemIds != null && message.installedInventoryItemIds.length) + for (var i = 0; i < message.installedInventoryItemIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.installedInventoryItemIds[i]); + if (message.availableInventoryItemIds != null && message.availableInventoryItemIds.length) + for (var i = 0; i < message.availableInventoryItemIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.availableInventoryItemIds[i]); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ListPatchJobInstanceDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobInstanceDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.IVulnerability} message Vulnerability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vulnerability.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobInstanceDetailsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a Vulnerability message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability} Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vulnerability.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.installedInventoryItemIds && message.installedInventoryItemIds.length)) + message.installedInventoryItemIds = []; + message.installedInventoryItemIds.push(reader.string()); + break; + case 3: + if (!(message.availableInventoryItemIds && message.availableInventoryItemIds.length)) + message.availableInventoryItemIds = []; + message.availableInventoryItemIds.push(reader.string()); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a ListPatchJobInstanceDetailsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobInstanceDetailsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability} Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vulnerability.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListPatchJobInstanceDetailsRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPatchJobInstanceDetailsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; + /** + * Verifies a Vulnerability message. + * @function verify + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vulnerability.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.details != null && message.hasOwnProperty("details")) { + var error = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.verify(message.details); + if (error) + return "details." + error; + } + if (message.installedInventoryItemIds != null && message.hasOwnProperty("installedInventoryItemIds")) { + if (!Array.isArray(message.installedInventoryItemIds)) + return "installedInventoryItemIds: array expected"; + for (var i = 0; i < message.installedInventoryItemIds.length; ++i) + if (!$util.isString(message.installedInventoryItemIds[i])) + return "installedInventoryItemIds: string[] expected"; + } + if (message.availableInventoryItemIds != null && message.hasOwnProperty("availableInventoryItemIds")) { + if (!Array.isArray(message.availableInventoryItemIds)) + return "availableInventoryItemIds: array expected"; + for (var i = 0; i < message.availableInventoryItemIds.length; ++i) + if (!$util.isString(message.availableInventoryItemIds[i])) + return "availableInventoryItemIds: 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; + } + return null; + }; - /** - * Creates a ListPatchJobInstanceDetailsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} ListPatchJobInstanceDetailsRequest - */ - ListPatchJobInstanceDetailsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; + /** + * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability} Vulnerability + */ + Vulnerability.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability) + return object; + var message = new $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability(); + if (object.details != null) { + if (typeof object.details !== "object") + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.details: object expected"); + message.details = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.fromObject(object.details); + } + if (object.installedInventoryItemIds) { + if (!Array.isArray(object.installedInventoryItemIds)) + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.installedInventoryItemIds: array expected"); + message.installedInventoryItemIds = []; + for (var i = 0; i < object.installedInventoryItemIds.length; ++i) + message.installedInventoryItemIds[i] = String(object.installedInventoryItemIds[i]); + } + if (object.availableInventoryItemIds) { + if (!Array.isArray(object.availableInventoryItemIds)) + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.availableInventoryItemIds: array expected"); + message.availableInventoryItemIds = []; + for (var i = 0; i < object.availableInventoryItemIds.length; ++i) + message.availableInventoryItemIds[i] = String(object.availableInventoryItemIds[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.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.osconfig.v1.VulnerabilityReport.Vulnerability.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; - /** - * Creates a plain object from a ListPatchJobInstanceDetailsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @static - * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest} message ListPatchJobInstanceDetailsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPatchJobInstanceDetailsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; + /** + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability} message Vulnerability + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vulnerability.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.installedInventoryItemIds = []; + object.availableInventoryItemIds = []; + } + if (options.defaults) { + object.details = null; + object.createTime = null; + object.updateTime = null; + } + if (message.details != null && message.hasOwnProperty("details")) + object.details = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.toObject(message.details, options); + if (message.installedInventoryItemIds && message.installedInventoryItemIds.length) { + object.installedInventoryItemIds = []; + for (var j = 0; j < message.installedInventoryItemIds.length; ++j) + object.installedInventoryItemIds[j] = message.installedInventoryItemIds[j]; + } + if (message.availableInventoryItemIds && message.availableInventoryItemIds.length) { + object.availableInventoryItemIds = []; + for (var j = 0; j < message.availableInventoryItemIds.length; ++j) + object.availableInventoryItemIds[j] = message.availableInventoryItemIds[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; - /** - * Converts this ListPatchJobInstanceDetailsRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPatchJobInstanceDetailsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Vulnerability to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @instance + * @returns {Object.} JSON object + */ + Vulnerability.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListPatchJobInstanceDetailsRequest; - })(); + Vulnerability.Details = (function() { - v1.ListPatchJobInstanceDetailsResponse = (function() { + /** + * Properties of a Details. + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @interface IDetails + * @property {string|null} [cve] Details cve + * @property {number|null} [cvssV2Score] Details cvssV2Score + * @property {google.cloud.osconfig.v1.ICVSSv3|null} [cvssV3] Details cvssV3 + * @property {string|null} [severity] Details severity + * @property {string|null} [description] Details description + * @property {Array.|null} [references] Details references + */ + + /** + * Constructs a new Details. + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @classdesc Represents a Details. + * @implements IDetails + * @constructor + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails=} [properties] Properties to set + */ + function Details(properties) { + this.references = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Details cve. + * @member {string} cve + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.cve = ""; + + /** + * Details cvssV2Score. + * @member {number} cvssV2Score + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.cvssV2Score = 0; + + /** + * Details cvssV3. + * @member {google.cloud.osconfig.v1.ICVSSv3|null|undefined} cvssV3 + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.cvssV3 = null; + + /** + * Details severity. + * @member {string} severity + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.severity = ""; + + /** + * Details description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.description = ""; + + /** + * Details references. + * @member {Array.} references + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.references = $util.emptyArray; + + /** + * Creates a new Details instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details} Details instance + */ + Details.create = function create(properties) { + return new Details(properties); + }; + + /** + * Encodes the specified Details message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails} message Details message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Details.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cve != null && Object.hasOwnProperty.call(message, "cve")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cve); + if (message.cvssV2Score != null && Object.hasOwnProperty.call(message, "cvssV2Score")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.cvssV2Score); + if (message.cvssV3 != null && Object.hasOwnProperty.call(message, "cvssV3")) + $root.google.cloud.osconfig.v1.CVSSv3.encode(message.cvssV3, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.severity); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.encode(message.references[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IDetails} message Details message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Details.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Details message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details} Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Details.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cve = reader.string(); + break; + case 2: + message.cvssV2Score = reader.float(); + break; + case 3: + message.cvssV3 = $root.google.cloud.osconfig.v1.CVSSv3.decode(reader, reader.uint32()); + break; + case 4: + message.severity = reader.string(); + break; + case 5: + message.description = reader.string(); + break; + case 6: + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Details message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details} Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Details.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Details message. + * @function verify + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Details.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cve != null && message.hasOwnProperty("cve")) + if (!$util.isString(message.cve)) + return "cve: string expected"; + if (message.cvssV2Score != null && message.hasOwnProperty("cvssV2Score")) + if (typeof message.cvssV2Score !== "number") + return "cvssV2Score: number expected"; + if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) { + var error = $root.google.cloud.osconfig.v1.CVSSv3.verify(message.cvssV3); + if (error) + return "cvssV3." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.verify(message.references[i]); + if (error) + return "references." + error; + } + } + return null; + }; + + /** + * Creates a Details message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details} Details + */ + Details.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details) + return object; + var message = new $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details(); + if (object.cve != null) + message.cve = String(object.cve); + if (object.cvssV2Score != null) + message.cvssV2Score = Number(object.cvssV2Score); + if (object.cvssV3 != null) { + if (typeof object.cvssV3 !== "object") + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.cvssV3: object expected"); + message.cvssV3 = $root.google.cloud.osconfig.v1.CVSSv3.fromObject(object.cvssV3); + } + if (object.severity != null) + message.severity = String(object.severity); + if (object.description != null) + message.description = String(object.description); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.references: object expected"); + message.references[i] = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.fromObject(object.references[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Details message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details} message Details + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Details.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.references = []; + if (options.defaults) { + object.cve = ""; + object.cvssV2Score = 0; + object.cvssV3 = null; + object.severity = ""; + object.description = ""; + } + if (message.cve != null && message.hasOwnProperty("cve")) + object.cve = message.cve; + if (message.cvssV2Score != null && message.hasOwnProperty("cvssV2Score")) + object.cvssV2Score = options.json && !isFinite(message.cvssV2Score) ? String(message.cvssV2Score) : message.cvssV2Score; + if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) + object.cvssV3 = $root.google.cloud.osconfig.v1.CVSSv3.toObject(message.cvssV3, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.toObject(message.references[j], options); + } + return object; + }; + + /** + * Converts this Details to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @instance + * @returns {Object.} JSON object + */ + Details.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Details.Reference = (function() { + + /** + * Properties of a Reference. + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @interface IReference + * @property {string|null} [url] Reference url + * @property {string|null} [source] Reference source + */ + + /** + * Constructs a new Reference. + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @classdesc Represents a Reference. + * @implements IReference + * @constructor + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference=} [properties] Properties to set + */ + function Reference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Reference url. + * @member {string} url + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @instance + */ + Reference.prototype.url = ""; + + /** + * Reference source. + * @member {string} source + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @instance + */ + Reference.prototype.source = ""; + + /** + * Creates a new Reference instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference} Reference instance + */ + Reference.create = function create(properties) { + return new Reference(properties); + }; + + /** + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference} message Reference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.source); + return writer; + }; + + /** + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.IReference} message Reference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Reference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference} Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.url = reader.string(); + break; + case 2: + message.source = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Reference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference} Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Reference message. + * @function verify + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Reference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + return null; + }; + + /** + * Creates a Reference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference} Reference + */ + Reference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference) + return object; + var message = new $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference(); + if (object.url != null) + message.url = String(object.url); + if (object.source != null) + message.source = String(object.source); + return message; + }; + + /** + * Creates a plain object from a Reference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference} message Reference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Reference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.source = ""; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + return object; + }; + + /** + * Converts this Reference to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @instance + * @returns {Object.} JSON object + */ + Reference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Reference; + })(); + + return Details; + })(); + + return Vulnerability; + })(); + + return VulnerabilityReport; + })(); + + v1.GetVulnerabilityReportRequest = (function() { /** - * Properties of a ListPatchJobInstanceDetailsResponse. + * Properties of a GetVulnerabilityReportRequest. * @memberof google.cloud.osconfig.v1 - * @interface IListPatchJobInstanceDetailsResponse - * @property {Array.|null} [patchJobInstanceDetails] ListPatchJobInstanceDetailsResponse patchJobInstanceDetails - * @property {string|null} [nextPageToken] ListPatchJobInstanceDetailsResponse nextPageToken + * @interface IGetVulnerabilityReportRequest + * @property {string|null} [name] GetVulnerabilityReportRequest name */ /** - * Constructs a new ListPatchJobInstanceDetailsResponse. + * Constructs a new GetVulnerabilityReportRequest. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchJobInstanceDetailsResponse. - * @implements IListPatchJobInstanceDetailsResponse + * @classdesc Represents a GetVulnerabilityReportRequest. + * @implements IGetVulnerabilityReportRequest * @constructor - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IGetVulnerabilityReportRequest=} [properties] Properties to set */ - function ListPatchJobInstanceDetailsResponse(properties) { - this.patchJobInstanceDetails = []; + function GetVulnerabilityReportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17313,91 +15979,75 @@ } /** - * ListPatchJobInstanceDetailsResponse patchJobInstanceDetails. - * @member {Array.} patchJobInstanceDetails - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - * @instance - */ - ListPatchJobInstanceDetailsResponse.prototype.patchJobInstanceDetails = $util.emptyArray; - - /** - * ListPatchJobInstanceDetailsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * GetVulnerabilityReportRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @instance */ - ListPatchJobInstanceDetailsResponse.prototype.nextPageToken = ""; + GetVulnerabilityReportRequest.prototype.name = ""; /** - * Creates a new ListPatchJobInstanceDetailsResponse instance using the specified properties. + * Creates a new GetVulnerabilityReportRequest instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse instance + * @param {google.cloud.osconfig.v1.IGetVulnerabilityReportRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest instance */ - ListPatchJobInstanceDetailsResponse.create = function create(properties) { - return new ListPatchJobInstanceDetailsResponse(properties); + GetVulnerabilityReportRequest.create = function create(properties) { + return new GetVulnerabilityReportRequest(properties); }; /** - * Encodes the specified ListPatchJobInstanceDetailsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * Encodes the specified GetVulnerabilityReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetVulnerabilityReportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param {google.cloud.osconfig.v1.IGetVulnerabilityReportRequest} message GetVulnerabilityReportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPatchJobInstanceDetailsResponse.encode = function encode(message, writer) { + GetVulnerabilityReportRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.patchJobInstanceDetails != null && message.patchJobInstanceDetails.length) - for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) - $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.encode(message.patchJobInstanceDetails[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListPatchJobInstanceDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.verify|verify} messages. + * Encodes the specified GetVulnerabilityReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetVulnerabilityReportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @static - * @param {google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse message or plain object to encode + * @param {google.cloud.osconfig.v1.IGetVulnerabilityReportRequest} message GetVulnerabilityReportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPatchJobInstanceDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetVulnerabilityReportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer. + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + * @returns {google.cloud.osconfig.v1.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPatchJobInstanceDetailsResponse.decode = function decode(reader, length) { + GetVulnerabilityReportRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetVulnerabilityReportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.patchJobInstanceDetails && message.patchJobInstanceDetails.length)) - message.patchJobInstanceDetails = []; - message.patchJobInstanceDetails.push($root.google.cloud.osconfig.v1.PatchJobInstanceDetails.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -17408,137 +16058,110 @@ }; /** - * Decodes a ListPatchJobInstanceDetailsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + * @returns {google.cloud.osconfig.v1.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPatchJobInstanceDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + GetVulnerabilityReportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPatchJobInstanceDetailsResponse message. + * Verifies a GetVulnerabilityReportRequest message. * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPatchJobInstanceDetailsResponse.verify = function verify(message) { + GetVulnerabilityReportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.patchJobInstanceDetails != null && message.hasOwnProperty("patchJobInstanceDetails")) { - if (!Array.isArray(message.patchJobInstanceDetails)) - return "patchJobInstanceDetails: array expected"; - for (var i = 0; i < message.patchJobInstanceDetails.length; ++i) { - var error = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.verify(message.patchJobInstanceDetails[i]); - if (error) - return "patchJobInstanceDetails." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListPatchJobInstanceDetailsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetVulnerabilityReportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} ListPatchJobInstanceDetailsResponse + * @returns {google.cloud.osconfig.v1.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest */ - ListPatchJobInstanceDetailsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) + GetVulnerabilityReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetVulnerabilityReportRequest) return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse(); - if (object.patchJobInstanceDetails) { - if (!Array.isArray(object.patchJobInstanceDetails)) - throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: array expected"); - message.patchJobInstanceDetails = []; - for (var i = 0; i < object.patchJobInstanceDetails.length; ++i) { - if (typeof object.patchJobInstanceDetails[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse.patchJobInstanceDetails: object expected"); - message.patchJobInstanceDetails[i] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.fromObject(object.patchJobInstanceDetails[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.osconfig.v1.GetVulnerabilityReportRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListPatchJobInstanceDetailsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetVulnerabilityReportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @static - * @param {google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse} message ListPatchJobInstanceDetailsResponse + * @param {google.cloud.osconfig.v1.GetVulnerabilityReportRequest} message GetVulnerabilityReportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPatchJobInstanceDetailsResponse.toObject = function toObject(message, options) { + GetVulnerabilityReportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.patchJobInstanceDetails = []; if (options.defaults) - object.nextPageToken = ""; - if (message.patchJobInstanceDetails && message.patchJobInstanceDetails.length) { - object.patchJobInstanceDetails = []; - for (var j = 0; j < message.patchJobInstanceDetails.length; ++j) - object.patchJobInstanceDetails[j] = $root.google.cloud.osconfig.v1.PatchJobInstanceDetails.toObject(message.patchJobInstanceDetails[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListPatchJobInstanceDetailsResponse to JSON. + * Converts this GetVulnerabilityReportRequest to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest * @instance * @returns {Object.} JSON object */ - ListPatchJobInstanceDetailsResponse.prototype.toJSON = function toJSON() { + GetVulnerabilityReportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListPatchJobInstanceDetailsResponse; + return GetVulnerabilityReportRequest; })(); - v1.PatchJobInstanceDetails = (function() { + v1.ListVulnerabilityReportsRequest = (function() { /** - * Properties of a PatchJobInstanceDetails. + * Properties of a ListVulnerabilityReportsRequest. * @memberof google.cloud.osconfig.v1 - * @interface IPatchJobInstanceDetails - * @property {string|null} [name] PatchJobInstanceDetails name - * @property {string|null} [instanceSystemId] PatchJobInstanceDetails instanceSystemId - * @property {google.cloud.osconfig.v1.Instance.PatchState|null} [state] PatchJobInstanceDetails state - * @property {string|null} [failureReason] PatchJobInstanceDetails failureReason - * @property {number|Long|null} [attemptCount] PatchJobInstanceDetails attemptCount + * @interface IListVulnerabilityReportsRequest + * @property {string|null} [parent] ListVulnerabilityReportsRequest parent + * @property {number|null} [pageSize] ListVulnerabilityReportsRequest pageSize + * @property {string|null} [pageToken] ListVulnerabilityReportsRequest pageToken + * @property {string|null} [filter] ListVulnerabilityReportsRequest filter */ /** - * Constructs a new PatchJobInstanceDetails. + * Constructs a new ListVulnerabilityReportsRequest. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchJobInstanceDetails. - * @implements IPatchJobInstanceDetails + * @classdesc Represents a ListVulnerabilityReportsRequest. + * @implements IListVulnerabilityReportsRequest * @constructor - * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsRequest=} [properties] Properties to set */ - function PatchJobInstanceDetails(properties) { + function ListVulnerabilityReportsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17546,127 +16169,114 @@ } /** - * PatchJobInstanceDetails name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails - * @instance - */ - PatchJobInstanceDetails.prototype.name = ""; - - /** - * PatchJobInstanceDetails instanceSystemId. - * @member {string} instanceSystemId - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * ListVulnerabilityReportsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @instance */ - PatchJobInstanceDetails.prototype.instanceSystemId = ""; + ListVulnerabilityReportsRequest.prototype.parent = ""; /** - * PatchJobInstanceDetails state. - * @member {google.cloud.osconfig.v1.Instance.PatchState} state - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * ListVulnerabilityReportsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @instance */ - PatchJobInstanceDetails.prototype.state = 0; + ListVulnerabilityReportsRequest.prototype.pageSize = 0; /** - * PatchJobInstanceDetails failureReason. - * @member {string} failureReason - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * ListVulnerabilityReportsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @instance */ - PatchJobInstanceDetails.prototype.failureReason = ""; + ListVulnerabilityReportsRequest.prototype.pageToken = ""; /** - * PatchJobInstanceDetails attemptCount. - * @member {number|Long} attemptCount - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * ListVulnerabilityReportsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @instance */ - PatchJobInstanceDetails.prototype.attemptCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ListVulnerabilityReportsRequest.prototype.filter = ""; /** - * Creates a new PatchJobInstanceDetails instance using the specified properties. + * Creates a new ListVulnerabilityReportsRequest instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @static - * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails instance + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest instance */ - PatchJobInstanceDetails.create = function create(properties) { - return new PatchJobInstanceDetails(properties); + ListVulnerabilityReportsRequest.create = function create(properties) { + return new ListVulnerabilityReportsRequest(properties); }; /** - * Encodes the specified PatchJobInstanceDetails message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * Encodes the specified ListVulnerabilityReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListVulnerabilityReportsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @static - * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PatchJobInstanceDetails.encode = function encode(message, writer) { + ListVulnerabilityReportsRequest.encode = function encode(message, writer) { 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.instanceSystemId != null && Object.hasOwnProperty.call(message, "instanceSystemId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceSystemId); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.failureReason); - if (message.attemptCount != null && Object.hasOwnProperty.call(message, "attemptCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.attemptCount); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); return writer; }; /** - * Encodes the specified PatchJobInstanceDetails message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJobInstanceDetails.verify|verify} messages. + * Encodes the specified ListVulnerabilityReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListVulnerabilityReportsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @static - * @param {google.cloud.osconfig.v1.IPatchJobInstanceDetails} message PatchJobInstanceDetails message or plain object to encode + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PatchJobInstanceDetails.encodeDelimited = function encodeDelimited(message, writer) { + ListVulnerabilityReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PatchJobInstanceDetails message from the specified reader or buffer. + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + * @returns {google.cloud.osconfig.v1.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PatchJobInstanceDetails.decode = function decode(reader, length) { + ListVulnerabilityReportsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.instanceSystemId = reader.string(); + message.pageSize = reader.int32(); break; case 3: - message.state = reader.int32(); + message.pageToken = reader.string(); break; case 4: - message.failureReason = reader.string(); - break; - case 5: - message.attemptCount = reader.int64(); + message.filter = reader.string(); break; default: reader.skipType(tag & 7); @@ -17677,240 +16287,134 @@ }; /** - * Decodes a PatchJobInstanceDetails message from the specified reader or buffer, length delimited. + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + * @returns {google.cloud.osconfig.v1.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PatchJobInstanceDetails.decodeDelimited = function decodeDelimited(reader) { + ListVulnerabilityReportsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PatchJobInstanceDetails message. + * Verifies a ListVulnerabilityReportsRequest message. * @function verify - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PatchJobInstanceDetails.verify = function verify(message) { + ListVulnerabilityReportsRequest.verify = function verify(message) { if (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.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) - if (!$util.isString(message.instanceSystemId)) - return "instanceSystemId: 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: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - break; - } - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - if (!$util.isString(message.failureReason)) - return "failureReason: string expected"; - if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) - if (!$util.isInteger(message.attemptCount) && !(message.attemptCount && $util.isInteger(message.attemptCount.low) && $util.isInteger(message.attemptCount.high))) - return "attemptCount: integer|Long expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates a PatchJobInstanceDetails message from a plain object. Also converts values to their respective internal types. + * Creates a ListVulnerabilityReportsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchJobInstanceDetails} PatchJobInstanceDetails + * @returns {google.cloud.osconfig.v1.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest */ - PatchJobInstanceDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchJobInstanceDetails) + ListVulnerabilityReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest) return object; - var message = new $root.google.cloud.osconfig.v1.PatchJobInstanceDetails(); - if (object.name != null) - message.name = String(object.name); - if (object.instanceSystemId != null) - message.instanceSystemId = String(object.instanceSystemId); - switch (object.state) { - case "PATCH_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; - case "NOTIFIED": - case 3: - message.state = 3; - break; - case "STARTED": - case 4: - message.state = 4; - break; - case "DOWNLOADING_PATCHES": - case 5: - message.state = 5; - break; - case "APPLYING_PATCHES": - case 6: - message.state = 6; - break; - case "REBOOTING": - case 7: - message.state = 7; - break; - case "SUCCEEDED": - case 8: - message.state = 8; - break; - case "SUCCEEDED_REBOOT_REQUIRED": - case 9: - message.state = 9; - break; - case "FAILED": - case 10: - message.state = 10; - break; - case "ACKED": - case 11: - message.state = 11; - break; - case "TIMED_OUT": - case 12: - message.state = 12; - break; - case "RUNNING_PRE_PATCH_STEP": - case 13: - message.state = 13; - break; - case "RUNNING_POST_PATCH_STEP": - case 14: - message.state = 14; - break; - case "NO_AGENT_DETECTED": - case 15: - message.state = 15; - break; - } - if (object.failureReason != null) - message.failureReason = String(object.failureReason); - if (object.attemptCount != null) - if ($util.Long) - (message.attemptCount = $util.Long.fromValue(object.attemptCount)).unsigned = false; - else if (typeof object.attemptCount === "string") - message.attemptCount = parseInt(object.attemptCount, 10); - else if (typeof object.attemptCount === "number") - message.attemptCount = object.attemptCount; - else if (typeof object.attemptCount === "object") - message.attemptCount = new $util.LongBits(object.attemptCount.low >>> 0, object.attemptCount.high >>> 0).toNumber(); + var message = new $root.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from a PatchJobInstanceDetails message. Also converts values to other types if specified. + * Creates a plain object from a ListVulnerabilityReportsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @static - * @param {google.cloud.osconfig.v1.PatchJobInstanceDetails} message PatchJobInstanceDetails + * @param {google.cloud.osconfig.v1.ListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PatchJobInstanceDetails.toObject = function toObject(message, options) { + ListVulnerabilityReportsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.instanceSystemId = ""; - object.state = options.enums === String ? "PATCH_STATE_UNSPECIFIED" : 0; - object.failureReason = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.attemptCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.attemptCount = options.longs === String ? "0" : 0; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) - object.instanceSystemId = message.instanceSystemId; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1.Instance.PatchState[message.state] : message.state; - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - object.failureReason = message.failureReason; - if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) - if (typeof message.attemptCount === "number") - object.attemptCount = options.longs === String ? String(message.attemptCount) : message.attemptCount; - else - object.attemptCount = options.longs === String ? $util.Long.prototype.toString.call(message.attemptCount) : options.longs === Number ? new $util.LongBits(message.attemptCount.low >>> 0, message.attemptCount.high >>> 0).toNumber() : message.attemptCount; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this PatchJobInstanceDetails to JSON. + * Converts this ListVulnerabilityReportsRequest to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest * @instance * @returns {Object.} JSON object */ - PatchJobInstanceDetails.prototype.toJSON = function toJSON() { + ListVulnerabilityReportsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PatchJobInstanceDetails; + return ListVulnerabilityReportsRequest; })(); - v1.ListPatchJobsRequest = (function() { + v1.ListVulnerabilityReportsResponse = (function() { /** - * Properties of a ListPatchJobsRequest. + * Properties of a ListVulnerabilityReportsResponse. * @memberof google.cloud.osconfig.v1 - * @interface IListPatchJobsRequest - * @property {string|null} [parent] ListPatchJobsRequest parent - * @property {number|null} [pageSize] ListPatchJobsRequest pageSize - * @property {string|null} [pageToken] ListPatchJobsRequest pageToken - * @property {string|null} [filter] ListPatchJobsRequest filter + * @interface IListVulnerabilityReportsResponse + * @property {Array.|null} [vulnerabilityReports] ListVulnerabilityReportsResponse vulnerabilityReports + * @property {string|null} [nextPageToken] ListVulnerabilityReportsResponse nextPageToken */ /** - * Constructs a new ListPatchJobsRequest. + * Constructs a new ListVulnerabilityReportsResponse. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchJobsRequest. - * @implements IListPatchJobsRequest + * @classdesc Represents a ListVulnerabilityReportsResponse. + * @implements IListVulnerabilityReportsResponse * @constructor - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsResponse=} [properties] Properties to set */ - function ListPatchJobsRequest(properties) { + function ListVulnerabilityReportsResponse(properties) { + this.vulnerabilityReports = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17918,114 +16422,91 @@ } /** - * ListPatchJobsRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @instance - */ - ListPatchJobsRequest.prototype.parent = ""; - - /** - * ListPatchJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @instance - */ - ListPatchJobsRequest.prototype.pageSize = 0; - - /** - * ListPatchJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * ListVulnerabilityReportsResponse vulnerabilityReports. + * @member {Array.} vulnerabilityReports + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @instance */ - ListPatchJobsRequest.prototype.pageToken = ""; + ListVulnerabilityReportsResponse.prototype.vulnerabilityReports = $util.emptyArray; /** - * ListPatchJobsRequest filter. - * @member {string} filter - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * ListVulnerabilityReportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @instance */ - ListPatchJobsRequest.prototype.filter = ""; + ListVulnerabilityReportsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListPatchJobsRequest instance using the specified properties. + * Creates a new ListVulnerabilityReportsResponse instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest instance + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse instance */ - ListPatchJobsRequest.create = function create(properties) { - return new ListPatchJobsRequest(properties); + ListVulnerabilityReportsResponse.create = function create(properties) { + return new ListVulnerabilityReportsResponse(properties); }; /** - * Encodes the specified ListPatchJobsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * Encodes the specified ListVulnerabilityReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListVulnerabilityReportsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPatchJobsRequest.encode = function encode(message, writer) { + ListVulnerabilityReportsResponse.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.vulnerabilityReports != null && message.vulnerabilityReports.length) + for (var i = 0; i < message.vulnerabilityReports.length; ++i) + $root.google.cloud.osconfig.v1.VulnerabilityReport.encode(message.vulnerabilityReports[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 ListPatchJobsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsRequest.verify|verify} messages. + * Encodes the specified ListVulnerabilityReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListVulnerabilityReportsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsRequest} message ListPatchJobsRequest message or plain object to encode + * @param {google.cloud.osconfig.v1.IListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPatchJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListVulnerabilityReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPatchJobsRequest message from the specified reader or buffer. + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + * @returns {google.cloud.osconfig.v1.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPatchJobsRequest.decode = function decode(reader, length) { + ListVulnerabilityReportsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListVulnerabilityReportsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.vulnerabilityReports && message.vulnerabilityReports.length)) + message.vulnerabilityReports = []; + message.vulnerabilityReports.push($root.google.cloud.osconfig.v1.VulnerabilityReport.decode(reader, reader.uint32())); break; case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -18036,269 +16517,39 @@ }; /** - * Decodes a ListPatchJobsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest + * @returns {google.cloud.osconfig.v1.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPatchJobsRequest.decodeDelimited = function decodeDelimited(reader) { + ListVulnerabilityReportsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPatchJobsRequest message. + * Verifies a ListVulnerabilityReportsResponse message. * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPatchJobsRequest.verify = function verify(message) { + ListVulnerabilityReportsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListPatchJobsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchJobsRequest} ListPatchJobsRequest - */ - ListPatchJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsRequest) - return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchJobsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListPatchJobsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @static - * @param {google.cloud.osconfig.v1.ListPatchJobsRequest} message ListPatchJobsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPatchJobsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListPatchJobsRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPatchJobsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListPatchJobsRequest; - })(); - - v1.ListPatchJobsResponse = (function() { - - /** - * Properties of a ListPatchJobsResponse. - * @memberof google.cloud.osconfig.v1 - * @interface IListPatchJobsResponse - * @property {Array.|null} [patchJobs] ListPatchJobsResponse patchJobs - * @property {string|null} [nextPageToken] ListPatchJobsResponse nextPageToken - */ - - /** - * Constructs a new ListPatchJobsResponse. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ListPatchJobsResponse. - * @implements IListPatchJobsResponse - * @constructor - * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set - */ - function ListPatchJobsResponse(properties) { - this.patchJobs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPatchJobsResponse patchJobs. - * @member {Array.} patchJobs - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @instance - */ - ListPatchJobsResponse.prototype.patchJobs = $util.emptyArray; - - /** - * ListPatchJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @instance - */ - ListPatchJobsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListPatchJobsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse instance - */ - ListPatchJobsResponse.create = function create(properties) { - return new ListPatchJobsResponse(properties); - }; - - /** - * Encodes the specified ListPatchJobsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.patchJobs != null && message.patchJobs.length) - for (var i = 0; i < message.patchJobs.length; ++i) - $root.google.cloud.osconfig.v1.PatchJob.encode(message.patchJobs[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 ListPatchJobsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListPatchJobsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {google.cloud.osconfig.v1.IListPatchJobsResponse} message ListPatchJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPatchJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPatchJobsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.patchJobs && message.patchJobs.length)) - message.patchJobs = []; - message.patchJobs.push($root.google.cloud.osconfig.v1.PatchJob.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPatchJobsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPatchJobsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPatchJobsResponse message. - * @function verify - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPatchJobsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.patchJobs != null && message.hasOwnProperty("patchJobs")) { - if (!Array.isArray(message.patchJobs)) - return "patchJobs: array expected"; - for (var i = 0; i < message.patchJobs.length; ++i) { - var error = $root.google.cloud.osconfig.v1.PatchJob.verify(message.patchJobs[i]); + if (message.vulnerabilityReports != null && message.hasOwnProperty("vulnerabilityReports")) { + if (!Array.isArray(message.vulnerabilityReports)) + return "vulnerabilityReports: array expected"; + for (var i = 0; i < message.vulnerabilityReports.length; ++i) { + var error = $root.google.cloud.osconfig.v1.VulnerabilityReport.verify(message.vulnerabilityReports[i]); if (error) - return "patchJobs." + error; + return "vulnerabilityReports." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -18308,25 +16559,25 @@ }; /** - * Creates a ListPatchJobsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListVulnerabilityReportsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ListPatchJobsResponse} ListPatchJobsResponse + * @returns {google.cloud.osconfig.v1.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse */ - ListPatchJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ListPatchJobsResponse) + ListVulnerabilityReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListVulnerabilityReportsResponse) return object; - var message = new $root.google.cloud.osconfig.v1.ListPatchJobsResponse(); - if (object.patchJobs) { - if (!Array.isArray(object.patchJobs)) - throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: array expected"); - message.patchJobs = []; - for (var i = 0; i < object.patchJobs.length; ++i) { - if (typeof object.patchJobs[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1.ListPatchJobsResponse.patchJobs: object expected"); - message.patchJobs[i] = $root.google.cloud.osconfig.v1.PatchJob.fromObject(object.patchJobs[i]); + var message = new $root.google.cloud.osconfig.v1.ListVulnerabilityReportsResponse(); + if (object.vulnerabilityReports) { + if (!Array.isArray(object.vulnerabilityReports)) + throw TypeError(".google.cloud.osconfig.v1.ListVulnerabilityReportsResponse.vulnerabilityReports: array expected"); + message.vulnerabilityReports = []; + for (var i = 0; i < object.vulnerabilityReports.length; ++i) { + if (typeof object.vulnerabilityReports[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListVulnerabilityReportsResponse.vulnerabilityReports: object expected"); + message.vulnerabilityReports[i] = $root.google.cloud.osconfig.v1.VulnerabilityReport.fromObject(object.vulnerabilityReports[i]); } } if (object.nextPageToken != null) @@ -18335,26 +16586,26 @@ }; /** - * Creates a plain object from a ListPatchJobsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListVulnerabilityReportsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @static - * @param {google.cloud.osconfig.v1.ListPatchJobsResponse} message ListPatchJobsResponse + * @param {google.cloud.osconfig.v1.ListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPatchJobsResponse.toObject = function toObject(message, options) { + ListVulnerabilityReportsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.patchJobs = []; + object.vulnerabilityReports = []; if (options.defaults) object.nextPageToken = ""; - if (message.patchJobs && message.patchJobs.length) { - object.patchJobs = []; - for (var j = 0; j < message.patchJobs.length; ++j) - object.patchJobs[j] = $root.google.cloud.osconfig.v1.PatchJob.toObject(message.patchJobs[j], options); + if (message.vulnerabilityReports && message.vulnerabilityReports.length) { + object.vulnerabilityReports = []; + for (var j = 0; j < message.vulnerabilityReports.length; ++j) + object.vulnerabilityReports[j] = $root.google.cloud.osconfig.v1.VulnerabilityReport.toObject(message.vulnerabilityReports[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -18362,51 +16613,47 @@ }; /** - * Converts this ListPatchJobsResponse to JSON. + * Converts this ListVulnerabilityReportsResponse to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse * @instance * @returns {Object.} JSON object */ - ListPatchJobsResponse.prototype.toJSON = function toJSON() { + ListVulnerabilityReportsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListPatchJobsResponse; + return ListVulnerabilityReportsResponse; })(); - v1.PatchJob = (function() { + v1.CVSSv3 = (function() { /** - * Properties of a PatchJob. + * Properties of a CVSSv3. * @memberof google.cloud.osconfig.v1 - * @interface IPatchJob - * @property {string|null} [name] PatchJob name - * @property {string|null} [displayName] PatchJob displayName - * @property {string|null} [description] PatchJob description - * @property {google.protobuf.ITimestamp|null} [createTime] PatchJob createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PatchJob updateTime - * @property {google.cloud.osconfig.v1.PatchJob.State|null} [state] PatchJob state - * @property {google.cloud.osconfig.v1.IPatchInstanceFilter|null} [instanceFilter] PatchJob instanceFilter - * @property {google.cloud.osconfig.v1.IPatchConfig|null} [patchConfig] PatchJob patchConfig - * @property {google.protobuf.IDuration|null} [duration] PatchJob duration - * @property {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null} [instanceDetailsSummary] PatchJob instanceDetailsSummary - * @property {boolean|null} [dryRun] PatchJob dryRun - * @property {string|null} [errorMessage] PatchJob errorMessage - * @property {number|null} [percentComplete] PatchJob percentComplete - * @property {string|null} [patchDeployment] PatchJob patchDeployment - * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] PatchJob rollout + * @interface ICVSSv3 + * @property {number|null} [baseScore] CVSSv3 baseScore + * @property {number|null} [exploitabilityScore] CVSSv3 exploitabilityScore + * @property {number|null} [impactScore] CVSSv3 impactScore + * @property {google.cloud.osconfig.v1.CVSSv3.AttackVector|null} [attackVector] CVSSv3 attackVector + * @property {google.cloud.osconfig.v1.CVSSv3.AttackComplexity|null} [attackComplexity] CVSSv3 attackComplexity + * @property {google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired|null} [privilegesRequired] CVSSv3 privilegesRequired + * @property {google.cloud.osconfig.v1.CVSSv3.UserInteraction|null} [userInteraction] CVSSv3 userInteraction + * @property {google.cloud.osconfig.v1.CVSSv3.Scope|null} [scope] CVSSv3 scope + * @property {google.cloud.osconfig.v1.CVSSv3.Impact|null} [confidentialityImpact] CVSSv3 confidentialityImpact + * @property {google.cloud.osconfig.v1.CVSSv3.Impact|null} [integrityImpact] CVSSv3 integrityImpact + * @property {google.cloud.osconfig.v1.CVSSv3.Impact|null} [availabilityImpact] CVSSv3 availabilityImpact */ /** - * Constructs a new PatchJob. + * Constructs a new CVSSv3. * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchJob. - * @implements IPatchJob + * @classdesc Represents a CVSSv3. + * @implements ICVSSv3 * @constructor - * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set + * @param {google.cloud.osconfig.v1.ICVSSv3=} [properties] Properties to set */ - function PatchJob(properties) { + function CVSSv3(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18414,257 +16661,205 @@ } /** - * PatchJob name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.name = ""; - - /** - * PatchJob displayName. - * @member {string} displayName - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.displayName = ""; - - /** - * PatchJob description. - * @member {string} description - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.description = ""; - - /** - * PatchJob createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.osconfig.v1.PatchJob - * @instance - */ - PatchJob.prototype.createTime = null; - - /** - * PatchJob updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 baseScore. + * @member {number} baseScore + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.updateTime = null; + CVSSv3.prototype.baseScore = 0; /** - * PatchJob state. - * @member {google.cloud.osconfig.v1.PatchJob.State} state - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 exploitabilityScore. + * @member {number} exploitabilityScore + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.state = 0; + CVSSv3.prototype.exploitabilityScore = 0; /** - * PatchJob instanceFilter. - * @member {google.cloud.osconfig.v1.IPatchInstanceFilter|null|undefined} instanceFilter - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 impactScore. + * @member {number} impactScore + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.instanceFilter = null; + CVSSv3.prototype.impactScore = 0; /** - * PatchJob patchConfig. - * @member {google.cloud.osconfig.v1.IPatchConfig|null|undefined} patchConfig - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 attackVector. + * @member {google.cloud.osconfig.v1.CVSSv3.AttackVector} attackVector + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.patchConfig = null; + CVSSv3.prototype.attackVector = 0; /** - * PatchJob duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 attackComplexity. + * @member {google.cloud.osconfig.v1.CVSSv3.AttackComplexity} attackComplexity + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.duration = null; + CVSSv3.prototype.attackComplexity = 0; /** - * PatchJob instanceDetailsSummary. - * @member {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary|null|undefined} instanceDetailsSummary - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 privilegesRequired. + * @member {google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired} privilegesRequired + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.instanceDetailsSummary = null; + CVSSv3.prototype.privilegesRequired = 0; /** - * PatchJob dryRun. - * @member {boolean} dryRun - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 userInteraction. + * @member {google.cloud.osconfig.v1.CVSSv3.UserInteraction} userInteraction + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.dryRun = false; + CVSSv3.prototype.userInteraction = 0; /** - * PatchJob errorMessage. - * @member {string} errorMessage - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 scope. + * @member {google.cloud.osconfig.v1.CVSSv3.Scope} scope + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.errorMessage = ""; + CVSSv3.prototype.scope = 0; /** - * PatchJob percentComplete. - * @member {number} percentComplete - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 confidentialityImpact. + * @member {google.cloud.osconfig.v1.CVSSv3.Impact} confidentialityImpact + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.percentComplete = 0; + CVSSv3.prototype.confidentialityImpact = 0; /** - * PatchJob patchDeployment. - * @member {string} patchDeployment - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 integrityImpact. + * @member {google.cloud.osconfig.v1.CVSSv3.Impact} integrityImpact + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.patchDeployment = ""; + CVSSv3.prototype.integrityImpact = 0; /** - * PatchJob rollout. - * @member {google.cloud.osconfig.v1.IPatchRollout|null|undefined} rollout - * @memberof google.cloud.osconfig.v1.PatchJob + * CVSSv3 availabilityImpact. + * @member {google.cloud.osconfig.v1.CVSSv3.Impact} availabilityImpact + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance */ - PatchJob.prototype.rollout = null; + CVSSv3.prototype.availabilityImpact = 0; /** - * Creates a new PatchJob instance using the specified properties. + * Creates a new CVSSv3 instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.PatchJob + * @memberof google.cloud.osconfig.v1.CVSSv3 * @static - * @param {google.cloud.osconfig.v1.IPatchJob=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob instance + * @param {google.cloud.osconfig.v1.ICVSSv3=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.CVSSv3} CVSSv3 instance */ - PatchJob.create = function create(properties) { - return new PatchJob(properties); + CVSSv3.create = function create(properties) { + return new CVSSv3(properties); }; /** - * Encodes the specified PatchJob message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * Encodes the specified CVSSv3 message. Does not implicitly {@link google.cloud.osconfig.v1.CVSSv3.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.PatchJob + * @memberof google.cloud.osconfig.v1.CVSSv3 * @static - * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode + * @param {google.cloud.osconfig.v1.ICVSSv3} message CVSSv3 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PatchJob.encode = function encode(message, writer) { + CVSSv3.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.patchConfig != null && Object.hasOwnProperty.call(message, "patchConfig")) - $root.google.cloud.osconfig.v1.PatchConfig.encode(message.patchConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.instanceDetailsSummary != null && Object.hasOwnProperty.call(message, "instanceDetailsSummary")) - $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.encode(message.instanceDetailsSummary, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.dryRun); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.errorMessage); - if (message.percentComplete != null && Object.hasOwnProperty.call(message, "percentComplete")) - writer.uint32(/* id 12, wireType 1 =*/97).double(message.percentComplete); - if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) - $root.google.cloud.osconfig.v1.PatchInstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.displayName); - if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.patchDeployment); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.baseScore); + if (message.exploitabilityScore != null && Object.hasOwnProperty.call(message, "exploitabilityScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.exploitabilityScore); + if (message.impactScore != null && Object.hasOwnProperty.call(message, "impactScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.impactScore); + if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attackVector); + if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.attackComplexity); + if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.privilegesRequired); + if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userInteraction); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scope); + if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.confidentialityImpact); + if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.integrityImpact); + if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.availabilityImpact); return writer; }; /** - * Encodes the specified PatchJob message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.verify|verify} messages. + * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CVSSv3.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJob + * @memberof google.cloud.osconfig.v1.CVSSv3 * @static - * @param {google.cloud.osconfig.v1.IPatchJob} message PatchJob message or plain object to encode + * @param {google.cloud.osconfig.v1.ICVSSv3} message CVSSv3 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PatchJob.encodeDelimited = function encodeDelimited(message, writer) { + CVSSv3.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PatchJob message from the specified reader or buffer. + * Decodes a CVSSv3 message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.PatchJob + * @memberof google.cloud.osconfig.v1.CVSSv3 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + * @returns {google.cloud.osconfig.v1.CVSSv3} CVSSv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PatchJob.decode = function decode(reader, length) { + CVSSv3.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CVSSv3(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 14: - message.displayName = reader.string(); + message.baseScore = reader.float(); break; case 2: - message.description = reader.string(); + message.exploitabilityScore = reader.float(); break; case 3: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.impactScore = reader.float(); break; case 5: - message.state = reader.int32(); + message.attackVector = reader.int32(); break; - case 13: - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + case 6: + message.attackComplexity = reader.int32(); break; case 7: - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + message.privilegesRequired = reader.int32(); break; case 8: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.userInteraction = reader.int32(); break; case 9: - message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.decode(reader, reader.uint32()); + message.scope = reader.int32(); break; case 10: - message.dryRun = reader.bool(); + message.confidentialityImpact = reader.int32(); break; case 11: - message.errorMessage = reader.string(); + message.integrityImpact = reader.int32(); break; case 12: - message.percentComplete = reader.double(); - break; - case 15: - message.patchDeployment = reader.string(); - break; - case 16: - message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + message.availabilityImpact = reader.int32(); break; default: reader.skipType(tag & 7); @@ -18675,1037 +16870,796 @@ }; /** - * Decodes a PatchJob message from the specified reader or buffer, length delimited. + * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJob + * @memberof google.cloud.osconfig.v1.CVSSv3 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + * @returns {google.cloud.osconfig.v1.CVSSv3} CVSSv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PatchJob.decodeDelimited = function decodeDelimited(reader) { + CVSSv3.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PatchJob message. + * Verifies a CVSSv3 message. * @function verify - * @memberof google.cloud.osconfig.v1.PatchJob + * @memberof google.cloud.osconfig.v1.CVSSv3 * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PatchJob.verify = function verify(message) { + CVSSv3.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + if (typeof message.baseScore !== "number") + return "baseScore: number expected"; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + if (typeof message.exploitabilityScore !== "number") + return "exploitabilityScore: number expected"; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + if (typeof message.impactScore !== "number") + return "impactScore: number expected"; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + switch (message.attackVector) { default: - return "state: enum value expected"; + return "attackVector: enum value expected"; case 0: case 1: case 2: case 3: case 4: - case 5: - case 6: - case 7: break; } - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { - var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.verify(message.instanceFilter); - if (error) - return "instanceFilter." + error; - } - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) { - var error = $root.google.cloud.osconfig.v1.PatchConfig.verify(message.patchConfig); - if (error) - return "patchConfig." + error; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) { - var error = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify(message.instanceDetailsSummary); - if (error) - return "instanceDetailsSummary." + error; - } - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - if (typeof message.dryRun !== "boolean") - return "dryRun: boolean expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) - if (typeof message.percentComplete !== "number") - return "percentComplete: number expected"; - if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) - if (!$util.isString(message.patchDeployment)) - return "patchDeployment: string expected"; - if (message.rollout != null && message.hasOwnProperty("rollout")) { - var error = $root.google.cloud.osconfig.v1.PatchRollout.verify(message.rollout); - if (error) - return "rollout." + error; - } + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + switch (message.attackComplexity) { + default: + return "attackComplexity: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + switch (message.privilegesRequired) { + default: + return "privilegesRequired: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + switch (message.userInteraction) { + default: + return "userInteraction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + switch (message.confidentialityImpact) { + default: + return "confidentialityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + switch (message.integrityImpact) { + default: + return "integrityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + switch (message.availabilityImpact) { + default: + return "availabilityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a PatchJob message from a plain object. Also converts values to their respective internal types. + * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchJob + * @memberof google.cloud.osconfig.v1.CVSSv3 * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchJob} PatchJob + * @returns {google.cloud.osconfig.v1.CVSSv3} CVSSv3 */ - PatchJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchJob) + CVSSv3.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.CVSSv3) return object; - var message = new $root.google.cloud.osconfig.v1.PatchJob(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.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.osconfig.v1.PatchJob.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.state) { - case "STATE_UNSPECIFIED": + var message = new $root.google.cloud.osconfig.v1.CVSSv3(); + if (object.baseScore != null) + message.baseScore = Number(object.baseScore); + if (object.exploitabilityScore != null) + message.exploitabilityScore = Number(object.exploitabilityScore); + if (object.impactScore != null) + message.impactScore = Number(object.impactScore); + switch (object.attackVector) { + case "ATTACK_VECTOR_UNSPECIFIED": case 0: - message.state = 0; + message.attackVector = 0; break; - case "STARTED": + case "ATTACK_VECTOR_NETWORK": case 1: - message.state = 1; + message.attackVector = 1; break; - case "INSTANCE_LOOKUP": + case "ATTACK_VECTOR_ADJACENT": case 2: - message.state = 2; + message.attackVector = 2; break; - case "PATCHING": + case "ATTACK_VECTOR_LOCAL": case 3: - message.state = 3; + message.attackVector = 3; break; - case "SUCCEEDED": + case "ATTACK_VECTOR_PHYSICAL": case 4: - message.state = 4; + message.attackVector = 4; break; - case "COMPLETED_WITH_ERRORS": - case 5: - message.state = 5; + } + switch (object.attackComplexity) { + case "ATTACK_COMPLEXITY_UNSPECIFIED": + case 0: + message.attackComplexity = 0; break; - case "CANCELED": - case 6: - message.state = 6; + case "ATTACK_COMPLEXITY_LOW": + case 1: + message.attackComplexity = 1; break; - case "TIMED_OUT": - case 7: - message.state = 7; + case "ATTACK_COMPLEXITY_HIGH": + case 2: + message.attackComplexity = 2; break; } - if (object.instanceFilter != null) { - if (typeof object.instanceFilter !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceFilter: object expected"); - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.fromObject(object.instanceFilter); + switch (object.privilegesRequired) { + case "PRIVILEGES_REQUIRED_UNSPECIFIED": + case 0: + message.privilegesRequired = 0; + break; + case "PRIVILEGES_REQUIRED_NONE": + case 1: + message.privilegesRequired = 1; + break; + case "PRIVILEGES_REQUIRED_LOW": + case 2: + message.privilegesRequired = 2; + break; + case "PRIVILEGES_REQUIRED_HIGH": + case 3: + message.privilegesRequired = 3; + break; } - if (object.patchConfig != null) { - if (typeof object.patchConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.patchConfig: object expected"); - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.fromObject(object.patchConfig); + switch (object.userInteraction) { + case "USER_INTERACTION_UNSPECIFIED": + case 0: + message.userInteraction = 0; + break; + case "USER_INTERACTION_NONE": + case 1: + message.userInteraction = 1; + break; + case "USER_INTERACTION_REQUIRED": + case 2: + message.userInteraction = 2; + break; } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + switch (object.scope) { + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "SCOPE_UNCHANGED": + case 1: + message.scope = 1; + break; + case "SCOPE_CHANGED": + case 2: + message.scope = 2; + break; } - if (object.instanceDetailsSummary != null) { - if (typeof object.instanceDetailsSummary !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.instanceDetailsSummary: object expected"); - message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.fromObject(object.instanceDetailsSummary); + switch (object.confidentialityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.confidentialityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.confidentialityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.confidentialityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.confidentialityImpact = 3; + break; } - if (object.dryRun != null) - message.dryRun = Boolean(object.dryRun); - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.percentComplete != null) - message.percentComplete = Number(object.percentComplete); - if (object.patchDeployment != null) - message.patchDeployment = String(object.patchDeployment); - if (object.rollout != null) { - if (typeof object.rollout !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchJob.rollout: object expected"); - message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); + switch (object.integrityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.integrityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.integrityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.integrityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.integrityImpact = 3; + break; + } + switch (object.availabilityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.availabilityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.availabilityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.availabilityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.availabilityImpact = 3; + break; } return message; }; /** - * Creates a plain object from a PatchJob message. Also converts values to other types if specified. + * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.PatchJob + * @memberof google.cloud.osconfig.v1.CVSSv3 * @static - * @param {google.cloud.osconfig.v1.PatchJob} message PatchJob + * @param {google.cloud.osconfig.v1.CVSSv3} message CVSSv3 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PatchJob.toObject = function toObject(message, options) { + CVSSv3.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.patchConfig = null; - object.duration = null; - object.instanceDetailsSummary = null; - object.dryRun = false; - object.errorMessage = ""; - object.percentComplete = 0; - object.instanceFilter = null; - object.displayName = ""; - object.patchDeployment = ""; - object.rollout = null; + object.baseScore = 0; + object.exploitabilityScore = 0; + object.impactScore = 0; + object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; + object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; + object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; + object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; + object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchJob.State[message.state] : message.state; - if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) - object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.instanceDetailsSummary != null && message.hasOwnProperty("instanceDetailsSummary")) - object.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.toObject(message.instanceDetailsSummary, options); - if (message.dryRun != null && message.hasOwnProperty("dryRun")) - object.dryRun = message.dryRun; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - if (message.percentComplete != null && message.hasOwnProperty("percentComplete")) - object.percentComplete = options.json && !isFinite(message.percentComplete) ? String(message.percentComplete) : message.percentComplete; - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) - object.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.toObject(message.instanceFilter, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) - object.patchDeployment = message.patchDeployment; - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + object.exploitabilityScore = options.json && !isFinite(message.exploitabilityScore) ? String(message.exploitabilityScore) : message.exploitabilityScore; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + object.impactScore = options.json && !isFinite(message.impactScore) ? String(message.impactScore) : message.impactScore; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + object.attackVector = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.AttackVector[message.attackVector] : message.attackVector; + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + object.attackComplexity = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + object.privilegesRequired = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + object.userInteraction = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Scope[message.scope] : message.scope; + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + object.confidentialityImpact = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + object.integrityImpact = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + object.availabilityImpact = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; return object; }; /** - * Converts this PatchJob to JSON. + * Converts this CVSSv3 to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchJob + * @memberof google.cloud.osconfig.v1.CVSSv3 * @instance * @returns {Object.} JSON object */ - PatchJob.prototype.toJSON = function toJSON() { + CVSSv3.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - PatchJob.InstanceDetailsSummary = (function() { - - /** - * Properties of an InstanceDetailsSummary. - * @memberof google.cloud.osconfig.v1.PatchJob - * @interface IInstanceDetailsSummary - * @property {number|Long|null} [pendingInstanceCount] InstanceDetailsSummary pendingInstanceCount - * @property {number|Long|null} [inactiveInstanceCount] InstanceDetailsSummary inactiveInstanceCount - * @property {number|Long|null} [notifiedInstanceCount] InstanceDetailsSummary notifiedInstanceCount - * @property {number|Long|null} [startedInstanceCount] InstanceDetailsSummary startedInstanceCount - * @property {number|Long|null} [downloadingPatchesInstanceCount] InstanceDetailsSummary downloadingPatchesInstanceCount - * @property {number|Long|null} [applyingPatchesInstanceCount] InstanceDetailsSummary applyingPatchesInstanceCount - * @property {number|Long|null} [rebootingInstanceCount] InstanceDetailsSummary rebootingInstanceCount - * @property {number|Long|null} [succeededInstanceCount] InstanceDetailsSummary succeededInstanceCount - * @property {number|Long|null} [succeededRebootRequiredInstanceCount] InstanceDetailsSummary succeededRebootRequiredInstanceCount - * @property {number|Long|null} [failedInstanceCount] InstanceDetailsSummary failedInstanceCount - * @property {number|Long|null} [ackedInstanceCount] InstanceDetailsSummary ackedInstanceCount - * @property {number|Long|null} [timedOutInstanceCount] InstanceDetailsSummary timedOutInstanceCount - * @property {number|Long|null} [prePatchStepInstanceCount] InstanceDetailsSummary prePatchStepInstanceCount - * @property {number|Long|null} [postPatchStepInstanceCount] InstanceDetailsSummary postPatchStepInstanceCount - * @property {number|Long|null} [noAgentDetectedInstanceCount] InstanceDetailsSummary noAgentDetectedInstanceCount - */ + /** + * AttackVector enum. + * @name google.cloud.osconfig.v1.CVSSv3.AttackVector + * @enum {number} + * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value + * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value + * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value + * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value + * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value + */ + CVSSv3.AttackVector = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; + values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; + values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; + values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; + return values; + })(); - /** - * Constructs a new InstanceDetailsSummary. - * @memberof google.cloud.osconfig.v1.PatchJob - * @classdesc Represents an InstanceDetailsSummary. - * @implements IInstanceDetailsSummary - * @constructor - * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set - */ - function InstanceDetailsSummary(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AttackComplexity enum. + * @name google.cloud.osconfig.v1.CVSSv3.AttackComplexity + * @enum {number} + * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value + * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value + * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value + */ + CVSSv3.AttackComplexity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; + values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; + return values; + })(); - /** - * InstanceDetailsSummary pendingInstanceCount. - * @member {number|Long} pendingInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.pendingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * InstanceDetailsSummary inactiveInstanceCount. - * @member {number|Long} inactiveInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.inactiveInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * PrivilegesRequired enum. + * @name google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired + * @enum {number} + * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value + * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value + * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value + * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value + */ + CVSSv3.PrivilegesRequired = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; + values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; + values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; + return values; + })(); - /** - * InstanceDetailsSummary notifiedInstanceCount. - * @member {number|Long} notifiedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.notifiedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * UserInteraction enum. + * @name google.cloud.osconfig.v1.CVSSv3.UserInteraction + * @enum {number} + * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value + * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value + * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value + */ + CVSSv3.UserInteraction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; + values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; + return values; + })(); - /** - * InstanceDetailsSummary startedInstanceCount. - * @member {number|Long} startedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.startedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Scope enum. + * @name google.cloud.osconfig.v1.CVSSv3.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value + * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value + */ + CVSSv3.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; + values[valuesById[2] = "SCOPE_CHANGED"] = 2; + return values; + })(); - /** - * InstanceDetailsSummary downloadingPatchesInstanceCount. - * @member {number|Long} downloadingPatchesInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.downloadingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Impact enum. + * @name google.cloud.osconfig.v1.CVSSv3.Impact + * @enum {number} + * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value + * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value + * @property {number} IMPACT_LOW=2 IMPACT_LOW value + * @property {number} IMPACT_NONE=3 IMPACT_NONE value + */ + CVSSv3.Impact = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPACT_HIGH"] = 1; + values[valuesById[2] = "IMPACT_LOW"] = 2; + values[valuesById[3] = "IMPACT_NONE"] = 3; + return values; + })(); - /** - * InstanceDetailsSummary applyingPatchesInstanceCount. - * @member {number|Long} applyingPatchesInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.applyingPatchesInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + return CVSSv3; + })(); - /** - * InstanceDetailsSummary rebootingInstanceCount. - * @member {number|Long} rebootingInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.rebootingInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + return v1; + })(); - /** - * InstanceDetailsSummary succeededInstanceCount. - * @member {number|Long} succeededInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.succeededInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + osconfig.v1alpha = (function() { - /** - * InstanceDetailsSummary succeededRebootRequiredInstanceCount. - * @member {number|Long} succeededRebootRequiredInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.succeededRebootRequiredInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Namespace v1alpha. + * @memberof google.cloud.osconfig + * @namespace + */ + var v1alpha = {}; - /** - * InstanceDetailsSummary failedInstanceCount. - * @member {number|Long} failedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.failedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + v1alpha.OSPolicyResourceConfigStep = (function() { - /** - * InstanceDetailsSummary ackedInstanceCount. - * @member {number|Long} ackedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.ackedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Properties of a OSPolicyResourceConfigStep. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyResourceConfigStep + * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|null} [type] OSPolicyResourceConfigStep type + * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|null} [outcome] OSPolicyResourceConfigStep outcome + * @property {string|null} [errorMessage] OSPolicyResourceConfigStep errorMessage + */ - /** - * InstanceDetailsSummary timedOutInstanceCount. - * @member {number|Long} timedOutInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.timedOutInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Constructs a new OSPolicyResourceConfigStep. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyResourceConfigStep. + * @implements IOSPolicyResourceConfigStep + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep=} [properties] Properties to set + */ + function OSPolicyResourceConfigStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * InstanceDetailsSummary prePatchStepInstanceCount. - * @member {number|Long} prePatchStepInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.prePatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * OSPolicyResourceConfigStep type. + * @member {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type} type + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.type = 0; - /** - * InstanceDetailsSummary postPatchStepInstanceCount. - * @member {number|Long} postPatchStepInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.postPatchStepInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * OSPolicyResourceConfigStep outcome. + * @member {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome} outcome + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.outcome = 0; - /** - * InstanceDetailsSummary noAgentDetectedInstanceCount. - * @member {number|Long} noAgentDetectedInstanceCount - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - */ - InstanceDetailsSummary.prototype.noAgentDetectedInstanceCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * OSPolicyResourceConfigStep errorMessage. + * @member {string} errorMessage + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.errorMessage = ""; - /** - * Creates a new InstanceDetailsSummary instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary instance - */ - InstanceDetailsSummary.create = function create(properties) { - return new InstanceDetailsSummary(properties); - }; + /** + * Creates a new OSPolicyResourceConfigStep instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep instance + */ + OSPolicyResourceConfigStep.create = function create(properties) { + return new OSPolicyResourceConfigStep(properties); + }; - /** - * Encodes the specified InstanceDetailsSummary message. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceDetailsSummary.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pendingInstanceCount != null && Object.hasOwnProperty.call(message, "pendingInstanceCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pendingInstanceCount); - if (message.inactiveInstanceCount != null && Object.hasOwnProperty.call(message, "inactiveInstanceCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.inactiveInstanceCount); - if (message.notifiedInstanceCount != null && Object.hasOwnProperty.call(message, "notifiedInstanceCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.notifiedInstanceCount); - if (message.startedInstanceCount != null && Object.hasOwnProperty.call(message, "startedInstanceCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.startedInstanceCount); - if (message.downloadingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "downloadingPatchesInstanceCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.downloadingPatchesInstanceCount); - if (message.applyingPatchesInstanceCount != null && Object.hasOwnProperty.call(message, "applyingPatchesInstanceCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.applyingPatchesInstanceCount); - if (message.rebootingInstanceCount != null && Object.hasOwnProperty.call(message, "rebootingInstanceCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.rebootingInstanceCount); - if (message.succeededInstanceCount != null && Object.hasOwnProperty.call(message, "succeededInstanceCount")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.succeededInstanceCount); - if (message.succeededRebootRequiredInstanceCount != null && Object.hasOwnProperty.call(message, "succeededRebootRequiredInstanceCount")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.succeededRebootRequiredInstanceCount); - if (message.failedInstanceCount != null && Object.hasOwnProperty.call(message, "failedInstanceCount")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.failedInstanceCount); - if (message.ackedInstanceCount != null && Object.hasOwnProperty.call(message, "ackedInstanceCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.ackedInstanceCount); - if (message.timedOutInstanceCount != null && Object.hasOwnProperty.call(message, "timedOutInstanceCount")) - writer.uint32(/* id 12, wireType 0 =*/96).int64(message.timedOutInstanceCount); - if (message.prePatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "prePatchStepInstanceCount")) - writer.uint32(/* id 13, wireType 0 =*/104).int64(message.prePatchStepInstanceCount); - if (message.postPatchStepInstanceCount != null && Object.hasOwnProperty.call(message, "postPatchStepInstanceCount")) - writer.uint32(/* id 14, wireType 0 =*/112).int64(message.postPatchStepInstanceCount); - if (message.noAgentDetectedInstanceCount != null && Object.hasOwnProperty.call(message, "noAgentDetectedInstanceCount")) - writer.uint32(/* id 15, wireType 0 =*/120).int64(message.noAgentDetectedInstanceCount); - return writer; - }; + /** + * Encodes the specified OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceConfigStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.outcome != null && Object.hasOwnProperty.call(message, "outcome")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.outcome); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage); + return writer; + }; - /** - * Encodes the specified InstanceDetailsSummary message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {google.cloud.osconfig.v1.PatchJob.IInstanceDetailsSummary} message InstanceDetailsSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceDetailsSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceConfigStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an InstanceDetailsSummary message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceDetailsSummary.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pendingInstanceCount = reader.int64(); - break; - case 2: - message.inactiveInstanceCount = reader.int64(); - break; - case 3: - message.notifiedInstanceCount = reader.int64(); - break; - case 4: - message.startedInstanceCount = reader.int64(); - break; - case 5: - message.downloadingPatchesInstanceCount = reader.int64(); - break; - case 6: - message.applyingPatchesInstanceCount = reader.int64(); - break; - case 7: - message.rebootingInstanceCount = reader.int64(); - break; - case 8: - message.succeededInstanceCount = reader.int64(); - break; - case 9: - message.succeededRebootRequiredInstanceCount = reader.int64(); - break; - case 10: - message.failedInstanceCount = reader.int64(); - break; - case 11: - message.ackedInstanceCount = reader.int64(); - break; - case 12: - message.timedOutInstanceCount = reader.int64(); - break; - case 13: - message.prePatchStepInstanceCount = reader.int64(); - break; - case 14: - message.postPatchStepInstanceCount = reader.int64(); - break; - case 15: - message.noAgentDetectedInstanceCount = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceConfigStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.outcome = reader.int32(); + break; + case 3: + message.errorMessage = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an InstanceDetailsSummary message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceDetailsSummary.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceConfigStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an InstanceDetailsSummary message. - * @function verify - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceDetailsSummary.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) - if (!$util.isInteger(message.pendingInstanceCount) && !(message.pendingInstanceCount && $util.isInteger(message.pendingInstanceCount.low) && $util.isInteger(message.pendingInstanceCount.high))) - return "pendingInstanceCount: integer|Long expected"; - if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) - if (!$util.isInteger(message.inactiveInstanceCount) && !(message.inactiveInstanceCount && $util.isInteger(message.inactiveInstanceCount.low) && $util.isInteger(message.inactiveInstanceCount.high))) - return "inactiveInstanceCount: integer|Long expected"; - if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) - if (!$util.isInteger(message.notifiedInstanceCount) && !(message.notifiedInstanceCount && $util.isInteger(message.notifiedInstanceCount.low) && $util.isInteger(message.notifiedInstanceCount.high))) - return "notifiedInstanceCount: integer|Long expected"; - if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) - if (!$util.isInteger(message.startedInstanceCount) && !(message.startedInstanceCount && $util.isInteger(message.startedInstanceCount.low) && $util.isInteger(message.startedInstanceCount.high))) - return "startedInstanceCount: integer|Long expected"; - if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) - if (!$util.isInteger(message.downloadingPatchesInstanceCount) && !(message.downloadingPatchesInstanceCount && $util.isInteger(message.downloadingPatchesInstanceCount.low) && $util.isInteger(message.downloadingPatchesInstanceCount.high))) - return "downloadingPatchesInstanceCount: integer|Long expected"; - if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) - if (!$util.isInteger(message.applyingPatchesInstanceCount) && !(message.applyingPatchesInstanceCount && $util.isInteger(message.applyingPatchesInstanceCount.low) && $util.isInteger(message.applyingPatchesInstanceCount.high))) - return "applyingPatchesInstanceCount: integer|Long expected"; - if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) - if (!$util.isInteger(message.rebootingInstanceCount) && !(message.rebootingInstanceCount && $util.isInteger(message.rebootingInstanceCount.low) && $util.isInteger(message.rebootingInstanceCount.high))) - return "rebootingInstanceCount: integer|Long expected"; - if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) - if (!$util.isInteger(message.succeededInstanceCount) && !(message.succeededInstanceCount && $util.isInteger(message.succeededInstanceCount.low) && $util.isInteger(message.succeededInstanceCount.high))) - return "succeededInstanceCount: integer|Long expected"; - if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) - if (!$util.isInteger(message.succeededRebootRequiredInstanceCount) && !(message.succeededRebootRequiredInstanceCount && $util.isInteger(message.succeededRebootRequiredInstanceCount.low) && $util.isInteger(message.succeededRebootRequiredInstanceCount.high))) - return "succeededRebootRequiredInstanceCount: integer|Long expected"; - if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) - if (!$util.isInteger(message.failedInstanceCount) && !(message.failedInstanceCount && $util.isInteger(message.failedInstanceCount.low) && $util.isInteger(message.failedInstanceCount.high))) - return "failedInstanceCount: integer|Long expected"; - if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) - if (!$util.isInteger(message.ackedInstanceCount) && !(message.ackedInstanceCount && $util.isInteger(message.ackedInstanceCount.low) && $util.isInteger(message.ackedInstanceCount.high))) - return "ackedInstanceCount: integer|Long expected"; - if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) - if (!$util.isInteger(message.timedOutInstanceCount) && !(message.timedOutInstanceCount && $util.isInteger(message.timedOutInstanceCount.low) && $util.isInteger(message.timedOutInstanceCount.high))) - return "timedOutInstanceCount: integer|Long expected"; - if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) - if (!$util.isInteger(message.prePatchStepInstanceCount) && !(message.prePatchStepInstanceCount && $util.isInteger(message.prePatchStepInstanceCount.low) && $util.isInteger(message.prePatchStepInstanceCount.high))) - return "prePatchStepInstanceCount: integer|Long expected"; - if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) - if (!$util.isInteger(message.postPatchStepInstanceCount) && !(message.postPatchStepInstanceCount && $util.isInteger(message.postPatchStepInstanceCount.low) && $util.isInteger(message.postPatchStepInstanceCount.high))) - return "postPatchStepInstanceCount: integer|Long expected"; - if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) - if (!$util.isInteger(message.noAgentDetectedInstanceCount) && !(message.noAgentDetectedInstanceCount && $util.isInteger(message.noAgentDetectedInstanceCount.low) && $util.isInteger(message.noAgentDetectedInstanceCount.high))) - return "noAgentDetectedInstanceCount: integer|Long expected"; - return null; - }; - - /** - * Creates an InstanceDetailsSummary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} InstanceDetailsSummary - */ - InstanceDetailsSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary) - return object; - var message = new $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary(); - if (object.pendingInstanceCount != null) - if ($util.Long) - (message.pendingInstanceCount = $util.Long.fromValue(object.pendingInstanceCount)).unsigned = false; - else if (typeof object.pendingInstanceCount === "string") - message.pendingInstanceCount = parseInt(object.pendingInstanceCount, 10); - else if (typeof object.pendingInstanceCount === "number") - message.pendingInstanceCount = object.pendingInstanceCount; - else if (typeof object.pendingInstanceCount === "object") - message.pendingInstanceCount = new $util.LongBits(object.pendingInstanceCount.low >>> 0, object.pendingInstanceCount.high >>> 0).toNumber(); - if (object.inactiveInstanceCount != null) - if ($util.Long) - (message.inactiveInstanceCount = $util.Long.fromValue(object.inactiveInstanceCount)).unsigned = false; - else if (typeof object.inactiveInstanceCount === "string") - message.inactiveInstanceCount = parseInt(object.inactiveInstanceCount, 10); - else if (typeof object.inactiveInstanceCount === "number") - message.inactiveInstanceCount = object.inactiveInstanceCount; - else if (typeof object.inactiveInstanceCount === "object") - message.inactiveInstanceCount = new $util.LongBits(object.inactiveInstanceCount.low >>> 0, object.inactiveInstanceCount.high >>> 0).toNumber(); - if (object.notifiedInstanceCount != null) - if ($util.Long) - (message.notifiedInstanceCount = $util.Long.fromValue(object.notifiedInstanceCount)).unsigned = false; - else if (typeof object.notifiedInstanceCount === "string") - message.notifiedInstanceCount = parseInt(object.notifiedInstanceCount, 10); - else if (typeof object.notifiedInstanceCount === "number") - message.notifiedInstanceCount = object.notifiedInstanceCount; - else if (typeof object.notifiedInstanceCount === "object") - message.notifiedInstanceCount = new $util.LongBits(object.notifiedInstanceCount.low >>> 0, object.notifiedInstanceCount.high >>> 0).toNumber(); - if (object.startedInstanceCount != null) - if ($util.Long) - (message.startedInstanceCount = $util.Long.fromValue(object.startedInstanceCount)).unsigned = false; - else if (typeof object.startedInstanceCount === "string") - message.startedInstanceCount = parseInt(object.startedInstanceCount, 10); - else if (typeof object.startedInstanceCount === "number") - message.startedInstanceCount = object.startedInstanceCount; - else if (typeof object.startedInstanceCount === "object") - message.startedInstanceCount = new $util.LongBits(object.startedInstanceCount.low >>> 0, object.startedInstanceCount.high >>> 0).toNumber(); - if (object.downloadingPatchesInstanceCount != null) - if ($util.Long) - (message.downloadingPatchesInstanceCount = $util.Long.fromValue(object.downloadingPatchesInstanceCount)).unsigned = false; - else if (typeof object.downloadingPatchesInstanceCount === "string") - message.downloadingPatchesInstanceCount = parseInt(object.downloadingPatchesInstanceCount, 10); - else if (typeof object.downloadingPatchesInstanceCount === "number") - message.downloadingPatchesInstanceCount = object.downloadingPatchesInstanceCount; - else if (typeof object.downloadingPatchesInstanceCount === "object") - message.downloadingPatchesInstanceCount = new $util.LongBits(object.downloadingPatchesInstanceCount.low >>> 0, object.downloadingPatchesInstanceCount.high >>> 0).toNumber(); - if (object.applyingPatchesInstanceCount != null) - if ($util.Long) - (message.applyingPatchesInstanceCount = $util.Long.fromValue(object.applyingPatchesInstanceCount)).unsigned = false; - else if (typeof object.applyingPatchesInstanceCount === "string") - message.applyingPatchesInstanceCount = parseInt(object.applyingPatchesInstanceCount, 10); - else if (typeof object.applyingPatchesInstanceCount === "number") - message.applyingPatchesInstanceCount = object.applyingPatchesInstanceCount; - else if (typeof object.applyingPatchesInstanceCount === "object") - message.applyingPatchesInstanceCount = new $util.LongBits(object.applyingPatchesInstanceCount.low >>> 0, object.applyingPatchesInstanceCount.high >>> 0).toNumber(); - if (object.rebootingInstanceCount != null) - if ($util.Long) - (message.rebootingInstanceCount = $util.Long.fromValue(object.rebootingInstanceCount)).unsigned = false; - else if (typeof object.rebootingInstanceCount === "string") - message.rebootingInstanceCount = parseInt(object.rebootingInstanceCount, 10); - else if (typeof object.rebootingInstanceCount === "number") - message.rebootingInstanceCount = object.rebootingInstanceCount; - else if (typeof object.rebootingInstanceCount === "object") - message.rebootingInstanceCount = new $util.LongBits(object.rebootingInstanceCount.low >>> 0, object.rebootingInstanceCount.high >>> 0).toNumber(); - if (object.succeededInstanceCount != null) - if ($util.Long) - (message.succeededInstanceCount = $util.Long.fromValue(object.succeededInstanceCount)).unsigned = false; - else if (typeof object.succeededInstanceCount === "string") - message.succeededInstanceCount = parseInt(object.succeededInstanceCount, 10); - else if (typeof object.succeededInstanceCount === "number") - message.succeededInstanceCount = object.succeededInstanceCount; - else if (typeof object.succeededInstanceCount === "object") - message.succeededInstanceCount = new $util.LongBits(object.succeededInstanceCount.low >>> 0, object.succeededInstanceCount.high >>> 0).toNumber(); - if (object.succeededRebootRequiredInstanceCount != null) - if ($util.Long) - (message.succeededRebootRequiredInstanceCount = $util.Long.fromValue(object.succeededRebootRequiredInstanceCount)).unsigned = false; - else if (typeof object.succeededRebootRequiredInstanceCount === "string") - message.succeededRebootRequiredInstanceCount = parseInt(object.succeededRebootRequiredInstanceCount, 10); - else if (typeof object.succeededRebootRequiredInstanceCount === "number") - message.succeededRebootRequiredInstanceCount = object.succeededRebootRequiredInstanceCount; - else if (typeof object.succeededRebootRequiredInstanceCount === "object") - message.succeededRebootRequiredInstanceCount = new $util.LongBits(object.succeededRebootRequiredInstanceCount.low >>> 0, object.succeededRebootRequiredInstanceCount.high >>> 0).toNumber(); - if (object.failedInstanceCount != null) - if ($util.Long) - (message.failedInstanceCount = $util.Long.fromValue(object.failedInstanceCount)).unsigned = false; - else if (typeof object.failedInstanceCount === "string") - message.failedInstanceCount = parseInt(object.failedInstanceCount, 10); - else if (typeof object.failedInstanceCount === "number") - message.failedInstanceCount = object.failedInstanceCount; - else if (typeof object.failedInstanceCount === "object") - message.failedInstanceCount = new $util.LongBits(object.failedInstanceCount.low >>> 0, object.failedInstanceCount.high >>> 0).toNumber(); - if (object.ackedInstanceCount != null) - if ($util.Long) - (message.ackedInstanceCount = $util.Long.fromValue(object.ackedInstanceCount)).unsigned = false; - else if (typeof object.ackedInstanceCount === "string") - message.ackedInstanceCount = parseInt(object.ackedInstanceCount, 10); - else if (typeof object.ackedInstanceCount === "number") - message.ackedInstanceCount = object.ackedInstanceCount; - else if (typeof object.ackedInstanceCount === "object") - message.ackedInstanceCount = new $util.LongBits(object.ackedInstanceCount.low >>> 0, object.ackedInstanceCount.high >>> 0).toNumber(); - if (object.timedOutInstanceCount != null) - if ($util.Long) - (message.timedOutInstanceCount = $util.Long.fromValue(object.timedOutInstanceCount)).unsigned = false; - else if (typeof object.timedOutInstanceCount === "string") - message.timedOutInstanceCount = parseInt(object.timedOutInstanceCount, 10); - else if (typeof object.timedOutInstanceCount === "number") - message.timedOutInstanceCount = object.timedOutInstanceCount; - else if (typeof object.timedOutInstanceCount === "object") - message.timedOutInstanceCount = new $util.LongBits(object.timedOutInstanceCount.low >>> 0, object.timedOutInstanceCount.high >>> 0).toNumber(); - if (object.prePatchStepInstanceCount != null) - if ($util.Long) - (message.prePatchStepInstanceCount = $util.Long.fromValue(object.prePatchStepInstanceCount)).unsigned = false; - else if (typeof object.prePatchStepInstanceCount === "string") - message.prePatchStepInstanceCount = parseInt(object.prePatchStepInstanceCount, 10); - else if (typeof object.prePatchStepInstanceCount === "number") - message.prePatchStepInstanceCount = object.prePatchStepInstanceCount; - else if (typeof object.prePatchStepInstanceCount === "object") - message.prePatchStepInstanceCount = new $util.LongBits(object.prePatchStepInstanceCount.low >>> 0, object.prePatchStepInstanceCount.high >>> 0).toNumber(); - if (object.postPatchStepInstanceCount != null) - if ($util.Long) - (message.postPatchStepInstanceCount = $util.Long.fromValue(object.postPatchStepInstanceCount)).unsigned = false; - else if (typeof object.postPatchStepInstanceCount === "string") - message.postPatchStepInstanceCount = parseInt(object.postPatchStepInstanceCount, 10); - else if (typeof object.postPatchStepInstanceCount === "number") - message.postPatchStepInstanceCount = object.postPatchStepInstanceCount; - else if (typeof object.postPatchStepInstanceCount === "object") - message.postPatchStepInstanceCount = new $util.LongBits(object.postPatchStepInstanceCount.low >>> 0, object.postPatchStepInstanceCount.high >>> 0).toNumber(); - if (object.noAgentDetectedInstanceCount != null) - if ($util.Long) - (message.noAgentDetectedInstanceCount = $util.Long.fromValue(object.noAgentDetectedInstanceCount)).unsigned = false; - else if (typeof object.noAgentDetectedInstanceCount === "string") - message.noAgentDetectedInstanceCount = parseInt(object.noAgentDetectedInstanceCount, 10); - else if (typeof object.noAgentDetectedInstanceCount === "number") - message.noAgentDetectedInstanceCount = object.noAgentDetectedInstanceCount; - else if (typeof object.noAgentDetectedInstanceCount === "object") - message.noAgentDetectedInstanceCount = new $util.LongBits(object.noAgentDetectedInstanceCount.low >>> 0, object.noAgentDetectedInstanceCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an InstanceDetailsSummary message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @static - * @param {google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary} message InstanceDetailsSummary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceDetailsSummary.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.pendingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.pendingInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.inactiveInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.inactiveInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.notifiedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.notifiedInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startedInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.downloadingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.downloadingPatchesInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.applyingPatchesInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.applyingPatchesInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rebootingInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rebootingInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.succeededInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.succeededInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.succeededRebootRequiredInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.succeededRebootRequiredInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failedInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.ackedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ackedInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timedOutInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timedOutInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.prePatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.prePatchStepInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.postPatchStepInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.postPatchStepInstanceCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.noAgentDetectedInstanceCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.noAgentDetectedInstanceCount = options.longs === String ? "0" : 0; + /** + * Verifies a OSPolicyResourceConfigStep message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyResourceConfigStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; } - if (message.pendingInstanceCount != null && message.hasOwnProperty("pendingInstanceCount")) - if (typeof message.pendingInstanceCount === "number") - object.pendingInstanceCount = options.longs === String ? String(message.pendingInstanceCount) : message.pendingInstanceCount; - else - object.pendingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.pendingInstanceCount) : options.longs === Number ? new $util.LongBits(message.pendingInstanceCount.low >>> 0, message.pendingInstanceCount.high >>> 0).toNumber() : message.pendingInstanceCount; - if (message.inactiveInstanceCount != null && message.hasOwnProperty("inactiveInstanceCount")) - if (typeof message.inactiveInstanceCount === "number") - object.inactiveInstanceCount = options.longs === String ? String(message.inactiveInstanceCount) : message.inactiveInstanceCount; - else - object.inactiveInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.inactiveInstanceCount) : options.longs === Number ? new $util.LongBits(message.inactiveInstanceCount.low >>> 0, message.inactiveInstanceCount.high >>> 0).toNumber() : message.inactiveInstanceCount; - if (message.notifiedInstanceCount != null && message.hasOwnProperty("notifiedInstanceCount")) - if (typeof message.notifiedInstanceCount === "number") - object.notifiedInstanceCount = options.longs === String ? String(message.notifiedInstanceCount) : message.notifiedInstanceCount; - else - object.notifiedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.notifiedInstanceCount) : options.longs === Number ? new $util.LongBits(message.notifiedInstanceCount.low >>> 0, message.notifiedInstanceCount.high >>> 0).toNumber() : message.notifiedInstanceCount; - if (message.startedInstanceCount != null && message.hasOwnProperty("startedInstanceCount")) - if (typeof message.startedInstanceCount === "number") - object.startedInstanceCount = options.longs === String ? String(message.startedInstanceCount) : message.startedInstanceCount; - else - object.startedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.startedInstanceCount) : options.longs === Number ? new $util.LongBits(message.startedInstanceCount.low >>> 0, message.startedInstanceCount.high >>> 0).toNumber() : message.startedInstanceCount; - if (message.downloadingPatchesInstanceCount != null && message.hasOwnProperty("downloadingPatchesInstanceCount")) - if (typeof message.downloadingPatchesInstanceCount === "number") - object.downloadingPatchesInstanceCount = options.longs === String ? String(message.downloadingPatchesInstanceCount) : message.downloadingPatchesInstanceCount; - else - object.downloadingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.downloadingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.downloadingPatchesInstanceCount.low >>> 0, message.downloadingPatchesInstanceCount.high >>> 0).toNumber() : message.downloadingPatchesInstanceCount; - if (message.applyingPatchesInstanceCount != null && message.hasOwnProperty("applyingPatchesInstanceCount")) - if (typeof message.applyingPatchesInstanceCount === "number") - object.applyingPatchesInstanceCount = options.longs === String ? String(message.applyingPatchesInstanceCount) : message.applyingPatchesInstanceCount; - else - object.applyingPatchesInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.applyingPatchesInstanceCount) : options.longs === Number ? new $util.LongBits(message.applyingPatchesInstanceCount.low >>> 0, message.applyingPatchesInstanceCount.high >>> 0).toNumber() : message.applyingPatchesInstanceCount; - if (message.rebootingInstanceCount != null && message.hasOwnProperty("rebootingInstanceCount")) - if (typeof message.rebootingInstanceCount === "number") - object.rebootingInstanceCount = options.longs === String ? String(message.rebootingInstanceCount) : message.rebootingInstanceCount; - else - object.rebootingInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.rebootingInstanceCount) : options.longs === Number ? new $util.LongBits(message.rebootingInstanceCount.low >>> 0, message.rebootingInstanceCount.high >>> 0).toNumber() : message.rebootingInstanceCount; - if (message.succeededInstanceCount != null && message.hasOwnProperty("succeededInstanceCount")) - if (typeof message.succeededInstanceCount === "number") - object.succeededInstanceCount = options.longs === String ? String(message.succeededInstanceCount) : message.succeededInstanceCount; - else - object.succeededInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededInstanceCount.low >>> 0, message.succeededInstanceCount.high >>> 0).toNumber() : message.succeededInstanceCount; - if (message.succeededRebootRequiredInstanceCount != null && message.hasOwnProperty("succeededRebootRequiredInstanceCount")) - if (typeof message.succeededRebootRequiredInstanceCount === "number") - object.succeededRebootRequiredInstanceCount = options.longs === String ? String(message.succeededRebootRequiredInstanceCount) : message.succeededRebootRequiredInstanceCount; - else - object.succeededRebootRequiredInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.succeededRebootRequiredInstanceCount) : options.longs === Number ? new $util.LongBits(message.succeededRebootRequiredInstanceCount.low >>> 0, message.succeededRebootRequiredInstanceCount.high >>> 0).toNumber() : message.succeededRebootRequiredInstanceCount; - if (message.failedInstanceCount != null && message.hasOwnProperty("failedInstanceCount")) - if (typeof message.failedInstanceCount === "number") - object.failedInstanceCount = options.longs === String ? String(message.failedInstanceCount) : message.failedInstanceCount; - else - object.failedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedInstanceCount) : options.longs === Number ? new $util.LongBits(message.failedInstanceCount.low >>> 0, message.failedInstanceCount.high >>> 0).toNumber() : message.failedInstanceCount; - if (message.ackedInstanceCount != null && message.hasOwnProperty("ackedInstanceCount")) - if (typeof message.ackedInstanceCount === "number") - object.ackedInstanceCount = options.longs === String ? String(message.ackedInstanceCount) : message.ackedInstanceCount; - else - object.ackedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.ackedInstanceCount) : options.longs === Number ? new $util.LongBits(message.ackedInstanceCount.low >>> 0, message.ackedInstanceCount.high >>> 0).toNumber() : message.ackedInstanceCount; - if (message.timedOutInstanceCount != null && message.hasOwnProperty("timedOutInstanceCount")) - if (typeof message.timedOutInstanceCount === "number") - object.timedOutInstanceCount = options.longs === String ? String(message.timedOutInstanceCount) : message.timedOutInstanceCount; - else - object.timedOutInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.timedOutInstanceCount) : options.longs === Number ? new $util.LongBits(message.timedOutInstanceCount.low >>> 0, message.timedOutInstanceCount.high >>> 0).toNumber() : message.timedOutInstanceCount; - if (message.prePatchStepInstanceCount != null && message.hasOwnProperty("prePatchStepInstanceCount")) - if (typeof message.prePatchStepInstanceCount === "number") - object.prePatchStepInstanceCount = options.longs === String ? String(message.prePatchStepInstanceCount) : message.prePatchStepInstanceCount; - else - object.prePatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.prePatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.prePatchStepInstanceCount.low >>> 0, message.prePatchStepInstanceCount.high >>> 0).toNumber() : message.prePatchStepInstanceCount; - if (message.postPatchStepInstanceCount != null && message.hasOwnProperty("postPatchStepInstanceCount")) - if (typeof message.postPatchStepInstanceCount === "number") - object.postPatchStepInstanceCount = options.longs === String ? String(message.postPatchStepInstanceCount) : message.postPatchStepInstanceCount; - else - object.postPatchStepInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.postPatchStepInstanceCount) : options.longs === Number ? new $util.LongBits(message.postPatchStepInstanceCount.low >>> 0, message.postPatchStepInstanceCount.high >>> 0).toNumber() : message.postPatchStepInstanceCount; - if (message.noAgentDetectedInstanceCount != null && message.hasOwnProperty("noAgentDetectedInstanceCount")) - if (typeof message.noAgentDetectedInstanceCount === "number") - object.noAgentDetectedInstanceCount = options.longs === String ? String(message.noAgentDetectedInstanceCount) : message.noAgentDetectedInstanceCount; - else - object.noAgentDetectedInstanceCount = options.longs === String ? $util.Long.prototype.toString.call(message.noAgentDetectedInstanceCount) : options.longs === Number ? new $util.LongBits(message.noAgentDetectedInstanceCount.low >>> 0, message.noAgentDetectedInstanceCount.high >>> 0).toNumber() : message.noAgentDetectedInstanceCount; + if (message.outcome != null && message.hasOwnProperty("outcome")) + switch (message.outcome) { + default: + return "outcome: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + return null; + }; + + /** + * Creates a OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + */ + OSPolicyResourceConfigStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) return object; - }; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "VALIDATION": + case 1: + message.type = 1; + break; + case "DESIRED_STATE_CHECK": + case 2: + message.type = 2; + break; + case "DESIRED_STATE_ENFORCEMENT": + case 3: + message.type = 3; + break; + case "DESIRED_STATE_CHECK_POST_ENFORCEMENT": + case 4: + message.type = 4; + break; + } + switch (object.outcome) { + case "OUTCOME_UNSPECIFIED": + case 0: + message.outcome = 0; + break; + case "SUCCEEDED": + case 1: + message.outcome = 1; + break; + case "FAILED": + case 2: + message.outcome = 2; + break; + } + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + return message; + }; - /** - * Converts this InstanceDetailsSummary to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - * @instance - * @returns {Object.} JSON object - */ - InstanceDetailsSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} message OSPolicyResourceConfigStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyResourceConfigStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.outcome = options.enums === String ? "OUTCOME_UNSPECIFIED" : 0; + object.errorMessage = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type[message.type] : message.type; + if (message.outcome != null && message.hasOwnProperty("outcome")) + object.outcome = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome[message.outcome] : message.outcome; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + return object; + }; - return InstanceDetailsSummary; + /** + * Converts this OSPolicyResourceConfigStep to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @instance + * @returns {Object.} JSON object + */ + OSPolicyResourceConfigStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} VALIDATION=1 VALIDATION value + * @property {number} DESIRED_STATE_CHECK=2 DESIRED_STATE_CHECK value + * @property {number} DESIRED_STATE_ENFORCEMENT=3 DESIRED_STATE_ENFORCEMENT value + * @property {number} DESIRED_STATE_CHECK_POST_ENFORCEMENT=4 DESIRED_STATE_CHECK_POST_ENFORCEMENT value + */ + OSPolicyResourceConfigStep.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VALIDATION"] = 1; + values[valuesById[2] = "DESIRED_STATE_CHECK"] = 2; + values[valuesById[3] = "DESIRED_STATE_ENFORCEMENT"] = 3; + values[valuesById[4] = "DESIRED_STATE_CHECK_POST_ENFORCEMENT"] = 4; + return values; })(); /** - * State enum. - * @name google.cloud.osconfig.v1.PatchJob.State + * Outcome enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} STARTED=1 STARTED value - * @property {number} INSTANCE_LOOKUP=2 INSTANCE_LOOKUP value - * @property {number} PATCHING=3 PATCHING value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} COMPLETED_WITH_ERRORS=5 COMPLETED_WITH_ERRORS value - * @property {number} CANCELED=6 CANCELED value - * @property {number} TIMED_OUT=7 TIMED_OUT value + * @property {number} OUTCOME_UNSPECIFIED=0 OUTCOME_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value */ - PatchJob.State = (function() { + OSPolicyResourceConfigStep.Outcome = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STARTED"] = 1; - values[valuesById[2] = "INSTANCE_LOOKUP"] = 2; - values[valuesById[3] = "PATCHING"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "COMPLETED_WITH_ERRORS"] = 5; - values[valuesById[6] = "CANCELED"] = 6; - values[valuesById[7] = "TIMED_OUT"] = 7; + values[valuesById[0] = "OUTCOME_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; return values; })(); - return PatchJob; + return OSPolicyResourceConfigStep; })(); - v1.PatchConfig = (function() { + v1alpha.OSPolicyResourceCompliance = (function() { /** - * Properties of a PatchConfig. - * @memberof google.cloud.osconfig.v1 - * @interface IPatchConfig - * @property {google.cloud.osconfig.v1.PatchConfig.RebootConfig|null} [rebootConfig] PatchConfig rebootConfig - * @property {google.cloud.osconfig.v1.IAptSettings|null} [apt] PatchConfig apt - * @property {google.cloud.osconfig.v1.IYumSettings|null} [yum] PatchConfig yum - * @property {google.cloud.osconfig.v1.IGooSettings|null} [goo] PatchConfig goo - * @property {google.cloud.osconfig.v1.IZypperSettings|null} [zypper] PatchConfig zypper - * @property {google.cloud.osconfig.v1.IWindowsUpdateSettings|null} [windowsUpdate] PatchConfig windowsUpdate - * @property {google.cloud.osconfig.v1.IExecStep|null} [preStep] PatchConfig preStep - * @property {google.cloud.osconfig.v1.IExecStep|null} [postStep] PatchConfig postStep + * Properties of a OSPolicyResourceCompliance. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyResourceCompliance + * @property {string|null} [osPolicyResourceId] OSPolicyResourceCompliance osPolicyResourceId + * @property {Array.|null} [configSteps] OSPolicyResourceCompliance configSteps + * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] OSPolicyResourceCompliance state + * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null} [execResourceOutput] OSPolicyResourceCompliance execResourceOutput */ /** - * Constructs a new PatchConfig. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchConfig. - * @implements IPatchConfig + * Constructs a new OSPolicyResourceCompliance. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyResourceCompliance. + * @implements IOSPolicyResourceCompliance * @constructor - * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance=} [properties] Properties to set */ - function PatchConfig(properties) { + function OSPolicyResourceCompliance(properties) { + this.configSteps = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19713,166 +17667,131 @@ } /** - * PatchConfig rebootConfig. - * @member {google.cloud.osconfig.v1.PatchConfig.RebootConfig} rebootConfig - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.rebootConfig = 0; - - /** - * PatchConfig apt. - * @member {google.cloud.osconfig.v1.IAptSettings|null|undefined} apt - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.apt = null; - - /** - * PatchConfig yum. - * @member {google.cloud.osconfig.v1.IYumSettings|null|undefined} yum - * @memberof google.cloud.osconfig.v1.PatchConfig + * OSPolicyResourceCompliance osPolicyResourceId. + * @member {string} osPolicyResourceId + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @instance */ - PatchConfig.prototype.yum = null; + OSPolicyResourceCompliance.prototype.osPolicyResourceId = ""; /** - * PatchConfig goo. - * @member {google.cloud.osconfig.v1.IGooSettings|null|undefined} goo - * @memberof google.cloud.osconfig.v1.PatchConfig + * OSPolicyResourceCompliance configSteps. + * @member {Array.} configSteps + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @instance */ - PatchConfig.prototype.goo = null; + OSPolicyResourceCompliance.prototype.configSteps = $util.emptyArray; /** - * PatchConfig zypper. - * @member {google.cloud.osconfig.v1.IZypperSettings|null|undefined} zypper - * @memberof google.cloud.osconfig.v1.PatchConfig + * OSPolicyResourceCompliance state. + * @member {google.cloud.osconfig.v1alpha.OSPolicyComplianceState} state + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @instance */ - PatchConfig.prototype.zypper = null; + OSPolicyResourceCompliance.prototype.state = 0; /** - * PatchConfig windowsUpdate. - * @member {google.cloud.osconfig.v1.IWindowsUpdateSettings|null|undefined} windowsUpdate - * @memberof google.cloud.osconfig.v1.PatchConfig + * OSPolicyResourceCompliance execResourceOutput. + * @member {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null|undefined} execResourceOutput + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @instance */ - PatchConfig.prototype.windowsUpdate = null; + OSPolicyResourceCompliance.prototype.execResourceOutput = null; - /** - * PatchConfig preStep. - * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} preStep - * @memberof google.cloud.osconfig.v1.PatchConfig - * @instance - */ - PatchConfig.prototype.preStep = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * PatchConfig postStep. - * @member {google.cloud.osconfig.v1.IExecStep|null|undefined} postStep - * @memberof google.cloud.osconfig.v1.PatchConfig + * OSPolicyResourceCompliance output. + * @member {"execResourceOutput"|undefined} output + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @instance */ - PatchConfig.prototype.postStep = null; + Object.defineProperty(OSPolicyResourceCompliance.prototype, "output", { + get: $util.oneOfGetter($oneOfFields = ["execResourceOutput"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new PatchConfig instance using the specified properties. + * Creates a new OSPolicyResourceCompliance instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.PatchConfig + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @static - * @param {google.cloud.osconfig.v1.IPatchConfig=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig instance + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance instance */ - PatchConfig.create = function create(properties) { - return new PatchConfig(properties); + OSPolicyResourceCompliance.create = function create(properties) { + return new OSPolicyResourceCompliance(properties); }; /** - * Encodes the specified PatchConfig message. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.PatchConfig + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @static - * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PatchConfig.encode = function encode(message, writer) { + OSPolicyResourceCompliance.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rebootConfig != null && Object.hasOwnProperty.call(message, "rebootConfig")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rebootConfig); - if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) - $root.google.cloud.osconfig.v1.AptSettings.encode(message.apt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) - $root.google.cloud.osconfig.v1.YumSettings.encode(message.yum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.goo != null && Object.hasOwnProperty.call(message, "goo")) - $root.google.cloud.osconfig.v1.GooSettings.encode(message.goo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) - $root.google.cloud.osconfig.v1.ZypperSettings.encode(message.zypper, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.windowsUpdate != null && Object.hasOwnProperty.call(message, "windowsUpdate")) - $root.google.cloud.osconfig.v1.WindowsUpdateSettings.encode(message.windowsUpdate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.preStep != null && Object.hasOwnProperty.call(message, "preStep")) - $root.google.cloud.osconfig.v1.ExecStep.encode(message.preStep, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.postStep != null && Object.hasOwnProperty.call(message, "postStep")) - $root.google.cloud.osconfig.v1.ExecStep.encode(message.postStep, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.osPolicyResourceId != null && Object.hasOwnProperty.call(message, "osPolicyResourceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyResourceId); + if (message.configSteps != null && message.configSteps.length) + for (var i = 0; i < message.configSteps.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.encode(message.configSteps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.execResourceOutput != null && Object.hasOwnProperty.call(message, "execResourceOutput")) + $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.encode(message.execResourceOutput, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified PatchConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchConfig.verify|verify} messages. + * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchConfig + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @static - * @param {google.cloud.osconfig.v1.IPatchConfig} message PatchConfig message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PatchConfig.encodeDelimited = function encodeDelimited(message, writer) { + OSPolicyResourceCompliance.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PatchConfig message from the specified reader or buffer. + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.PatchConfig + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PatchConfig.decode = function decode(reader, length) { + OSPolicyResourceCompliance.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.rebootConfig = reader.int32(); + message.osPolicyResourceId = reader.string(); + break; + case 2: + if (!(message.configSteps && message.configSteps.length)) + message.configSteps = []; + message.configSteps.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); break; case 3: - message.apt = $root.google.cloud.osconfig.v1.AptSettings.decode(reader, reader.uint32()); + message.state = reader.int32(); break; case 4: - message.yum = $root.google.cloud.osconfig.v1.YumSettings.decode(reader, reader.uint32()); - break; - case 5: - message.goo = $root.google.cloud.osconfig.v1.GooSettings.decode(reader, reader.uint32()); - break; - case 6: - message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.decode(reader, reader.uint32()); - break; - case 7: - message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.decode(reader, reader.uint32()); - break; - case 8: - message.preStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); - break; - case 9: - message.postStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); + message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -19883,519 +17802,584 @@ }; /** - * Decodes a PatchConfig message from the specified reader or buffer, length delimited. + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchConfig + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PatchConfig.decodeDelimited = function decodeDelimited(reader) { + OSPolicyResourceCompliance.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PatchConfig message. + * Verifies a OSPolicyResourceCompliance message. * @function verify - * @memberof google.cloud.osconfig.v1.PatchConfig + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PatchConfig.verify = function verify(message) { + OSPolicyResourceCompliance.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) - switch (message.rebootConfig) { + var properties = {}; + if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) + if (!$util.isString(message.osPolicyResourceId)) + return "osPolicyResourceId: string expected"; + if (message.configSteps != null && message.hasOwnProperty("configSteps")) { + if (!Array.isArray(message.configSteps)) + return "configSteps: array expected"; + for (var i = 0; i < message.configSteps.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify(message.configSteps[i]); + if (error) + return "configSteps." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "rebootConfig: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: case 3: + case 4: break; } - if (message.apt != null && message.hasOwnProperty("apt")) { - var error = $root.google.cloud.osconfig.v1.AptSettings.verify(message.apt); - if (error) - return "apt." + error; - } - if (message.yum != null && message.hasOwnProperty("yum")) { - var error = $root.google.cloud.osconfig.v1.YumSettings.verify(message.yum); - if (error) - return "yum." + error; - } - if (message.goo != null && message.hasOwnProperty("goo")) { - var error = $root.google.cloud.osconfig.v1.GooSettings.verify(message.goo); - if (error) - return "goo." + error; - } - if (message.zypper != null && message.hasOwnProperty("zypper")) { - var error = $root.google.cloud.osconfig.v1.ZypperSettings.verify(message.zypper); - if (error) - return "zypper." + error; - } - if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) { - var error = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.verify(message.windowsUpdate); - if (error) - return "windowsUpdate." + error; - } - if (message.preStep != null && message.hasOwnProperty("preStep")) { - var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.preStep); - if (error) - return "preStep." + error; - } - if (message.postStep != null && message.hasOwnProperty("postStep")) { - var error = $root.google.cloud.osconfig.v1.ExecStep.verify(message.postStep); - if (error) - return "postStep." + error; + if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { + properties.output = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify(message.execResourceOutput); + if (error) + return "execResourceOutput." + error; + } } return null; }; /** - * Creates a PatchConfig message from a plain object. Also converts values to their respective internal types. + * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchConfig + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchConfig} PatchConfig + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance */ - PatchConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchConfig) + OSPolicyResourceCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) return object; - var message = new $root.google.cloud.osconfig.v1.PatchConfig(); - switch (object.rebootConfig) { - case "REBOOT_CONFIG_UNSPECIFIED": + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance(); + if (object.osPolicyResourceId != null) + message.osPolicyResourceId = String(object.osPolicyResourceId); + if (object.configSteps) { + if (!Array.isArray(object.configSteps)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.configSteps: array expected"); + message.configSteps = []; + for (var i = 0; i < object.configSteps.length; ++i) { + if (typeof object.configSteps[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.configSteps: object expected"); + message.configSteps[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.fromObject(object.configSteps[i]); + } + } + switch (object.state) { + case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": case 0: - message.rebootConfig = 0; + message.state = 0; break; - case "DEFAULT": + case "COMPLIANT": case 1: - message.rebootConfig = 1; + message.state = 1; break; - case "ALWAYS": + case "NON_COMPLIANT": case 2: - message.rebootConfig = 2; + message.state = 2; break; - case "NEVER": + case "UNKNOWN": case 3: - message.rebootConfig = 3; + message.state = 3; + break; + case "NO_OS_POLICIES_APPLICABLE": + case 4: + message.state = 4; break; } - if (object.apt != null) { - if (typeof object.apt !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.apt: object expected"); - message.apt = $root.google.cloud.osconfig.v1.AptSettings.fromObject(object.apt); - } - if (object.yum != null) { - if (typeof object.yum !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.yum: object expected"); - message.yum = $root.google.cloud.osconfig.v1.YumSettings.fromObject(object.yum); - } - if (object.goo != null) { - if (typeof object.goo !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.goo: object expected"); - message.goo = $root.google.cloud.osconfig.v1.GooSettings.fromObject(object.goo); - } - if (object.zypper != null) { - if (typeof object.zypper !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.zypper: object expected"); - message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.fromObject(object.zypper); - } - if (object.windowsUpdate != null) { - if (typeof object.windowsUpdate !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.windowsUpdate: object expected"); - message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.fromObject(object.windowsUpdate); - } - if (object.preStep != null) { - if (typeof object.preStep !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.preStep: object expected"); - message.preStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.preStep); - } - if (object.postStep != null) { - if (typeof object.postStep !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchConfig.postStep: object expected"); - message.postStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.postStep); + if (object.execResourceOutput != null) { + if (typeof object.execResourceOutput !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.execResourceOutput: object expected"); + message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.fromObject(object.execResourceOutput); } return message; }; /** - * Creates a plain object from a PatchConfig message. Also converts values to other types if specified. + * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.PatchConfig + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @static - * @param {google.cloud.osconfig.v1.PatchConfig} message PatchConfig + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} message OSPolicyResourceCompliance * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PatchConfig.toObject = function toObject(message, options) { + OSPolicyResourceCompliance.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.configSteps = []; if (options.defaults) { - object.rebootConfig = options.enums === String ? "REBOOT_CONFIG_UNSPECIFIED" : 0; - object.apt = null; - object.yum = null; - object.goo = null; - object.zypper = null; - object.windowsUpdate = null; - object.preStep = null; - object.postStep = null; + object.osPolicyResourceId = ""; + object.state = options.enums === String ? "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" : 0; + } + if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) + object.osPolicyResourceId = message.osPolicyResourceId; + if (message.configSteps && message.configSteps.length) { + object.configSteps = []; + for (var j = 0; j < message.configSteps.length; ++j) + object.configSteps[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.toObject(message.configSteps[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { + object.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.toObject(message.execResourceOutput, options); + if (options.oneofs) + object.output = "execResourceOutput"; } - if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) - object.rebootConfig = options.enums === String ? $root.google.cloud.osconfig.v1.PatchConfig.RebootConfig[message.rebootConfig] : message.rebootConfig; - if (message.apt != null && message.hasOwnProperty("apt")) - object.apt = $root.google.cloud.osconfig.v1.AptSettings.toObject(message.apt, options); - if (message.yum != null && message.hasOwnProperty("yum")) - object.yum = $root.google.cloud.osconfig.v1.YumSettings.toObject(message.yum, options); - if (message.goo != null && message.hasOwnProperty("goo")) - object.goo = $root.google.cloud.osconfig.v1.GooSettings.toObject(message.goo, options); - if (message.zypper != null && message.hasOwnProperty("zypper")) - object.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.toObject(message.zypper, options); - if (message.windowsUpdate != null && message.hasOwnProperty("windowsUpdate")) - object.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.toObject(message.windowsUpdate, options); - if (message.preStep != null && message.hasOwnProperty("preStep")) - object.preStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.preStep, options); - if (message.postStep != null && message.hasOwnProperty("postStep")) - object.postStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.postStep, options); return object; }; /** - * Converts this PatchConfig to JSON. + * Converts this OSPolicyResourceCompliance to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchConfig + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance * @instance * @returns {Object.} JSON object */ - PatchConfig.prototype.toJSON = function toJSON() { + OSPolicyResourceCompliance.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * RebootConfig enum. - * @name google.cloud.osconfig.v1.PatchConfig.RebootConfig - * @enum {number} - * @property {number} REBOOT_CONFIG_UNSPECIFIED=0 REBOOT_CONFIG_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} ALWAYS=2 ALWAYS value - * @property {number} NEVER=3 NEVER value - */ - PatchConfig.RebootConfig = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REBOOT_CONFIG_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "ALWAYS"] = 2; - values[valuesById[3] = "NEVER"] = 3; - return values; - })(); + OSPolicyResourceCompliance.ExecResourceOutput = (function() { - return PatchConfig; - })(); + /** + * Properties of an ExecResourceOutput. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @interface IExecResourceOutput + * @property {Uint8Array|null} [enforcementOutput] ExecResourceOutput enforcementOutput + */ - v1.Instance = (function() { + /** + * Constructs a new ExecResourceOutput. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @classdesc Represents an ExecResourceOutput. + * @implements IExecResourceOutput + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set + */ + function ExecResourceOutput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of an Instance. - * @memberof google.cloud.osconfig.v1 - * @interface IInstance - */ + /** + * ExecResourceOutput enforcementOutput. + * @member {Uint8Array} enforcementOutput + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @instance + */ + ExecResourceOutput.prototype.enforcementOutput = $util.newBuffer([]); - /** - * Constructs a new Instance. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an Instance. - * @implements IInstance - * @constructor - * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set - */ - function Instance(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new ExecResourceOutput instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput instance + */ + ExecResourceOutput.create = function create(properties) { + return new ExecResourceOutput(properties); + }; - /** - * Creates a new Instance instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {google.cloud.osconfig.v1.IInstance=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.Instance} Instance instance - */ - Instance.create = function create(properties) { - return new Instance(properties); - }; + /** + * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResourceOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enforcementOutput != null && Object.hasOwnProperty.call(message, "enforcementOutput")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.enforcementOutput); + return writer; + }; - /** - * Encodes the specified Instance message. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Instance.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResourceOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.Instance.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {google.cloud.osconfig.v1.IInstance} message Instance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Instance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResourceOutput.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.enforcementOutput = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResourceOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecResourceOutput message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecResourceOutput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) + if (!(message.enforcementOutput && typeof message.enforcementOutput.length === "number" || $util.isString(message.enforcementOutput))) + return "enforcementOutput: buffer expected"; + return null; + }; + + /** + * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + */ + ExecResourceOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput(); + if (object.enforcementOutput != null) + if (typeof object.enforcementOutput === "string") + $util.base64.decode(object.enforcementOutput, message.enforcementOutput = $util.newBuffer($util.base64.length(object.enforcementOutput)), 0); + else if (object.enforcementOutput.length) + message.enforcementOutput = object.enforcementOutput; + return message; + }; + + /** + * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} message ExecResourceOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecResourceOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.enforcementOutput = ""; + else { + object.enforcementOutput = []; + if (options.bytes !== Array) + object.enforcementOutput = $util.newBuffer(object.enforcementOutput); + } + if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) + object.enforcementOutput = options.bytes === String ? $util.base64.encode(message.enforcementOutput, 0, message.enforcementOutput.length) : options.bytes === Array ? Array.prototype.slice.call(message.enforcementOutput) : message.enforcementOutput; + return object; + }; + + /** + * Converts this ExecResourceOutput to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @instance + * @returns {Object.} JSON object + */ + ExecResourceOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExecResourceOutput; + })(); + + return OSPolicyResourceCompliance; + })(); + + /** + * OSPolicyComplianceState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyComplianceState + * @enum {number} + * @property {number} OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED=0 OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED value + * @property {number} COMPLIANT=1 COMPLIANT value + * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value + * @property {number} UNKNOWN=3 UNKNOWN value + * @property {number} NO_OS_POLICIES_APPLICABLE=4 NO_OS_POLICIES_APPLICABLE value + */ + v1alpha.OSPolicyComplianceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPLIANT"] = 1; + values[valuesById[2] = "NON_COMPLIANT"] = 2; + values[valuesById[3] = "UNKNOWN"] = 3; + values[valuesById[4] = "NO_OS_POLICIES_APPLICABLE"] = 4; + return values; + })(); + + v1alpha.InstanceOSPoliciesCompliance = (function() { /** - * Decodes an Instance message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.Instance} Instance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Properties of an InstanceOSPoliciesCompliance. + * @memberof google.cloud.osconfig.v1alpha + * @interface IInstanceOSPoliciesCompliance + * @property {string|null} [name] InstanceOSPoliciesCompliance name + * @property {string|null} [instance] InstanceOSPoliciesCompliance instance + * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] InstanceOSPoliciesCompliance state + * @property {string|null} [detailedState] InstanceOSPoliciesCompliance detailedState + * @property {string|null} [detailedStateReason] InstanceOSPoliciesCompliance detailedStateReason + * @property {Array.|null} [osPolicyCompliances] InstanceOSPoliciesCompliance osPolicyCompliances + * @property {google.protobuf.ITimestamp|null} [lastComplianceCheckTime] InstanceOSPoliciesCompliance lastComplianceCheckTime + * @property {string|null} [lastComplianceRunId] InstanceOSPoliciesCompliance lastComplianceRunId */ - Instance.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.Instance(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an Instance message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.Instance} Instance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Constructs a new InstanceOSPoliciesCompliance. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents an InstanceOSPoliciesCompliance. + * @implements IInstanceOSPoliciesCompliance + * @constructor + * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance=} [properties] Properties to set */ - Instance.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + function InstanceOSPoliciesCompliance(properties) { + this.osPolicyCompliances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Verifies an Instance message. - * @function verify - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * InstanceOSPoliciesCompliance name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance */ - Instance.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + InstanceOSPoliciesCompliance.prototype.name = ""; /** - * Creates an Instance message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.Instance} Instance + * InstanceOSPoliciesCompliance instance. + * @member {string} instance + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance */ - Instance.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.Instance) - return object; - return new $root.google.cloud.osconfig.v1.Instance(); - }; + InstanceOSPoliciesCompliance.prototype.instance = ""; /** - * Creates a plain object from an Instance message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.Instance - * @static - * @param {google.cloud.osconfig.v1.Instance} message Instance - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * InstanceOSPoliciesCompliance state. + * @member {google.cloud.osconfig.v1alpha.OSPolicyComplianceState} state + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance */ - Instance.toObject = function toObject() { - return {}; - }; + InstanceOSPoliciesCompliance.prototype.state = 0; /** - * Converts this Instance to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.Instance + * InstanceOSPoliciesCompliance detailedState. + * @member {string} detailedState + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @instance - * @returns {Object.} JSON object */ - Instance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + InstanceOSPoliciesCompliance.prototype.detailedState = ""; /** - * PatchState enum. - * @name google.cloud.osconfig.v1.Instance.PatchState - * @enum {number} - * @property {number} PATCH_STATE_UNSPECIFIED=0 PATCH_STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} INACTIVE=2 INACTIVE value - * @property {number} NOTIFIED=3 NOTIFIED value - * @property {number} STARTED=4 STARTED value - * @property {number} DOWNLOADING_PATCHES=5 DOWNLOADING_PATCHES value - * @property {number} APPLYING_PATCHES=6 APPLYING_PATCHES value - * @property {number} REBOOTING=7 REBOOTING value - * @property {number} SUCCEEDED=8 SUCCEEDED value - * @property {number} SUCCEEDED_REBOOT_REQUIRED=9 SUCCEEDED_REBOOT_REQUIRED value - * @property {number} FAILED=10 FAILED value - * @property {number} ACKED=11 ACKED value - * @property {number} TIMED_OUT=12 TIMED_OUT value - * @property {number} RUNNING_PRE_PATCH_STEP=13 RUNNING_PRE_PATCH_STEP value - * @property {number} RUNNING_POST_PATCH_STEP=14 RUNNING_POST_PATCH_STEP value - * @property {number} NO_AGENT_DETECTED=15 NO_AGENT_DETECTED value + * InstanceOSPoliciesCompliance detailedStateReason. + * @member {string} detailedStateReason + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance */ - Instance.PatchState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PATCH_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - values[valuesById[3] = "NOTIFIED"] = 3; - values[valuesById[4] = "STARTED"] = 4; - values[valuesById[5] = "DOWNLOADING_PATCHES"] = 5; - values[valuesById[6] = "APPLYING_PATCHES"] = 6; - values[valuesById[7] = "REBOOTING"] = 7; - values[valuesById[8] = "SUCCEEDED"] = 8; - values[valuesById[9] = "SUCCEEDED_REBOOT_REQUIRED"] = 9; - values[valuesById[10] = "FAILED"] = 10; - values[valuesById[11] = "ACKED"] = 11; - values[valuesById[12] = "TIMED_OUT"] = 12; - values[valuesById[13] = "RUNNING_PRE_PATCH_STEP"] = 13; - values[valuesById[14] = "RUNNING_POST_PATCH_STEP"] = 14; - values[valuesById[15] = "NO_AGENT_DETECTED"] = 15; - return values; - })(); - - return Instance; - })(); - - v1.CancelPatchJobRequest = (function() { + InstanceOSPoliciesCompliance.prototype.detailedStateReason = ""; /** - * Properties of a CancelPatchJobRequest. - * @memberof google.cloud.osconfig.v1 - * @interface ICancelPatchJobRequest - * @property {string|null} [name] CancelPatchJobRequest name + * InstanceOSPoliciesCompliance osPolicyCompliances. + * @member {Array.} osPolicyCompliances + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance */ + InstanceOSPoliciesCompliance.prototype.osPolicyCompliances = $util.emptyArray; /** - * Constructs a new CancelPatchJobRequest. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a CancelPatchJobRequest. - * @implements ICancelPatchJobRequest - * @constructor - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set + * InstanceOSPoliciesCompliance lastComplianceCheckTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastComplianceCheckTime + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @instance */ - function CancelPatchJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + InstanceOSPoliciesCompliance.prototype.lastComplianceCheckTime = null; /** - * CancelPatchJobRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * InstanceOSPoliciesCompliance lastComplianceRunId. + * @member {string} lastComplianceRunId + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @instance */ - CancelPatchJobRequest.prototype.name = ""; + InstanceOSPoliciesCompliance.prototype.lastComplianceRunId = ""; /** - * Creates a new CancelPatchJobRequest instance using the specified properties. + * Creates a new InstanceOSPoliciesCompliance instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @static - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest instance + * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance instance */ - CancelPatchJobRequest.create = function create(properties) { - return new CancelPatchJobRequest(properties); + InstanceOSPoliciesCompliance.create = function create(properties) { + return new InstanceOSPoliciesCompliance(properties); }; /** - * Encodes the specified CancelPatchJobRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * Encodes the specified InstanceOSPoliciesCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @static - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance} message InstanceOSPoliciesCompliance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelPatchJobRequest.encode = function encode(message, writer) { + InstanceOSPoliciesCompliance.encode = function encode(message, writer) { 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.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instance); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.detailedState != null && Object.hasOwnProperty.call(message, "detailedState")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.detailedState); + if (message.detailedStateReason != null && Object.hasOwnProperty.call(message, "detailedStateReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.detailedStateReason); + if (message.osPolicyCompliances != null && message.osPolicyCompliances.length) + for (var i = 0; i < message.osPolicyCompliances.length; ++i) + $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.encode(message.osPolicyCompliances[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastComplianceCheckTime != null && Object.hasOwnProperty.call(message, "lastComplianceCheckTime")) + $root.google.protobuf.Timestamp.encode(message.lastComplianceCheckTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastComplianceRunId != null && Object.hasOwnProperty.call(message, "lastComplianceRunId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.lastComplianceRunId); return writer; }; /** - * Encodes the specified CancelPatchJobRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CancelPatchJobRequest.verify|verify} messages. + * Encodes the specified InstanceOSPoliciesCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @static - * @param {google.cloud.osconfig.v1.ICancelPatchJobRequest} message CancelPatchJobRequest message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance} message InstanceOSPoliciesCompliance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelPatchJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + InstanceOSPoliciesCompliance.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelPatchJobRequest message from the specified reader or buffer. + * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelPatchJobRequest.decode = function decode(reader, length) { + InstanceOSPoliciesCompliance.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.instance = reader.string(); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.detailedState = reader.string(); + break; + case 5: + message.detailedStateReason = reader.string(); + break; + case 6: + if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) + message.osPolicyCompliances = []; + message.osPolicyCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.decode(reader, reader.uint32())); + break; + case 7: + message.lastComplianceCheckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.lastComplianceRunId = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -20405,111 +18389,519 @@ }; /** - * Decodes a CancelPatchJobRequest message from the specified reader or buffer, length delimited. + * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelPatchJobRequest.decodeDelimited = function decodeDelimited(reader) { + InstanceOSPoliciesCompliance.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CancelPatchJobRequest message. + * Verifies an InstanceOSPoliciesCompliance message. * @function verify - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CancelPatchJobRequest.verify = function verify(message) { + InstanceOSPoliciesCompliance.verify = function verify(message) { if (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.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.detailedState != null && message.hasOwnProperty("detailedState")) + if (!$util.isString(message.detailedState)) + return "detailedState: string expected"; + if (message.detailedStateReason != null && message.hasOwnProperty("detailedStateReason")) + if (!$util.isString(message.detailedStateReason)) + return "detailedStateReason: string expected"; + if (message.osPolicyCompliances != null && message.hasOwnProperty("osPolicyCompliances")) { + if (!Array.isArray(message.osPolicyCompliances)) + return "osPolicyCompliances: array expected"; + for (var i = 0; i < message.osPolicyCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify(message.osPolicyCompliances[i]); + if (error) + return "osPolicyCompliances." + error; + } + } + if (message.lastComplianceCheckTime != null && message.hasOwnProperty("lastComplianceCheckTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastComplianceCheckTime); + if (error) + return "lastComplianceCheckTime." + error; + } + if (message.lastComplianceRunId != null && message.hasOwnProperty("lastComplianceRunId")) + if (!$util.isString(message.lastComplianceRunId)) + return "lastComplianceRunId: string expected"; return null; }; /** - * Creates a CancelPatchJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InstanceOSPoliciesCompliance message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.CancelPatchJobRequest} CancelPatchJobRequest + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance */ - CancelPatchJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.CancelPatchJobRequest) + InstanceOSPoliciesCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) return object; - var message = new $root.google.cloud.osconfig.v1.CancelPatchJobRequest(); + var message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance(); if (object.name != null) message.name = String(object.name); - return message; + if (object.instance != null) + message.instance = String(object.instance); + switch (object.state) { + case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "COMPLIANT": + case 1: + message.state = 1; + break; + case "NON_COMPLIANT": + case 2: + message.state = 2; + break; + case "UNKNOWN": + case 3: + message.state = 3; + break; + case "NO_OS_POLICIES_APPLICABLE": + case 4: + message.state = 4; + break; + } + if (object.detailedState != null) + message.detailedState = String(object.detailedState); + if (object.detailedStateReason != null) + message.detailedStateReason = String(object.detailedStateReason); + if (object.osPolicyCompliances) { + if (!Array.isArray(object.osPolicyCompliances)) + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.osPolicyCompliances: array expected"); + message.osPolicyCompliances = []; + for (var i = 0; i < object.osPolicyCompliances.length; ++i) { + if (typeof object.osPolicyCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.osPolicyCompliances: object expected"); + message.osPolicyCompliances[i] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.fromObject(object.osPolicyCompliances[i]); + } + } + if (object.lastComplianceCheckTime != null) { + if (typeof object.lastComplianceCheckTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.lastComplianceCheckTime: object expected"); + message.lastComplianceCheckTime = $root.google.protobuf.Timestamp.fromObject(object.lastComplianceCheckTime); + } + if (object.lastComplianceRunId != null) + message.lastComplianceRunId = String(object.lastComplianceRunId); + return message; }; /** - * Creates a plain object from a CancelPatchJobRequest message. Also converts values to other types if specified. + * Creates a plain object from an InstanceOSPoliciesCompliance message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @static - * @param {google.cloud.osconfig.v1.CancelPatchJobRequest} message CancelPatchJobRequest + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} message InstanceOSPoliciesCompliance * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelPatchJobRequest.toObject = function toObject(message, options) { + InstanceOSPoliciesCompliance.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) + object.osPolicyCompliances = []; + if (options.defaults) { object.name = ""; + object.instance = ""; + object.state = options.enums === String ? "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" : 0; + object.detailedState = ""; + object.detailedStateReason = ""; + object.lastComplianceCheckTime = null; + object.lastComplianceRunId = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + if (message.detailedState != null && message.hasOwnProperty("detailedState")) + object.detailedState = message.detailedState; + if (message.detailedStateReason != null && message.hasOwnProperty("detailedStateReason")) + object.detailedStateReason = message.detailedStateReason; + if (message.osPolicyCompliances && message.osPolicyCompliances.length) { + object.osPolicyCompliances = []; + for (var j = 0; j < message.osPolicyCompliances.length; ++j) + object.osPolicyCompliances[j] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.toObject(message.osPolicyCompliances[j], options); + } + if (message.lastComplianceCheckTime != null && message.hasOwnProperty("lastComplianceCheckTime")) + object.lastComplianceCheckTime = $root.google.protobuf.Timestamp.toObject(message.lastComplianceCheckTime, options); + if (message.lastComplianceRunId != null && message.hasOwnProperty("lastComplianceRunId")) + object.lastComplianceRunId = message.lastComplianceRunId; return object; }; /** - * Converts this CancelPatchJobRequest to JSON. + * Converts this InstanceOSPoliciesCompliance to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance * @instance * @returns {Object.} JSON object */ - CancelPatchJobRequest.prototype.toJSON = function toJSON() { + InstanceOSPoliciesCompliance.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CancelPatchJobRequest; + InstanceOSPoliciesCompliance.OSPolicyCompliance = (function() { + + /** + * Properties of a OSPolicyCompliance. + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @interface IOSPolicyCompliance + * @property {string|null} [osPolicyId] OSPolicyCompliance osPolicyId + * @property {string|null} [osPolicyAssignment] OSPolicyCompliance osPolicyAssignment + * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] OSPolicyCompliance state + * @property {Array.|null} [osPolicyResourceCompliances] OSPolicyCompliance osPolicyResourceCompliances + */ + + /** + * Constructs a new OSPolicyCompliance. + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @classdesc Represents a OSPolicyCompliance. + * @implements IOSPolicyCompliance + * @constructor + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance=} [properties] Properties to set + */ + function OSPolicyCompliance(properties) { + this.osPolicyResourceCompliances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyCompliance osPolicyId. + * @member {string} osPolicyId + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyId = ""; + + /** + * OSPolicyCompliance osPolicyAssignment. + * @member {string} osPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyAssignment = ""; + + /** + * OSPolicyCompliance state. + * @member {google.cloud.osconfig.v1alpha.OSPolicyComplianceState} state + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.state = 0; + + /** + * OSPolicyCompliance osPolicyResourceCompliances. + * @member {Array.} osPolicyResourceCompliances + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyResourceCompliances = $util.emptyArray; + + /** + * Creates a new OSPolicyCompliance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance instance + */ + OSPolicyCompliance.create = function create(properties) { + return new OSPolicyCompliance(properties); + }; + + /** + * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyCompliance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyId != null && Object.hasOwnProperty.call(message, "osPolicyId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyId); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osPolicyAssignment); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.osPolicyResourceCompliances != null && message.osPolicyResourceCompliances.length) + for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.encode(message.osPolicyResourceCompliances[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyCompliance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyCompliance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyId = reader.string(); + break; + case 2: + message.osPolicyAssignment = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) + message.osPolicyResourceCompliances = []; + message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyCompliance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyCompliance message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyCompliance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) + if (!$util.isString(message.osPolicyId)) + return "osPolicyId: string expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + if (!$util.isString(message.osPolicyAssignment)) + return "osPolicyAssignment: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.osPolicyResourceCompliances != null && message.hasOwnProperty("osPolicyResourceCompliances")) { + if (!Array.isArray(message.osPolicyResourceCompliances)) + return "osPolicyResourceCompliances: array expected"; + for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify(message.osPolicyResourceCompliances[i]); + if (error) + return "osPolicyResourceCompliances." + error; + } + } + return null; + }; + + /** + * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance + */ + OSPolicyCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance(); + if (object.osPolicyId != null) + message.osPolicyId = String(object.osPolicyId); + if (object.osPolicyAssignment != null) + message.osPolicyAssignment = String(object.osPolicyAssignment); + switch (object.state) { + case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "COMPLIANT": + case 1: + message.state = 1; + break; + case "NON_COMPLIANT": + case 2: + message.state = 2; + break; + case "UNKNOWN": + case 3: + message.state = 3; + break; + case "NO_OS_POLICIES_APPLICABLE": + case 4: + message.state = 4; + break; + } + if (object.osPolicyResourceCompliances) { + if (!Array.isArray(object.osPolicyResourceCompliances)) + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.osPolicyResourceCompliances: array expected"); + message.osPolicyResourceCompliances = []; + for (var i = 0; i < object.osPolicyResourceCompliances.length; ++i) { + if (typeof object.osPolicyResourceCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.osPolicyResourceCompliances: object expected"); + message.osPolicyResourceCompliances[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.fromObject(object.osPolicyResourceCompliances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} message OSPolicyCompliance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyCompliance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyResourceCompliances = []; + if (options.defaults) { + object.osPolicyId = ""; + object.osPolicyAssignment = ""; + object.state = options.enums === String ? "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" : 0; + } + if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) + object.osPolicyId = message.osPolicyId; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = message.osPolicyAssignment; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + if (message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length) { + object.osPolicyResourceCompliances = []; + for (var j = 0; j < message.osPolicyResourceCompliances.length; ++j) + object.osPolicyResourceCompliances[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.toObject(message.osPolicyResourceCompliances[j], options); + } + return object; + }; + + /** + * Converts this OSPolicyCompliance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @instance + * @returns {Object.} JSON object + */ + OSPolicyCompliance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OSPolicyCompliance; + })(); + + return InstanceOSPoliciesCompliance; })(); - v1.AptSettings = (function() { + v1alpha.GetInstanceOSPoliciesComplianceRequest = (function() { /** - * Properties of an AptSettings. - * @memberof google.cloud.osconfig.v1 - * @interface IAptSettings - * @property {google.cloud.osconfig.v1.AptSettings.Type|null} [type] AptSettings type - * @property {Array.|null} [excludes] AptSettings excludes - * @property {Array.|null} [exclusivePackages] AptSettings exclusivePackages + * Properties of a GetInstanceOSPoliciesComplianceRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IGetInstanceOSPoliciesComplianceRequest + * @property {string|null} [name] GetInstanceOSPoliciesComplianceRequest name */ /** - * Constructs a new AptSettings. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an AptSettings. - * @implements IAptSettings + * Constructs a new GetInstanceOSPoliciesComplianceRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a GetInstanceOSPoliciesComplianceRequest. + * @implements IGetInstanceOSPoliciesComplianceRequest * @constructor - * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest=} [properties] Properties to set */ - function AptSettings(properties) { - this.excludes = []; - this.exclusivePackages = []; + function GetInstanceOSPoliciesComplianceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20517,107 +18909,75 @@ } /** - * AptSettings type. - * @member {google.cloud.osconfig.v1.AptSettings.Type} type - * @memberof google.cloud.osconfig.v1.AptSettings - * @instance - */ - AptSettings.prototype.type = 0; - - /** - * AptSettings excludes. - * @member {Array.} excludes - * @memberof google.cloud.osconfig.v1.AptSettings - * @instance - */ - AptSettings.prototype.excludes = $util.emptyArray; - - /** - * AptSettings exclusivePackages. - * @member {Array.} exclusivePackages - * @memberof google.cloud.osconfig.v1.AptSettings + * GetInstanceOSPoliciesComplianceRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @instance */ - AptSettings.prototype.exclusivePackages = $util.emptyArray; + GetInstanceOSPoliciesComplianceRequest.prototype.name = ""; /** - * Creates a new AptSettings instance using the specified properties. + * Creates a new GetInstanceOSPoliciesComplianceRequest instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.AptSettings + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @static - * @param {google.cloud.osconfig.v1.IAptSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings instance + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest instance */ - AptSettings.create = function create(properties) { - return new AptSettings(properties); + GetInstanceOSPoliciesComplianceRequest.create = function create(properties) { + return new GetInstanceOSPoliciesComplianceRequest(properties); }; /** - * Encodes the specified AptSettings message. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * Encodes the specified GetInstanceOSPoliciesComplianceRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.AptSettings + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @static - * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} message GetInstanceOSPoliciesComplianceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AptSettings.encode = function encode(message, writer) { + GetInstanceOSPoliciesComplianceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.excludes != null && message.excludes.length) - for (var i = 0; i < message.excludes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); - if (message.exclusivePackages != null && message.exclusivePackages.length) - for (var i = 0; i < message.exclusivePackages.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePackages[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified AptSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.AptSettings.verify|verify} messages. + * Encodes the specified GetInstanceOSPoliciesComplianceRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.AptSettings + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @static - * @param {google.cloud.osconfig.v1.IAptSettings} message AptSettings message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} message GetInstanceOSPoliciesComplianceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AptSettings.encodeDelimited = function encodeDelimited(message, writer) { + GetInstanceOSPoliciesComplianceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AptSettings message from the specified reader or buffer. + * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.AptSettings + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings + * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AptSettings.decode = function decode(reader, length) { + GetInstanceOSPoliciesComplianceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.AptSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.int32(); - break; - case 2: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 3: - if (!(message.exclusivePackages && message.exclusivePackages.length)) - message.exclusivePackages = []; - message.exclusivePackages.push(reader.string()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -20628,188 +18988,110 @@ }; /** - * Decodes an AptSettings message from the specified reader or buffer, length delimited. + * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.AptSettings + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings + * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AptSettings.decodeDelimited = function decodeDelimited(reader) { + GetInstanceOSPoliciesComplianceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AptSettings message. + * Verifies a GetInstanceOSPoliciesComplianceRequest message. * @function verify - * @memberof google.cloud.osconfig.v1.AptSettings + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AptSettings.verify = function verify(message) { + GetInstanceOSPoliciesComplianceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.excludes != null && message.hasOwnProperty("excludes")) { - if (!Array.isArray(message.excludes)) - return "excludes: array expected"; - for (var i = 0; i < message.excludes.length; ++i) - if (!$util.isString(message.excludes[i])) - return "excludes: string[] expected"; - } - if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { - if (!Array.isArray(message.exclusivePackages)) - return "exclusivePackages: array expected"; - for (var i = 0; i < message.exclusivePackages.length; ++i) - if (!$util.isString(message.exclusivePackages[i])) - return "exclusivePackages: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an AptSettings message from a plain object. Also converts values to their respective internal types. + * Creates a GetInstanceOSPoliciesComplianceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.AptSettings + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.AptSettings} AptSettings + * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest */ - AptSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.AptSettings) + GetInstanceOSPoliciesComplianceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) return object; - var message = new $root.google.cloud.osconfig.v1.AptSettings(); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DIST": - case 1: - message.type = 1; - break; - case "UPGRADE": - case 2: - message.type = 2; - break; - } - if (object.excludes) { - if (!Array.isArray(object.excludes)) - throw TypeError(".google.cloud.osconfig.v1.AptSettings.excludes: array expected"); - message.excludes = []; - for (var i = 0; i < object.excludes.length; ++i) - message.excludes[i] = String(object.excludes[i]); - } - if (object.exclusivePackages) { - if (!Array.isArray(object.exclusivePackages)) - throw TypeError(".google.cloud.osconfig.v1.AptSettings.exclusivePackages: array expected"); - message.exclusivePackages = []; - for (var i = 0; i < object.exclusivePackages.length; ++i) - message.exclusivePackages[i] = String(object.exclusivePackages[i]); - } + var message = new $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an AptSettings message. Also converts values to other types if specified. + * Creates a plain object from a GetInstanceOSPoliciesComplianceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.AptSettings + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @static - * @param {google.cloud.osconfig.v1.AptSettings} message AptSettings + * @param {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} message GetInstanceOSPoliciesComplianceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AptSettings.toObject = function toObject(message, options) { + GetInstanceOSPoliciesComplianceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.excludes = []; - object.exclusivePackages = []; - } if (options.defaults) - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1.AptSettings.Type[message.type] : message.type; - if (message.excludes && message.excludes.length) { - object.excludes = []; - for (var j = 0; j < message.excludes.length; ++j) - object.excludes[j] = message.excludes[j]; - } - if (message.exclusivePackages && message.exclusivePackages.length) { - object.exclusivePackages = []; - for (var j = 0; j < message.exclusivePackages.length; ++j) - object.exclusivePackages[j] = message.exclusivePackages[j]; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this AptSettings to JSON. + * Converts this GetInstanceOSPoliciesComplianceRequest to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.AptSettings + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest * @instance * @returns {Object.} JSON object */ - AptSettings.prototype.toJSON = function toJSON() { + GetInstanceOSPoliciesComplianceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Type enum. - * @name google.cloud.osconfig.v1.AptSettings.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} DIST=1 DIST value - * @property {number} UPGRADE=2 UPGRADE value - */ - AptSettings.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIST"] = 1; - values[valuesById[2] = "UPGRADE"] = 2; - return values; - })(); - - return AptSettings; + return GetInstanceOSPoliciesComplianceRequest; })(); - v1.YumSettings = (function() { + v1alpha.ListInstanceOSPoliciesCompliancesRequest = (function() { /** - * Properties of a YumSettings. - * @memberof google.cloud.osconfig.v1 - * @interface IYumSettings - * @property {boolean|null} [security] YumSettings security - * @property {boolean|null} [minimal] YumSettings minimal - * @property {Array.|null} [excludes] YumSettings excludes - * @property {Array.|null} [exclusivePackages] YumSettings exclusivePackages + * Properties of a ListInstanceOSPoliciesCompliancesRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListInstanceOSPoliciesCompliancesRequest + * @property {string|null} [parent] ListInstanceOSPoliciesCompliancesRequest parent + * @property {number|null} [pageSize] ListInstanceOSPoliciesCompliancesRequest pageSize + * @property {string|null} [pageToken] ListInstanceOSPoliciesCompliancesRequest pageToken + * @property {string|null} [filter] ListInstanceOSPoliciesCompliancesRequest filter */ /** - * Constructs a new YumSettings. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a YumSettings. - * @implements IYumSettings + * Constructs a new ListInstanceOSPoliciesCompliancesRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListInstanceOSPoliciesCompliancesRequest. + * @implements IListInstanceOSPoliciesCompliancesRequest * @constructor - * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest=} [properties] Properties to set */ - function YumSettings(properties) { - this.excludes = []; - this.exclusivePackages = []; + function ListInstanceOSPoliciesCompliancesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20817,120 +19099,114 @@ } /** - * YumSettings security. - * @member {boolean} security - * @memberof google.cloud.osconfig.v1.YumSettings + * ListInstanceOSPoliciesCompliancesRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @instance */ - YumSettings.prototype.security = false; + ListInstanceOSPoliciesCompliancesRequest.prototype.parent = ""; /** - * YumSettings minimal. - * @member {boolean} minimal - * @memberof google.cloud.osconfig.v1.YumSettings + * ListInstanceOSPoliciesCompliancesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @instance */ - YumSettings.prototype.minimal = false; + ListInstanceOSPoliciesCompliancesRequest.prototype.pageSize = 0; /** - * YumSettings excludes. - * @member {Array.} excludes - * @memberof google.cloud.osconfig.v1.YumSettings + * ListInstanceOSPoliciesCompliancesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @instance */ - YumSettings.prototype.excludes = $util.emptyArray; + ListInstanceOSPoliciesCompliancesRequest.prototype.pageToken = ""; /** - * YumSettings exclusivePackages. - * @member {Array.} exclusivePackages - * @memberof google.cloud.osconfig.v1.YumSettings + * ListInstanceOSPoliciesCompliancesRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @instance */ - YumSettings.prototype.exclusivePackages = $util.emptyArray; + ListInstanceOSPoliciesCompliancesRequest.prototype.filter = ""; /** - * Creates a new YumSettings instance using the specified properties. + * Creates a new ListInstanceOSPoliciesCompliancesRequest instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.YumSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @static - * @param {google.cloud.osconfig.v1.IYumSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings instance + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest instance */ - YumSettings.create = function create(properties) { - return new YumSettings(properties); + ListInstanceOSPoliciesCompliancesRequest.create = function create(properties) { + return new ListInstanceOSPoliciesCompliancesRequest(properties); }; /** - * Encodes the specified YumSettings message. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.YumSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @static - * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - YumSettings.encode = function encode(message, writer) { + ListInstanceOSPoliciesCompliancesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.security != null && Object.hasOwnProperty.call(message, "security")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.security); - if (message.minimal != null && Object.hasOwnProperty.call(message, "minimal")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.minimal); - if (message.excludes != null && message.excludes.length) - for (var i = 0; i < message.excludes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludes[i]); - if (message.exclusivePackages != null && message.exclusivePackages.length) - for (var i = 0; i < message.exclusivePackages.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.exclusivePackages[i]); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); return writer; }; /** - * Encodes the specified YumSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.YumSettings.verify|verify} messages. + * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.YumSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @static - * @param {google.cloud.osconfig.v1.IYumSettings} message YumSettings message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - YumSettings.encodeDelimited = function encodeDelimited(message, writer) { + ListInstanceOSPoliciesCompliancesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a YumSettings message from the specified reader or buffer. + * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.YumSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - YumSettings.decode = function decode(reader, length) { + ListInstanceOSPoliciesCompliancesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.YumSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.security = reader.bool(); + message.parent = reader.string(); break; case 2: - message.minimal = reader.bool(); + message.pageSize = reader.int32(); break; case 3: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); + message.pageToken = reader.string(); break; case 4: - if (!(message.exclusivePackages && message.exclusivePackages.length)) - message.exclusivePackages = []; - message.exclusivePackages.push(reader.string()); + message.filter = reader.string(); break; default: reader.skipType(tag & 7); @@ -20941,157 +19217,134 @@ }; /** - * Decodes a YumSettings message from the specified reader or buffer, length delimited. + * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.YumSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - YumSettings.decodeDelimited = function decodeDelimited(reader) { + ListInstanceOSPoliciesCompliancesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a YumSettings message. + * Verifies a ListInstanceOSPoliciesCompliancesRequest message. * @function verify - * @memberof google.cloud.osconfig.v1.YumSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - YumSettings.verify = function verify(message) { + ListInstanceOSPoliciesCompliancesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.security != null && message.hasOwnProperty("security")) - if (typeof message.security !== "boolean") - return "security: boolean expected"; - if (message.minimal != null && message.hasOwnProperty("minimal")) - if (typeof message.minimal !== "boolean") - return "minimal: boolean expected"; - if (message.excludes != null && message.hasOwnProperty("excludes")) { - if (!Array.isArray(message.excludes)) - return "excludes: array expected"; - for (var i = 0; i < message.excludes.length; ++i) - if (!$util.isString(message.excludes[i])) - return "excludes: string[] expected"; - } - if (message.exclusivePackages != null && message.hasOwnProperty("exclusivePackages")) { - if (!Array.isArray(message.exclusivePackages)) - return "exclusivePackages: array expected"; - for (var i = 0; i < message.exclusivePackages.length; ++i) - if (!$util.isString(message.exclusivePackages[i])) - return "exclusivePackages: string[] expected"; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates a YumSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListInstanceOSPoliciesCompliancesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.YumSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.YumSettings} YumSettings + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest */ - YumSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.YumSettings) + ListInstanceOSPoliciesCompliancesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) return object; - var message = new $root.google.cloud.osconfig.v1.YumSettings(); - if (object.security != null) - message.security = Boolean(object.security); - if (object.minimal != null) - message.minimal = Boolean(object.minimal); - if (object.excludes) { - if (!Array.isArray(object.excludes)) - throw TypeError(".google.cloud.osconfig.v1.YumSettings.excludes: array expected"); - message.excludes = []; - for (var i = 0; i < object.excludes.length; ++i) - message.excludes[i] = String(object.excludes[i]); - } - if (object.exclusivePackages) { - if (!Array.isArray(object.exclusivePackages)) - throw TypeError(".google.cloud.osconfig.v1.YumSettings.exclusivePackages: array expected"); - message.exclusivePackages = []; - for (var i = 0; i < object.exclusivePackages.length; ++i) - message.exclusivePackages[i] = String(object.exclusivePackages[i]); - } + var message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from a YumSettings message. Also converts values to other types if specified. + * Creates a plain object from a ListInstanceOSPoliciesCompliancesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.YumSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @static - * @param {google.cloud.osconfig.v1.YumSettings} message YumSettings + * @param {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} message ListInstanceOSPoliciesCompliancesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - YumSettings.toObject = function toObject(message, options) { + ListInstanceOSPoliciesCompliancesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.excludes = []; - object.exclusivePackages = []; - } if (options.defaults) { - object.security = false; - object.minimal = false; - } - if (message.security != null && message.hasOwnProperty("security")) - object.security = message.security; - if (message.minimal != null && message.hasOwnProperty("minimal")) - object.minimal = message.minimal; - if (message.excludes && message.excludes.length) { - object.excludes = []; - for (var j = 0; j < message.excludes.length; ++j) - object.excludes[j] = message.excludes[j]; - } - if (message.exclusivePackages && message.exclusivePackages.length) { - object.exclusivePackages = []; - for (var j = 0; j < message.exclusivePackages.length; ++j) - object.exclusivePackages[j] = message.exclusivePackages[j]; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this YumSettings to JSON. + * Converts this ListInstanceOSPoliciesCompliancesRequest to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.YumSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest * @instance * @returns {Object.} JSON object */ - YumSettings.prototype.toJSON = function toJSON() { + ListInstanceOSPoliciesCompliancesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return YumSettings; + return ListInstanceOSPoliciesCompliancesRequest; })(); - v1.GooSettings = (function() { + v1alpha.ListInstanceOSPoliciesCompliancesResponse = (function() { /** - * Properties of a GooSettings. - * @memberof google.cloud.osconfig.v1 - * @interface IGooSettings + * Properties of a ListInstanceOSPoliciesCompliancesResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListInstanceOSPoliciesCompliancesResponse + * @property {Array.|null} [instanceOsPoliciesCompliances] ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances + * @property {string|null} [nextPageToken] ListInstanceOSPoliciesCompliancesResponse nextPageToken */ /** - * Constructs a new GooSettings. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a GooSettings. - * @implements IGooSettings + * Constructs a new ListInstanceOSPoliciesCompliancesResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListInstanceOSPoliciesCompliancesResponse. + * @implements IListInstanceOSPoliciesCompliancesResponse * @constructor - * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse=} [properties] Properties to set */ - function GooSettings(properties) { + function ListInstanceOSPoliciesCompliancesResponse(properties) { + this.instanceOsPoliciesCompliances = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21099,63 +19352,92 @@ } /** - * Creates a new GooSettings instance using the specified properties. + * ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances. + * @member {Array.} instanceOsPoliciesCompliances + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @instance + */ + ListInstanceOSPoliciesCompliancesResponse.prototype.instanceOsPoliciesCompliances = $util.emptyArray; + + /** + * ListInstanceOSPoliciesCompliancesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @instance + */ + ListInstanceOSPoliciesCompliancesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListInstanceOSPoliciesCompliancesResponse instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.GooSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse * @static - * @param {google.cloud.osconfig.v1.IGooSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings instance + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse instance */ - GooSettings.create = function create(properties) { - return new GooSettings(properties); + ListInstanceOSPoliciesCompliancesResponse.create = function create(properties) { + return new ListInstanceOSPoliciesCompliancesResponse(properties); }; /** - * Encodes the specified GooSettings message. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.GooSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse * @static - * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse} message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GooSettings.encode = function encode(message, writer) { + ListInstanceOSPoliciesCompliancesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.instanceOsPoliciesCompliances != null && message.instanceOsPoliciesCompliances.length) + for (var i = 0; i < message.instanceOsPoliciesCompliances.length; ++i) + $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.encode(message.instanceOsPoliciesCompliances[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 GooSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GooSettings.verify|verify} messages. + * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.GooSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse * @static - * @param {google.cloud.osconfig.v1.IGooSettings} message GooSettings message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse} message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GooSettings.encodeDelimited = function encodeDelimited(message, writer) { + ListInstanceOSPoliciesCompliancesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GooSettings message from the specified reader or buffer. + * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.GooSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GooSettings.decode = function decode(reader, length) { + ListInstanceOSPoliciesCompliancesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GooSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (!(message.instanceOsPoliciesCompliances && message.instanceOsPoliciesCompliances.length)) + message.instanceOsPoliciesCompliances = []; + message.instanceOsPoliciesCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -21165,103 +19447,137 @@ }; /** - * Decodes a GooSettings message from the specified reader or buffer, length delimited. + * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.GooSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GooSettings.decodeDelimited = function decodeDelimited(reader) { + ListInstanceOSPoliciesCompliancesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GooSettings message. + * Verifies a ListInstanceOSPoliciesCompliancesResponse message. * @function verify - * @memberof google.cloud.osconfig.v1.GooSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GooSettings.verify = function verify(message) { + ListInstanceOSPoliciesCompliancesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.instanceOsPoliciesCompliances != null && message.hasOwnProperty("instanceOsPoliciesCompliances")) { + if (!Array.isArray(message.instanceOsPoliciesCompliances)) + return "instanceOsPoliciesCompliances: array expected"; + for (var i = 0; i < message.instanceOsPoliciesCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify(message.instanceOsPoliciesCompliances[i]); + if (error) + return "instanceOsPoliciesCompliances." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GooSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListInstanceOSPoliciesCompliancesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.GooSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.GooSettings} GooSettings + * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse */ - GooSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.GooSettings) + ListInstanceOSPoliciesCompliancesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) return object; - return new $root.google.cloud.osconfig.v1.GooSettings(); + var message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse(); + if (object.instanceOsPoliciesCompliances) { + if (!Array.isArray(object.instanceOsPoliciesCompliances)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.instanceOsPoliciesCompliances: array expected"); + message.instanceOsPoliciesCompliances = []; + for (var i = 0; i < object.instanceOsPoliciesCompliances.length; ++i) { + if (typeof object.instanceOsPoliciesCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.instanceOsPoliciesCompliances: object expected"); + message.instanceOsPoliciesCompliances[i] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.fromObject(object.instanceOsPoliciesCompliances[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; }; /** - * Creates a plain object from a GooSettings message. Also converts values to other types if specified. + * Creates a plain object from a ListInstanceOSPoliciesCompliancesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.GooSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse * @static - * @param {google.cloud.osconfig.v1.GooSettings} message GooSettings + * @param {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} message ListInstanceOSPoliciesCompliancesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GooSettings.toObject = function toObject() { - return {}; + ListInstanceOSPoliciesCompliancesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.instanceOsPoliciesCompliances = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.instanceOsPoliciesCompliances && message.instanceOsPoliciesCompliances.length) { + object.instanceOsPoliciesCompliances = []; + for (var j = 0; j < message.instanceOsPoliciesCompliances.length; ++j) + object.instanceOsPoliciesCompliances[j] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.toObject(message.instanceOsPoliciesCompliances[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; }; /** - * Converts this GooSettings to JSON. + * Converts this ListInstanceOSPoliciesCompliancesResponse to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.GooSettings + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse * @instance * @returns {Object.} JSON object */ - GooSettings.prototype.toJSON = function toJSON() { + ListInstanceOSPoliciesCompliancesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GooSettings; + return ListInstanceOSPoliciesCompliancesResponse; })(); - v1.ZypperSettings = (function() { + v1alpha.Inventory = (function() { /** - * Properties of a ZypperSettings. - * @memberof google.cloud.osconfig.v1 - * @interface IZypperSettings - * @property {boolean|null} [withOptional] ZypperSettings withOptional - * @property {boolean|null} [withUpdate] ZypperSettings withUpdate - * @property {Array.|null} [categories] ZypperSettings categories - * @property {Array.|null} [severities] ZypperSettings severities - * @property {Array.|null} [excludes] ZypperSettings excludes - * @property {Array.|null} [exclusivePatches] ZypperSettings exclusivePatches + * Properties of an Inventory. + * @memberof google.cloud.osconfig.v1alpha + * @interface IInventory + * @property {string|null} [name] Inventory name + * @property {google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null} [osInfo] Inventory osInfo + * @property {Object.|null} [items] Inventory items + * @property {google.protobuf.ITimestamp|null} [updateTime] Inventory updateTime */ /** - * Constructs a new ZypperSettings. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a ZypperSettings. - * @implements IZypperSettings + * Constructs a new Inventory. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents an Inventory. + * @implements IInventory * @constructor - * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IInventory=} [properties] Properties to set */ - function ZypperSettings(properties) { - this.categories = []; - this.severities = []; - this.excludes = []; - this.exclusivePatches = []; + function Inventory(properties) { + this.items = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21269,152 +19585,136 @@ } /** - * ZypperSettings withOptional. - * @member {boolean} withOptional - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @instance - */ - ZypperSettings.prototype.withOptional = false; - - /** - * ZypperSettings withUpdate. - * @member {boolean} withUpdate - * @memberof google.cloud.osconfig.v1.ZypperSettings - * @instance - */ - ZypperSettings.prototype.withUpdate = false; - - /** - * ZypperSettings categories. - * @member {Array.} categories - * @memberof google.cloud.osconfig.v1.ZypperSettings + * Inventory name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.Inventory * @instance */ - ZypperSettings.prototype.categories = $util.emptyArray; + Inventory.prototype.name = ""; /** - * ZypperSettings severities. - * @member {Array.} severities - * @memberof google.cloud.osconfig.v1.ZypperSettings + * Inventory osInfo. + * @member {google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null|undefined} osInfo + * @memberof google.cloud.osconfig.v1alpha.Inventory * @instance */ - ZypperSettings.prototype.severities = $util.emptyArray; + Inventory.prototype.osInfo = null; /** - * ZypperSettings excludes. - * @member {Array.} excludes - * @memberof google.cloud.osconfig.v1.ZypperSettings + * Inventory items. + * @member {Object.} items + * @memberof google.cloud.osconfig.v1alpha.Inventory * @instance */ - ZypperSettings.prototype.excludes = $util.emptyArray; + Inventory.prototype.items = $util.emptyObject; /** - * ZypperSettings exclusivePatches. - * @member {Array.} exclusivePatches - * @memberof google.cloud.osconfig.v1.ZypperSettings + * Inventory updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1alpha.Inventory * @instance */ - ZypperSettings.prototype.exclusivePatches = $util.emptyArray; + Inventory.prototype.updateTime = null; /** - * Creates a new ZypperSettings instance using the specified properties. + * Creates a new Inventory instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.ZypperSettings + * @memberof google.cloud.osconfig.v1alpha.Inventory * @static - * @param {google.cloud.osconfig.v1.IZypperSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings instance + * @param {google.cloud.osconfig.v1alpha.IInventory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory instance */ - ZypperSettings.create = function create(properties) { - return new ZypperSettings(properties); + Inventory.create = function create(properties) { + return new Inventory(properties); }; /** - * Encodes the specified ZypperSettings message. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.ZypperSettings + * @memberof google.cloud.osconfig.v1alpha.Inventory * @static - * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IInventory} message Inventory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ZypperSettings.encode = function encode(message, writer) { + Inventory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.withOptional != null && Object.hasOwnProperty.call(message, "withOptional")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.withOptional); - if (message.withUpdate != null && Object.hasOwnProperty.call(message, "withUpdate")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.withUpdate); - if (message.categories != null && message.categories.length) - for (var i = 0; i < message.categories.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.categories[i]); - if (message.severities != null && message.severities.length) - for (var i = 0; i < message.severities.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.severities[i]); - if (message.excludes != null && message.excludes.length) - for (var i = 0; i < message.excludes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.excludes[i]); - if (message.exclusivePatches != null && message.exclusivePatches.length) - for (var i = 0; i < message.exclusivePatches.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.exclusivePatches[i]); + if (message.osInfo != null && Object.hasOwnProperty.call(message, "osInfo")) + $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.encode(message.osInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.items != null && Object.hasOwnProperty.call(message, "items")) + for (var keys = Object.keys(message.items), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.osconfig.v1alpha.Inventory.Item.encode(message.items[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ZypperSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ZypperSettings.verify|verify} messages. + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ZypperSettings + * @memberof google.cloud.osconfig.v1alpha.Inventory * @static - * @param {google.cloud.osconfig.v1.IZypperSettings} message ZypperSettings message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IInventory} message Inventory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ZypperSettings.encodeDelimited = function encodeDelimited(message, writer) { + Inventory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ZypperSettings message from the specified reader or buffer. + * Decodes an Inventory message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.ZypperSettings + * @memberof google.cloud.osconfig.v1alpha.Inventory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings + * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ZypperSettings.decode = function decode(reader, length) { + Inventory.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ZypperSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; case 1: - message.withOptional = reader.bool(); + message.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.decode(reader, reader.uint32()); break; case 2: - message.withUpdate = reader.bool(); - break; - case 3: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push(reader.string()); + if (message.items === $util.emptyObject) + message.items = {}; + 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.osconfig.v1alpha.Inventory.Item.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.items[key] = value; break; case 4: - if (!(message.severities && message.severities.length)) - message.severities = []; - message.severities.push(reader.string()); - break; - case 5: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 6: - if (!(message.exclusivePatches && message.exclusivePatches.length)) - message.exclusivePatches = []; - message.exclusivePatches.push(reader.string()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -21425,1724 +19725,1414 @@ }; /** - * Decodes a ZypperSettings message from the specified reader or buffer, length delimited. + * Decodes an Inventory message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ZypperSettings + * @memberof google.cloud.osconfig.v1alpha.Inventory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings + * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ZypperSettings.decodeDelimited = function decodeDelimited(reader) { + Inventory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ZypperSettings message. + * Verifies an Inventory message. * @function verify - * @memberof google.cloud.osconfig.v1.ZypperSettings + * @memberof google.cloud.osconfig.v1alpha.Inventory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ZypperSettings.verify = function verify(message) { + Inventory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.withOptional != null && message.hasOwnProperty("withOptional")) - if (typeof message.withOptional !== "boolean") - return "withOptional: boolean expected"; - if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) - if (typeof message.withUpdate !== "boolean") - return "withUpdate: boolean expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) - return "categories: array expected"; - for (var i = 0; i < message.categories.length; ++i) - if (!$util.isString(message.categories[i])) - return "categories: string[] expected"; - } - if (message.severities != null && message.hasOwnProperty("severities")) { - if (!Array.isArray(message.severities)) - return "severities: array expected"; - for (var i = 0; i < message.severities.length; ++i) - if (!$util.isString(message.severities[i])) - return "severities: string[] expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.osInfo != null && message.hasOwnProperty("osInfo")) { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify(message.osInfo); + if (error) + return "osInfo." + error; } - if (message.excludes != null && message.hasOwnProperty("excludes")) { - if (!Array.isArray(message.excludes)) - return "excludes: array expected"; - for (var i = 0; i < message.excludes.length; ++i) - if (!$util.isString(message.excludes[i])) - return "excludes: string[] expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!$util.isObject(message.items)) + return "items: object expected"; + var key = Object.keys(message.items); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.Item.verify(message.items[key[i]]); + if (error) + return "items." + error; + } } - if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { - if (!Array.isArray(message.exclusivePatches)) - return "exclusivePatches: array expected"; - for (var i = 0; i < message.exclusivePatches.length; ++i) - if (!$util.isString(message.exclusivePatches[i])) - return "exclusivePatches: string[] expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } return null; }; /** - * Creates a ZypperSettings message from a plain object. Also converts values to their respective internal types. + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.ZypperSettings + * @memberof google.cloud.osconfig.v1alpha.Inventory * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ZypperSettings} ZypperSettings + * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory */ - ZypperSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ZypperSettings) + Inventory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory) return object; - var message = new $root.google.cloud.osconfig.v1.ZypperSettings(); - if (object.withOptional != null) - message.withOptional = Boolean(object.withOptional); - if (object.withUpdate != null) - message.withUpdate = Boolean(object.withUpdate); - if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.categories: array expected"); - message.categories = []; - for (var i = 0; i < object.categories.length; ++i) - message.categories[i] = String(object.categories[i]); - } - if (object.severities) { - if (!Array.isArray(object.severities)) - throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.severities: array expected"); - message.severities = []; - for (var i = 0; i < object.severities.length; ++i) - message.severities[i] = String(object.severities[i]); + var message = new $root.google.cloud.osconfig.v1alpha.Inventory(); + if (object.name != null) + message.name = String(object.name); + if (object.osInfo != null) { + if (typeof object.osInfo !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.osInfo: object expected"); + message.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.fromObject(object.osInfo); } - if (object.excludes) { - if (!Array.isArray(object.excludes)) - throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.excludes: array expected"); - message.excludes = []; - for (var i = 0; i < object.excludes.length; ++i) - message.excludes[i] = String(object.excludes[i]); + if (object.items) { + if (typeof object.items !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.items: object expected"); + message.items = {}; + for (var keys = Object.keys(object.items), i = 0; i < keys.length; ++i) { + if (typeof object.items[keys[i]] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.items: object expected"); + message.items[keys[i]] = $root.google.cloud.osconfig.v1alpha.Inventory.Item.fromObject(object.items[keys[i]]); + } } - if (object.exclusivePatches) { - if (!Array.isArray(object.exclusivePatches)) - throw TypeError(".google.cloud.osconfig.v1.ZypperSettings.exclusivePatches: array expected"); - message.exclusivePatches = []; - for (var i = 0; i < object.exclusivePatches.length; ++i) - message.exclusivePatches[i] = String(object.exclusivePatches[i]); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from a ZypperSettings message. Also converts values to other types if specified. + * Creates a plain object from an Inventory message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.ZypperSettings + * @memberof google.cloud.osconfig.v1alpha.Inventory * @static - * @param {google.cloud.osconfig.v1.ZypperSettings} message ZypperSettings + * @param {google.cloud.osconfig.v1alpha.Inventory} message Inventory * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ZypperSettings.toObject = function toObject(message, options) { + Inventory.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.categories = []; - object.severities = []; - object.excludes = []; - object.exclusivePatches = []; - } + if (options.objects || options.defaults) + object.items = {}; if (options.defaults) { - object.withOptional = false; - object.withUpdate = false; - } - if (message.withOptional != null && message.hasOwnProperty("withOptional")) - object.withOptional = message.withOptional; - if (message.withUpdate != null && message.hasOwnProperty("withUpdate")) - object.withUpdate = message.withUpdate; - if (message.categories && message.categories.length) { - object.categories = []; - for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = message.categories[j]; - } - if (message.severities && message.severities.length) { - object.severities = []; - for (var j = 0; j < message.severities.length; ++j) - object.severities[j] = message.severities[j]; - } - if (message.excludes && message.excludes.length) { - object.excludes = []; - for (var j = 0; j < message.excludes.length; ++j) - object.excludes[j] = message.excludes[j]; + object.osInfo = null; + object.name = ""; + object.updateTime = null; } - if (message.exclusivePatches && message.exclusivePatches.length) { - object.exclusivePatches = []; - for (var j = 0; j < message.exclusivePatches.length; ++j) - object.exclusivePatches[j] = message.exclusivePatches[j]; + if (message.osInfo != null && message.hasOwnProperty("osInfo")) + object.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.toObject(message.osInfo, options); + var keys2; + if (message.items && (keys2 = Object.keys(message.items)).length) { + object.items = {}; + for (var j = 0; j < keys2.length; ++j) + object.items[keys2[j]] = $root.google.cloud.osconfig.v1alpha.Inventory.Item.toObject(message.items[keys2[j]], options); } + 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); return object; }; /** - * Converts this ZypperSettings to JSON. + * Converts this Inventory to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.ZypperSettings + * @memberof google.cloud.osconfig.v1alpha.Inventory * @instance * @returns {Object.} JSON object */ - ZypperSettings.prototype.toJSON = function toJSON() { + Inventory.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ZypperSettings; - })(); + Inventory.OsInfo = (function() { - v1.WindowsUpdateSettings = (function() { + /** + * Properties of an OsInfo. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IOsInfo + * @property {string|null} [hostname] OsInfo hostname + * @property {string|null} [longName] OsInfo longName + * @property {string|null} [shortName] OsInfo shortName + * @property {string|null} [version] OsInfo version + * @property {string|null} [architecture] OsInfo architecture + * @property {string|null} [kernelVersion] OsInfo kernelVersion + * @property {string|null} [kernelRelease] OsInfo kernelRelease + * @property {string|null} [osconfigAgentVersion] OsInfo osconfigAgentVersion + */ - /** - * Properties of a WindowsUpdateSettings. - * @memberof google.cloud.osconfig.v1 - * @interface IWindowsUpdateSettings - * @property {Array.|null} [classifications] WindowsUpdateSettings classifications - * @property {Array.|null} [excludes] WindowsUpdateSettings excludes - * @property {Array.|null} [exclusivePatches] WindowsUpdateSettings exclusivePatches - */ + /** + * Constructs a new OsInfo. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents an OsInfo. + * @implements IOsInfo + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo=} [properties] Properties to set + */ + function OsInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new WindowsUpdateSettings. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a WindowsUpdateSettings. - * @implements IWindowsUpdateSettings - * @constructor - * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set - */ - function WindowsUpdateSettings(properties) { - this.classifications = []; - this.excludes = []; - this.exclusivePatches = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * OsInfo hostname. + * @member {string} hostname + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.hostname = ""; - /** - * WindowsUpdateSettings classifications. - * @member {Array.} classifications - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @instance - */ - WindowsUpdateSettings.prototype.classifications = $util.emptyArray; + /** + * OsInfo longName. + * @member {string} longName + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.longName = ""; - /** - * WindowsUpdateSettings excludes. - * @member {Array.} excludes - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @instance - */ - WindowsUpdateSettings.prototype.excludes = $util.emptyArray; + /** + * OsInfo shortName. + * @member {string} shortName + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.shortName = ""; - /** - * WindowsUpdateSettings exclusivePatches. - * @member {Array.} exclusivePatches - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @instance - */ - WindowsUpdateSettings.prototype.exclusivePatches = $util.emptyArray; + /** + * OsInfo version. + * @member {string} version + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.version = ""; - /** - * Creates a new WindowsUpdateSettings instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings instance - */ - WindowsUpdateSettings.create = function create(properties) { - return new WindowsUpdateSettings(properties); - }; + /** + * OsInfo architecture. + * @member {string} architecture + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.architecture = ""; - /** - * Encodes the specified WindowsUpdateSettings message. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdateSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.classifications != null && message.classifications.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.classifications.length; ++i) - writer.int32(message.classifications[i]); - writer.ldelim(); - } - if (message.excludes != null && message.excludes.length) - for (var i = 0; i < message.excludes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludes[i]); - if (message.exclusivePatches != null && message.exclusivePatches.length) - for (var i = 0; i < message.exclusivePatches.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclusivePatches[i]); - return writer; - }; + /** + * OsInfo kernelVersion. + * @member {string} kernelVersion + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.kernelVersion = ""; - /** - * Encodes the specified WindowsUpdateSettings message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.WindowsUpdateSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {google.cloud.osconfig.v1.IWindowsUpdateSettings} message WindowsUpdateSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdateSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * OsInfo kernelRelease. + * @member {string} kernelRelease + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.kernelRelease = ""; - /** - * Decodes a WindowsUpdateSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdateSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.classifications && message.classifications.length)) - message.classifications = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.classifications.push(reader.int32()); - } else - message.classifications.push(reader.int32()); - break; - case 2: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 3: - if (!(message.exclusivePatches && message.exclusivePatches.length)) - message.exclusivePatches = []; - message.exclusivePatches.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * OsInfo osconfigAgentVersion. + * @member {string} osconfigAgentVersion + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + */ + OsInfo.prototype.osconfigAgentVersion = ""; - /** - * Decodes a WindowsUpdateSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdateSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new OsInfo instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo instance + */ + OsInfo.create = function create(properties) { + return new OsInfo(properties); + }; - /** - * Verifies a WindowsUpdateSettings message. - * @function verify - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsUpdateSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.classifications != null && message.hasOwnProperty("classifications")) { - if (!Array.isArray(message.classifications)) - return "classifications: array expected"; - for (var i = 0; i < message.classifications.length; ++i) - switch (message.classifications[i]) { - default: - return "classifications: 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.excludes != null && message.hasOwnProperty("excludes")) { - if (!Array.isArray(message.excludes)) - return "excludes: array expected"; - for (var i = 0; i < message.excludes.length; ++i) - if (!$util.isString(message.excludes[i])) - return "excludes: string[] expected"; - } - if (message.exclusivePatches != null && message.hasOwnProperty("exclusivePatches")) { - if (!Array.isArray(message.exclusivePatches)) - return "exclusivePatches: array expected"; - for (var i = 0; i < message.exclusivePatches.length; ++i) - if (!$util.isString(message.exclusivePatches[i])) - return "exclusivePatches: string[] expected"; - } - return null; - }; + /** + * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.longName != null && Object.hasOwnProperty.call(message, "longName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.longName); + if (message.shortName != null && Object.hasOwnProperty.call(message, "shortName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shortName); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.architecture); + if (message.kernelVersion != null && Object.hasOwnProperty.call(message, "kernelVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.kernelVersion); + if (message.kernelRelease != null && Object.hasOwnProperty.call(message, "kernelRelease")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.kernelRelease); + if (message.osconfigAgentVersion != null && Object.hasOwnProperty.call(message, "osconfigAgentVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.osconfigAgentVersion); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.hostname); + return writer; + }; - /** - * Creates a WindowsUpdateSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.WindowsUpdateSettings} WindowsUpdateSettings - */ - WindowsUpdateSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.WindowsUpdateSettings) - return object; - var message = new $root.google.cloud.osconfig.v1.WindowsUpdateSettings(); - if (object.classifications) { - if (!Array.isArray(object.classifications)) - throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.classifications: array expected"); - message.classifications = []; - for (var i = 0; i < object.classifications.length; ++i) - switch (object.classifications[i]) { - default: - case "CLASSIFICATION_UNSPECIFIED": - case 0: - message.classifications[i] = 0; - break; - case "CRITICAL": - case 1: - message.classifications[i] = 1; + /** + * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OsInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 9: + message.hostname = reader.string(); break; - case "SECURITY": case 2: - message.classifications[i] = 2; + message.longName = reader.string(); break; - case "DEFINITION": case 3: - message.classifications[i] = 3; + message.shortName = reader.string(); break; - case "DRIVER": case 4: - message.classifications[i] = 4; + message.version = reader.string(); break; - case "FEATURE_PACK": case 5: - message.classifications[i] = 5; + message.architecture = reader.string(); break; - case "SERVICE_PACK": case 6: - message.classifications[i] = 6; + message.kernelVersion = reader.string(); break; - case "TOOL": case 7: - message.classifications[i] = 7; + message.kernelRelease = reader.string(); break; - case "UPDATE_ROLLUP": case 8: - message.classifications[i] = 8; + message.osconfigAgentVersion = reader.string(); break; - case "UPDATE": - case 9: - message.classifications[i] = 9; + default: + reader.skipType(tag & 7); break; } - } - if (object.excludes) { - if (!Array.isArray(object.excludes)) - throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.excludes: array expected"); - message.excludes = []; - for (var i = 0; i < object.excludes.length; ++i) - message.excludes[i] = String(object.excludes[i]); - } - if (object.exclusivePatches) { - if (!Array.isArray(object.exclusivePatches)) - throw TypeError(".google.cloud.osconfig.v1.WindowsUpdateSettings.exclusivePatches: array expected"); - message.exclusivePatches = []; - for (var i = 0; i < object.exclusivePatches.length; ++i) - message.exclusivePatches[i] = String(object.exclusivePatches[i]); - } - return message; - }; - - /** - * Creates a plain object from a WindowsUpdateSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @static - * @param {google.cloud.osconfig.v1.WindowsUpdateSettings} message WindowsUpdateSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsUpdateSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.classifications = []; - object.excludes = []; - object.exclusivePatches = []; - } - if (message.classifications && message.classifications.length) { - object.classifications = []; - for (var j = 0; j < message.classifications.length; ++j) - object.classifications[j] = options.enums === String ? $root.google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[message.classifications[j]] : message.classifications[j]; - } - if (message.excludes && message.excludes.length) { - object.excludes = []; - for (var j = 0; j < message.excludes.length; ++j) - object.excludes[j] = message.excludes[j]; - } - if (message.exclusivePatches && message.exclusivePatches.length) { - object.exclusivePatches = []; - for (var j = 0; j < message.exclusivePatches.length; ++j) - object.exclusivePatches[j] = message.exclusivePatches[j]; - } - return object; - }; - - /** - * Converts this WindowsUpdateSettings to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings - * @instance - * @returns {Object.} JSON object - */ - WindowsUpdateSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + return message; + }; - /** - * Classification enum. - * @name google.cloud.osconfig.v1.WindowsUpdateSettings.Classification - * @enum {number} - * @property {number} CLASSIFICATION_UNSPECIFIED=0 CLASSIFICATION_UNSPECIFIED value - * @property {number} CRITICAL=1 CRITICAL value - * @property {number} SECURITY=2 SECURITY value - * @property {number} DEFINITION=3 DEFINITION value - * @property {number} DRIVER=4 DRIVER value - * @property {number} FEATURE_PACK=5 FEATURE_PACK value - * @property {number} SERVICE_PACK=6 SERVICE_PACK value - * @property {number} TOOL=7 TOOL value - * @property {number} UPDATE_ROLLUP=8 UPDATE_ROLLUP value - * @property {number} UPDATE=9 UPDATE value - */ - WindowsUpdateSettings.Classification = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLASSIFICATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CRITICAL"] = 1; - values[valuesById[2] = "SECURITY"] = 2; - values[valuesById[3] = "DEFINITION"] = 3; - values[valuesById[4] = "DRIVER"] = 4; - values[valuesById[5] = "FEATURE_PACK"] = 5; - values[valuesById[6] = "SERVICE_PACK"] = 6; - values[valuesById[7] = "TOOL"] = 7; - values[valuesById[8] = "UPDATE_ROLLUP"] = 8; - values[valuesById[9] = "UPDATE"] = 9; - return values; - })(); + /** + * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return WindowsUpdateSettings; - })(); + /** + * Verifies an OsInfo message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OsInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.longName != null && message.hasOwnProperty("longName")) + if (!$util.isString(message.longName)) + return "longName: string expected"; + if (message.shortName != null && message.hasOwnProperty("shortName")) + if (!$util.isString(message.shortName)) + return "shortName: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) + if (!$util.isString(message.kernelVersion)) + return "kernelVersion: string expected"; + if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) + if (!$util.isString(message.kernelRelease)) + return "kernelRelease: string expected"; + if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) + if (!$util.isString(message.osconfigAgentVersion)) + return "osconfigAgentVersion: string expected"; + return null; + }; - v1.ExecStep = (function() { + /** + * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo + */ + OsInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.longName != null) + message.longName = String(object.longName); + if (object.shortName != null) + message.shortName = String(object.shortName); + if (object.version != null) + message.version = String(object.version); + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.kernelVersion != null) + message.kernelVersion = String(object.kernelVersion); + if (object.kernelRelease != null) + message.kernelRelease = String(object.kernelRelease); + if (object.osconfigAgentVersion != null) + message.osconfigAgentVersion = String(object.osconfigAgentVersion); + return message; + }; - /** - * Properties of an ExecStep. - * @memberof google.cloud.osconfig.v1 - * @interface IExecStep - * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [linuxExecStepConfig] ExecStep linuxExecStepConfig - * @property {google.cloud.osconfig.v1.IExecStepConfig|null} [windowsExecStepConfig] ExecStep windowsExecStepConfig - */ - - /** - * Constructs a new ExecStep. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an ExecStep. - * @implements IExecStep - * @constructor - * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set - */ - function ExecStep(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecStep linuxExecStepConfig. - * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} linuxExecStepConfig - * @memberof google.cloud.osconfig.v1.ExecStep - * @instance - */ - ExecStep.prototype.linuxExecStepConfig = null; + /** + * Creates a plain object from an OsInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.OsInfo} message OsInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OsInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.longName = ""; + object.shortName = ""; + object.version = ""; + object.architecture = ""; + object.kernelVersion = ""; + object.kernelRelease = ""; + object.osconfigAgentVersion = ""; + object.hostname = ""; + } + if (message.longName != null && message.hasOwnProperty("longName")) + object.longName = message.longName; + if (message.shortName != null && message.hasOwnProperty("shortName")) + object.shortName = message.shortName; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) + object.kernelVersion = message.kernelVersion; + if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) + object.kernelRelease = message.kernelRelease; + if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) + object.osconfigAgentVersion = message.osconfigAgentVersion; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + return object; + }; - /** - * ExecStep windowsExecStepConfig. - * @member {google.cloud.osconfig.v1.IExecStepConfig|null|undefined} windowsExecStepConfig - * @memberof google.cloud.osconfig.v1.ExecStep - * @instance - */ - ExecStep.prototype.windowsExecStepConfig = null; + /** + * Converts this OsInfo to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @instance + * @returns {Object.} JSON object + */ + OsInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new ExecStep instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {google.cloud.osconfig.v1.IExecStep=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep instance - */ - ExecStep.create = function create(properties) { - return new ExecStep(properties); - }; + return OsInfo; + })(); - /** - * Encodes the specified ExecStep message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecStep.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.linuxExecStepConfig != null && Object.hasOwnProperty.call(message, "linuxExecStepConfig")) - $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.linuxExecStepConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.windowsExecStepConfig != null && Object.hasOwnProperty.call(message, "windowsExecStepConfig")) - $root.google.cloud.osconfig.v1.ExecStepConfig.encode(message.windowsExecStepConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + Inventory.Item = (function() { - /** - * Encodes the specified ExecStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStep.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {google.cloud.osconfig.v1.IExecStep} message ExecStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecStep.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an Item. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IItem + * @property {string|null} [id] Item id + * @property {google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|null} [originType] Item originType + * @property {google.protobuf.ITimestamp|null} [createTime] Item createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Item updateTime + * @property {google.cloud.osconfig.v1alpha.Inventory.Item.Type|null} [type] Item type + * @property {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null} [installedPackage] Item installedPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null} [availablePackage] Item availablePackage + */ - /** - * Decodes an ExecStep message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecStep.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStep(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); - break; - case 2: - message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new Item. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents an Item. + * @implements IItem + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IItem=} [properties] Properties to set + */ + function Item(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes an ExecStep message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecStep.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Item id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.id = ""; - /** - * Verifies an ExecStep message. - * @function verify - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecStep.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) { - var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.linuxExecStepConfig); - if (error) - return "linuxExecStepConfig." + error; - } - if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) { - var error = $root.google.cloud.osconfig.v1.ExecStepConfig.verify(message.windowsExecStepConfig); - if (error) - return "windowsExecStepConfig." + error; - } - return null; - }; + /** + * Item originType. + * @member {google.cloud.osconfig.v1alpha.Inventory.Item.OriginType} originType + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.originType = 0; - /** - * Creates an ExecStep message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ExecStep} ExecStep - */ - ExecStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ExecStep) - return object; - var message = new $root.google.cloud.osconfig.v1.ExecStep(); - if (object.linuxExecStepConfig != null) { - if (typeof object.linuxExecStepConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecStep.linuxExecStepConfig: object expected"); - message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.linuxExecStepConfig); - } - if (object.windowsExecStepConfig != null) { - if (typeof object.windowsExecStepConfig !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecStep.windowsExecStepConfig: object expected"); - message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.fromObject(object.windowsExecStepConfig); - } - return message; - }; + /** + * Item createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.createTime = null; - /** - * Creates a plain object from an ExecStep message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ExecStep - * @static - * @param {google.cloud.osconfig.v1.ExecStep} message ExecStep - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecStep.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.linuxExecStepConfig = null; - object.windowsExecStepConfig = null; - } - if (message.linuxExecStepConfig != null && message.hasOwnProperty("linuxExecStepConfig")) - object.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.linuxExecStepConfig, options); - if (message.windowsExecStepConfig != null && message.hasOwnProperty("windowsExecStepConfig")) - object.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.toObject(message.windowsExecStepConfig, options); - return object; - }; + /** + * Item updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.updateTime = null; - /** - * Converts this ExecStep to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ExecStep - * @instance - * @returns {Object.} JSON object - */ - ExecStep.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Item type. + * @member {google.cloud.osconfig.v1alpha.Inventory.Item.Type} type + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.type = 0; - return ExecStep; - })(); + /** + * Item installedPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null|undefined} installedPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.installedPackage = null; - v1.ExecStepConfig = (function() { + /** + * Item availablePackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null|undefined} availablePackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Item.prototype.availablePackage = null; - /** - * Properties of an ExecStepConfig. - * @memberof google.cloud.osconfig.v1 - * @interface IExecStepConfig - * @property {string|null} [localPath] ExecStepConfig localPath - * @property {google.cloud.osconfig.v1.IGcsObject|null} [gcsObject] ExecStepConfig gcsObject - * @property {Array.|null} [allowedSuccessCodes] ExecStepConfig allowedSuccessCodes - * @property {google.cloud.osconfig.v1.ExecStepConfig.Interpreter|null} [interpreter] ExecStepConfig interpreter - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Constructs a new ExecStepConfig. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents an ExecStepConfig. - * @implements IExecStepConfig - * @constructor - * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set - */ - function ExecStepConfig(properties) { - this.allowedSuccessCodes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Item details. + * @member {"installedPackage"|"availablePackage"|undefined} details + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + */ + Object.defineProperty(Item.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["installedPackage", "availablePackage"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ExecStepConfig localPath. - * @member {string|null|undefined} localPath - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - ExecStepConfig.prototype.localPath = null; + /** + * Creates a new Item instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IItem=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item instance + */ + Item.create = function create(properties) { + return new Item(properties); + }; - /** - * ExecStepConfig gcsObject. - * @member {google.cloud.osconfig.v1.IGcsObject|null|undefined} gcsObject - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - ExecStepConfig.prototype.gcsObject = null; + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.originType != null && Object.hasOwnProperty.call(message, "originType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.originType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.installedPackage != null && Object.hasOwnProperty.call(message, "installedPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.encode(message.installedPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.availablePackage != null && Object.hasOwnProperty.call(message, "availablePackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.encode(message.availablePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; - /** - * ExecStepConfig allowedSuccessCodes. - * @member {Array.} allowedSuccessCodes - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - ExecStepConfig.prototype.allowedSuccessCodes = $util.emptyArray; + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ExecStepConfig interpreter. - * @member {google.cloud.osconfig.v1.ExecStepConfig.Interpreter} interpreter - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - ExecStepConfig.prototype.interpreter = 0; + /** + * Decodes an Item message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.Item(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.originType = reader.int32(); + break; + case 8: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + case 7: + message.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ExecStepConfig executable. - * @member {"localPath"|"gcsObject"|undefined} executable - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - */ - Object.defineProperty(ExecStepConfig.prototype, "executable", { - get: $util.oneOfGetter($oneOfFields = ["localPath", "gcsObject"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ExecStepConfig instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {google.cloud.osconfig.v1.IExecStepConfig=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig instance - */ - ExecStepConfig.create = function create(properties) { - return new ExecStepConfig(properties); - }; - - /** - * Encodes the specified ExecStepConfig message. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecStepConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath); - if (message.gcsObject != null && Object.hasOwnProperty.call(message, "gcsObject")) - $root.google.cloud.osconfig.v1.GcsObject.encode(message.gcsObject, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.allowedSuccessCodes != null && message.allowedSuccessCodes.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.allowedSuccessCodes.length; ++i) - writer.int32(message.allowedSuccessCodes[i]); - writer.ldelim(); - } - if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); - return writer; - }; - - /** - * Encodes the specified ExecStepConfig message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ExecStepConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {google.cloud.osconfig.v1.IExecStepConfig} message ExecStepConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecStepConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies an Item message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Item.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.originType != null && message.hasOwnProperty("originType")) + switch (message.originType) { + default: + return "originType: enum value expected"; + case 0: + case 1: + break; + } + 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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify(message.installedPackage); + if (error) + return "installedPackage." + error; + } + } + if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify(message.availablePackage); + if (error) + return "availablePackage." + error; + } + } + return null; + }; - /** - * Decodes an ExecStepConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecStepConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.localPath = reader.string(); - break; - case 2: - message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.allowedSuccessCodes && message.allowedSuccessCodes.length)) - message.allowedSuccessCodes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.allowedSuccessCodes.push(reader.int32()); - } else - message.allowedSuccessCodes.push(reader.int32()); - break; - case 4: - message.interpreter = reader.int32(); + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item + */ + Item.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.Item) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.Item(); + if (object.id != null) + message.id = String(object.id); + switch (object.originType) { + case "ORIGIN_TYPE_UNSPECIFIED": + case 0: + message.originType = 0; break; - default: - reader.skipType(tag & 7); + case "INVENTORY_REPORT": + case 1: + message.originType = 1; break; } - } - return message; - }; - - /** - * Decodes an ExecStepConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecStepConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecStepConfig message. - * @function verify - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecStepConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.localPath != null && message.hasOwnProperty("localPath")) { - properties.executable = 1; - if (!$util.isString(message.localPath)) - return "localPath: string expected"; - } - if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { - if (properties.executable === 1) - return "executable: multiple values"; - properties.executable = 1; - { - var error = $root.google.cloud.osconfig.v1.GcsObject.verify(message.gcsObject); - if (error) - return "gcsObject." + error; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - } - if (message.allowedSuccessCodes != null && message.hasOwnProperty("allowedSuccessCodes")) { - if (!Array.isArray(message.allowedSuccessCodes)) - return "allowedSuccessCodes: array expected"; - for (var i = 0; i < message.allowedSuccessCodes.length; ++i) - if (!$util.isInteger(message.allowedSuccessCodes[i])) - return "allowedSuccessCodes: integer[] expected"; - } - if (message.interpreter != null && message.hasOwnProperty("interpreter")) - switch (message.interpreter) { - default: - return "interpreter: enum value expected"; + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.type) { + case "TYPE_UNSPECIFIED": case 0: + message.type = 0; + break; + case "INSTALLED_PACKAGE": case 1: + message.type = 1; + break; + case "AVAILABLE_PACKAGE": case 2: + message.type = 2; break; } - return null; - }; + if (object.installedPackage != null) { + if (typeof object.installedPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.installedPackage: object expected"); + message.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.fromObject(object.installedPackage); + } + if (object.availablePackage != null) { + if (typeof object.availablePackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.availablePackage: object expected"); + message.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.fromObject(object.availablePackage); + } + return message; + }; - /** - * Creates an ExecStepConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.ExecStepConfig} ExecStepConfig - */ - ExecStepConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.ExecStepConfig) + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.Item} message Item + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Item.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.originType = options.enums === String ? "ORIGIN_TYPE_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.originType != null && message.hasOwnProperty("originType")) + object.originType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType[message.originType] : message.originType; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.Type[message.type] : message.type; + if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { + object.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.toObject(message.installedPackage, options); + if (options.oneofs) + object.details = "installedPackage"; + } + if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { + object.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.toObject(message.availablePackage, options); + if (options.oneofs) + object.details = "availablePackage"; + } + 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); return object; - var message = new $root.google.cloud.osconfig.v1.ExecStepConfig(); - if (object.localPath != null) - message.localPath = String(object.localPath); - if (object.gcsObject != null) { - if (typeof object.gcsObject !== "object") - throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.gcsObject: object expected"); - message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.fromObject(object.gcsObject); - } - if (object.allowedSuccessCodes) { - if (!Array.isArray(object.allowedSuccessCodes)) - throw TypeError(".google.cloud.osconfig.v1.ExecStepConfig.allowedSuccessCodes: array expected"); - message.allowedSuccessCodes = []; - for (var i = 0; i < object.allowedSuccessCodes.length; ++i) - message.allowedSuccessCodes[i] = object.allowedSuccessCodes[i] | 0; - } - switch (object.interpreter) { - case "INTERPRETER_UNSPECIFIED": - case 0: - message.interpreter = 0; - break; - case "SHELL": - case 1: - message.interpreter = 1; - break; - case "POWERSHELL": - case 2: - message.interpreter = 2; - break; - } - return message; - }; + }; - /** - * Creates a plain object from an ExecStepConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @static - * @param {google.cloud.osconfig.v1.ExecStepConfig} message ExecStepConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecStepConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.allowedSuccessCodes = []; - if (options.defaults) - object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; - if (message.localPath != null && message.hasOwnProperty("localPath")) { - object.localPath = message.localPath; - if (options.oneofs) - object.executable = "localPath"; - } - if (message.gcsObject != null && message.hasOwnProperty("gcsObject")) { - object.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.toObject(message.gcsObject, options); - if (options.oneofs) - object.executable = "gcsObject"; - } - if (message.allowedSuccessCodes && message.allowedSuccessCodes.length) { - object.allowedSuccessCodes = []; - for (var j = 0; j < message.allowedSuccessCodes.length; ++j) - object.allowedSuccessCodes[j] = message.allowedSuccessCodes[j]; - } - if (message.interpreter != null && message.hasOwnProperty("interpreter")) - object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.ExecStepConfig.Interpreter[message.interpreter] : message.interpreter; - return object; - }; + /** + * Converts this Item to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @instance + * @returns {Object.} JSON object + */ + Item.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ExecStepConfig to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.ExecStepConfig - * @instance - * @returns {Object.} JSON object - */ - ExecStepConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * OriginType enum. + * @name google.cloud.osconfig.v1alpha.Inventory.Item.OriginType + * @enum {number} + * @property {number} ORIGIN_TYPE_UNSPECIFIED=0 ORIGIN_TYPE_UNSPECIFIED value + * @property {number} INVENTORY_REPORT=1 INVENTORY_REPORT value + */ + Item.OriginType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORIGIN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INVENTORY_REPORT"] = 1; + return values; + })(); - /** - * Interpreter enum. - * @name google.cloud.osconfig.v1.ExecStepConfig.Interpreter - * @enum {number} - * @property {number} INTERPRETER_UNSPECIFIED=0 INTERPRETER_UNSPECIFIED value - * @property {number} SHELL=1 SHELL value - * @property {number} POWERSHELL=2 POWERSHELL value - */ - ExecStepConfig.Interpreter = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTERPRETER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SHELL"] = 1; - values[valuesById[2] = "POWERSHELL"] = 2; - return values; - })(); + /** + * Type enum. + * @name google.cloud.osconfig.v1alpha.Inventory.Item.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INSTALLED_PACKAGE=1 INSTALLED_PACKAGE value + * @property {number} AVAILABLE_PACKAGE=2 AVAILABLE_PACKAGE value + */ + Item.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLED_PACKAGE"] = 1; + values[valuesById[2] = "AVAILABLE_PACKAGE"] = 2; + return values; + })(); - return ExecStepConfig; - })(); + return Item; + })(); - v1.GcsObject = (function() { + Inventory.SoftwarePackage = (function() { - /** - * Properties of a GcsObject. - * @memberof google.cloud.osconfig.v1 - * @interface IGcsObject - * @property {string|null} [bucket] GcsObject bucket - * @property {string|null} [object] GcsObject object - * @property {number|Long|null} [generationNumber] GcsObject generationNumber - */ + /** + * Properties of a SoftwarePackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface ISoftwarePackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [yumPackage] SoftwarePackage yumPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [aptPackage] SoftwarePackage aptPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [zypperPackage] SoftwarePackage zypperPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [googetPackage] SoftwarePackage googetPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null} [zypperPatch] SoftwarePackage zypperPatch + * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null} [wuaPackage] SoftwarePackage wuaPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null} [qfePackage] SoftwarePackage qfePackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [cosPackage] SoftwarePackage cosPackage + * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null} [windowsApplication] SoftwarePackage windowsApplication + */ - /** - * Constructs a new GcsObject. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a GcsObject. - * @implements IGcsObject - * @constructor - * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set - */ - function GcsObject(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new SoftwarePackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a SoftwarePackage. + * @implements ISoftwarePackage + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage=} [properties] Properties to set + */ + function SoftwarePackage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * GcsObject bucket. - * @member {string} bucket - * @memberof google.cloud.osconfig.v1.GcsObject - * @instance - */ - GcsObject.prototype.bucket = ""; - - /** - * GcsObject object. - * @member {string} object - * @memberof google.cloud.osconfig.v1.GcsObject - * @instance - */ - GcsObject.prototype.object = ""; - - /** - * GcsObject generationNumber. - * @member {number|Long} generationNumber - * @memberof google.cloud.osconfig.v1.GcsObject - * @instance - */ - GcsObject.prototype.generationNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new GcsObject instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {google.cloud.osconfig.v1.IGcsObject=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject instance - */ - GcsObject.create = function create(properties) { - return new GcsObject(properties); - }; - - /** - * Encodes the specified GcsObject message. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsObject.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - if (message.object != null && Object.hasOwnProperty.call(message, "object")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); - if (message.generationNumber != null && Object.hasOwnProperty.call(message, "generationNumber")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generationNumber); - return writer; - }; - - /** - * Encodes the specified GcsObject message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GcsObject.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {google.cloud.osconfig.v1.IGcsObject} message GcsObject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsObject.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsObject message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsObject.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GcsObject(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bucket = reader.string(); - break; - case 2: - message.object = reader.string(); - break; - case 3: - message.generationNumber = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsObject message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsObject.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * SoftwarePackage yumPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} yumPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.yumPackage = null; - /** - * Verifies a GcsObject message. - * @function verify - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsObject.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - if (message.object != null && message.hasOwnProperty("object")) - if (!$util.isString(message.object)) - return "object: string expected"; - if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) - if (!$util.isInteger(message.generationNumber) && !(message.generationNumber && $util.isInteger(message.generationNumber.low) && $util.isInteger(message.generationNumber.high))) - return "generationNumber: integer|Long expected"; - return null; - }; + /** + * SoftwarePackage aptPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} aptPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.aptPackage = null; - /** - * Creates a GcsObject message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.GcsObject} GcsObject - */ - GcsObject.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.GcsObject) - return object; - var message = new $root.google.cloud.osconfig.v1.GcsObject(); - if (object.bucket != null) - message.bucket = String(object.bucket); - if (object.object != null) - message.object = String(object.object); - if (object.generationNumber != null) - if ($util.Long) - (message.generationNumber = $util.Long.fromValue(object.generationNumber)).unsigned = false; - else if (typeof object.generationNumber === "string") - message.generationNumber = parseInt(object.generationNumber, 10); - else if (typeof object.generationNumber === "number") - message.generationNumber = object.generationNumber; - else if (typeof object.generationNumber === "object") - message.generationNumber = new $util.LongBits(object.generationNumber.low >>> 0, object.generationNumber.high >>> 0).toNumber(); - return message; - }; + /** + * SoftwarePackage zypperPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} zypperPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.zypperPackage = null; - /** - * Creates a plain object from a GcsObject message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.GcsObject - * @static - * @param {google.cloud.osconfig.v1.GcsObject} message GcsObject - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsObject.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bucket = ""; - object.object = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.generationNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.generationNumber = options.longs === String ? "0" : 0; - } - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - if (message.object != null && message.hasOwnProperty("object")) - object.object = message.object; - if (message.generationNumber != null && message.hasOwnProperty("generationNumber")) - if (typeof message.generationNumber === "number") - object.generationNumber = options.longs === String ? String(message.generationNumber) : message.generationNumber; - else - object.generationNumber = options.longs === String ? $util.Long.prototype.toString.call(message.generationNumber) : options.longs === Number ? new $util.LongBits(message.generationNumber.low >>> 0, message.generationNumber.high >>> 0).toNumber() : message.generationNumber; - return object; - }; + /** + * SoftwarePackage googetPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} googetPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.googetPackage = null; - /** - * Converts this GcsObject to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.GcsObject - * @instance - * @returns {Object.} JSON object - */ - GcsObject.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * SoftwarePackage zypperPatch. + * @member {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null|undefined} zypperPatch + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.zypperPatch = null; - return GcsObject; - })(); + /** + * SoftwarePackage wuaPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null|undefined} wuaPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.wuaPackage = null; - v1.PatchInstanceFilter = (function() { + /** + * SoftwarePackage qfePackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null|undefined} qfePackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.qfePackage = null; - /** - * Properties of a PatchInstanceFilter. - * @memberof google.cloud.osconfig.v1 - * @interface IPatchInstanceFilter - * @property {boolean|null} [all] PatchInstanceFilter all - * @property {Array.|null} [groupLabels] PatchInstanceFilter groupLabels - * @property {Array.|null} [zones] PatchInstanceFilter zones - * @property {Array.|null} [instances] PatchInstanceFilter instances - * @property {Array.|null} [instanceNamePrefixes] PatchInstanceFilter instanceNamePrefixes - */ + /** + * SoftwarePackage cosPackage. + * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} cosPackage + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.cosPackage = null; - /** - * Constructs a new PatchInstanceFilter. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchInstanceFilter. - * @implements IPatchInstanceFilter - * @constructor - * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set - */ - function PatchInstanceFilter(properties) { - this.groupLabels = []; - this.zones = []; - this.instances = []; - this.instanceNamePrefixes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * SoftwarePackage windowsApplication. + * @member {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null|undefined} windowsApplication + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + SoftwarePackage.prototype.windowsApplication = null; - /** - * PatchInstanceFilter all. - * @member {boolean} all - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.all = false; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * PatchInstanceFilter groupLabels. - * @member {Array.} groupLabels - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.groupLabels = $util.emptyArray; + /** + * SoftwarePackage details. + * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"|undefined} details + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + */ + Object.defineProperty(SoftwarePackage.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage", "windowsApplication"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * PatchInstanceFilter zones. - * @member {Array.} zones - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.zones = $util.emptyArray; + /** + * Creates a new SoftwarePackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage instance + */ + SoftwarePackage.create = function create(properties) { + return new SoftwarePackage(properties); + }; - /** - * PatchInstanceFilter instances. - * @member {Array.} instances - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.instances = $util.emptyArray; + /** + * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwarePackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yumPackage != null && Object.hasOwnProperty.call(message, "yumPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.yumPackage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.aptPackage != null && Object.hasOwnProperty.call(message, "aptPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.aptPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zypperPackage != null && Object.hasOwnProperty.call(message, "zypperPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.zypperPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.googetPackage != null && Object.hasOwnProperty.call(message, "googetPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.googetPackage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.zypperPatch != null && Object.hasOwnProperty.call(message, "zypperPatch")) + $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.encode(message.zypperPatch, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.wuaPackage != null && Object.hasOwnProperty.call(message, "wuaPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.encode(message.wuaPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.qfePackage != null && Object.hasOwnProperty.call(message, "qfePackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.encode(message.qfePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.cosPackage != null && Object.hasOwnProperty.call(message, "cosPackage")) + $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.cosPackage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.windowsApplication != null && Object.hasOwnProperty.call(message, "windowsApplication")) + $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.encode(message.windowsApplication, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; - /** - * PatchInstanceFilter instanceNamePrefixes. - * @member {Array.} instanceNamePrefixes - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - */ - PatchInstanceFilter.prototype.instanceNamePrefixes = $util.emptyArray; + /** + * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwarePackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new PatchInstanceFilter instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {google.cloud.osconfig.v1.IPatchInstanceFilter=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter instance - */ - PatchInstanceFilter.create = function create(properties) { - return new PatchInstanceFilter(properties); - }; + /** + * Decodes a SoftwarePackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwarePackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 2: + message.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 3: + message.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 4: + message.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 5: + message.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.decode(reader, reader.uint32()); + break; + case 6: + message.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); + break; + case 7: + message.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); + break; + case 8: + message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + case 9: + message.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified PatchInstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchInstanceFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.all != null && Object.hasOwnProperty.call(message, "all")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all); - if (message.groupLabels != null && message.groupLabels.length) - for (var i = 0; i < message.groupLabels.length; ++i) - $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.encode(message.groupLabels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.zones != null && message.zones.length) - for (var i = 0; i < message.zones.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.zones[i]); - if (message.instances != null && message.instances.length) - for (var i = 0; i < message.instances.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.instances[i]); - if (message.instanceNamePrefixes != null && message.instanceNamePrefixes.length) - for (var i = 0; i < message.instanceNamePrefixes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.instanceNamePrefixes[i]); - return writer; - }; + /** + * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwarePackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified PatchInstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {google.cloud.osconfig.v1.IPatchInstanceFilter} message PatchInstanceFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchInstanceFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PatchInstanceFilter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchInstanceFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.all = reader.bool(); - break; - case 2: - if (!(message.groupLabels && message.groupLabels.length)) - message.groupLabels = []; - message.groupLabels.push($root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.zones && message.zones.length)) - message.zones = []; - message.zones.push(reader.string()); - break; - case 4: - if (!(message.instances && message.instances.length)) - message.instances = []; - message.instances.push(reader.string()); - break; - case 5: - if (!(message.instanceNamePrefixes && message.instanceNamePrefixes.length)) - message.instanceNamePrefixes = []; - message.instanceNamePrefixes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Verifies a SoftwarePackage message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwarePackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.yumPackage); + if (error) + return "yumPackage." + error; + } } - } - return message; - }; - - /** - * Decodes a PatchInstanceFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchInstanceFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.aptPackage); + if (error) + return "aptPackage." + error; + } + } + if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.zypperPackage); + if (error) + return "zypperPackage." + error; + } + } + if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.googetPackage); + if (error) + return "googetPackage." + error; + } + } + if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify(message.zypperPatch); + if (error) + return "zypperPatch." + error; + } + } + if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify(message.wuaPackage); + if (error) + return "wuaPackage." + error; + } + } + if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify(message.qfePackage); + if (error) + return "qfePackage." + error; + } + } + if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.cosPackage); + if (error) + return "cosPackage." + error; + } + } + if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify(message.windowsApplication); + if (error) + return "windowsApplication." + error; + } + } + return null; + }; - /** - * Verifies a PatchInstanceFilter message. - * @function verify - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PatchInstanceFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.all != null && message.hasOwnProperty("all")) - if (typeof message.all !== "boolean") - return "all: boolean expected"; - if (message.groupLabels != null && message.hasOwnProperty("groupLabels")) { - if (!Array.isArray(message.groupLabels)) - return "groupLabels: array expected"; - for (var i = 0; i < message.groupLabels.length; ++i) { - var error = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify(message.groupLabels[i]); - if (error) - return "groupLabels." + error; + /** + * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage + */ + SoftwarePackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage(); + if (object.yumPackage != null) { + if (typeof object.yumPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.yumPackage: object expected"); + message.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.yumPackage); } - } - if (message.zones != null && message.hasOwnProperty("zones")) { - if (!Array.isArray(message.zones)) - return "zones: array expected"; - for (var i = 0; i < message.zones.length; ++i) - if (!$util.isString(message.zones[i])) - return "zones: string[] expected"; - } - if (message.instances != null && message.hasOwnProperty("instances")) { - if (!Array.isArray(message.instances)) - return "instances: array expected"; - for (var i = 0; i < message.instances.length; ++i) - if (!$util.isString(message.instances[i])) - return "instances: string[] expected"; - } - if (message.instanceNamePrefixes != null && message.hasOwnProperty("instanceNamePrefixes")) { - if (!Array.isArray(message.instanceNamePrefixes)) - return "instanceNamePrefixes: array expected"; - for (var i = 0; i < message.instanceNamePrefixes.length; ++i) - if (!$util.isString(message.instanceNamePrefixes[i])) - return "instanceNamePrefixes: string[] expected"; - } - return null; - }; + if (object.aptPackage != null) { + if (typeof object.aptPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.aptPackage: object expected"); + message.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.aptPackage); + } + if (object.zypperPackage != null) { + if (typeof object.zypperPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.zypperPackage: object expected"); + message.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.zypperPackage); + } + if (object.googetPackage != null) { + if (typeof object.googetPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.googetPackage: object expected"); + message.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.googetPackage); + } + if (object.zypperPatch != null) { + if (typeof object.zypperPatch !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.zypperPatch: object expected"); + message.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.fromObject(object.zypperPatch); + } + if (object.wuaPackage != null) { + if (typeof object.wuaPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.wuaPackage: object expected"); + message.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.fromObject(object.wuaPackage); + } + if (object.qfePackage != null) { + if (typeof object.qfePackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.qfePackage: object expected"); + message.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.fromObject(object.qfePackage); + } + if (object.cosPackage != null) { + if (typeof object.cosPackage !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.cosPackage: object expected"); + message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.cosPackage); + } + if (object.windowsApplication != null) { + if (typeof object.windowsApplication !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.windowsApplication: object expected"); + message.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.fromObject(object.windowsApplication); + } + return message; + }; - /** - * Creates a PatchInstanceFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter} PatchInstanceFilter - */ - PatchInstanceFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter) - return object; - var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter(); - if (object.all != null) - message.all = Boolean(object.all); - if (object.groupLabels) { - if (!Array.isArray(object.groupLabels)) - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: array expected"); - message.groupLabels = []; - for (var i = 0; i < object.groupLabels.length; ++i) { - if (typeof object.groupLabels[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.groupLabels: object expected"); - message.groupLabels[i] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.fromObject(object.groupLabels[i]); + /** + * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} message SoftwarePackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwarePackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { + object.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.yumPackage, options); + if (options.oneofs) + object.details = "yumPackage"; } - } - if (object.zones) { - if (!Array.isArray(object.zones)) - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.zones: array expected"); - message.zones = []; - for (var i = 0; i < object.zones.length; ++i) - message.zones[i] = String(object.zones[i]); - } - if (object.instances) { - if (!Array.isArray(object.instances)) - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instances: array expected"); - message.instances = []; - for (var i = 0; i < object.instances.length; ++i) - message.instances[i] = String(object.instances[i]); - } - if (object.instanceNamePrefixes) { - if (!Array.isArray(object.instanceNamePrefixes)) - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.instanceNamePrefixes: array expected"); - message.instanceNamePrefixes = []; - for (var i = 0; i < object.instanceNamePrefixes.length; ++i) - message.instanceNamePrefixes[i] = String(object.instanceNamePrefixes[i]); - } - return message; - }; + if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { + object.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.aptPackage, options); + if (options.oneofs) + object.details = "aptPackage"; + } + if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { + object.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.zypperPackage, options); + if (options.oneofs) + object.details = "zypperPackage"; + } + if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { + object.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.googetPackage, options); + if (options.oneofs) + object.details = "googetPackage"; + } + if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { + object.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.toObject(message.zypperPatch, options); + if (options.oneofs) + object.details = "zypperPatch"; + } + if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { + object.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.toObject(message.wuaPackage, options); + if (options.oneofs) + object.details = "wuaPackage"; + } + if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { + object.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.toObject(message.qfePackage, options); + if (options.oneofs) + object.details = "qfePackage"; + } + if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { + object.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.cosPackage, options); + if (options.oneofs) + object.details = "cosPackage"; + } + if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { + object.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.toObject(message.windowsApplication, options); + if (options.oneofs) + object.details = "windowsApplication"; + } + return object; + }; - /** - * Creates a plain object from a PatchInstanceFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter} message PatchInstanceFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PatchInstanceFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.groupLabels = []; - object.zones = []; - object.instances = []; - object.instanceNamePrefixes = []; - } - if (options.defaults) - object.all = false; - if (message.all != null && message.hasOwnProperty("all")) - object.all = message.all; - if (message.groupLabels && message.groupLabels.length) { - object.groupLabels = []; - for (var j = 0; j < message.groupLabels.length; ++j) - object.groupLabels[j] = $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.toObject(message.groupLabels[j], options); - } - if (message.zones && message.zones.length) { - object.zones = []; - for (var j = 0; j < message.zones.length; ++j) - object.zones[j] = message.zones[j]; - } - if (message.instances && message.instances.length) { - object.instances = []; - for (var j = 0; j < message.instances.length; ++j) - object.instances[j] = message.instances[j]; - } - if (message.instanceNamePrefixes && message.instanceNamePrefixes.length) { - object.instanceNamePrefixes = []; - for (var j = 0; j < message.instanceNamePrefixes.length; ++j) - object.instanceNamePrefixes[j] = message.instanceNamePrefixes[j]; - } - return object; - }; + /** + * Converts this SoftwarePackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @instance + * @returns {Object.} JSON object + */ + SoftwarePackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this PatchInstanceFilter to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @instance - * @returns {Object.} JSON object - */ - PatchInstanceFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return SoftwarePackage; + })(); - PatchInstanceFilter.GroupLabel = (function() { + Inventory.VersionedPackage = (function() { /** - * Properties of a GroupLabel. - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @interface IGroupLabel - * @property {Object.|null} [labels] GroupLabel labels + * Properties of a VersionedPackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IVersionedPackage + * @property {string|null} [packageName] VersionedPackage packageName + * @property {string|null} [architecture] VersionedPackage architecture + * @property {string|null} [version] VersionedPackage version */ /** - * Constructs a new GroupLabel. - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter - * @classdesc Represents a GroupLabel. - * @implements IGroupLabel + * Constructs a new VersionedPackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a VersionedPackage. + * @implements IVersionedPackage * @constructor - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage=} [properties] Properties to set */ - function GroupLabel(properties) { - this.labels = {}; + function VersionedPackage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23150,95 +21140,101 @@ } /** - * GroupLabel labels. - * @member {Object.} labels - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * VersionedPackage packageName. + * @member {string} packageName + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @instance */ - GroupLabel.prototype.labels = $util.emptyObject; + VersionedPackage.prototype.packageName = ""; /** - * Creates a new GroupLabel instance using the specified properties. + * VersionedPackage architecture. + * @member {string} architecture + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.architecture = ""; + + /** + * VersionedPackage version. + * @member {string} version + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @instance + */ + VersionedPackage.prototype.version = ""; + + /** + * Creates a new VersionedPackage instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel instance + * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage instance */ - GroupLabel.create = function create(properties) { - return new GroupLabel(properties); + VersionedPackage.create = function create(properties) { + return new VersionedPackage(properties); }; /** - * Encodes the specified GroupLabel message. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupLabel.encode = function encode(message, writer) { + VersionedPackage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.architecture); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageName); return writer; }; /** - * Encodes the specified GroupLabel message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.verify|verify} messages. + * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.IGroupLabel} message GroupLabel message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupLabel.encodeDelimited = function encodeDelimited(message, writer) { + VersionedPackage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupLabel message from the specified reader or buffer. + * Decodes a VersionedPackage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupLabel.decode = function decode(reader, length) { + VersionedPackage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - 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; + case 4: + message.packageName = reader.string(); + break; + case 2: + message.architecture = reader.string(); + break; + case 3: + message.version = reader.string(); break; default: reader.skipType(tag & 7); @@ -23249,1025 +21245,1015 @@ }; /** - * Decodes a GroupLabel message from the specified reader or buffer, length delimited. + * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupLabel.decodeDelimited = function decodeDelimited(reader) { + VersionedPackage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupLabel message. + * Verifies a VersionedPackage message. * @function verify - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupLabel.verify = function verify(message) { + VersionedPackage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates a GroupLabel message from a plain object. Also converts values to their respective internal types. + * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} GroupLabel + * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage */ - GroupLabel.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel) + VersionedPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) return object; - var message = new $root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel(); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage(); + if (object.packageName != null) + message.packageName = String(object.packageName); + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from a GroupLabel message. Also converts values to other types if specified. + * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @static - * @param {google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel} message GroupLabel + * @param {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} message VersionedPackage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupLabel.toObject = function toObject(message, options) { + VersionedPackage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (options.defaults) { + object.architecture = ""; + object.version = ""; + object.packageName = ""; } + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; return object; }; /** - * Converts this GroupLabel to JSON. + * Converts this VersionedPackage to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage * @instance * @returns {Object.} JSON object */ - GroupLabel.prototype.toJSON = function toJSON() { + VersionedPackage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GroupLabel; + return VersionedPackage; })(); - return PatchInstanceFilter; - })(); - - v1.PatchRollout = (function() { + Inventory.ZypperPatch = (function() { - /** - * Properties of a PatchRollout. - * @memberof google.cloud.osconfig.v1 - * @interface IPatchRollout - * @property {google.cloud.osconfig.v1.PatchRollout.Mode|null} [mode] PatchRollout mode - * @property {google.cloud.osconfig.v1.IFixedOrPercent|null} [disruptionBudget] PatchRollout disruptionBudget - */ + /** + * Properties of a ZypperPatch. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IZypperPatch + * @property {string|null} [patchName] ZypperPatch patchName + * @property {string|null} [category] ZypperPatch category + * @property {string|null} [severity] ZypperPatch severity + * @property {string|null} [summary] ZypperPatch summary + */ - /** - * Constructs a new PatchRollout. - * @memberof google.cloud.osconfig.v1 - * @classdesc Represents a PatchRollout. - * @implements IPatchRollout - * @constructor - * @param {google.cloud.osconfig.v1.IPatchRollout=} [properties] Properties to set - */ - function PatchRollout(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ZypperPatch. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a ZypperPatch. + * @implements IZypperPatch + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch=} [properties] Properties to set + */ + function ZypperPatch(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * PatchRollout mode. - * @member {google.cloud.osconfig.v1.PatchRollout.Mode} mode - * @memberof google.cloud.osconfig.v1.PatchRollout - * @instance - */ - PatchRollout.prototype.mode = 0; + /** + * ZypperPatch patchName. + * @member {string} patchName + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.patchName = ""; - /** - * PatchRollout disruptionBudget. - * @member {google.cloud.osconfig.v1.IFixedOrPercent|null|undefined} disruptionBudget - * @memberof google.cloud.osconfig.v1.PatchRollout - * @instance - */ - PatchRollout.prototype.disruptionBudget = null; + /** + * ZypperPatch category. + * @member {string} category + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.category = ""; - /** - * Creates a new PatchRollout instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1.PatchRollout - * @static - * @param {google.cloud.osconfig.v1.IPatchRollout=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout instance - */ - PatchRollout.create = function create(properties) { - return new PatchRollout(properties); - }; + /** + * ZypperPatch severity. + * @member {string} severity + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.severity = ""; - /** - * Encodes the specified PatchRollout message. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1.PatchRollout - * @static - * @param {google.cloud.osconfig.v1.IPatchRollout} message PatchRollout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchRollout.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - if (message.disruptionBudget != null && Object.hasOwnProperty.call(message, "disruptionBudget")) - $root.google.cloud.osconfig.v1.FixedOrPercent.encode(message.disruptionBudget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * ZypperPatch summary. + * @member {string} summary + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + */ + ZypperPatch.prototype.summary = ""; - /** - * Encodes the specified PatchRollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PatchRollout.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1.PatchRollout - * @static - * @param {google.cloud.osconfig.v1.IPatchRollout} message PatchRollout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PatchRollout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ZypperPatch instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch instance + */ + ZypperPatch.create = function create(properties) { + return new ZypperPatch(properties); + }; - /** - * Decodes a PatchRollout message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1.PatchRollout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchRollout.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PatchRollout(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mode = reader.int32(); - break; - case 2: - message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperPatch.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.category); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.severity); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.summary); + if (message.patchName != null && Object.hasOwnProperty.call(message, "patchName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.patchName); + return writer; + }; - /** - * Decodes a PatchRollout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1.PatchRollout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PatchRollout.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperPatch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a PatchRollout message. - * @function verify - * @memberof google.cloud.osconfig.v1.PatchRollout - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PatchRollout.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - break; + /** + * Decodes a ZypperPatch message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperPatch.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.patchName = reader.string(); + break; + case 2: + message.category = reader.string(); + break; + case 3: + message.severity = reader.string(); + break; + case 4: + message.summary = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) { - var error = $root.google.cloud.osconfig.v1.FixedOrPercent.verify(message.disruptionBudget); - if (error) - return "disruptionBudget." + error; - } - return null; - }; - - /** - * Creates a PatchRollout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1.PatchRollout - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1.PatchRollout} PatchRollout - */ - PatchRollout.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1.PatchRollout) - return object; - var message = new $root.google.cloud.osconfig.v1.PatchRollout(); - switch (object.mode) { - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "ZONE_BY_ZONE": - case 1: - message.mode = 1; - break; - case "CONCURRENT_ZONES": - case 2: - message.mode = 2; - break; - } - if (object.disruptionBudget != null) { - if (typeof object.disruptionBudget !== "object") - throw TypeError(".google.cloud.osconfig.v1.PatchRollout.disruptionBudget: object expected"); - message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.fromObject(object.disruptionBudget); - } - return message; - }; + return message; + }; - /** - * Creates a plain object from a PatchRollout message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1.PatchRollout - * @static - * @param {google.cloud.osconfig.v1.PatchRollout} message PatchRollout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PatchRollout.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - object.disruptionBudget = null; - } - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.osconfig.v1.PatchRollout.Mode[message.mode] : message.mode; - if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) - object.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.toObject(message.disruptionBudget, options); - return object; - }; + /** + * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperPatch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this PatchRollout to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1.PatchRollout - * @instance - * @returns {Object.} JSON object - */ - PatchRollout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a ZypperPatch message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ZypperPatch.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchName != null && message.hasOwnProperty("patchName")) + if (!$util.isString(message.patchName)) + return "patchName: string expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + return null; + }; - /** - * Mode enum. - * @name google.cloud.osconfig.v1.PatchRollout.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} ZONE_BY_ZONE=1 ZONE_BY_ZONE value - * @property {number} CONCURRENT_ZONES=2 CONCURRENT_ZONES value - */ - PatchRollout.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ZONE_BY_ZONE"] = 1; - values[valuesById[2] = "CONCURRENT_ZONES"] = 2; - return values; + /** + * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch + */ + ZypperPatch.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch(); + if (object.patchName != null) + message.patchName = String(object.patchName); + if (object.category != null) + message.category = String(object.category); + if (object.severity != null) + message.severity = String(object.severity); + if (object.summary != null) + message.summary = String(object.summary); + return message; + }; + + /** + * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} message ZypperPatch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ZypperPatch.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.category = ""; + object.severity = ""; + object.summary = ""; + object.patchName = ""; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + if (message.patchName != null && message.hasOwnProperty("patchName")) + object.patchName = message.patchName; + return object; + }; + + /** + * Converts this ZypperPatch to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @instance + * @returns {Object.} JSON object + */ + ZypperPatch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ZypperPatch; })(); - return PatchRollout; - })(); + Inventory.WindowsUpdatePackage = (function() { - return v1; - })(); + /** + * Properties of a WindowsUpdatePackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IWindowsUpdatePackage + * @property {string|null} [title] WindowsUpdatePackage title + * @property {string|null} [description] WindowsUpdatePackage description + * @property {Array.|null} [categories] WindowsUpdatePackage categories + * @property {Array.|null} [kbArticleIds] WindowsUpdatePackage kbArticleIds + * @property {string|null} [supportUrl] WindowsUpdatePackage supportUrl + * @property {Array.|null} [moreInfoUrls] WindowsUpdatePackage moreInfoUrls + * @property {string|null} [updateId] WindowsUpdatePackage updateId + * @property {number|null} [revisionNumber] WindowsUpdatePackage revisionNumber + * @property {google.protobuf.ITimestamp|null} [lastDeploymentChangeTime] WindowsUpdatePackage lastDeploymentChangeTime + */ - osconfig.v1alpha = (function() { + /** + * Constructs a new WindowsUpdatePackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a WindowsUpdatePackage. + * @implements IWindowsUpdatePackage + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage=} [properties] Properties to set + */ + function WindowsUpdatePackage(properties) { + this.categories = []; + this.kbArticleIds = []; + this.moreInfoUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Namespace v1alpha. - * @memberof google.cloud.osconfig - * @namespace - */ - var v1alpha = {}; + /** + * WindowsUpdatePackage title. + * @member {string} title + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.title = ""; - v1alpha.OSPolicyResourceConfigStep = (function() { + /** + * WindowsUpdatePackage description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.description = ""; - /** - * Properties of a OSPolicyResourceConfigStep. - * @memberof google.cloud.osconfig.v1alpha - * @interface IOSPolicyResourceConfigStep - * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type|null} [type] OSPolicyResourceConfigStep type - * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome|null} [outcome] OSPolicyResourceConfigStep outcome - * @property {string|null} [errorMessage] OSPolicyResourceConfigStep errorMessage - */ + /** + * WindowsUpdatePackage categories. + * @member {Array.} categories + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.categories = $util.emptyArray; - /** - * Constructs a new OSPolicyResourceConfigStep. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a OSPolicyResourceConfigStep. - * @implements IOSPolicyResourceConfigStep - * @constructor - * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep=} [properties] Properties to set - */ - function OSPolicyResourceConfigStep(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * WindowsUpdatePackage kbArticleIds. + * @member {Array.} kbArticleIds + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.kbArticleIds = $util.emptyArray; - /** - * OSPolicyResourceConfigStep type. - * @member {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type} type - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @instance - */ - OSPolicyResourceConfigStep.prototype.type = 0; + /** + * WindowsUpdatePackage supportUrl. + * @member {string} supportUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.supportUrl = ""; - /** - * OSPolicyResourceConfigStep outcome. - * @member {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome} outcome - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @instance - */ - OSPolicyResourceConfigStep.prototype.outcome = 0; + /** + * WindowsUpdatePackage moreInfoUrls. + * @member {Array.} moreInfoUrls + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.moreInfoUrls = $util.emptyArray; - /** - * OSPolicyResourceConfigStep errorMessage. - * @member {string} errorMessage - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @instance - */ - OSPolicyResourceConfigStep.prototype.errorMessage = ""; + /** + * WindowsUpdatePackage updateId. + * @member {string} updateId + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.updateId = ""; - /** - * Creates a new OSPolicyResourceConfigStep instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep instance - */ - OSPolicyResourceConfigStep.create = function create(properties) { - return new OSPolicyResourceConfigStep(properties); - }; + /** + * WindowsUpdatePackage revisionNumber. + * @member {number} revisionNumber + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.revisionNumber = 0; - /** - * Encodes the specified OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicyResourceConfigStep.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.outcome != null && Object.hasOwnProperty.call(message, "outcome")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.outcome); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorMessage); - return writer; - }; + /** + * WindowsUpdatePackage lastDeploymentChangeTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastDeploymentChangeTime + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + */ + WindowsUpdatePackage.prototype.lastDeploymentChangeTime = null; - /** - * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicyResourceConfigStep.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new WindowsUpdatePackage instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage instance + */ + WindowsUpdatePackage.create = function create(properties) { + return new WindowsUpdatePackage(properties); + }; - /** - * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicyResourceConfigStep.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.outcome = reader.int32(); - break; - case 3: - message.errorMessage = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdatePackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.encode(message.categories[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.kbArticleIds != null && message.kbArticleIds.length) + for (var i = 0; i < message.kbArticleIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kbArticleIds[i]); + if (message.moreInfoUrls != null && message.moreInfoUrls.length) + for (var i = 0; i < message.moreInfoUrls.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.moreInfoUrls[i]); + if (message.updateId != null && Object.hasOwnProperty.call(message, "updateId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.updateId); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.revisionNumber); + if (message.lastDeploymentChangeTime != null && Object.hasOwnProperty.call(message, "lastDeploymentChangeTime")) + $root.google.protobuf.Timestamp.encode(message.lastDeploymentChangeTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.supportUrl != null && Object.hasOwnProperty.call(message, "supportUrl")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.supportUrl); + return writer; + }; - /** - * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicyResourceConfigStep.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdatePackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a OSPolicyResourceConfigStep message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OSPolicyResourceConfigStep.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.outcome != null && message.hasOwnProperty("outcome")) - switch (message.outcome) { - default: - return "outcome: enum value expected"; - case 0: - case 1: - case 2: - break; + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdatePackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.kbArticleIds && message.kbArticleIds.length)) + message.kbArticleIds = []; + message.kbArticleIds.push(reader.string()); + break; + case 11: + message.supportUrl = reader.string(); + break; + case 5: + if (!(message.moreInfoUrls && message.moreInfoUrls.length)) + message.moreInfoUrls = []; + message.moreInfoUrls.push(reader.string()); + break; + case 6: + message.updateId = reader.string(); + break; + case 7: + message.revisionNumber = reader.int32(); + break; + case 10: + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - return null; - }; + return message; + }; - /** - * Creates a OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep - */ - OSPolicyResourceConfigStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep(); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "VALIDATION": - case 1: - message.type = 1; - break; - case "DESIRED_STATE_CHECK": - case 2: - message.type = 2; - break; - case "DESIRED_STATE_ENFORCEMENT": - case 3: - message.type = 3; - break; - case "DESIRED_STATE_CHECK_POST_ENFORCEMENT": - case 4: - message.type = 4; - break; - } - switch (object.outcome) { - case "OUTCOME_UNSPECIFIED": - case 0: - message.outcome = 0; - break; - case "SUCCEEDED": - case 1: - message.outcome = 1; - break; - case "FAILED": - case 2: - message.outcome = 2; - break; - } - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - return message; - }; - - /** - * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} message OSPolicyResourceConfigStep - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OSPolicyResourceConfigStep.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.outcome = options.enums === String ? "OUTCOME_UNSPECIFIED" : 0; - object.errorMessage = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type[message.type] : message.type; - if (message.outcome != null && message.hasOwnProperty("outcome")) - object.outcome = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome[message.outcome] : message.outcome; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - return object; - }; + /** + * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdatePackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this OSPolicyResourceConfigStep to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep - * @instance - * @returns {Object.} JSON object - */ - OSPolicyResourceConfigStep.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a WindowsUpdatePackage message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdatePackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } + if (message.kbArticleIds != null && message.hasOwnProperty("kbArticleIds")) { + if (!Array.isArray(message.kbArticleIds)) + return "kbArticleIds: array expected"; + for (var i = 0; i < message.kbArticleIds.length; ++i) + if (!$util.isString(message.kbArticleIds[i])) + return "kbArticleIds: string[] expected"; + } + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + if (!$util.isString(message.supportUrl)) + return "supportUrl: string expected"; + if (message.moreInfoUrls != null && message.hasOwnProperty("moreInfoUrls")) { + if (!Array.isArray(message.moreInfoUrls)) + return "moreInfoUrls: array expected"; + for (var i = 0; i < message.moreInfoUrls.length; ++i) + if (!$util.isString(message.moreInfoUrls[i])) + return "moreInfoUrls: string[] expected"; + } + if (message.updateId != null && message.hasOwnProperty("updateId")) + if (!$util.isString(message.updateId)) + return "updateId: string expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber)) + return "revisionNumber: integer expected"; + if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastDeploymentChangeTime); + if (error) + return "lastDeploymentChangeTime." + error; + } + return null; + }; - /** - * Type enum. - * @name google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} VALIDATION=1 VALIDATION value - * @property {number} DESIRED_STATE_CHECK=2 DESIRED_STATE_CHECK value - * @property {number} DESIRED_STATE_ENFORCEMENT=3 DESIRED_STATE_ENFORCEMENT value - * @property {number} DESIRED_STATE_CHECK_POST_ENFORCEMENT=4 DESIRED_STATE_CHECK_POST_ENFORCEMENT value - */ - OSPolicyResourceConfigStep.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VALIDATION"] = 1; - values[valuesById[2] = "DESIRED_STATE_CHECK"] = 2; - values[valuesById[3] = "DESIRED_STATE_ENFORCEMENT"] = 3; - values[valuesById[4] = "DESIRED_STATE_CHECK_POST_ENFORCEMENT"] = 4; - return values; - })(); + /** + * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage + */ + WindowsUpdatePackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.categories: object expected"); + message.categories[i] = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.fromObject(object.categories[i]); + } + } + if (object.kbArticleIds) { + if (!Array.isArray(object.kbArticleIds)) + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.kbArticleIds: array expected"); + message.kbArticleIds = []; + for (var i = 0; i < object.kbArticleIds.length; ++i) + message.kbArticleIds[i] = String(object.kbArticleIds[i]); + } + if (object.supportUrl != null) + message.supportUrl = String(object.supportUrl); + if (object.moreInfoUrls) { + if (!Array.isArray(object.moreInfoUrls)) + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.moreInfoUrls: array expected"); + message.moreInfoUrls = []; + for (var i = 0; i < object.moreInfoUrls.length; ++i) + message.moreInfoUrls[i] = String(object.moreInfoUrls[i]); + } + if (object.updateId != null) + message.updateId = String(object.updateId); + if (object.revisionNumber != null) + message.revisionNumber = object.revisionNumber | 0; + if (object.lastDeploymentChangeTime != null) { + if (typeof object.lastDeploymentChangeTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.lastDeploymentChangeTime: object expected"); + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.fromObject(object.lastDeploymentChangeTime); + } + return message; + }; - /** - * Outcome enum. - * @name google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome - * @enum {number} - * @property {number} OUTCOME_UNSPECIFIED=0 OUTCOME_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - */ - OSPolicyResourceConfigStep.Outcome = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OUTCOME_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - return values; - })(); + /** + * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} message WindowsUpdatePackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdatePackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.categories = []; + object.kbArticleIds = []; + object.moreInfoUrls = []; + } + if (options.defaults) { + object.title = ""; + object.description = ""; + object.updateId = ""; + object.revisionNumber = 0; + object.lastDeploymentChangeTime = null; + object.supportUrl = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.toObject(message.categories[j], options); + } + if (message.kbArticleIds && message.kbArticleIds.length) { + object.kbArticleIds = []; + for (var j = 0; j < message.kbArticleIds.length; ++j) + object.kbArticleIds[j] = message.kbArticleIds[j]; + } + if (message.moreInfoUrls && message.moreInfoUrls.length) { + object.moreInfoUrls = []; + for (var j = 0; j < message.moreInfoUrls.length; ++j) + object.moreInfoUrls[j] = message.moreInfoUrls[j]; + } + if (message.updateId != null && message.hasOwnProperty("updateId")) + object.updateId = message.updateId; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + object.revisionNumber = message.revisionNumber; + if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) + object.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.toObject(message.lastDeploymentChangeTime, options); + if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) + object.supportUrl = message.supportUrl; + return object; + }; - return OSPolicyResourceConfigStep; - })(); + /** + * Converts this WindowsUpdatePackage to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdatePackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1alpha.OSPolicyResourceCompliance = (function() { + WindowsUpdatePackage.WindowsUpdateCategory = (function() { - /** - * Properties of a OSPolicyResourceCompliance. - * @memberof google.cloud.osconfig.v1alpha - * @interface IOSPolicyResourceCompliance - * @property {string|null} [osPolicyResourceId] OSPolicyResourceCompliance osPolicyResourceId - * @property {Array.|null} [configSteps] OSPolicyResourceCompliance configSteps - * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] OSPolicyResourceCompliance state - * @property {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null} [execResourceOutput] OSPolicyResourceCompliance execResourceOutput - */ + /** + * Properties of a WindowsUpdateCategory. + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @interface IWindowsUpdateCategory + * @property {string|null} [id] WindowsUpdateCategory id + * @property {string|null} [name] WindowsUpdateCategory name + */ - /** - * Constructs a new OSPolicyResourceCompliance. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a OSPolicyResourceCompliance. - * @implements IOSPolicyResourceCompliance - * @constructor - * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance=} [properties] Properties to set - */ - function OSPolicyResourceCompliance(properties) { - this.configSteps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new WindowsUpdateCategory. + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @classdesc Represents a WindowsUpdateCategory. + * @implements IWindowsUpdateCategory + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set + */ + function WindowsUpdateCategory(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * OSPolicyResourceCompliance osPolicyResourceId. - * @member {string} osPolicyResourceId - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @instance - */ - OSPolicyResourceCompliance.prototype.osPolicyResourceId = ""; + /** + * WindowsUpdateCategory id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + */ + WindowsUpdateCategory.prototype.id = ""; - /** - * OSPolicyResourceCompliance configSteps. - * @member {Array.} configSteps - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @instance - */ - OSPolicyResourceCompliance.prototype.configSteps = $util.emptyArray; + /** + * WindowsUpdateCategory name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + */ + WindowsUpdateCategory.prototype.name = ""; - /** - * OSPolicyResourceCompliance state. - * @member {google.cloud.osconfig.v1alpha.OSPolicyComplianceState} state - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @instance - */ - OSPolicyResourceCompliance.prototype.state = 0; + /** + * Creates a new WindowsUpdateCategory instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory instance + */ + WindowsUpdateCategory.create = function create(properties) { + return new WindowsUpdateCategory(properties); + }; - /** - * OSPolicyResourceCompliance execResourceOutput. - * @member {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput|null|undefined} execResourceOutput - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @instance - */ - OSPolicyResourceCompliance.prototype.execResourceOutput = null; + /** + * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateCategory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsUpdateCategory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * OSPolicyResourceCompliance output. - * @member {"execResourceOutput"|undefined} output - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @instance - */ - Object.defineProperty(OSPolicyResourceCompliance.prototype, "output", { - get: $util.oneOfGetter($oneOfFields = ["execResourceOutput"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateCategory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new OSPolicyResourceCompliance instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance instance - */ - OSPolicyResourceCompliance.create = function create(properties) { - return new OSPolicyResourceCompliance(properties); - }; + /** + * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsUpdateCategory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicyResourceCompliance.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osPolicyResourceId != null && Object.hasOwnProperty.call(message, "osPolicyResourceId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyResourceId); - if (message.configSteps != null && message.configSteps.length) - for (var i = 0; i < message.configSteps.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.encode(message.configSteps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.execResourceOutput != null && Object.hasOwnProperty.call(message, "execResourceOutput")) - $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.encode(message.execResourceOutput, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicyResourceCompliance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicyResourceCompliance.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.osPolicyResourceId = reader.string(); - break; - case 2: - if (!(message.configSteps && message.configSteps.length)) - message.configSteps = []; - message.configSteps.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a WindowsUpdateCategory message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsUpdateCategory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicyResourceCompliance.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory + */ + WindowsUpdateCategory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Verifies a OSPolicyResourceCompliance message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OSPolicyResourceCompliance.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) - if (!$util.isString(message.osPolicyResourceId)) - return "osPolicyResourceId: string expected"; - if (message.configSteps != null && message.hasOwnProperty("configSteps")) { - if (!Array.isArray(message.configSteps)) - return "configSteps: array expected"; - for (var i = 0; i < message.configSteps.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.verify(message.configSteps[i]); - if (error) - return "configSteps." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { - properties.output = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify(message.execResourceOutput); - if (error) - return "execResourceOutput." + error; - } - } - return null; - }; + /** + * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} message WindowsUpdateCategory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsUpdateCategory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} OSPolicyResourceCompliance - */ - OSPolicyResourceCompliance.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance(); - if (object.osPolicyResourceId != null) - message.osPolicyResourceId = String(object.osPolicyResourceId); - if (object.configSteps) { - if (!Array.isArray(object.configSteps)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.configSteps: array expected"); - message.configSteps = []; - for (var i = 0; i < object.configSteps.length; ++i) { - if (typeof object.configSteps[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.configSteps: object expected"); - message.configSteps[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.fromObject(object.configSteps[i]); - } - } - switch (object.state) { - case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "COMPLIANT": - case 1: - message.state = 1; - break; - case "NON_COMPLIANT": - case 2: - message.state = 2; - break; - case "UNKNOWN": - case 3: - message.state = 3; - break; - case "NO_OS_POLICIES_APPLICABLE": - case 4: - message.state = 4; - break; - } - if (object.execResourceOutput != null) { - if (typeof object.execResourceOutput !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.execResourceOutput: object expected"); - message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.fromObject(object.execResourceOutput); - } - return message; - }; + /** + * Converts this WindowsUpdateCategory to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @instance + * @returns {Object.} JSON object + */ + WindowsUpdateCategory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} message OSPolicyResourceCompliance - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OSPolicyResourceCompliance.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.configSteps = []; - if (options.defaults) { - object.osPolicyResourceId = ""; - object.state = options.enums === String ? "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" : 0; - } - if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) - object.osPolicyResourceId = message.osPolicyResourceId; - if (message.configSteps && message.configSteps.length) { - object.configSteps = []; - for (var j = 0; j < message.configSteps.length; ++j) - object.configSteps[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.toObject(message.configSteps[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; - if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { - object.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.toObject(message.execResourceOutput, options); - if (options.oneofs) - object.output = "execResourceOutput"; - } - return object; - }; + return WindowsUpdateCategory; + })(); - /** - * Converts this OSPolicyResourceCompliance to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @instance - * @returns {Object.} JSON object - */ - OSPolicyResourceCompliance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return WindowsUpdatePackage; + })(); - OSPolicyResourceCompliance.ExecResourceOutput = (function() { + Inventory.WindowsQuickFixEngineeringPackage = (function() { /** - * Properties of an ExecResourceOutput. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @interface IExecResourceOutput - * @property {Uint8Array|null} [enforcementOutput] ExecResourceOutput enforcementOutput + * Properties of a WindowsQuickFixEngineeringPackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IWindowsQuickFixEngineeringPackage + * @property {string|null} [caption] WindowsQuickFixEngineeringPackage caption + * @property {string|null} [description] WindowsQuickFixEngineeringPackage description + * @property {string|null} [hotFixId] WindowsQuickFixEngineeringPackage hotFixId + * @property {google.protobuf.ITimestamp|null} [installTime] WindowsQuickFixEngineeringPackage installTime */ /** - * Constructs a new ExecResourceOutput. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance - * @classdesc Represents an ExecResourceOutput. - * @implements IExecResourceOutput + * Constructs a new WindowsQuickFixEngineeringPackage. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a WindowsQuickFixEngineeringPackage. + * @implements IWindowsQuickFixEngineeringPackage * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set */ - function ExecResourceOutput(properties) { + function WindowsQuickFixEngineeringPackage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24275,75 +22261,114 @@ } /** - * ExecResourceOutput enforcementOutput. - * @member {Uint8Array} enforcementOutput - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * WindowsQuickFixEngineeringPackage caption. + * @member {string} caption + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @instance */ - ExecResourceOutput.prototype.enforcementOutput = $util.newBuffer([]); + WindowsQuickFixEngineeringPackage.prototype.caption = ""; /** - * Creates a new ExecResourceOutput instance using the specified properties. + * WindowsQuickFixEngineeringPackage description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.description = ""; + + /** + * WindowsQuickFixEngineeringPackage hotFixId. + * @member {string} hotFixId + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.hotFixId = ""; + + /** + * WindowsQuickFixEngineeringPackage installTime. + * @member {google.protobuf.ITimestamp|null|undefined} installTime + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @instance + */ + WindowsQuickFixEngineeringPackage.prototype.installTime = null; + + /** + * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput instance + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage instance */ - ExecResourceOutput.create = function create(properties) { - return new ExecResourceOutput(properties); + WindowsQuickFixEngineeringPackage.create = function create(properties) { + return new WindowsQuickFixEngineeringPackage(properties); }; /** - * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecResourceOutput.encode = function encode(message, writer) { + WindowsQuickFixEngineeringPackage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enforcementOutput != null && Object.hasOwnProperty.call(message, "enforcementOutput")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.enforcementOutput); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caption); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.hotFixId != null && Object.hasOwnProperty.call(message, "hotFixId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.hotFixId); + if (message.installTime != null && Object.hasOwnProperty.call(message, "installTime")) + $root.google.protobuf.Timestamp.encode(message.installTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecResourceOutput.encodeDelimited = function encodeDelimited(message, writer) { + WindowsQuickFixEngineeringPackage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecResourceOutput message from the specified reader or buffer. + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecResourceOutput.decode = function decode(reader, length) { + WindowsQuickFixEngineeringPackage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.caption = reader.string(); + break; case 2: - message.enforcementOutput = reader.bytes(); + message.description = reader.string(); + break; + case 3: + message.hotFixId = reader.string(); + break; + case 5: + message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -24354,147 +22379,422 @@ }; /** - * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. + * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecResourceOutput.decodeDelimited = function decodeDelimited(reader) { + WindowsQuickFixEngineeringPackage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecResourceOutput message. + * Verifies a WindowsQuickFixEngineeringPackage message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecResourceOutput.verify = function verify(message) { + WindowsQuickFixEngineeringPackage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) - if (!(message.enforcementOutput && typeof message.enforcementOutput.length === "number" || $util.isString(message.enforcementOutput))) - return "enforcementOutput: buffer expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) + if (!$util.isString(message.hotFixId)) + return "hotFixId: string expected"; + if (message.installTime != null && message.hasOwnProperty("installTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.installTime); + if (error) + return "installTime." + error; + } return null; }; /** - * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. + * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage */ - ExecResourceOutput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + WindowsQuickFixEngineeringPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput(); - if (object.enforcementOutput != null) - if (typeof object.enforcementOutput === "string") - $util.base64.decode(object.enforcementOutput, message.enforcementOutput = $util.newBuffer($util.base64.length(object.enforcementOutput)), 0); - else if (object.enforcementOutput.length) - message.enforcementOutput = object.enforcementOutput; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage(); + if (object.caption != null) + message.caption = String(object.caption); + if (object.description != null) + message.description = String(object.description); + if (object.hotFixId != null) + message.hotFixId = String(object.hotFixId); + if (object.installTime != null) { + if (typeof object.installTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.installTime: object expected"); + message.installTime = $root.google.protobuf.Timestamp.fromObject(object.installTime); + } return message; }; /** - * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. + * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} message ExecResourceOutput + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecResourceOutput.toObject = function toObject(message, options) { + WindowsQuickFixEngineeringPackage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.enforcementOutput = ""; - else { - object.enforcementOutput = []; - if (options.bytes !== Array) - object.enforcementOutput = $util.newBuffer(object.enforcementOutput); - } - if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) - object.enforcementOutput = options.bytes === String ? $util.base64.encode(message.enforcementOutput, 0, message.enforcementOutput.length) : options.bytes === Array ? Array.prototype.slice.call(message.enforcementOutput) : message.enforcementOutput; + if (options.defaults) { + object.caption = ""; + object.description = ""; + object.hotFixId = ""; + object.installTime = null; + } + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) + object.hotFixId = message.hotFixId; + if (message.installTime != null && message.hasOwnProperty("installTime")) + object.installTime = $root.google.protobuf.Timestamp.toObject(message.installTime, options); return object; }; /** - * Converts this ExecResourceOutput to JSON. + * Converts this WindowsQuickFixEngineeringPackage to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage * @instance * @returns {Object.} JSON object */ - ExecResourceOutput.prototype.toJSON = function toJSON() { + WindowsQuickFixEngineeringPackage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExecResourceOutput; + return WindowsQuickFixEngineeringPackage; })(); - return OSPolicyResourceCompliance; - })(); + Inventory.WindowsApplication = (function() { - /** - * OSPolicyComplianceState enum. - * @name google.cloud.osconfig.v1alpha.OSPolicyComplianceState - * @enum {number} - * @property {number} OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED=0 OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED value - * @property {number} COMPLIANT=1 COMPLIANT value - * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value - * @property {number} UNKNOWN=3 UNKNOWN value - * @property {number} NO_OS_POLICIES_APPLICABLE=4 NO_OS_POLICIES_APPLICABLE value - */ - v1alpha.OSPolicyComplianceState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMPLIANT"] = 1; - values[valuesById[2] = "NON_COMPLIANT"] = 2; - values[valuesById[3] = "UNKNOWN"] = 3; - values[valuesById[4] = "NO_OS_POLICIES_APPLICABLE"] = 4; - return values; + /** + * Properties of a WindowsApplication. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @interface IWindowsApplication + * @property {string|null} [displayName] WindowsApplication displayName + * @property {string|null} [displayVersion] WindowsApplication displayVersion + * @property {string|null} [publisher] WindowsApplication publisher + * @property {google.type.IDate|null} [installDate] WindowsApplication installDate + * @property {string|null} [helpLink] WindowsApplication helpLink + */ + + /** + * Constructs a new WindowsApplication. + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @classdesc Represents a WindowsApplication. + * @implements IWindowsApplication + * @constructor + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication=} [properties] Properties to set + */ + function WindowsApplication(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsApplication displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.displayName = ""; + + /** + * WindowsApplication displayVersion. + * @member {string} displayVersion + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.displayVersion = ""; + + /** + * WindowsApplication publisher. + * @member {string} publisher + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.publisher = ""; + + /** + * WindowsApplication installDate. + * @member {google.type.IDate|null|undefined} installDate + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.installDate = null; + + /** + * WindowsApplication helpLink. + * @member {string} helpLink + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + */ + WindowsApplication.prototype.helpLink = ""; + + /** + * Creates a new WindowsApplication instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication instance + */ + WindowsApplication.create = function create(properties) { + return new WindowsApplication(properties); + }; + + /** + * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsApplication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.displayVersion != null && Object.hasOwnProperty.call(message, "displayVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayVersion); + if (message.publisher != null && Object.hasOwnProperty.call(message, "publisher")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.publisher); + if (message.installDate != null && Object.hasOwnProperty.call(message, "installDate")) + $root.google.type.Date.encode(message.installDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.helpLink != null && Object.hasOwnProperty.call(message, "helpLink")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.helpLink); + return writer; + }; + + /** + * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsApplication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsApplication.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 2: + message.displayVersion = reader.string(); + break; + case 3: + message.publisher = reader.string(); + break; + case 4: + message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + case 5: + message.helpLink = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsApplication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsApplication message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsApplication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) + if (!$util.isString(message.displayVersion)) + return "displayVersion: string expected"; + if (message.publisher != null && message.hasOwnProperty("publisher")) + if (!$util.isString(message.publisher)) + return "publisher: string expected"; + if (message.installDate != null && message.hasOwnProperty("installDate")) { + var error = $root.google.type.Date.verify(message.installDate); + if (error) + return "installDate." + error; + } + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + if (!$util.isString(message.helpLink)) + return "helpLink: string expected"; + return null; + }; + + /** + * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication + */ + WindowsApplication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.displayVersion != null) + message.displayVersion = String(object.displayVersion); + if (object.publisher != null) + message.publisher = String(object.publisher); + if (object.installDate != null) { + if (typeof object.installDate !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.installDate: object expected"); + message.installDate = $root.google.type.Date.fromObject(object.installDate); + } + if (object.helpLink != null) + message.helpLink = String(object.helpLink); + return message; + }; + + /** + * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} message WindowsApplication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsApplication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.displayVersion = ""; + object.publisher = ""; + object.installDate = null; + object.helpLink = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) + object.displayVersion = message.displayVersion; + if (message.publisher != null && message.hasOwnProperty("publisher")) + object.publisher = message.publisher; + if (message.installDate != null && message.hasOwnProperty("installDate")) + object.installDate = $root.google.type.Date.toObject(message.installDate, options); + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + object.helpLink = message.helpLink; + return object; + }; + + /** + * Converts this WindowsApplication to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @instance + * @returns {Object.} JSON object + */ + WindowsApplication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WindowsApplication; + })(); + + return Inventory; })(); - v1alpha.InstanceOSPoliciesCompliance = (function() { + v1alpha.GetInventoryRequest = (function() { /** - * Properties of an InstanceOSPoliciesCompliance. + * Properties of a GetInventoryRequest. * @memberof google.cloud.osconfig.v1alpha - * @interface IInstanceOSPoliciesCompliance - * @property {string|null} [name] InstanceOSPoliciesCompliance name - * @property {string|null} [instance] InstanceOSPoliciesCompliance instance - * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] InstanceOSPoliciesCompliance state - * @property {string|null} [detailedState] InstanceOSPoliciesCompliance detailedState - * @property {string|null} [detailedStateReason] InstanceOSPoliciesCompliance detailedStateReason - * @property {Array.|null} [osPolicyCompliances] InstanceOSPoliciesCompliance osPolicyCompliances - * @property {google.protobuf.ITimestamp|null} [lastComplianceCheckTime] InstanceOSPoliciesCompliance lastComplianceCheckTime - * @property {string|null} [lastComplianceRunId] InstanceOSPoliciesCompliance lastComplianceRunId + * @interface IGetInventoryRequest + * @property {string|null} [name] GetInventoryRequest name + * @property {google.cloud.osconfig.v1alpha.InventoryView|null} [view] GetInventoryRequest view */ /** - * Constructs a new InstanceOSPoliciesCompliance. + * Constructs a new GetInventoryRequest. * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents an InstanceOSPoliciesCompliance. - * @implements IInstanceOSPoliciesCompliance + * @classdesc Represents a GetInventoryRequest. + * @implements IGetInventoryRequest * @constructor - * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest=} [properties] Properties to set */ - function InstanceOSPoliciesCompliance(properties) { - this.osPolicyCompliances = []; + function GetInventoryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24502,141 +22802,80 @@ } /** - * InstanceOSPoliciesCompliance name. + * GetInventoryRequest name. * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance - * @instance - */ - InstanceOSPoliciesCompliance.prototype.name = ""; - - /** - * InstanceOSPoliciesCompliance instance. - * @member {string} instance - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance - * @instance - */ - InstanceOSPoliciesCompliance.prototype.instance = ""; - - /** - * InstanceOSPoliciesCompliance state. - * @member {google.cloud.osconfig.v1alpha.OSPolicyComplianceState} state - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance - * @instance - */ - InstanceOSPoliciesCompliance.prototype.state = 0; - - /** - * InstanceOSPoliciesCompliance detailedState. - * @member {string} detailedState - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance - * @instance - */ - InstanceOSPoliciesCompliance.prototype.detailedState = ""; - - /** - * InstanceOSPoliciesCompliance detailedStateReason. - * @member {string} detailedStateReason - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance - * @instance - */ - InstanceOSPoliciesCompliance.prototype.detailedStateReason = ""; - - /** - * InstanceOSPoliciesCompliance osPolicyCompliances. - * @member {Array.} osPolicyCompliances - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance - * @instance - */ - InstanceOSPoliciesCompliance.prototype.osPolicyCompliances = $util.emptyArray; - - /** - * InstanceOSPoliciesCompliance lastComplianceCheckTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastComplianceCheckTime - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @instance */ - InstanceOSPoliciesCompliance.prototype.lastComplianceCheckTime = null; + GetInventoryRequest.prototype.name = ""; /** - * InstanceOSPoliciesCompliance lastComplianceRunId. - * @member {string} lastComplianceRunId - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * GetInventoryRequest view. + * @member {google.cloud.osconfig.v1alpha.InventoryView} view + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @instance */ - InstanceOSPoliciesCompliance.prototype.lastComplianceRunId = ""; + GetInventoryRequest.prototype.view = 0; /** - * Creates a new InstanceOSPoliciesCompliance instance using the specified properties. + * Creates a new GetInventoryRequest instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @static - * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance instance + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest instance */ - InstanceOSPoliciesCompliance.create = function create(properties) { - return new InstanceOSPoliciesCompliance(properties); + GetInventoryRequest.create = function create(properties) { + return new GetInventoryRequest(properties); }; /** - * Encodes the specified InstanceOSPoliciesCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. + * Encodes the specified GetInventoryRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @static - * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance} message InstanceOSPoliciesCompliance message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} message GetInventoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InstanceOSPoliciesCompliance.encode = function encode(message, writer) { + GetInventoryRequest.encode = function encode(message, writer) { 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.instance != null && Object.hasOwnProperty.call(message, "instance")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instance); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.detailedState != null && Object.hasOwnProperty.call(message, "detailedState")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.detailedState); - if (message.detailedStateReason != null && Object.hasOwnProperty.call(message, "detailedStateReason")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.detailedStateReason); - if (message.osPolicyCompliances != null && message.osPolicyCompliances.length) - for (var i = 0; i < message.osPolicyCompliances.length; ++i) - $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.encode(message.osPolicyCompliances[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.lastComplianceCheckTime != null && Object.hasOwnProperty.call(message, "lastComplianceCheckTime")) - $root.google.protobuf.Timestamp.encode(message.lastComplianceCheckTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastComplianceRunId != null && Object.hasOwnProperty.call(message, "lastComplianceRunId")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.lastComplianceRunId); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; /** - * Encodes the specified InstanceOSPoliciesCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify|verify} messages. + * Encodes the specified GetInventoryRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @static - * @param {google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance} message InstanceOSPoliciesCompliance message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} message GetInventoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InstanceOSPoliciesCompliance.encodeDelimited = function encodeDelimited(message, writer) { + GetInventoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer. + * Decodes a GetInventoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance + * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InstanceOSPoliciesCompliance.decode = function decode(reader, length) { + GetInventoryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetInventoryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -24644,27 +22883,7 @@ message.name = reader.string(); break; case 2: - message.instance = reader.string(); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.detailedState = reader.string(); - break; - case 5: - message.detailedStateReason = reader.string(); - break; - case 6: - if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) - message.osPolicyCompliances = []; - message.osPolicyCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.decode(reader, reader.uint32())); - break; - case 7: - message.lastComplianceCheckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.lastComplianceRunId = reader.string(); + message.view = reader.int32(); break; default: reader.skipType(tag & 7); @@ -24675,519 +22894,138 @@ }; /** - * Decodes an InstanceOSPoliciesCompliance message from the specified reader or buffer, length delimited. + * Decodes a GetInventoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance + * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InstanceOSPoliciesCompliance.decodeDelimited = function decodeDelimited(reader) { + GetInventoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InstanceOSPoliciesCompliance message. + * Verifies a GetInventoryRequest message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InstanceOSPoliciesCompliance.verify = function verify(message) { + GetInventoryRequest.verify = function verify(message) { if (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.instance != null && message.hasOwnProperty("instance")) - if (!$util.isString(message.instance)) - return "instance: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { default: - return "state: enum value expected"; + return "view: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: break; } - if (message.detailedState != null && message.hasOwnProperty("detailedState")) - if (!$util.isString(message.detailedState)) - return "detailedState: string expected"; - if (message.detailedStateReason != null && message.hasOwnProperty("detailedStateReason")) - if (!$util.isString(message.detailedStateReason)) - return "detailedStateReason: string expected"; - if (message.osPolicyCompliances != null && message.hasOwnProperty("osPolicyCompliances")) { - if (!Array.isArray(message.osPolicyCompliances)) - return "osPolicyCompliances: array expected"; - for (var i = 0; i < message.osPolicyCompliances.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify(message.osPolicyCompliances[i]); - if (error) - return "osPolicyCompliances." + error; - } - } - if (message.lastComplianceCheckTime != null && message.hasOwnProperty("lastComplianceCheckTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastComplianceCheckTime); - if (error) - return "lastComplianceCheckTime." + error; - } - if (message.lastComplianceRunId != null && message.hasOwnProperty("lastComplianceRunId")) - if (!$util.isString(message.lastComplianceRunId)) - return "lastComplianceRunId: string expected"; return null; }; /** - * Creates an InstanceOSPoliciesCompliance message from a plain object. Also converts values to their respective internal types. + * Creates a GetInventoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} InstanceOSPoliciesCompliance + * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest */ - InstanceOSPoliciesCompliance.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) + GetInventoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.GetInventoryRequest) return object; - var message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance(); + var message = new $root.google.cloud.osconfig.v1alpha.GetInventoryRequest(); if (object.name != null) message.name = String(object.name); - if (object.instance != null) - message.instance = String(object.instance); - switch (object.state) { - case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": + switch (object.view) { + case "INVENTORY_VIEW_UNSPECIFIED": case 0: - message.state = 0; + message.view = 0; break; - case "COMPLIANT": + case "BASIC": case 1: - message.state = 1; + message.view = 1; break; - case "NON_COMPLIANT": + case "FULL": case 2: - message.state = 2; - break; - case "UNKNOWN": - case 3: - message.state = 3; - break; - case "NO_OS_POLICIES_APPLICABLE": - case 4: - message.state = 4; + message.view = 2; break; } - if (object.detailedState != null) - message.detailedState = String(object.detailedState); - if (object.detailedStateReason != null) - message.detailedStateReason = String(object.detailedStateReason); - if (object.osPolicyCompliances) { - if (!Array.isArray(object.osPolicyCompliances)) - throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.osPolicyCompliances: array expected"); - message.osPolicyCompliances = []; - for (var i = 0; i < object.osPolicyCompliances.length; ++i) { - if (typeof object.osPolicyCompliances[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.osPolicyCompliances: object expected"); - message.osPolicyCompliances[i] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.fromObject(object.osPolicyCompliances[i]); - } - } - if (object.lastComplianceCheckTime != null) { - if (typeof object.lastComplianceCheckTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.lastComplianceCheckTime: object expected"); - message.lastComplianceCheckTime = $root.google.protobuf.Timestamp.fromObject(object.lastComplianceCheckTime); - } - if (object.lastComplianceRunId != null) - message.lastComplianceRunId = String(object.lastComplianceRunId); return message; }; /** - * Creates a plain object from an InstanceOSPoliciesCompliance message. Also converts values to other types if specified. + * Creates a plain object from a GetInventoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @static - * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} message InstanceOSPoliciesCompliance + * @param {google.cloud.osconfig.v1alpha.GetInventoryRequest} message GetInventoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InstanceOSPoliciesCompliance.toObject = function toObject(message, options) { + GetInventoryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.osPolicyCompliances = []; if (options.defaults) { object.name = ""; - object.instance = ""; - object.state = options.enums === String ? "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" : 0; - object.detailedState = ""; - object.detailedStateReason = ""; - object.lastComplianceCheckTime = null; - object.lastComplianceRunId = ""; + object.view = options.enums === String ? "INVENTORY_VIEW_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = message.instance; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; - if (message.detailedState != null && message.hasOwnProperty("detailedState")) - object.detailedState = message.detailedState; - if (message.detailedStateReason != null && message.hasOwnProperty("detailedStateReason")) - object.detailedStateReason = message.detailedStateReason; - if (message.osPolicyCompliances && message.osPolicyCompliances.length) { - object.osPolicyCompliances = []; - for (var j = 0; j < message.osPolicyCompliances.length; ++j) - object.osPolicyCompliances[j] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.toObject(message.osPolicyCompliances[j], options); - } - if (message.lastComplianceCheckTime != null && message.hasOwnProperty("lastComplianceCheckTime")) - object.lastComplianceCheckTime = $root.google.protobuf.Timestamp.toObject(message.lastComplianceCheckTime, options); - if (message.lastComplianceRunId != null && message.hasOwnProperty("lastComplianceRunId")) - object.lastComplianceRunId = message.lastComplianceRunId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; return object; }; /** - * Converts this InstanceOSPoliciesCompliance to JSON. + * Converts this GetInventoryRequest to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest * @instance * @returns {Object.} JSON object */ - InstanceOSPoliciesCompliance.prototype.toJSON = function toJSON() { + GetInventoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - InstanceOSPoliciesCompliance.OSPolicyCompliance = (function() { - - /** - * Properties of a OSPolicyCompliance. - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance - * @interface IOSPolicyCompliance - * @property {string|null} [osPolicyId] OSPolicyCompliance osPolicyId - * @property {string|null} [osPolicyAssignment] OSPolicyCompliance osPolicyAssignment - * @property {google.cloud.osconfig.v1alpha.OSPolicyComplianceState|null} [state] OSPolicyCompliance state - * @property {Array.|null} [osPolicyResourceCompliances] OSPolicyCompliance osPolicyResourceCompliances - */ - - /** - * Constructs a new OSPolicyCompliance. - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance - * @classdesc Represents a OSPolicyCompliance. - * @implements IOSPolicyCompliance - * @constructor - * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance=} [properties] Properties to set - */ - function OSPolicyCompliance(properties) { - this.osPolicyResourceCompliances = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OSPolicyCompliance osPolicyId. - * @member {string} osPolicyId - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @instance - */ - OSPolicyCompliance.prototype.osPolicyId = ""; - - /** - * OSPolicyCompliance osPolicyAssignment. - * @member {string} osPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @instance - */ - OSPolicyCompliance.prototype.osPolicyAssignment = ""; - - /** - * OSPolicyCompliance state. - * @member {google.cloud.osconfig.v1alpha.OSPolicyComplianceState} state - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @instance - */ - OSPolicyCompliance.prototype.state = 0; - - /** - * OSPolicyCompliance osPolicyResourceCompliances. - * @member {Array.} osPolicyResourceCompliances - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @instance - */ - OSPolicyCompliance.prototype.osPolicyResourceCompliances = $util.emptyArray; - - /** - * Creates a new OSPolicyCompliance instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @static - * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance instance - */ - OSPolicyCompliance.create = function create(properties) { - return new OSPolicyCompliance(properties); - }; - - /** - * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @static - * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicyCompliance.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osPolicyId != null && Object.hasOwnProperty.call(message, "osPolicyId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyId); - if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.osPolicyAssignment); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.osPolicyResourceCompliances != null && message.osPolicyResourceCompliances.length) - for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.encode(message.osPolicyResourceCompliances[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @static - * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicyCompliance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a OSPolicyCompliance message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicyCompliance.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.osPolicyId = reader.string(); - break; - case 2: - message.osPolicyAssignment = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) - message.osPolicyResourceCompliances = []; - message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicyCompliance.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a OSPolicyCompliance message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OSPolicyCompliance.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) - if (!$util.isString(message.osPolicyId)) - return "osPolicyId: string expected"; - if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) - if (!$util.isString(message.osPolicyAssignment)) - return "osPolicyAssignment: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.osPolicyResourceCompliances != null && message.hasOwnProperty("osPolicyResourceCompliances")) { - if (!Array.isArray(message.osPolicyResourceCompliances)) - return "osPolicyResourceCompliances: array expected"; - for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.verify(message.osPolicyResourceCompliances[i]); - if (error) - return "osPolicyResourceCompliances." + error; - } - } - return null; - }; - - /** - * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} OSPolicyCompliance - */ - OSPolicyCompliance.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance(); - if (object.osPolicyId != null) - message.osPolicyId = String(object.osPolicyId); - if (object.osPolicyAssignment != null) - message.osPolicyAssignment = String(object.osPolicyAssignment); - switch (object.state) { - case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "COMPLIANT": - case 1: - message.state = 1; - break; - case "NON_COMPLIANT": - case 2: - message.state = 2; - break; - case "UNKNOWN": - case 3: - message.state = 3; - break; - case "NO_OS_POLICIES_APPLICABLE": - case 4: - message.state = 4; - break; - } - if (object.osPolicyResourceCompliances) { - if (!Array.isArray(object.osPolicyResourceCompliances)) - throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.osPolicyResourceCompliances: array expected"); - message.osPolicyResourceCompliances = []; - for (var i = 0; i < object.osPolicyResourceCompliances.length; ++i) { - if (typeof object.osPolicyResourceCompliances[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.osPolicyResourceCompliances: object expected"); - message.osPolicyResourceCompliances[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.fromObject(object.osPolicyResourceCompliances[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @static - * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} message OSPolicyCompliance - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OSPolicyCompliance.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.osPolicyResourceCompliances = []; - if (options.defaults) { - object.osPolicyId = ""; - object.osPolicyAssignment = ""; - object.state = options.enums === String ? "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" : 0; - } - if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) - object.osPolicyId = message.osPolicyId; - if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) - object.osPolicyAssignment = message.osPolicyAssignment; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; - if (message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length) { - object.osPolicyResourceCompliances = []; - for (var j = 0; j < message.osPolicyResourceCompliances.length; ++j) - object.osPolicyResourceCompliances[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.toObject(message.osPolicyResourceCompliances[j], options); - } - return object; - }; - - /** - * Converts this OSPolicyCompliance to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance - * @instance - * @returns {Object.} JSON object - */ - OSPolicyCompliance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return OSPolicyCompliance; - })(); - - return InstanceOSPoliciesCompliance; + return GetInventoryRequest; })(); - v1alpha.GetInstanceOSPoliciesComplianceRequest = (function() { + v1alpha.ListInventoriesRequest = (function() { /** - * Properties of a GetInstanceOSPoliciesComplianceRequest. + * Properties of a ListInventoriesRequest. * @memberof google.cloud.osconfig.v1alpha - * @interface IGetInstanceOSPoliciesComplianceRequest - * @property {string|null} [name] GetInstanceOSPoliciesComplianceRequest name + * @interface IListInventoriesRequest + * @property {string|null} [parent] ListInventoriesRequest parent + * @property {google.cloud.osconfig.v1alpha.InventoryView|null} [view] ListInventoriesRequest view + * @property {number|null} [pageSize] ListInventoriesRequest pageSize + * @property {string|null} [pageToken] ListInventoriesRequest pageToken + * @property {string|null} [filter] ListInventoriesRequest filter */ /** - * Constructs a new GetInstanceOSPoliciesComplianceRequest. + * Constructs a new ListInventoriesRequest. * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a GetInstanceOSPoliciesComplianceRequest. - * @implements IGetInstanceOSPoliciesComplianceRequest + * @classdesc Represents a ListInventoriesRequest. + * @implements IListInventoriesRequest * @constructor - * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest=} [properties] Properties to set */ - function GetInstanceOSPoliciesComplianceRequest(properties) { + function ListInventoriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25195,290 +23033,110 @@ } /** - * GetInstanceOSPoliciesComplianceRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * ListInventoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @instance */ - GetInstanceOSPoliciesComplianceRequest.prototype.name = ""; + ListInventoriesRequest.prototype.parent = ""; /** - * Creates a new GetInstanceOSPoliciesComplianceRequest instance using the specified properties. + * ListInventoriesRequest view. + * @member {google.cloud.osconfig.v1alpha.InventoryView} view + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.view = 0; + + /** + * ListInventoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.pageSize = 0; + + /** + * ListInventoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.pageToken = ""; + + /** + * ListInventoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @instance + */ + ListInventoriesRequest.prototype.filter = ""; + + /** + * Creates a new ListInventoriesRequest instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @static - * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest instance + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest instance */ - GetInstanceOSPoliciesComplianceRequest.create = function create(properties) { - return new GetInstanceOSPoliciesComplianceRequest(properties); + ListInventoriesRequest.create = function create(properties) { + return new ListInventoriesRequest(properties); }; /** - * Encodes the specified GetInstanceOSPoliciesComplianceRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. + * Encodes the specified ListInventoriesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @static - * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} message GetInstanceOSPoliciesComplianceRequest message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} message ListInventoriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetInstanceOSPoliciesComplianceRequest.encode = function encode(message, writer) { + ListInventoriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); return writer; }; /** - * Encodes the specified GetInstanceOSPoliciesComplianceRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.verify|verify} messages. + * Encodes the specified ListInventoriesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @static - * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} message GetInstanceOSPoliciesComplianceRequest message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} message ListInventoriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetInstanceOSPoliciesComplianceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetInstanceOSPoliciesComplianceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetInstanceOSPoliciesComplianceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetInstanceOSPoliciesComplianceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetInstanceOSPoliciesComplianceRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetInstanceOSPoliciesComplianceRequest.verify = function verify(message) { - if (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 GetInstanceOSPoliciesComplianceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} GetInstanceOSPoliciesComplianceRequest - */ - GetInstanceOSPoliciesComplianceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetInstanceOSPoliciesComplianceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest - * @static - * @param {google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} message GetInstanceOSPoliciesComplianceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetInstanceOSPoliciesComplianceRequest.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 GetInstanceOSPoliciesComplianceRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest - * @instance - * @returns {Object.} JSON object - */ - GetInstanceOSPoliciesComplianceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetInstanceOSPoliciesComplianceRequest; - })(); - - v1alpha.ListInstanceOSPoliciesCompliancesRequest = (function() { - - /** - * Properties of a ListInstanceOSPoliciesCompliancesRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IListInstanceOSPoliciesCompliancesRequest - * @property {string|null} [parent] ListInstanceOSPoliciesCompliancesRequest parent - * @property {number|null} [pageSize] ListInstanceOSPoliciesCompliancesRequest pageSize - * @property {string|null} [pageToken] ListInstanceOSPoliciesCompliancesRequest pageToken - * @property {string|null} [filter] ListInstanceOSPoliciesCompliancesRequest filter - */ - - /** - * Constructs a new ListInstanceOSPoliciesCompliancesRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListInstanceOSPoliciesCompliancesRequest. - * @implements IListInstanceOSPoliciesCompliancesRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest=} [properties] Properties to set - */ - function ListInstanceOSPoliciesCompliancesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListInstanceOSPoliciesCompliancesRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest - * @instance - */ - ListInstanceOSPoliciesCompliancesRequest.prototype.parent = ""; - - /** - * ListInstanceOSPoliciesCompliancesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest - * @instance - */ - ListInstanceOSPoliciesCompliancesRequest.prototype.pageSize = 0; - - /** - * ListInstanceOSPoliciesCompliancesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest - * @instance - */ - ListInstanceOSPoliciesCompliancesRequest.prototype.pageToken = ""; - - /** - * ListInstanceOSPoliciesCompliancesRequest filter. - * @member {string} filter - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest - * @instance - */ - ListInstanceOSPoliciesCompliancesRequest.prototype.filter = ""; - - /** - * Creates a new ListInstanceOSPoliciesCompliancesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest instance - */ - ListInstanceOSPoliciesCompliancesRequest.create = function create(properties) { - return new ListInstanceOSPoliciesCompliancesRequest(properties); - }; - - /** - * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListInstanceOSPoliciesCompliancesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListInstanceOSPoliciesCompliancesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} message ListInstanceOSPoliciesCompliancesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListInstanceOSPoliciesCompliancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListInventoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer. + * Decodes a ListInventoriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInstanceOSPoliciesCompliancesRequest.decode = function decode(reader, length) { + ListInventoriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -25486,12 +23144,15 @@ message.parent = reader.string(); break; case 2: - message.pageSize = reader.int32(); + message.view = reader.int32(); break; case 3: - message.pageToken = reader.string(); + message.pageSize = reader.int32(); break; case 4: + message.pageToken = reader.string(); + break; + case 5: message.filter = reader.string(); break; default: @@ -25503,35 +23164,44 @@ }; /** - * Decodes a ListInstanceOSPoliciesCompliancesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListInventoriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInstanceOSPoliciesCompliancesRequest.decodeDelimited = function decodeDelimited(reader) { + ListInventoriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListInstanceOSPoliciesCompliancesRequest message. + * Verifies a ListInventoriesRequest message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListInstanceOSPoliciesCompliancesRequest.verify = function verify(message) { + ListInventoriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -25545,19 +23215,33 @@ }; /** - * Creates a ListInstanceOSPoliciesCompliancesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListInventoriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} ListInstanceOSPoliciesCompliancesRequest + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest */ - ListInstanceOSPoliciesCompliancesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) + ListInventoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest) return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest(); + var message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest(); if (object.parent != null) message.parent = String(object.parent); + switch (object.view) { + case "INVENTORY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -25568,26 +23252,29 @@ }; /** - * Creates a plain object from a ListInstanceOSPoliciesCompliancesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListInventoriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @static - * @param {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} message ListInstanceOSPoliciesCompliancesRequest + * @param {google.cloud.osconfig.v1alpha.ListInventoriesRequest} message ListInventoriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListInstanceOSPoliciesCompliancesRequest.toObject = function toObject(message, options) { + ListInventoriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; + object.view = options.enums === String ? "INVENTORY_VIEW_UNSPECIFIED" : 0; object.pageSize = 0; object.pageToken = ""; object.filter = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -25598,39 +23285,39 @@ }; /** - * Converts this ListInstanceOSPoliciesCompliancesRequest to JSON. + * Converts this ListInventoriesRequest to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest * @instance * @returns {Object.} JSON object */ - ListInstanceOSPoliciesCompliancesRequest.prototype.toJSON = function toJSON() { + ListInventoriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListInstanceOSPoliciesCompliancesRequest; + return ListInventoriesRequest; })(); - v1alpha.ListInstanceOSPoliciesCompliancesResponse = (function() { + v1alpha.ListInventoriesResponse = (function() { /** - * Properties of a ListInstanceOSPoliciesCompliancesResponse. + * Properties of a ListInventoriesResponse. * @memberof google.cloud.osconfig.v1alpha - * @interface IListInstanceOSPoliciesCompliancesResponse - * @property {Array.|null} [instanceOsPoliciesCompliances] ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances - * @property {string|null} [nextPageToken] ListInstanceOSPoliciesCompliancesResponse nextPageToken + * @interface IListInventoriesResponse + * @property {Array.|null} [inventories] ListInventoriesResponse inventories + * @property {string|null} [nextPageToken] ListInventoriesResponse nextPageToken */ /** - * Constructs a new ListInstanceOSPoliciesCompliancesResponse. + * Constructs a new ListInventoriesResponse. * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListInstanceOSPoliciesCompliancesResponse. - * @implements IListInstanceOSPoliciesCompliancesResponse + * @classdesc Represents a ListInventoriesResponse. + * @implements IListInventoriesResponse * @constructor - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse=} [properties] Properties to set */ - function ListInstanceOSPoliciesCompliancesResponse(properties) { - this.instanceOsPoliciesCompliances = []; + function ListInventoriesResponse(properties) { + this.inventories = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25638,88 +23325,88 @@ } /** - * ListInstanceOSPoliciesCompliancesResponse instanceOsPoliciesCompliances. - * @member {Array.} instanceOsPoliciesCompliances - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * ListInventoriesResponse inventories. + * @member {Array.} inventories + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @instance */ - ListInstanceOSPoliciesCompliancesResponse.prototype.instanceOsPoliciesCompliances = $util.emptyArray; + ListInventoriesResponse.prototype.inventories = $util.emptyArray; /** - * ListInstanceOSPoliciesCompliancesResponse nextPageToken. + * ListInventoriesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @instance */ - ListInstanceOSPoliciesCompliancesResponse.prototype.nextPageToken = ""; + ListInventoriesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListInstanceOSPoliciesCompliancesResponse instance using the specified properties. + * Creates a new ListInventoriesResponse instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @static - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse instance + * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse instance */ - ListInstanceOSPoliciesCompliancesResponse.create = function create(properties) { - return new ListInstanceOSPoliciesCompliancesResponse(properties); + ListInventoriesResponse.create = function create(properties) { + return new ListInventoriesResponse(properties); }; /** - * Encodes the specified ListInstanceOSPoliciesCompliancesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. + * Encodes the specified ListInventoriesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @static - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse} message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse} message ListInventoriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInstanceOSPoliciesCompliancesResponse.encode = function encode(message, writer) { + ListInventoriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.instanceOsPoliciesCompliances != null && message.instanceOsPoliciesCompliances.length) - for (var i = 0; i < message.instanceOsPoliciesCompliances.length; ++i) - $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.encode(message.instanceOsPoliciesCompliances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.inventories != null && message.inventories.length) + for (var i = 0; i < message.inventories.length; ++i) + $root.google.cloud.osconfig.v1alpha.Inventory.encode(message.inventories[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 ListInstanceOSPoliciesCompliancesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.verify|verify} messages. + * Encodes the specified ListInventoriesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @static - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse} message ListInstanceOSPoliciesCompliancesResponse message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse} message ListInventoriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInstanceOSPoliciesCompliancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListInventoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer. + * Decodes a ListInventoriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInstanceOSPoliciesCompliancesResponse.decode = function decode(reader, length) { + ListInventoriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.instanceOsPoliciesCompliances && message.instanceOsPoliciesCompliances.length)) - message.instanceOsPoliciesCompliances = []; - message.instanceOsPoliciesCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.decode(reader, reader.uint32())); + if (!(message.inventories && message.inventories.length)) + message.inventories = []; + message.inventories.push($root.google.cloud.osconfig.v1alpha.Inventory.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -25733,39 +23420,39 @@ }; /** - * Decodes a ListInstanceOSPoliciesCompliancesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListInventoriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInstanceOSPoliciesCompliancesResponse.decodeDelimited = function decodeDelimited(reader) { + ListInventoriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListInstanceOSPoliciesCompliancesResponse message. + * Verifies a ListInventoriesResponse message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListInstanceOSPoliciesCompliancesResponse.verify = function verify(message) { + ListInventoriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.instanceOsPoliciesCompliances != null && message.hasOwnProperty("instanceOsPoliciesCompliances")) { - if (!Array.isArray(message.instanceOsPoliciesCompliances)) - return "instanceOsPoliciesCompliances: array expected"; - for (var i = 0; i < message.instanceOsPoliciesCompliances.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.verify(message.instanceOsPoliciesCompliances[i]); + if (message.inventories != null && message.hasOwnProperty("inventories")) { + if (!Array.isArray(message.inventories)) + return "inventories: array expected"; + for (var i = 0; i < message.inventories.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.Inventory.verify(message.inventories[i]); if (error) - return "instanceOsPoliciesCompliances." + error; + return "inventories." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -25775,25 +23462,25 @@ }; /** - * Creates a ListInstanceOSPoliciesCompliancesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListInventoriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} ListInstanceOSPoliciesCompliancesResponse + * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse */ - ListInstanceOSPoliciesCompliancesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) + ListInventoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse) return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse(); - if (object.instanceOsPoliciesCompliances) { - if (!Array.isArray(object.instanceOsPoliciesCompliances)) - throw TypeError(".google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.instanceOsPoliciesCompliances: array expected"); - message.instanceOsPoliciesCompliances = []; - for (var i = 0; i < object.instanceOsPoliciesCompliances.length; ++i) { - if (typeof object.instanceOsPoliciesCompliances[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.instanceOsPoliciesCompliances: object expected"); - message.instanceOsPoliciesCompliances[i] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.fromObject(object.instanceOsPoliciesCompliances[i]); + var message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse(); + if (object.inventories) { + if (!Array.isArray(object.inventories)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListInventoriesResponse.inventories: array expected"); + message.inventories = []; + for (var i = 0; i < object.inventories.length; ++i) { + if (typeof object.inventories[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListInventoriesResponse.inventories: object expected"); + message.inventories[i] = $root.google.cloud.osconfig.v1alpha.Inventory.fromObject(object.inventories[i]); } } if (object.nextPageToken != null) @@ -25802,26 +23489,26 @@ }; /** - * Creates a plain object from a ListInstanceOSPoliciesCompliancesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListInventoriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @static - * @param {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} message ListInstanceOSPoliciesCompliancesResponse + * @param {google.cloud.osconfig.v1alpha.ListInventoriesResponse} message ListInventoriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListInstanceOSPoliciesCompliancesResponse.toObject = function toObject(message, options) { + ListInventoriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.instanceOsPoliciesCompliances = []; + object.inventories = []; if (options.defaults) object.nextPageToken = ""; - if (message.instanceOsPoliciesCompliances && message.instanceOsPoliciesCompliances.length) { - object.instanceOsPoliciesCompliances = []; - for (var j = 0; j < message.instanceOsPoliciesCompliances.length; ++j) - object.instanceOsPoliciesCompliances[j] = $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.toObject(message.instanceOsPoliciesCompliances[j], options); + if (message.inventories && message.inventories.length) { + object.inventories = []; + for (var j = 0; j < message.inventories.length; ++j) + object.inventories[j] = $root.google.cloud.osconfig.v1alpha.Inventory.toObject(message.inventories[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -25829,41 +23516,58 @@ }; /** - * Converts this ListInstanceOSPoliciesCompliancesResponse to JSON. + * Converts this ListInventoriesResponse to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse * @instance * @returns {Object.} JSON object */ - ListInstanceOSPoliciesCompliancesResponse.prototype.toJSON = function toJSON() { + ListInventoriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListInstanceOSPoliciesCompliancesResponse; + return ListInventoriesResponse; })(); - v1alpha.Inventory = (function() { + /** + * InventoryView enum. + * @name google.cloud.osconfig.v1alpha.InventoryView + * @enum {number} + * @property {number} INVENTORY_VIEW_UNSPECIFIED=0 INVENTORY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + v1alpha.InventoryView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INVENTORY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + v1alpha.OSPolicy = (function() { /** - * Properties of an Inventory. + * Properties of a OSPolicy. * @memberof google.cloud.osconfig.v1alpha - * @interface IInventory - * @property {string|null} [name] Inventory name - * @property {google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null} [osInfo] Inventory osInfo - * @property {Object.|null} [items] Inventory items - * @property {google.protobuf.ITimestamp|null} [updateTime] Inventory updateTime + * @interface IOSPolicy + * @property {string|null} [id] OSPolicy id + * @property {string|null} [description] OSPolicy description + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Mode|null} [mode] OSPolicy mode + * @property {Array.|null} [resourceGroups] OSPolicy resourceGroups + * @property {boolean|null} [allowNoResourceGroupMatch] OSPolicy allowNoResourceGroupMatch */ /** - * Constructs a new Inventory. + * Constructs a new OSPolicy. * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents an Inventory. - * @implements IInventory + * @classdesc Represents a OSPolicy. + * @implements IOSPolicy * @constructor - * @param {google.cloud.osconfig.v1alpha.IInventory=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IOSPolicy=} [properties] Properties to set */ - function Inventory(properties) { - this.items = {}; + function OSPolicy(properties) { + this.resourceGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25871,136 +23575,130 @@ } /** - * Inventory name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.Inventory + * OSPolicy id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @instance */ - Inventory.prototype.name = ""; + OSPolicy.prototype.id = ""; /** - * Inventory osInfo. - * @member {google.cloud.osconfig.v1alpha.Inventory.IOsInfo|null|undefined} osInfo - * @memberof google.cloud.osconfig.v1alpha.Inventory + * OSPolicy description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @instance */ - Inventory.prototype.osInfo = null; + OSPolicy.prototype.description = ""; /** - * Inventory items. - * @member {Object.} items - * @memberof google.cloud.osconfig.v1alpha.Inventory + * OSPolicy mode. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Mode} mode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @instance */ - Inventory.prototype.items = $util.emptyObject; + OSPolicy.prototype.mode = 0; /** - * Inventory updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.osconfig.v1alpha.Inventory + * OSPolicy resourceGroups. + * @member {Array.} resourceGroups + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @instance */ - Inventory.prototype.updateTime = null; + OSPolicy.prototype.resourceGroups = $util.emptyArray; /** - * Creates a new Inventory instance using the specified properties. + * OSPolicy allowNoResourceGroupMatch. + * @member {boolean} allowNoResourceGroupMatch + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @instance + */ + OSPolicy.prototype.allowNoResourceGroupMatch = false; + + /** + * Creates a new OSPolicy instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @static - * @param {google.cloud.osconfig.v1alpha.IInventory=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory instance + * @param {google.cloud.osconfig.v1alpha.IOSPolicy=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy instance */ - Inventory.create = function create(properties) { - return new Inventory(properties); + OSPolicy.create = function create(properties) { + return new OSPolicy(properties); }; /** - * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. + * Encodes the specified OSPolicy message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @static - * @param {google.cloud.osconfig.v1alpha.IInventory} message Inventory message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IOSPolicy} message OSPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Inventory.encode = function encode(message, writer) { + OSPolicy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.osInfo != null && Object.hasOwnProperty.call(message, "osInfo")) - $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.encode(message.osInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.items != null && Object.hasOwnProperty.call(message, "items")) - for (var keys = Object.keys(message.items), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.osconfig.v1alpha.Inventory.Item.encode(message.items[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mode); + if (message.resourceGroups != null && message.resourceGroups.length) + for (var i = 0; i < message.resourceGroups.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.encode(message.resourceGroups[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.allowNoResourceGroupMatch != null && Object.hasOwnProperty.call(message, "allowNoResourceGroupMatch")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowNoResourceGroupMatch); return writer; }; /** - * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.verify|verify} messages. + * Encodes the specified OSPolicy message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @static - * @param {google.cloud.osconfig.v1alpha.IInventory} message Inventory message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IOSPolicy} message OSPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Inventory.encodeDelimited = function encodeDelimited(message, writer) { + OSPolicy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Inventory message from the specified reader or buffer. + * Decodes a OSPolicy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory + * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Inventory.decode = function decode(reader, length) { + OSPolicy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; case 1: - message.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.decode(reader, reader.uint32()); + message.id = reader.string(); break; case 2: - if (message.items === $util.emptyObject) - message.items = {}; - 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.osconfig.v1alpha.Inventory.Item.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.items[key] = value; + message.description = reader.string(); + break; + case 3: + message.mode = reader.int32(); break; case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.resourceGroups && message.resourceGroups.length)) + message.resourceGroups = []; + message.resourceGroups.push($root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.decode(reader, reader.uint32())); + break; + case 5: + message.allowNoResourceGroupMatch = reader.bool(); break; default: reader.skipType(tag & 7); @@ -26011,166 +23709,174 @@ }; /** - * Decodes an Inventory message from the specified reader or buffer, length delimited. + * Decodes a OSPolicy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory + * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Inventory.decodeDelimited = function decodeDelimited(reader) { + OSPolicy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Inventory message. + * Verifies a OSPolicy message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Inventory.verify = function verify(message) { + OSPolicy.verify = function verify(message) { if (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.osInfo != null && message.hasOwnProperty("osInfo")) { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify(message.osInfo); - if (error) - return "osInfo." + error; - } - if (message.items != null && message.hasOwnProperty("items")) { - if (!$util.isObject(message.items)) - return "items: object expected"; - var key = Object.keys(message.items); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.Item.verify(message.items[key[i]]); + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.resourceGroups != null && message.hasOwnProperty("resourceGroups")) { + if (!Array.isArray(message.resourceGroups)) + return "resourceGroups: array expected"; + for (var i = 0; i < message.resourceGroups.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify(message.resourceGroups[i]); if (error) - return "items." + error; + return "resourceGroups." + error; } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.allowNoResourceGroupMatch != null && message.hasOwnProperty("allowNoResourceGroupMatch")) + if (typeof message.allowNoResourceGroupMatch !== "boolean") + return "allowNoResourceGroupMatch: boolean expected"; return null; }; /** - * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * Creates a OSPolicy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory} Inventory + * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy */ - Inventory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory) + OSPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy) return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory(); - if (object.name != null) - message.name = String(object.name); - if (object.osInfo != null) { - if (typeof object.osInfo !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.osInfo: object expected"); - message.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.fromObject(object.osInfo); + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy(); + if (object.id != null) + message.id = String(object.id); + if (object.description != null) + message.description = String(object.description); + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "VALIDATION": + case 1: + message.mode = 1; + break; + case "ENFORCEMENT": + case 2: + message.mode = 2; + break; } - if (object.items) { - if (typeof object.items !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.items: object expected"); - message.items = {}; - for (var keys = Object.keys(object.items), i = 0; i < keys.length; ++i) { - if (typeof object.items[keys[i]] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.items: object expected"); - message.items[keys[i]] = $root.google.cloud.osconfig.v1alpha.Inventory.Item.fromObject(object.items[keys[i]]); + if (object.resourceGroups) { + if (!Array.isArray(object.resourceGroups)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.resourceGroups: array expected"); + message.resourceGroups = []; + for (var i = 0; i < object.resourceGroups.length; ++i) { + if (typeof object.resourceGroups[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.resourceGroups: object expected"); + message.resourceGroups[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.fromObject(object.resourceGroups[i]); } } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + if (object.allowNoResourceGroupMatch != null) + message.allowNoResourceGroupMatch = Boolean(object.allowNoResourceGroupMatch); return message; }; /** - * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * Creates a plain object from a OSPolicy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @static - * @param {google.cloud.osconfig.v1alpha.Inventory} message Inventory + * @param {google.cloud.osconfig.v1alpha.OSPolicy} message OSPolicy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Inventory.toObject = function toObject(message, options) { + OSPolicy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.items = {}; + if (options.arrays || options.defaults) + object.resourceGroups = []; if (options.defaults) { - object.osInfo = null; - object.name = ""; - object.updateTime = null; + object.id = ""; + object.description = ""; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.allowNoResourceGroupMatch = false; } - if (message.osInfo != null && message.hasOwnProperty("osInfo")) - object.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.toObject(message.osInfo, options); - var keys2; - if (message.items && (keys2 = Object.keys(message.items)).length) { - object.items = {}; - for (var j = 0; j < keys2.length; ++j) - object.items[keys2[j]] = $root.google.cloud.osconfig.v1alpha.Inventory.Item.toObject(message.items[keys2[j]], options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Mode[message.mode] : message.mode; + if (message.resourceGroups && message.resourceGroups.length) { + object.resourceGroups = []; + for (var j = 0; j < message.resourceGroups.length; ++j) + object.resourceGroups[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.toObject(message.resourceGroups[j], options); } - 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.allowNoResourceGroupMatch != null && message.hasOwnProperty("allowNoResourceGroupMatch")) + object.allowNoResourceGroupMatch = message.allowNoResourceGroupMatch; return object; }; /** - * Converts this Inventory to JSON. + * Converts this OSPolicy to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory + * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @instance * @returns {Object.} JSON object */ - Inventory.prototype.toJSON = function toJSON() { + OSPolicy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Inventory.OsInfo = (function() { + OSPolicy.OSFilter = (function() { /** - * Properties of an OsInfo. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @interface IOsInfo - * @property {string|null} [hostname] OsInfo hostname - * @property {string|null} [longName] OsInfo longName - * @property {string|null} [shortName] OsInfo shortName - * @property {string|null} [version] OsInfo version - * @property {string|null} [architecture] OsInfo architecture - * @property {string|null} [kernelVersion] OsInfo kernelVersion - * @property {string|null} [kernelRelease] OsInfo kernelRelease - * @property {string|null} [osconfigAgentVersion] OsInfo osconfigAgentVersion + * Properties of a OSFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @interface IOSFilter + * @property {string|null} [osShortName] OSFilter osShortName + * @property {string|null} [osVersion] OSFilter osVersion */ /** - * Constructs a new OsInfo. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @classdesc Represents an OsInfo. - * @implements IOsInfo + * Constructs a new OSFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @classdesc Represents a OSFilter. + * @implements IOSFilter * @constructor - * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter=} [properties] Properties to set */ - function OsInfo(properties) { + function OSFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26178,166 +23884,88 @@ } /** - * OsInfo hostname. - * @member {string} hostname - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.hostname = ""; - - /** - * OsInfo longName. - * @member {string} longName - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.longName = ""; - - /** - * OsInfo shortName. - * @member {string} shortName - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.shortName = ""; - - /** - * OsInfo version. - * @member {string} version - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.version = ""; - - /** - * OsInfo architecture. - * @member {string} architecture - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.architecture = ""; - - /** - * OsInfo kernelVersion. - * @member {string} kernelVersion - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo - * @instance - */ - OsInfo.prototype.kernelVersion = ""; - - /** - * OsInfo kernelRelease. - * @member {string} kernelRelease - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * OSFilter osShortName. + * @member {string} osShortName + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @instance */ - OsInfo.prototype.kernelRelease = ""; + OSFilter.prototype.osShortName = ""; /** - * OsInfo osconfigAgentVersion. - * @member {string} osconfigAgentVersion - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * OSFilter osVersion. + * @member {string} osVersion + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @instance */ - OsInfo.prototype.osconfigAgentVersion = ""; + OSFilter.prototype.osVersion = ""; /** - * Creates a new OsInfo instance using the specified properties. + * Creates a new OSFilter instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo instance + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter instance */ - OsInfo.create = function create(properties) { - return new OsInfo(properties); + OSFilter.create = function create(properties) { + return new OSFilter(properties); }; /** - * Encodes the specified OsInfo message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * Encodes the specified OSFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter} message OSFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OsInfo.encode = function encode(message, writer) { + OSFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.longName != null && Object.hasOwnProperty.call(message, "longName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.longName); - if (message.shortName != null && Object.hasOwnProperty.call(message, "shortName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shortName); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); - if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.architecture); - if (message.kernelVersion != null && Object.hasOwnProperty.call(message, "kernelVersion")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.kernelVersion); - if (message.kernelRelease != null && Object.hasOwnProperty.call(message, "kernelRelease")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.kernelRelease); - if (message.osconfigAgentVersion != null && Object.hasOwnProperty.call(message, "osconfigAgentVersion")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.osconfigAgentVersion); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.hostname); + if (message.osShortName != null && Object.hasOwnProperty.call(message, "osShortName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osShortName); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osVersion); return writer; }; /** - * Encodes the specified OsInfo message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.OsInfo.verify|verify} messages. + * Encodes the specified OSFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IOsInfo} message OsInfo message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter} message OSFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OsInfo.encodeDelimited = function encodeDelimited(message, writer) { + OSFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OsInfo message from the specified reader or buffer. + * Decodes a OSFilter message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OsInfo.decode = function decode(reader, length) { + OSFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 9: - message.hostname = reader.string(); + case 1: + message.osShortName = reader.string(); break; case 2: - message.longName = reader.string(); - break; - case 3: - message.shortName = reader.string(); - break; - case 4: - message.version = reader.string(); - break; - case 5: - message.architecture = reader.string(); - break; - case 6: - message.kernelVersion = reader.string(); - break; - case 7: - message.kernelRelease = reader.string(); - break; - case 8: - message.osconfigAgentVersion = reader.string(); + message.osVersion = reader.string(); break; default: reader.skipType(tag & 7); @@ -26348,170 +23976,120 @@ }; /** - * Decodes an OsInfo message from the specified reader or buffer, length delimited. + * Decodes a OSFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OsInfo.decodeDelimited = function decodeDelimited(reader) { + OSFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OsInfo message. + * Verifies a OSFilter message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OsInfo.verify = function verify(message) { + OSFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.longName != null && message.hasOwnProperty("longName")) - if (!$util.isString(message.longName)) - return "longName: string expected"; - if (message.shortName != null && message.hasOwnProperty("shortName")) - if (!$util.isString(message.shortName)) - return "shortName: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.architecture != null && message.hasOwnProperty("architecture")) - if (!$util.isString(message.architecture)) - return "architecture: string expected"; - if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) - if (!$util.isString(message.kernelVersion)) - return "kernelVersion: string expected"; - if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) - if (!$util.isString(message.kernelRelease)) - return "kernelRelease: string expected"; - if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) - if (!$util.isString(message.osconfigAgentVersion)) - return "osconfigAgentVersion: string expected"; + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + if (!$util.isString(message.osShortName)) + return "osShortName: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; return null; }; /** - * Creates an OsInfo message from a plain object. Also converts values to their respective internal types. + * Creates a OSFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory.OsInfo} OsInfo + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter */ - OsInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo) + OSFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.longName != null) - message.longName = String(object.longName); - if (object.shortName != null) - message.shortName = String(object.shortName); - if (object.version != null) - message.version = String(object.version); - if (object.architecture != null) - message.architecture = String(object.architecture); - if (object.kernelVersion != null) - message.kernelVersion = String(object.kernelVersion); - if (object.kernelRelease != null) - message.kernelRelease = String(object.kernelRelease); - if (object.osconfigAgentVersion != null) - message.osconfigAgentVersion = String(object.osconfigAgentVersion); + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter(); + if (object.osShortName != null) + message.osShortName = String(object.osShortName); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); return message; }; /** - * Creates a plain object from an OsInfo message. Also converts values to other types if specified. + * Creates a plain object from a OSFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.OsInfo} message OsInfo + * @param {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} message OSFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OsInfo.toObject = function toObject(message, options) { + OSFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.longName = ""; - object.shortName = ""; - object.version = ""; - object.architecture = ""; - object.kernelVersion = ""; - object.kernelRelease = ""; - object.osconfigAgentVersion = ""; - object.hostname = ""; + object.osShortName = ""; + object.osVersion = ""; } - if (message.longName != null && message.hasOwnProperty("longName")) - object.longName = message.longName; - if (message.shortName != null && message.hasOwnProperty("shortName")) - object.shortName = message.shortName; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.architecture != null && message.hasOwnProperty("architecture")) - object.architecture = message.architecture; - if (message.kernelVersion != null && message.hasOwnProperty("kernelVersion")) - object.kernelVersion = message.kernelVersion; - if (message.kernelRelease != null && message.hasOwnProperty("kernelRelease")) - object.kernelRelease = message.kernelRelease; - if (message.osconfigAgentVersion != null && message.hasOwnProperty("osconfigAgentVersion")) - object.osconfigAgentVersion = message.osconfigAgentVersion; - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + object.osShortName = message.osShortName; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; return object; }; /** - * Converts this OsInfo to JSON. + * Converts this OSFilter to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter * @instance * @returns {Object.} JSON object */ - OsInfo.prototype.toJSON = function toJSON() { + OSFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OsInfo; + return OSFilter; })(); - Inventory.Item = (function() { + OSPolicy.Resource = (function() { /** - * Properties of an Item. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @interface IItem - * @property {string|null} [id] Item id - * @property {google.cloud.osconfig.v1alpha.Inventory.Item.OriginType|null} [originType] Item originType - * @property {google.protobuf.ITimestamp|null} [createTime] Item createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Item updateTime - * @property {google.cloud.osconfig.v1alpha.Inventory.Item.Type|null} [type] Item type - * @property {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null} [installedPackage] Item installedPackage - * @property {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null} [availablePackage] Item availablePackage + * Properties of a Resource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @interface IResource + * @property {string|null} [id] Resource id + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null} [pkg] Resource pkg + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null} [repository] Resource repository + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null} [exec] Resource exec + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null} [file] Resource file */ /** - * Constructs a new Item. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @classdesc Represents an Item. - * @implements IItem + * Constructs a new Resource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @classdesc Represents a Resource. + * @implements IResource * @constructor - * @param {google.cloud.osconfig.v1alpha.Inventory.IItem=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResource=} [properties] Properties to set */ - function Item(properties) { + function Resource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26519,144 +24097,124 @@ } /** - * Item id. + * Resource id. * @member {string} id - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item - * @instance - */ - Item.prototype.id = ""; - - /** - * Item originType. - * @member {google.cloud.osconfig.v1alpha.Inventory.Item.OriginType} originType - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item - * @instance - */ - Item.prototype.originType = 0; - - /** - * Item createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @instance */ - Item.prototype.createTime = null; + Resource.prototype.id = ""; /** - * Item updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * Resource pkg. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null|undefined} pkg + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @instance */ - Item.prototype.updateTime = null; + Resource.prototype.pkg = null; /** - * Item type. - * @member {google.cloud.osconfig.v1alpha.Inventory.Item.Type} type - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * Resource repository. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null|undefined} repository + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @instance */ - Item.prototype.type = 0; + Resource.prototype.repository = null; /** - * Item installedPackage. - * @member {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null|undefined} installedPackage - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * Resource exec. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null|undefined} exec + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @instance */ - Item.prototype.installedPackage = null; + Resource.prototype.exec = null; /** - * Item availablePackage. - * @member {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage|null|undefined} availablePackage - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * Resource file. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null|undefined} file + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @instance */ - Item.prototype.availablePackage = null; + Resource.prototype.file = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Item details. - * @member {"installedPackage"|"availablePackage"|undefined} details - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * Resource resourceType. + * @member {"pkg"|"repository"|"exec"|"file"|undefined} resourceType + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @instance */ - Object.defineProperty(Item.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["installedPackage", "availablePackage"]), + Object.defineProperty(Resource.prototype, "resourceType", { + get: $util.oneOfGetter($oneOfFields = ["pkg", "repository", "exec", "file"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Item instance using the specified properties. + * Creates a new Resource instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IItem=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item instance + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource} Resource instance */ - Item.create = function create(properties) { - return new Item(properties); + Resource.create = function create(properties) { + return new Resource(properties); }; /** - * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IItem} message Item message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Item.encode = function encode(message, writer) { + Resource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.originType != null && Object.hasOwnProperty.call(message, "originType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.originType); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.installedPackage != null && Object.hasOwnProperty.call(message, "installedPackage")) - $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.encode(message.installedPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.availablePackage != null && Object.hasOwnProperty.call(message, "availablePackage")) - $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.encode(message.availablePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.pkg != null && Object.hasOwnProperty.call(message, "pkg")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.encode(message.pkg, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.encode(message.repository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.exec != null && Object.hasOwnProperty.call(message, "exec")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.encode(message.exec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.encode(message.file, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.Item.verify|verify} messages. + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IItem} message Item message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Item.encodeDelimited = function encodeDelimited(message, writer) { + Resource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Item message from the specified reader or buffer. + * Decodes a Resource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Item.decode = function decode(reader, length) { + Resource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.Item(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -26664,22 +24222,16 @@ message.id = reader.string(); break; case 2: - message.originType = reader.int32(); + message.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.decode(reader, reader.uint32()); break; - case 8: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 3: + message.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.decode(reader, reader.uint32()); break; - case 9: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 4: + message.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.decode(reader, reader.uint32()); break; case 5: - message.type = reader.int32(); - break; - case 6: - message.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); - break; - case 7: - message.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -26690,4404 +24242,3575 @@ }; /** - * Decodes an Item message from the specified reader or buffer, length delimited. + * Decodes a Resource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Item.decodeDelimited = function decodeDelimited(reader) { + Resource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Item message. + * Verifies a Resource message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Item.verify = function verify(message) { + Resource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isString(message.id)) return "id: string expected"; - if (message.originType != null && message.hasOwnProperty("originType")) - switch (message.originType) { - default: - return "originType: enum value expected"; - case 0: - case 1: - break; + if (message.pkg != null && message.hasOwnProperty("pkg")) { + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify(message.pkg); + if (error) + return "pkg." + error; } - 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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.repository != null && message.hasOwnProperty("repository")) { + if (properties.resourceType === 1) + return "resourceType: multiple values"; + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify(message.repository); + if (error) + return "repository." + error; } - if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { - properties.details = 1; + } + if (message.exec != null && message.hasOwnProperty("exec")) { + if (properties.resourceType === 1) + return "resourceType: multiple values"; + properties.resourceType = 1; { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify(message.installedPackage); + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify(message.exec); if (error) - return "installedPackage." + error; + return "exec." + error; } } - if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; + if (message.file != null && message.hasOwnProperty("file")) { + if (properties.resourceType === 1) + return "resourceType: multiple values"; + properties.resourceType = 1; { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify(message.availablePackage); + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify(message.file); if (error) - return "availablePackage." + error; + return "file." + error; } } return null; }; /** - * Creates an Item message from a plain object. Also converts values to their respective internal types. + * Creates a Resource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory.Item} Item + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource} Resource */ - Item.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.Item) + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource) return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory.Item(); + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource(); if (object.id != null) message.id = String(object.id); - switch (object.originType) { - case "ORIGIN_TYPE_UNSPECIFIED": - case 0: - message.originType = 0; - break; - case "INVENTORY_REPORT": - case 1: - message.originType = 1; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.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.osconfig.v1alpha.Inventory.Item.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.pkg != null) { + if (typeof object.pkg !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.pkg: object expected"); + message.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.fromObject(object.pkg); } - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "INSTALLED_PACKAGE": - case 1: - message.type = 1; - break; - case "AVAILABLE_PACKAGE": - case 2: - message.type = 2; - break; + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.repository: object expected"); + message.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.fromObject(object.repository); } - if (object.installedPackage != null) { - if (typeof object.installedPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.installedPackage: object expected"); - message.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.fromObject(object.installedPackage); + if (object.exec != null) { + if (typeof object.exec !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.exec: object expected"); + message.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.fromObject(object.exec); } - if (object.availablePackage != null) { - if (typeof object.availablePackage !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.Item.availablePackage: object expected"); - message.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.fromObject(object.availablePackage); + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.file: object expected"); + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.fromObject(object.file); } return message; }; /** - * Creates a plain object from an Item message. Also converts values to other types if specified. + * Creates a plain object from a Resource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.Item} message Item + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource} message Resource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Item.toObject = function toObject(message, options) { + Resource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.id = ""; - object.originType = options.enums === String ? "ORIGIN_TYPE_UNSPECIFIED" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.createTime = null; - object.updateTime = null; - } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; - if (message.originType != null && message.hasOwnProperty("originType")) - object.originType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType[message.originType] : message.originType; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.Type[message.type] : message.type; - if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { - object.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.toObject(message.installedPackage, options); + if (message.pkg != null && message.hasOwnProperty("pkg")) { + object.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.toObject(message.pkg, options); if (options.oneofs) - object.details = "installedPackage"; + object.resourceType = "pkg"; } - if (message.availablePackage != null && message.hasOwnProperty("availablePackage")) { - object.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.toObject(message.availablePackage, options); + if (message.repository != null && message.hasOwnProperty("repository")) { + object.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.toObject(message.repository, options); if (options.oneofs) - object.details = "availablePackage"; + object.resourceType = "repository"; + } + if (message.exec != null && message.hasOwnProperty("exec")) { + object.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.toObject(message.exec, options); + if (options.oneofs) + object.resourceType = "exec"; + } + if (message.file != null && message.hasOwnProperty("file")) { + object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.toObject(message.file, options); + if (options.oneofs) + object.resourceType = "file"; } - 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); return object; }; /** - * Converts this Item to JSON. + * Converts this Resource to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource * @instance * @returns {Object.} JSON object */ - Item.prototype.toJSON = function toJSON() { + Resource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * OriginType enum. - * @name google.cloud.osconfig.v1alpha.Inventory.Item.OriginType - * @enum {number} - * @property {number} ORIGIN_TYPE_UNSPECIFIED=0 ORIGIN_TYPE_UNSPECIFIED value - * @property {number} INVENTORY_REPORT=1 INVENTORY_REPORT value - */ - Item.OriginType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ORIGIN_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INVENTORY_REPORT"] = 1; - return values; - })(); - - /** - * Type enum. - * @name google.cloud.osconfig.v1alpha.Inventory.Item.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} INSTALLED_PACKAGE=1 INSTALLED_PACKAGE value - * @property {number} AVAILABLE_PACKAGE=2 AVAILABLE_PACKAGE value - */ - Item.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTALLED_PACKAGE"] = 1; - values[valuesById[2] = "AVAILABLE_PACKAGE"] = 2; - return values; - })(); + Resource.File = (function() { - return Item; - })(); + /** + * Properties of a File. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @interface IFile + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null} [remote] File remote + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null} [gcs] File gcs + * @property {string|null} [localPath] File localPath + * @property {boolean|null} [allowInsecure] File allowInsecure + */ - Inventory.SoftwarePackage = (function() { + /** + * Constructs a new File. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @classdesc Represents a File. + * @implements IFile + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile=} [properties] Properties to set + */ + function File(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a SoftwarePackage. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @interface ISoftwarePackage - * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [yumPackage] SoftwarePackage yumPackage - * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [aptPackage] SoftwarePackage aptPackage - * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [zypperPackage] SoftwarePackage zypperPackage - * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [googetPackage] SoftwarePackage googetPackage - * @property {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null} [zypperPatch] SoftwarePackage zypperPatch - * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null} [wuaPackage] SoftwarePackage wuaPackage - * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null} [qfePackage] SoftwarePackage qfePackage - * @property {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null} [cosPackage] SoftwarePackage cosPackage - * @property {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null} [windowsApplication] SoftwarePackage windowsApplication - */ + /** + * File remote. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null|undefined} remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + File.prototype.remote = null; - /** - * Constructs a new SoftwarePackage. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @classdesc Represents a SoftwarePackage. - * @implements ISoftwarePackage - * @constructor - * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage=} [properties] Properties to set - */ - function SoftwarePackage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * File gcs. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null|undefined} gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + File.prototype.gcs = null; - /** - * SoftwarePackage yumPackage. - * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} yumPackage - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.yumPackage = null; + /** + * File localPath. + * @member {string|null|undefined} localPath + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + File.prototype.localPath = null; - /** - * SoftwarePackage aptPackage. - * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} aptPackage - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.aptPackage = null; + /** + * File allowInsecure. + * @member {boolean} allowInsecure + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + File.prototype.allowInsecure = false; - /** - * SoftwarePackage zypperPackage. - * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} zypperPackage - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.zypperPackage = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * SoftwarePackage googetPackage. - * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} googetPackage - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.googetPackage = null; + /** + * File type. + * @member {"remote"|"gcs"|"localPath"|undefined} type + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + */ + Object.defineProperty(File.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["remote", "gcs", "localPath"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * SoftwarePackage zypperPatch. - * @member {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch|null|undefined} zypperPatch - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.zypperPatch = null; + /** + * Creates a new File instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File instance + */ + File.create = function create(properties) { + return new File(properties); + }; - /** - * SoftwarePackage wuaPackage. - * @member {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage|null|undefined} wuaPackage - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.wuaPackage = null; + /** + * Encodes the specified File message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.remote != null && Object.hasOwnProperty.call(message, "remote")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.encode(message.remote, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gcs != null && Object.hasOwnProperty.call(message, "gcs")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.encode(message.gcs, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.localPath); + if (message.allowInsecure != null && Object.hasOwnProperty.call(message, "allowInsecure")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowInsecure); + return writer; + }; - /** - * SoftwarePackage qfePackage. - * @member {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage|null|undefined} qfePackage - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.qfePackage = null; + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * SoftwarePackage cosPackage. - * @member {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage|null|undefined} cosPackage - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.cosPackage = null; + /** + * Decodes a File message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.decode(reader, reader.uint32()); + break; + case 2: + message.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.decode(reader, reader.uint32()); + break; + case 3: + message.localPath = reader.string(); + break; + case 4: + message.allowInsecure = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * SoftwarePackage windowsApplication. - * @member {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication|null|undefined} windowsApplication - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - SoftwarePackage.prototype.windowsApplication = null; + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Verifies a File message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + File.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.remote != null && message.hasOwnProperty("remote")) { + properties.type = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify(message.remote); + if (error) + return "remote." + error; + } + } + if (message.gcs != null && message.hasOwnProperty("gcs")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify(message.gcs); + if (error) + return "gcs." + error; + } + } + if (message.localPath != null && message.hasOwnProperty("localPath")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + if (!$util.isString(message.localPath)) + return "localPath: string expected"; + } + if (message.allowInsecure != null && message.hasOwnProperty("allowInsecure")) + if (typeof message.allowInsecure !== "boolean") + return "allowInsecure: boolean expected"; + return null; + }; - /** - * SoftwarePackage details. - * @member {"yumPackage"|"aptPackage"|"zypperPackage"|"googetPackage"|"zypperPatch"|"wuaPackage"|"qfePackage"|"cosPackage"|"windowsApplication"|undefined} details - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - */ - Object.defineProperty(SoftwarePackage.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["yumPackage", "aptPackage", "zypperPackage", "googetPackage", "zypperPatch", "wuaPackage", "qfePackage", "cosPackage", "windowsApplication"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File + */ + File.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File(); + if (object.remote != null) { + if (typeof object.remote !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.remote: object expected"); + message.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.fromObject(object.remote); + } + if (object.gcs != null) { + if (typeof object.gcs !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.gcs: object expected"); + message.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.fromObject(object.gcs); + } + if (object.localPath != null) + message.localPath = String(object.localPath); + if (object.allowInsecure != null) + message.allowInsecure = Boolean(object.allowInsecure); + return message; + }; - /** - * Creates a new SoftwarePackage instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage instance - */ - SoftwarePackage.create = function create(properties) { - return new SoftwarePackage(properties); - }; + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} message File + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + File.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.allowInsecure = false; + if (message.remote != null && message.hasOwnProperty("remote")) { + object.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.toObject(message.remote, options); + if (options.oneofs) + object.type = "remote"; + } + if (message.gcs != null && message.hasOwnProperty("gcs")) { + object.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.toObject(message.gcs, options); + if (options.oneofs) + object.type = "gcs"; + } + if (message.localPath != null && message.hasOwnProperty("localPath")) { + object.localPath = message.localPath; + if (options.oneofs) + object.type = "localPath"; + } + if (message.allowInsecure != null && message.hasOwnProperty("allowInsecure")) + object.allowInsecure = message.allowInsecure; + return object; + }; - /** - * Encodes the specified SoftwarePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwarePackage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.yumPackage != null && Object.hasOwnProperty.call(message, "yumPackage")) - $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.yumPackage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.aptPackage != null && Object.hasOwnProperty.call(message, "aptPackage")) - $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.aptPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.zypperPackage != null && Object.hasOwnProperty.call(message, "zypperPackage")) - $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.zypperPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.googetPackage != null && Object.hasOwnProperty.call(message, "googetPackage")) - $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.googetPackage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.zypperPatch != null && Object.hasOwnProperty.call(message, "zypperPatch")) - $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.encode(message.zypperPatch, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.wuaPackage != null && Object.hasOwnProperty.call(message, "wuaPackage")) - $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.encode(message.wuaPackage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.qfePackage != null && Object.hasOwnProperty.call(message, "qfePackage")) - $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.encode(message.qfePackage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.cosPackage != null && Object.hasOwnProperty.call(message, "cosPackage")) - $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.encode(message.cosPackage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.windowsApplication != null && Object.hasOwnProperty.call(message, "windowsApplication")) - $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.encode(message.windowsApplication, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; + /** + * Converts this File to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @instance + * @returns {Object.} JSON object + */ + File.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified SoftwarePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.ISoftwarePackage} message SoftwarePackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwarePackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + File.Remote = (function() { - /** - * Decodes a SoftwarePackage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwarePackage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 2: - message.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 3: - message.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 4: - message.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 5: - message.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.decode(reader, reader.uint32()); - break; - case 6: - message.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); - break; - case 7: - message.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); - break; - case 8: - message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 9: - message.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Properties of a Remote. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @interface IRemote + * @property {string|null} [uri] Remote uri + * @property {string|null} [sha256Checksum] Remote sha256Checksum + */ + + /** + * Constructs a new Remote. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @classdesc Represents a Remote. + * @implements IRemote + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote=} [properties] Properties to set + */ + function Remote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes a SoftwarePackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwarePackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Remote uri. + * @member {string} uri + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @instance + */ + Remote.prototype.uri = ""; - /** - * Verifies a SoftwarePackage message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SoftwarePackage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.yumPackage); - if (error) - return "yumPackage." + error; - } - } - if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.aptPackage); - if (error) - return "aptPackage." + error; - } - } - if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.zypperPackage); - if (error) - return "zypperPackage." + error; - } - } - if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.googetPackage); - if (error) - return "googetPackage." + error; - } - } - if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify(message.zypperPatch); - if (error) - return "zypperPatch." + error; - } - } - if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify(message.wuaPackage); - if (error) - return "wuaPackage." + error; - } - } - if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify(message.qfePackage); - if (error) - return "qfePackage." + error; - } - } - if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify(message.cosPackage); - if (error) - return "cosPackage." + error; - } - } - if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify(message.windowsApplication); - if (error) - return "windowsApplication." + error; - } - } - return null; - }; + /** + * Remote sha256Checksum. + * @member {string} sha256Checksum + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @instance + */ + Remote.prototype.sha256Checksum = ""; - /** - * Creates a SoftwarePackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} SoftwarePackage - */ - SoftwarePackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage(); - if (object.yumPackage != null) { - if (typeof object.yumPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.yumPackage: object expected"); - message.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.yumPackage); - } - if (object.aptPackage != null) { - if (typeof object.aptPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.aptPackage: object expected"); - message.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.aptPackage); - } - if (object.zypperPackage != null) { - if (typeof object.zypperPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.zypperPackage: object expected"); - message.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.zypperPackage); - } - if (object.googetPackage != null) { - if (typeof object.googetPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.googetPackage: object expected"); - message.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.googetPackage); - } - if (object.zypperPatch != null) { - if (typeof object.zypperPatch !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.zypperPatch: object expected"); - message.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.fromObject(object.zypperPatch); - } - if (object.wuaPackage != null) { - if (typeof object.wuaPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.wuaPackage: object expected"); - message.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.fromObject(object.wuaPackage); - } - if (object.qfePackage != null) { - if (typeof object.qfePackage !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.qfePackage: object expected"); - message.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.fromObject(object.qfePackage); - } - if (object.cosPackage != null) { - if (typeof object.cosPackage !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.cosPackage: object expected"); - message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.fromObject(object.cosPackage); - } - if (object.windowsApplication != null) { - if (typeof object.windowsApplication !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.windowsApplication: object expected"); - message.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.fromObject(object.windowsApplication); - } - return message; - }; + /** + * Creates a new Remote instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote instance + */ + Remote.create = function create(properties) { + return new Remote(properties); + }; - /** - * Creates a plain object from a SoftwarePackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} message SoftwarePackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SoftwarePackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.yumPackage != null && message.hasOwnProperty("yumPackage")) { - object.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.yumPackage, options); - if (options.oneofs) - object.details = "yumPackage"; - } - if (message.aptPackage != null && message.hasOwnProperty("aptPackage")) { - object.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.aptPackage, options); - if (options.oneofs) - object.details = "aptPackage"; - } - if (message.zypperPackage != null && message.hasOwnProperty("zypperPackage")) { - object.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.zypperPackage, options); - if (options.oneofs) - object.details = "zypperPackage"; - } - if (message.googetPackage != null && message.hasOwnProperty("googetPackage")) { - object.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.googetPackage, options); - if (options.oneofs) - object.details = "googetPackage"; - } - if (message.zypperPatch != null && message.hasOwnProperty("zypperPatch")) { - object.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.toObject(message.zypperPatch, options); - if (options.oneofs) - object.details = "zypperPatch"; - } - if (message.wuaPackage != null && message.hasOwnProperty("wuaPackage")) { - object.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.toObject(message.wuaPackage, options); - if (options.oneofs) - object.details = "wuaPackage"; - } - if (message.qfePackage != null && message.hasOwnProperty("qfePackage")) { - object.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.toObject(message.qfePackage, options); - if (options.oneofs) - object.details = "qfePackage"; - } - if (message.cosPackage != null && message.hasOwnProperty("cosPackage")) { - object.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.toObject(message.cosPackage, options); - if (options.oneofs) - object.details = "cosPackage"; - } - if (message.windowsApplication != null && message.hasOwnProperty("windowsApplication")) { - object.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.toObject(message.windowsApplication, options); - if (options.oneofs) - object.details = "windowsApplication"; - } - return object; - }; + /** + * Encodes the specified Remote message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote} message Remote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Remote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.sha256Checksum != null && Object.hasOwnProperty.call(message, "sha256Checksum")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sha256Checksum); + return writer; + }; - /** - * Converts this SoftwarePackage to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage - * @instance - * @returns {Object.} JSON object - */ - SoftwarePackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified Remote message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote} message Remote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Remote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return SoftwarePackage; - })(); + /** + * Decodes a Remote message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Remote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + message.sha256Checksum = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - Inventory.VersionedPackage = (function() { + /** + * Decodes a Remote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Remote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a VersionedPackage. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @interface IVersionedPackage - * @property {string|null} [packageName] VersionedPackage packageName - * @property {string|null} [architecture] VersionedPackage architecture - * @property {string|null} [version] VersionedPackage version - */ + /** + * Verifies a Remote message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Remote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.sha256Checksum != null && message.hasOwnProperty("sha256Checksum")) + if (!$util.isString(message.sha256Checksum)) + return "sha256Checksum: string expected"; + return null; + }; - /** - * Constructs a new VersionedPackage. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @classdesc Represents a VersionedPackage. - * @implements IVersionedPackage - * @constructor - * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage=} [properties] Properties to set - */ - function VersionedPackage(properties) { - if (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 Remote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote + */ + Remote.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.sha256Checksum != null) + message.sha256Checksum = String(object.sha256Checksum); + return message; + }; - /** - * VersionedPackage packageName. - * @member {string} packageName - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @instance - */ - VersionedPackage.prototype.packageName = ""; + /** + * Creates a plain object from a Remote message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} message Remote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Remote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.sha256Checksum = ""; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.sha256Checksum != null && message.hasOwnProperty("sha256Checksum")) + object.sha256Checksum = message.sha256Checksum; + return object; + }; - /** - * VersionedPackage architecture. - * @member {string} architecture - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @instance - */ - VersionedPackage.prototype.architecture = ""; + /** + * Converts this Remote to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @instance + * @returns {Object.} JSON object + */ + Remote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * VersionedPackage version. - * @member {string} version - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @instance - */ - VersionedPackage.prototype.version = ""; + return Remote; + })(); - /** - * Creates a new VersionedPackage instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage instance - */ - VersionedPackage.create = function create(properties) { - return new VersionedPackage(properties); - }; + File.Gcs = (function() { - /** - * Encodes the specified VersionedPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionedPackage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.architecture); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); - if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageName); - return writer; - }; + /** + * Properties of a Gcs. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @interface IGcs + * @property {string|null} [bucket] Gcs bucket + * @property {string|null} [object] Gcs object + * @property {number|Long|null} [generation] Gcs generation + */ - /** - * Encodes the specified VersionedPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IVersionedPackage} message VersionedPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionedPackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new Gcs. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @classdesc Represents a Gcs. + * @implements IGcs + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs=} [properties] Properties to set + */ + function Gcs(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a VersionedPackage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionedPackage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.packageName = reader.string(); - break; - case 2: - message.architecture = reader.string(); - break; - case 3: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VersionedPackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionedPackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Gcs bucket. + * @member {string} bucket + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @instance + */ + Gcs.prototype.bucket = ""; - /** - * Verifies a VersionedPackage message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VersionedPackage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packageName != null && message.hasOwnProperty("packageName")) - if (!$util.isString(message.packageName)) - return "packageName: string expected"; - if (message.architecture != null && message.hasOwnProperty("architecture")) - if (!$util.isString(message.architecture)) - return "architecture: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; + /** + * Gcs object. + * @member {string} object + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @instance + */ + Gcs.prototype.object = ""; - /** - * Creates a VersionedPackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} VersionedPackage - */ - VersionedPackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage(); - if (object.packageName != null) - message.packageName = String(object.packageName); - if (object.architecture != null) - message.architecture = String(object.architecture); - if (object.version != null) - message.version = String(object.version); - return message; - }; + /** + * Gcs generation. + * @member {number|Long} generation + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @instance + */ + Gcs.prototype.generation = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a plain object from a VersionedPackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} message VersionedPackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VersionedPackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.architecture = ""; - object.version = ""; - object.packageName = ""; - } - if (message.architecture != null && message.hasOwnProperty("architecture")) - object.architecture = message.architecture; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.packageName != null && message.hasOwnProperty("packageName")) - object.packageName = message.packageName; - return object; - }; + /** + * Creates a new Gcs instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs instance + */ + Gcs.create = function create(properties) { + return new Gcs(properties); + }; - /** - * Converts this VersionedPackage to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage - * @instance - * @returns {Object.} JSON object - */ - VersionedPackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified Gcs message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs} message Gcs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gcs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.object != null && Object.hasOwnProperty.call(message, "object")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); + if (message.generation != null && Object.hasOwnProperty.call(message, "generation")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generation); + return writer; + }; - return VersionedPackage; - })(); + /** + * Encodes the specified Gcs message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs} message Gcs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gcs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - Inventory.ZypperPatch = (function() { + /** + * Decodes a Gcs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gcs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bucket = reader.string(); + break; + case 2: + message.object = reader.string(); + break; + case 3: + message.generation = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a ZypperPatch. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @interface IZypperPatch - * @property {string|null} [patchName] ZypperPatch patchName - * @property {string|null} [category] ZypperPatch category - * @property {string|null} [severity] ZypperPatch severity - * @property {string|null} [summary] ZypperPatch summary - */ + /** + * Decodes a Gcs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gcs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new ZypperPatch. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @classdesc Represents a ZypperPatch. - * @implements IZypperPatch - * @constructor - * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch=} [properties] Properties to set - */ - function ZypperPatch(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a Gcs message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Gcs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.object != null && message.hasOwnProperty("object")) + if (!$util.isString(message.object)) + return "object: string expected"; + if (message.generation != null && message.hasOwnProperty("generation")) + if (!$util.isInteger(message.generation) && !(message.generation && $util.isInteger(message.generation.low) && $util.isInteger(message.generation.high))) + return "generation: integer|Long expected"; + return null; + }; - /** - * ZypperPatch patchName. - * @member {string} patchName - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @instance - */ - ZypperPatch.prototype.patchName = ""; + /** + * Creates a Gcs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs + */ + Gcs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.object != null) + message.object = String(object.object); + if (object.generation != null) + if ($util.Long) + (message.generation = $util.Long.fromValue(object.generation)).unsigned = false; + else if (typeof object.generation === "string") + message.generation = parseInt(object.generation, 10); + else if (typeof object.generation === "number") + message.generation = object.generation; + else if (typeof object.generation === "object") + message.generation = new $util.LongBits(object.generation.low >>> 0, object.generation.high >>> 0).toNumber(); + return message; + }; - /** - * ZypperPatch category. - * @member {string} category - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @instance - */ - ZypperPatch.prototype.category = ""; + /** + * Creates a plain object from a Gcs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} message Gcs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Gcs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.object = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.generation = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.generation = options.longs === String ? "0" : 0; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.object != null && message.hasOwnProperty("object")) + object.object = message.object; + if (message.generation != null && message.hasOwnProperty("generation")) + if (typeof message.generation === "number") + object.generation = options.longs === String ? String(message.generation) : message.generation; + else + object.generation = options.longs === String ? $util.Long.prototype.toString.call(message.generation) : options.longs === Number ? new $util.LongBits(message.generation.low >>> 0, message.generation.high >>> 0).toNumber() : message.generation; + return object; + }; - /** - * ZypperPatch severity. - * @member {string} severity - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @instance - */ - ZypperPatch.prototype.severity = ""; + /** + * Converts this Gcs to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @instance + * @returns {Object.} JSON object + */ + Gcs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ZypperPatch summary. - * @member {string} summary - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @instance - */ - ZypperPatch.prototype.summary = ""; + return Gcs; + })(); - /** - * Creates a new ZypperPatch instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch instance - */ - ZypperPatch.create = function create(properties) { - return new ZypperPatch(properties); - }; + return File; + })(); - /** - * Encodes the specified ZypperPatch message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ZypperPatch.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.category); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.severity); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.summary); - if (message.patchName != null && Object.hasOwnProperty.call(message, "patchName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.patchName); - return writer; - }; + Resource.PackageResource = (function() { - /** - * Encodes the specified ZypperPatch message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IZypperPatch} message ZypperPatch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ZypperPatch.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a PackageResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @interface IPackageResource + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|null} [desiredState] PackageResource desiredState + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null} [apt] PackageResource apt + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null} [deb] PackageResource deb + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null} [yum] PackageResource yum + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null} [zypper] PackageResource zypper + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null} [rpm] PackageResource rpm + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null} [googet] PackageResource googet + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null} [msi] PackageResource msi + */ - /** - * Decodes a ZypperPatch message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ZypperPatch.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: - message.patchName = reader.string(); - break; - case 2: - message.category = reader.string(); - break; - case 3: - message.severity = reader.string(); - break; - case 4: - message.summary = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new PackageResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @classdesc Represents a PackageResource. + * @implements IPackageResource + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource=} [properties] Properties to set + */ + function PackageResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes a ZypperPatch message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ZypperPatch.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * PackageResource desiredState. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState} desiredState + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.desiredState = 0; - /** - * Verifies a ZypperPatch message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ZypperPatch.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.patchName != null && message.hasOwnProperty("patchName")) - if (!$util.isString(message.patchName)) - return "patchName: string expected"; - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - if (message.severity != null && message.hasOwnProperty("severity")) - if (!$util.isString(message.severity)) - return "severity: string expected"; - if (message.summary != null && message.hasOwnProperty("summary")) - if (!$util.isString(message.summary)) - return "summary: string expected"; - return null; - }; + /** + * PackageResource apt. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null|undefined} apt + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.apt = null; - /** - * Creates a ZypperPatch message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} ZypperPatch - */ - ZypperPatch.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch(); - if (object.patchName != null) - message.patchName = String(object.patchName); - if (object.category != null) - message.category = String(object.category); - if (object.severity != null) - message.severity = String(object.severity); - if (object.summary != null) - message.summary = String(object.summary); - return message; - }; + /** + * PackageResource deb. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null|undefined} deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.deb = null; - /** - * Creates a plain object from a ZypperPatch message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} message ZypperPatch - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ZypperPatch.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.category = ""; - object.severity = ""; - object.summary = ""; - object.patchName = ""; - } - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = message.severity; - if (message.summary != null && message.hasOwnProperty("summary")) - object.summary = message.summary; - if (message.patchName != null && message.hasOwnProperty("patchName")) - object.patchName = message.patchName; - return object; - }; + /** + * PackageResource yum. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null|undefined} yum + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.yum = null; - /** - * Converts this ZypperPatch to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch - * @instance - * @returns {Object.} JSON object - */ - ZypperPatch.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * PackageResource zypper. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null|undefined} zypper + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.zypper = null; - return ZypperPatch; - })(); + /** + * PackageResource rpm. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null|undefined} rpm + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.rpm = null; - Inventory.WindowsUpdatePackage = (function() { + /** + * PackageResource googet. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null|undefined} googet + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.googet = null; - /** - * Properties of a WindowsUpdatePackage. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @interface IWindowsUpdatePackage - * @property {string|null} [title] WindowsUpdatePackage title - * @property {string|null} [description] WindowsUpdatePackage description - * @property {Array.|null} [categories] WindowsUpdatePackage categories - * @property {Array.|null} [kbArticleIds] WindowsUpdatePackage kbArticleIds - * @property {string|null} [supportUrl] WindowsUpdatePackage supportUrl - * @property {Array.|null} [moreInfoUrls] WindowsUpdatePackage moreInfoUrls - * @property {string|null} [updateId] WindowsUpdatePackage updateId - * @property {number|null} [revisionNumber] WindowsUpdatePackage revisionNumber - * @property {google.protobuf.ITimestamp|null} [lastDeploymentChangeTime] WindowsUpdatePackage lastDeploymentChangeTime - */ + /** + * PackageResource msi. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null|undefined} msi + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.msi = null; - /** - * Constructs a new WindowsUpdatePackage. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @classdesc Represents a WindowsUpdatePackage. - * @implements IWindowsUpdatePackage - * @constructor - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage=} [properties] Properties to set - */ - function WindowsUpdatePackage(properties) { - this.categories = []; - this.kbArticleIds = []; - this.moreInfoUrls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * WindowsUpdatePackage title. - * @member {string} title - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.title = ""; + /** + * PackageResource systemPackage. + * @member {"apt"|"deb"|"yum"|"zypper"|"rpm"|"googet"|"msi"|undefined} systemPackage + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @instance + */ + Object.defineProperty(PackageResource.prototype, "systemPackage", { + get: $util.oneOfGetter($oneOfFields = ["apt", "deb", "yum", "zypper", "rpm", "googet", "msi"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * WindowsUpdatePackage description. - * @member {string} description - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.description = ""; + /** + * Creates a new PackageResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource instance + */ + PackageResource.create = function create(properties) { + return new PackageResource(properties); + }; - /** - * WindowsUpdatePackage categories. - * @member {Array.} categories - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.categories = $util.emptyArray; + /** + * Encodes the specified PackageResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource} message PackageResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.desiredState != null && Object.hasOwnProperty.call(message, "desiredState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.desiredState); + if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.encode(message.apt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.deb != null && Object.hasOwnProperty.call(message, "deb")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.encode(message.deb, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.encode(message.yum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.encode(message.zypper, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.rpm != null && Object.hasOwnProperty.call(message, "rpm")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.encode(message.rpm, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.googet != null && Object.hasOwnProperty.call(message, "googet")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.encode(message.googet, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.msi != null && Object.hasOwnProperty.call(message, "msi")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.encode(message.msi, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; - /** - * WindowsUpdatePackage kbArticleIds. - * @member {Array.} kbArticleIds - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.kbArticleIds = $util.emptyArray; + /** + * Encodes the specified PackageResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource} message PackageResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * WindowsUpdatePackage supportUrl. - * @member {string} supportUrl - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.supportUrl = ""; + /** + * Decodes a PackageResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.desiredState = reader.int32(); + break; + case 2: + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.decode(reader, reader.uint32()); + break; + case 3: + message.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.decode(reader, reader.uint32()); + break; + case 4: + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.decode(reader, reader.uint32()); + break; + case 5: + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.decode(reader, reader.uint32()); + break; + case 6: + message.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.decode(reader, reader.uint32()); + break; + case 7: + message.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.decode(reader, reader.uint32()); + break; + case 8: + message.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * WindowsUpdatePackage moreInfoUrls. - * @member {Array.} moreInfoUrls - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.moreInfoUrls = $util.emptyArray; + /** + * Decodes a PackageResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * WindowsUpdatePackage updateId. - * @member {string} updateId - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.updateId = ""; + /** + * Verifies a PackageResource message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PackageResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.desiredState != null && message.hasOwnProperty("desiredState")) + switch (message.desiredState) { + default: + return "desiredState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.apt != null && message.hasOwnProperty("apt")) { + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify(message.apt); + if (error) + return "apt." + error; + } + } + if (message.deb != null && message.hasOwnProperty("deb")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify(message.deb); + if (error) + return "deb." + error; + } + } + if (message.yum != null && message.hasOwnProperty("yum")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify(message.yum); + if (error) + return "yum." + error; + } + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify(message.zypper); + if (error) + return "zypper." + error; + } + } + if (message.rpm != null && message.hasOwnProperty("rpm")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify(message.rpm); + if (error) + return "rpm." + error; + } + } + if (message.googet != null && message.hasOwnProperty("googet")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify(message.googet); + if (error) + return "googet." + error; + } + } + if (message.msi != null && message.hasOwnProperty("msi")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify(message.msi); + if (error) + return "msi." + error; + } + } + return null; + }; - /** - * WindowsUpdatePackage revisionNumber. - * @member {number} revisionNumber - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.revisionNumber = 0; + /** + * Creates a PackageResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource + */ + PackageResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource(); + switch (object.desiredState) { + case "DESIRED_STATE_UNSPECIFIED": + case 0: + message.desiredState = 0; + break; + case "INSTALLED": + case 1: + message.desiredState = 1; + break; + case "REMOVED": + case 2: + message.desiredState = 2; + break; + } + if (object.apt != null) { + if (typeof object.apt !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.apt: object expected"); + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.fromObject(object.apt); + } + if (object.deb != null) { + if (typeof object.deb !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.deb: object expected"); + message.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.fromObject(object.deb); + } + if (object.yum != null) { + if (typeof object.yum !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.yum: object expected"); + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.fromObject(object.yum); + } + if (object.zypper != null) { + if (typeof object.zypper !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.zypper: object expected"); + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.fromObject(object.zypper); + } + if (object.rpm != null) { + if (typeof object.rpm !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.rpm: object expected"); + message.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.fromObject(object.rpm); + } + if (object.googet != null) { + if (typeof object.googet !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.googet: object expected"); + message.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.fromObject(object.googet); + } + if (object.msi != null) { + if (typeof object.msi !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.msi: object expected"); + message.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.fromObject(object.msi); + } + return message; + }; - /** - * WindowsUpdatePackage lastDeploymentChangeTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastDeploymentChangeTime - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - */ - WindowsUpdatePackage.prototype.lastDeploymentChangeTime = null; - - /** - * Creates a new WindowsUpdatePackage instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage instance - */ - WindowsUpdatePackage.create = function create(properties) { - return new WindowsUpdatePackage(properties); - }; - - /** - * Encodes the specified WindowsUpdatePackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdatePackage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.categories != null && message.categories.length) - for (var i = 0; i < message.categories.length; ++i) - $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.encode(message.categories[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.kbArticleIds != null && message.kbArticleIds.length) - for (var i = 0; i < message.kbArticleIds.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kbArticleIds[i]); - if (message.moreInfoUrls != null && message.moreInfoUrls.length) - for (var i = 0; i < message.moreInfoUrls.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.moreInfoUrls[i]); - if (message.updateId != null && Object.hasOwnProperty.call(message, "updateId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.updateId); - if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.revisionNumber); - if (message.lastDeploymentChangeTime != null && Object.hasOwnProperty.call(message, "lastDeploymentChangeTime")) - $root.google.protobuf.Timestamp.encode(message.lastDeploymentChangeTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.supportUrl != null && Object.hasOwnProperty.call(message, "supportUrl")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.supportUrl); - return writer; - }; - - /** - * Encodes the specified WindowsUpdatePackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsUpdatePackage} message WindowsUpdatePackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdatePackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WindowsUpdatePackage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdatePackage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.kbArticleIds && message.kbArticleIds.length)) - message.kbArticleIds = []; - message.kbArticleIds.push(reader.string()); - break; - case 11: - message.supportUrl = reader.string(); - break; - case 5: - if (!(message.moreInfoUrls && message.moreInfoUrls.length)) - message.moreInfoUrls = []; - message.moreInfoUrls.push(reader.string()); - break; - case 6: - message.updateId = reader.string(); - break; - case 7: - message.revisionNumber = reader.int32(); - break; - case 10: - message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a plain object from a PackageResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} message PackageResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PackageResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desiredState = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; + if (message.desiredState != null && message.hasOwnProperty("desiredState")) + object.desiredState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] : message.desiredState; + if (message.apt != null && message.hasOwnProperty("apt")) { + object.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.toObject(message.apt, options); + if (options.oneofs) + object.systemPackage = "apt"; } - } - return message; - }; - - /** - * Decodes a WindowsUpdatePackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdatePackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WindowsUpdatePackage message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsUpdatePackage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) - return "categories: array expected"; - for (var i = 0; i < message.categories.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify(message.categories[i]); - if (error) - return "categories." + error; + if (message.deb != null && message.hasOwnProperty("deb")) { + object.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.toObject(message.deb, options); + if (options.oneofs) + object.systemPackage = "deb"; } - } - if (message.kbArticleIds != null && message.hasOwnProperty("kbArticleIds")) { - if (!Array.isArray(message.kbArticleIds)) - return "kbArticleIds: array expected"; - for (var i = 0; i < message.kbArticleIds.length; ++i) - if (!$util.isString(message.kbArticleIds[i])) - return "kbArticleIds: string[] expected"; - } - if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) - if (!$util.isString(message.supportUrl)) - return "supportUrl: string expected"; - if (message.moreInfoUrls != null && message.hasOwnProperty("moreInfoUrls")) { - if (!Array.isArray(message.moreInfoUrls)) - return "moreInfoUrls: array expected"; - for (var i = 0; i < message.moreInfoUrls.length; ++i) - if (!$util.isString(message.moreInfoUrls[i])) - return "moreInfoUrls: string[] expected"; - } - if (message.updateId != null && message.hasOwnProperty("updateId")) - if (!$util.isString(message.updateId)) - return "updateId: string expected"; - if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) - if (!$util.isInteger(message.revisionNumber)) - return "revisionNumber: integer expected"; - if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastDeploymentChangeTime); - if (error) - return "lastDeploymentChangeTime." + error; - } - return null; - }; - - /** - * Creates a WindowsUpdatePackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} WindowsUpdatePackage - */ - WindowsUpdatePackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.categories: array expected"); - message.categories = []; - for (var i = 0; i < object.categories.length; ++i) { - if (typeof object.categories[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.categories: object expected"); - message.categories[i] = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.fromObject(object.categories[i]); + if (message.yum != null && message.hasOwnProperty("yum")) { + object.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.toObject(message.yum, options); + if (options.oneofs) + object.systemPackage = "yum"; } - } - if (object.kbArticleIds) { - if (!Array.isArray(object.kbArticleIds)) - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.kbArticleIds: array expected"); - message.kbArticleIds = []; - for (var i = 0; i < object.kbArticleIds.length; ++i) - message.kbArticleIds[i] = String(object.kbArticleIds[i]); - } - if (object.supportUrl != null) - message.supportUrl = String(object.supportUrl); - if (object.moreInfoUrls) { - if (!Array.isArray(object.moreInfoUrls)) - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.moreInfoUrls: array expected"); - message.moreInfoUrls = []; - for (var i = 0; i < object.moreInfoUrls.length; ++i) - message.moreInfoUrls[i] = String(object.moreInfoUrls[i]); - } - if (object.updateId != null) - message.updateId = String(object.updateId); - if (object.revisionNumber != null) - message.revisionNumber = object.revisionNumber | 0; - if (object.lastDeploymentChangeTime != null) { - if (typeof object.lastDeploymentChangeTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.lastDeploymentChangeTime: object expected"); - message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.fromObject(object.lastDeploymentChangeTime); - } - return message; - }; - - /** - * Creates a plain object from a WindowsUpdatePackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} message WindowsUpdatePackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsUpdatePackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.categories = []; - object.kbArticleIds = []; - object.moreInfoUrls = []; - } - if (options.defaults) { - object.title = ""; - object.description = ""; - object.updateId = ""; - object.revisionNumber = 0; - object.lastDeploymentChangeTime = null; - object.supportUrl = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.categories && message.categories.length) { - object.categories = []; - for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.toObject(message.categories[j], options); - } - if (message.kbArticleIds && message.kbArticleIds.length) { - object.kbArticleIds = []; - for (var j = 0; j < message.kbArticleIds.length; ++j) - object.kbArticleIds[j] = message.kbArticleIds[j]; - } - if (message.moreInfoUrls && message.moreInfoUrls.length) { - object.moreInfoUrls = []; - for (var j = 0; j < message.moreInfoUrls.length; ++j) - object.moreInfoUrls[j] = message.moreInfoUrls[j]; - } - if (message.updateId != null && message.hasOwnProperty("updateId")) - object.updateId = message.updateId; - if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) - object.revisionNumber = message.revisionNumber; - if (message.lastDeploymentChangeTime != null && message.hasOwnProperty("lastDeploymentChangeTime")) - object.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.toObject(message.lastDeploymentChangeTime, options); - if (message.supportUrl != null && message.hasOwnProperty("supportUrl")) - object.supportUrl = message.supportUrl; - return object; - }; - - /** - * Converts this WindowsUpdatePackage to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @instance - * @returns {Object.} JSON object - */ - WindowsUpdatePackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - WindowsUpdatePackage.WindowsUpdateCategory = (function() { - - /** - * Properties of a WindowsUpdateCategory. - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @interface IWindowsUpdateCategory - * @property {string|null} [id] WindowsUpdateCategory id - * @property {string|null} [name] WindowsUpdateCategory name - */ - - /** - * Constructs a new WindowsUpdateCategory. - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage - * @classdesc Represents a WindowsUpdateCategory. - * @implements IWindowsUpdateCategory - * @constructor - * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set - */ - function WindowsUpdateCategory(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WindowsUpdateCategory id. - * @member {string} id - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @instance - */ - WindowsUpdateCategory.prototype.id = ""; + if (message.zypper != null && message.hasOwnProperty("zypper")) { + object.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.toObject(message.zypper, options); + if (options.oneofs) + object.systemPackage = "zypper"; + } + if (message.rpm != null && message.hasOwnProperty("rpm")) { + object.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.toObject(message.rpm, options); + if (options.oneofs) + object.systemPackage = "rpm"; + } + if (message.googet != null && message.hasOwnProperty("googet")) { + object.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.toObject(message.googet, options); + if (options.oneofs) + object.systemPackage = "googet"; + } + if (message.msi != null && message.hasOwnProperty("msi")) { + object.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.toObject(message.msi, options); + if (options.oneofs) + object.systemPackage = "msi"; + } + return object; + }; /** - * WindowsUpdateCategory name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * Converts this PackageResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource * @instance + * @returns {Object.} JSON object */ - WindowsUpdateCategory.prototype.name = ""; - - /** - * Creates a new WindowsUpdateCategory instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory instance - */ - WindowsUpdateCategory.create = function create(properties) { - return new WindowsUpdateCategory(properties); + PackageResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Encodes the specified WindowsUpdateCategory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdateCategory.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - return writer; - }; + PackageResource.Deb = (function() { - /** - * Encodes the specified WindowsUpdateCategory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.IWindowsUpdateCategory} message WindowsUpdateCategory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsUpdateCategory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a Deb. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IDeb + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [source] Deb source + * @property {boolean|null} [pullDeps] Deb pullDeps + */ - /** - * Decodes a WindowsUpdateCategory message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdateCategory.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new Deb. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a Deb. + * @implements IDeb + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb=} [properties] Properties to set + */ + function Deb(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes a WindowsUpdateCategory message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsUpdateCategory.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WindowsUpdateCategory message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsUpdateCategory.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a WindowsUpdateCategory message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} WindowsUpdateCategory - */ - WindowsUpdateCategory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a WindowsUpdateCategory message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} message WindowsUpdateCategory - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsUpdateCategory.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.name = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Deb source. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @instance + */ + Deb.prototype.source = null; - /** - * Converts this WindowsUpdateCategory to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - * @instance - * @returns {Object.} JSON object - */ - WindowsUpdateCategory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Deb pullDeps. + * @member {boolean} pullDeps + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @instance + */ + Deb.prototype.pullDeps = false; - return WindowsUpdateCategory; - })(); + /** + * Creates a new Deb instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb instance + */ + Deb.create = function create(properties) { + return new Deb(properties); + }; - return WindowsUpdatePackage; - })(); + /** + * Encodes the specified Deb message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb} message Deb message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deb.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pullDeps != null && Object.hasOwnProperty.call(message, "pullDeps")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.pullDeps); + return writer; + }; - Inventory.WindowsQuickFixEngineeringPackage = (function() { + /** + * Encodes the specified Deb message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb} message Deb message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deb.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a WindowsQuickFixEngineeringPackage. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @interface IWindowsQuickFixEngineeringPackage - * @property {string|null} [caption] WindowsQuickFixEngineeringPackage caption - * @property {string|null} [description] WindowsQuickFixEngineeringPackage description - * @property {string|null} [hotFixId] WindowsQuickFixEngineeringPackage hotFixId - * @property {google.protobuf.ITimestamp|null} [installTime] WindowsQuickFixEngineeringPackage installTime - */ + /** + * Decodes a Deb message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deb.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.pullDeps = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new WindowsQuickFixEngineeringPackage. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @classdesc Represents a WindowsQuickFixEngineeringPackage. - * @implements IWindowsQuickFixEngineeringPackage - * @constructor - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set - */ - function WindowsQuickFixEngineeringPackage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a Deb message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deb.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * WindowsQuickFixEngineeringPackage caption. - * @member {string} caption - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @instance - */ - WindowsQuickFixEngineeringPackage.prototype.caption = ""; + /** + * Verifies a Deb message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deb.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.source); + if (error) + return "source." + error; + } + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + if (typeof message.pullDeps !== "boolean") + return "pullDeps: boolean expected"; + return null; + }; - /** - * WindowsQuickFixEngineeringPackage description. - * @member {string} description - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @instance - */ - WindowsQuickFixEngineeringPackage.prototype.description = ""; + /** + * Creates a Deb message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb + */ + Deb.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.source: object expected"); + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.source); + } + if (object.pullDeps != null) + message.pullDeps = Boolean(object.pullDeps); + return message; + }; - /** - * WindowsQuickFixEngineeringPackage hotFixId. - * @member {string} hotFixId - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @instance - */ - WindowsQuickFixEngineeringPackage.prototype.hotFixId = ""; + /** + * Creates a plain object from a Deb message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} message Deb + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deb.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.pullDeps = false; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.source, options); + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + object.pullDeps = message.pullDeps; + return object; + }; - /** - * WindowsQuickFixEngineeringPackage installTime. - * @member {google.protobuf.ITimestamp|null|undefined} installTime - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @instance - */ - WindowsQuickFixEngineeringPackage.prototype.installTime = null; + /** + * Converts this Deb to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @instance + * @returns {Object.} JSON object + */ + Deb.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new WindowsQuickFixEngineeringPackage instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage instance - */ - WindowsQuickFixEngineeringPackage.create = function create(properties) { - return new WindowsQuickFixEngineeringPackage(properties); - }; + return Deb; + })(); - /** - * Encodes the specified WindowsQuickFixEngineeringPackage message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsQuickFixEngineeringPackage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.caption); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.hotFixId != null && Object.hasOwnProperty.call(message, "hotFixId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.hotFixId); - if (message.installTime != null && Object.hasOwnProperty.call(message, "installTime")) - $root.google.protobuf.Timestamp.encode(message.installTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + PackageResource.APT = (function() { - /** - * Encodes the specified WindowsQuickFixEngineeringPackage message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsQuickFixEngineeringPackage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a APT. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IAPT + * @property {string|null} [name] APT name + */ - /** - * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsQuickFixEngineeringPackage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.caption = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.hotFixId = reader.string(); - break; - case 5: - message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new APT. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a APT. + * @implements IAPT + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT=} [properties] Properties to set + */ + function APT(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes a WindowsQuickFixEngineeringPackage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsQuickFixEngineeringPackage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * APT name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @instance + */ + APT.prototype.name = ""; - /** - * Verifies a WindowsQuickFixEngineeringPackage message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsQuickFixEngineeringPackage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) - if (!$util.isString(message.hotFixId)) - return "hotFixId: string expected"; - if (message.installTime != null && message.hasOwnProperty("installTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.installTime); - if (error) - return "installTime." + error; - } - return null; - }; + /** + * Creates a new APT instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT instance + */ + APT.create = function create(properties) { + return new APT(properties); + }; - /** - * Creates a WindowsQuickFixEngineeringPackage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} WindowsQuickFixEngineeringPackage - */ - WindowsQuickFixEngineeringPackage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage(); - if (object.caption != null) - message.caption = String(object.caption); - if (object.description != null) - message.description = String(object.description); - if (object.hotFixId != null) - message.hotFixId = String(object.hotFixId); - if (object.installTime != null) { - if (typeof object.installTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.installTime: object expected"); - message.installTime = $root.google.protobuf.Timestamp.fromObject(object.installTime); - } - return message; - }; + /** + * Encodes the specified APT message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT} message APT message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + APT.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Creates a plain object from a WindowsQuickFixEngineeringPackage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} message WindowsQuickFixEngineeringPackage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsQuickFixEngineeringPackage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.caption = ""; - object.description = ""; - object.hotFixId = ""; - object.installTime = null; - } - if (message.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.hotFixId != null && message.hasOwnProperty("hotFixId")) - object.hotFixId = message.hotFixId; - if (message.installTime != null && message.hasOwnProperty("installTime")) - object.installTime = $root.google.protobuf.Timestamp.toObject(message.installTime, options); - return object; - }; + /** + * Encodes the specified APT message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT} message APT message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + APT.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this WindowsQuickFixEngineeringPackage to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage - * @instance - * @returns {Object.} JSON object - */ - WindowsQuickFixEngineeringPackage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a APT message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + APT.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return WindowsQuickFixEngineeringPackage; - })(); + /** + * Decodes a APT message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + APT.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Inventory.WindowsApplication = (function() { + /** + * Verifies a APT message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + APT.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Properties of a WindowsApplication. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @interface IWindowsApplication - * @property {string|null} [displayName] WindowsApplication displayName - * @property {string|null} [displayVersion] WindowsApplication displayVersion - * @property {string|null} [publisher] WindowsApplication publisher - * @property {google.type.IDate|null} [installDate] WindowsApplication installDate - * @property {string|null} [helpLink] WindowsApplication helpLink - */ + /** + * Creates a APT message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT + */ + APT.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Constructs a new WindowsApplication. - * @memberof google.cloud.osconfig.v1alpha.Inventory - * @classdesc Represents a WindowsApplication. - * @implements IWindowsApplication - * @constructor - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication=} [properties] Properties to set - */ - function WindowsApplication(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a APT message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} message APT + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + APT.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; + }; - /** - * WindowsApplication displayName. - * @member {string} displayName - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @instance - */ - WindowsApplication.prototype.displayName = ""; + /** + * Converts this APT to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @instance + * @returns {Object.} JSON object + */ + APT.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * WindowsApplication displayVersion. - * @member {string} displayVersion - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @instance - */ - WindowsApplication.prototype.displayVersion = ""; + return APT; + })(); - /** - * WindowsApplication publisher. - * @member {string} publisher - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @instance - */ - WindowsApplication.prototype.publisher = ""; + PackageResource.RPM = (function() { - /** - * WindowsApplication installDate. - * @member {google.type.IDate|null|undefined} installDate - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @instance - */ - WindowsApplication.prototype.installDate = null; + /** + * Properties of a RPM. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IRPM + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [source] RPM source + * @property {boolean|null} [pullDeps] RPM pullDeps + */ - /** - * WindowsApplication helpLink. - * @member {string} helpLink - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @instance - */ - WindowsApplication.prototype.helpLink = ""; + /** + * Constructs a new RPM. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a RPM. + * @implements IRPM + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM=} [properties] Properties to set + */ + function RPM(properties) { + if (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 WindowsApplication instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication instance - */ - WindowsApplication.create = function create(properties) { - return new WindowsApplication(properties); - }; + /** + * RPM source. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @instance + */ + RPM.prototype.source = null; - /** - * Encodes the specified WindowsApplication message. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsApplication.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.displayVersion != null && Object.hasOwnProperty.call(message, "displayVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayVersion); - if (message.publisher != null && Object.hasOwnProperty.call(message, "publisher")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.publisher); - if (message.installDate != null && Object.hasOwnProperty.call(message, "installDate")) - $root.google.type.Date.encode(message.installDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.helpLink != null && Object.hasOwnProperty.call(message, "helpLink")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.helpLink); - return writer; - }; + /** + * RPM pullDeps. + * @member {boolean} pullDeps + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @instance + */ + RPM.prototype.pullDeps = false; - /** - * Encodes the specified WindowsApplication message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.IWindowsApplication} message WindowsApplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WindowsApplication.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new RPM instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM instance + */ + RPM.create = function create(properties) { + return new RPM(properties); + }; - /** - * Decodes a WindowsApplication message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsApplication.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - case 2: - message.displayVersion = reader.string(); - break; - case 3: - message.publisher = reader.string(); - break; - case 4: - message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - case 5: - message.helpLink = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified RPM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM} message RPM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RPM.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pullDeps != null && Object.hasOwnProperty.call(message, "pullDeps")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.pullDeps); + return writer; + }; - /** - * Decodes a WindowsApplication message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WindowsApplication.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified RPM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM} message RPM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RPM.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a WindowsApplication message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WindowsApplication.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) - if (!$util.isString(message.displayVersion)) - return "displayVersion: string expected"; - if (message.publisher != null && message.hasOwnProperty("publisher")) - if (!$util.isString(message.publisher)) - return "publisher: string expected"; - if (message.installDate != null && message.hasOwnProperty("installDate")) { - var error = $root.google.type.Date.verify(message.installDate); - if (error) - return "installDate." + error; - } - if (message.helpLink != null && message.hasOwnProperty("helpLink")) - if (!$util.isString(message.helpLink)) - return "helpLink: string expected"; - return null; - }; + /** + * Decodes a RPM message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RPM.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.pullDeps = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a WindowsApplication message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} WindowsApplication - */ - WindowsApplication.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.displayVersion != null) - message.displayVersion = String(object.displayVersion); - if (object.publisher != null) - message.publisher = String(object.publisher); - if (object.installDate != null) { - if (typeof object.installDate !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.installDate: object expected"); - message.installDate = $root.google.type.Date.fromObject(object.installDate); - } - if (object.helpLink != null) - message.helpLink = String(object.helpLink); - return message; - }; + /** + * Decodes a RPM message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RPM.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a WindowsApplication message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @static - * @param {google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} message WindowsApplication - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WindowsApplication.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.displayVersion = ""; - object.publisher = ""; - object.installDate = null; - object.helpLink = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.displayVersion != null && message.hasOwnProperty("displayVersion")) - object.displayVersion = message.displayVersion; - if (message.publisher != null && message.hasOwnProperty("publisher")) - object.publisher = message.publisher; - if (message.installDate != null && message.hasOwnProperty("installDate")) - object.installDate = $root.google.type.Date.toObject(message.installDate, options); - if (message.helpLink != null && message.hasOwnProperty("helpLink")) - object.helpLink = message.helpLink; - return object; - }; - - /** - * Converts this WindowsApplication to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication - * @instance - * @returns {Object.} JSON object - */ - WindowsApplication.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a RPM message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RPM.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.source); + if (error) + return "source." + error; + } + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + if (typeof message.pullDeps !== "boolean") + return "pullDeps: boolean expected"; + return null; + }; - return WindowsApplication; - })(); + /** + * Creates a RPM message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM + */ + RPM.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.source: object expected"); + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.source); + } + if (object.pullDeps != null) + message.pullDeps = Boolean(object.pullDeps); + return message; + }; - return Inventory; - })(); + /** + * Creates a plain object from a RPM message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} message RPM + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RPM.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.pullDeps = false; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.source, options); + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + object.pullDeps = message.pullDeps; + return object; + }; - v1alpha.GetInventoryRequest = (function() { + /** + * Converts this RPM to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @instance + * @returns {Object.} JSON object + */ + RPM.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a GetInventoryRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IGetInventoryRequest - * @property {string|null} [name] GetInventoryRequest name - * @property {google.cloud.osconfig.v1alpha.InventoryView|null} [view] GetInventoryRequest view - */ + return RPM; + })(); - /** - * Constructs a new GetInventoryRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a GetInventoryRequest. - * @implements IGetInventoryRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest=} [properties] Properties to set - */ - function GetInventoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + PackageResource.YUM = (function() { - /** - * GetInventoryRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @instance - */ - GetInventoryRequest.prototype.name = ""; + /** + * Properties of a YUM. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IYUM + * @property {string|null} [name] YUM name + */ - /** - * GetInventoryRequest view. - * @member {google.cloud.osconfig.v1alpha.InventoryView} view - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @instance - */ - GetInventoryRequest.prototype.view = 0; + /** + * Constructs a new YUM. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a YUM. + * @implements IYUM + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM=} [properties] Properties to set + */ + function YUM(properties) { + if (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 GetInventoryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest instance - */ - GetInventoryRequest.create = function create(properties) { - return new GetInventoryRequest(properties); - }; + /** + * YUM name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @instance + */ + YUM.prototype.name = ""; - /** - * Encodes the specified GetInventoryRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} message GetInventoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetInventoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; + /** + * Creates a new YUM instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM instance + */ + YUM.create = function create(properties) { + return new YUM(properties); + }; - /** - * Encodes the specified GetInventoryRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetInventoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} message GetInventoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetInventoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified YUM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM} message YUM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YUM.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Decodes a GetInventoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetInventoryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetInventoryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified YUM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM} message YUM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YUM.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GetInventoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetInventoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a YUM message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YUM.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a GetInventoryRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetInventoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Decodes a YUM message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YUM.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a GetInventoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.GetInventoryRequest} GetInventoryRequest - */ - GetInventoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.GetInventoryRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.GetInventoryRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - case "INVENTORY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; - } - return message; - }; + /** + * Verifies a YUM message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YUM.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a plain object from a GetInventoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @static - * @param {google.cloud.osconfig.v1alpha.GetInventoryRequest} message GetInventoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetInventoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "INVENTORY_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; - return object; - }; + /** + * Creates a YUM message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM + */ + YUM.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this GetInventoryRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest - * @instance - * @returns {Object.} JSON object - */ - GetInventoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a YUM message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} message YUM + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YUM.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; + }; - return GetInventoryRequest; - })(); + /** + * Converts this YUM to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @instance + * @returns {Object.} JSON object + */ + YUM.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1alpha.ListInventoriesRequest = (function() { + return YUM; + })(); - /** - * Properties of a ListInventoriesRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IListInventoriesRequest - * @property {string|null} [parent] ListInventoriesRequest parent - * @property {google.cloud.osconfig.v1alpha.InventoryView|null} [view] ListInventoriesRequest view - * @property {number|null} [pageSize] ListInventoriesRequest pageSize - * @property {string|null} [pageToken] ListInventoriesRequest pageToken - * @property {string|null} [filter] ListInventoriesRequest filter - */ + PackageResource.Zypper = (function() { - /** - * Constructs a new ListInventoriesRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListInventoriesRequest. - * @implements IListInventoriesRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest=} [properties] Properties to set - */ - function ListInventoriesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a Zypper. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IZypper + * @property {string|null} [name] Zypper name + */ - /** - * ListInventoriesRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @instance - */ - ListInventoriesRequest.prototype.parent = ""; + /** + * Constructs a new Zypper. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a Zypper. + * @implements IZypper + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper=} [properties] Properties to set + */ + function Zypper(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListInventoriesRequest view. - * @member {google.cloud.osconfig.v1alpha.InventoryView} view - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @instance - */ - ListInventoriesRequest.prototype.view = 0; + /** + * Zypper name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @instance + */ + Zypper.prototype.name = ""; - /** - * ListInventoriesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @instance - */ - ListInventoriesRequest.prototype.pageSize = 0; + /** + * Creates a new Zypper instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper instance + */ + Zypper.create = function create(properties) { + return new Zypper(properties); + }; - /** - * ListInventoriesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @instance - */ - ListInventoriesRequest.prototype.pageToken = ""; + /** + * Encodes the specified Zypper message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper} message Zypper message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zypper.encode = function encode(message, writer) { + 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; + }; - /** - * ListInventoriesRequest filter. - * @member {string} filter - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @instance - */ - ListInventoriesRequest.prototype.filter = ""; + /** + * Encodes the specified Zypper message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper} message Zypper message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zypper.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new ListInventoriesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest instance - */ - ListInventoriesRequest.create = function create(properties) { - return new ListInventoriesRequest(properties); - }; + /** + * Decodes a Zypper message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zypper.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListInventoriesRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} message ListInventoriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListInventoriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; + /** + * Decodes a Zypper message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zypper.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ListInventoriesRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} message ListInventoriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListInventoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a Zypper message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Zypper.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Decodes a ListInventoriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListInventoriesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a Zypper message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper + */ + Zypper.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Decodes a ListInventoriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListInventoriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a Zypper message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} message Zypper + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Zypper.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; + }; - /** - * Verifies a ListInventoriesRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListInventoriesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; + /** + * Converts this Zypper to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @instance + * @returns {Object.} JSON object + */ + Zypper.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a ListInventoriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListInventoriesRequest} ListInventoriesRequest - */ - ListInventoriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - switch (object.view) { - case "INVENTORY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; - } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; + return Zypper; + })(); - /** - * Creates a plain object from a ListInventoriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @static - * @param {google.cloud.osconfig.v1alpha.ListInventoriesRequest} message ListInventoriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListInventoriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.view = options.enums === String ? "INVENTORY_VIEW_UNSPECIFIED" : 0; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; + PackageResource.GooGet = (function() { - /** - * Converts this ListInventoriesRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest - * @instance - * @returns {Object.} JSON object - */ - ListInventoriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a GooGet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IGooGet + * @property {string|null} [name] GooGet name + */ - return ListInventoriesRequest; - })(); + /** + * Constructs a new GooGet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a GooGet. + * @implements IGooGet + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet=} [properties] Properties to set + */ + function GooGet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - v1alpha.ListInventoriesResponse = (function() { + /** + * GooGet name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @instance + */ + GooGet.prototype.name = ""; - /** - * Properties of a ListInventoriesResponse. - * @memberof google.cloud.osconfig.v1alpha - * @interface IListInventoriesResponse - * @property {Array.|null} [inventories] ListInventoriesResponse inventories - * @property {string|null} [nextPageToken] ListInventoriesResponse nextPageToken - */ + /** + * Creates a new GooGet instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet instance + */ + GooGet.create = function create(properties) { + return new GooGet(properties); + }; - /** - * Constructs a new ListInventoriesResponse. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListInventoriesResponse. - * @implements IListInventoriesResponse - * @constructor - * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse=} [properties] Properties to set - */ - function ListInventoriesResponse(properties) { - this.inventories = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified GooGet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet} message GooGet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooGet.encode = function encode(message, writer) { + 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; + }; - /** - * ListInventoriesResponse inventories. - * @member {Array.} inventories - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @instance - */ - ListInventoriesResponse.prototype.inventories = $util.emptyArray; - - /** - * ListInventoriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @instance - */ - ListInventoriesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListInventoriesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse instance - */ - ListInventoriesResponse.create = function create(properties) { - return new ListInventoriesResponse(properties); - }; + /** + * Encodes the specified GooGet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet} message GooGet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooGet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ListInventoriesResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse} message ListInventoriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListInventoriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inventories != null && message.inventories.length) - for (var i = 0; i < message.inventories.length; ++i) - $root.google.cloud.osconfig.v1alpha.Inventory.encode(message.inventories[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; - }; + /** + * Decodes a GooGet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooGet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListInventoriesResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListInventoriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListInventoriesResponse} message ListInventoriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListInventoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a GooGet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooGet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ListInventoriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListInventoriesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.inventories && message.inventories.length)) - message.inventories = []; - message.inventories.push($root.google.cloud.osconfig.v1alpha.Inventory.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a GooGet message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GooGet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Decodes a ListInventoriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListInventoriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a GooGet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet + */ + GooGet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Verifies a ListInventoriesResponse message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListInventoriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inventories != null && message.hasOwnProperty("inventories")) { - if (!Array.isArray(message.inventories)) - return "inventories: array expected"; - for (var i = 0; i < message.inventories.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.Inventory.verify(message.inventories[i]); - if (error) - return "inventories." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Creates a plain object from a GooGet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} message GooGet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GooGet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Creates a ListInventoriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListInventoriesResponse} ListInventoriesResponse - */ - ListInventoriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse(); - if (object.inventories) { - if (!Array.isArray(object.inventories)) - throw TypeError(".google.cloud.osconfig.v1alpha.ListInventoriesResponse.inventories: array expected"); - message.inventories = []; - for (var i = 0; i < object.inventories.length; ++i) { - if (typeof object.inventories[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.ListInventoriesResponse.inventories: object expected"); - message.inventories[i] = $root.google.cloud.osconfig.v1alpha.Inventory.fromObject(object.inventories[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Converts this GooGet to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @instance + * @returns {Object.} JSON object + */ + GooGet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a ListInventoriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @static - * @param {google.cloud.osconfig.v1alpha.ListInventoriesResponse} message ListInventoriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListInventoriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.inventories = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.inventories && message.inventories.length) { - object.inventories = []; - for (var j = 0; j < message.inventories.length; ++j) - object.inventories[j] = $root.google.cloud.osconfig.v1alpha.Inventory.toObject(message.inventories[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + return GooGet; + })(); - /** - * Converts this ListInventoriesResponse to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse - * @instance - * @returns {Object.} JSON object - */ - ListInventoriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + PackageResource.MSI = (function() { - return ListInventoriesResponse; - })(); + /** + * Properties of a MSI. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @interface IMSI + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [source] MSI source + * @property {Array.|null} [properties] MSI properties + */ - /** - * InventoryView enum. - * @name google.cloud.osconfig.v1alpha.InventoryView - * @enum {number} - * @property {number} INVENTORY_VIEW_UNSPECIFIED=0 INVENTORY_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=2 FULL value - */ - v1alpha.InventoryView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INVENTORY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "FULL"] = 2; - return values; - })(); + /** + * Constructs a new MSI. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @classdesc Represents a MSI. + * @implements IMSI + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI=} [properties] Properties to set + */ + function MSI(properties) { + this.properties = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - v1alpha.OSPolicy = (function() { + /** + * MSI source. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @instance + */ + MSI.prototype.source = null; - /** - * Properties of a OSPolicy. - * @memberof google.cloud.osconfig.v1alpha - * @interface IOSPolicy - * @property {string|null} [id] OSPolicy id - * @property {string|null} [description] OSPolicy description - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Mode|null} [mode] OSPolicy mode - * @property {Array.|null} [resourceGroups] OSPolicy resourceGroups - * @property {boolean|null} [allowNoResourceGroupMatch] OSPolicy allowNoResourceGroupMatch - */ + /** + * MSI properties. + * @member {Array.} properties + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @instance + */ + MSI.prototype.properties = $util.emptyArray; - /** - * Constructs a new OSPolicy. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a OSPolicy. - * @implements IOSPolicy - * @constructor - * @param {google.cloud.osconfig.v1alpha.IOSPolicy=} [properties] Properties to set - */ - function OSPolicy(properties) { - this.resourceGroups = []; - if (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 MSI instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI instance + */ + MSI.create = function create(properties) { + return new MSI(properties); + }; - /** - * OSPolicy id. - * @member {string} id - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @instance - */ - OSPolicy.prototype.id = ""; + /** + * Encodes the specified MSI message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI} message MSI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MSI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.properties != null && message.properties.length) + for (var i = 0; i < message.properties.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.properties[i]); + return writer; + }; - /** - * OSPolicy description. - * @member {string} description - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @instance - */ - OSPolicy.prototype.description = ""; + /** + * Encodes the specified MSI message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI} message MSI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MSI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * OSPolicy mode. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Mode} mode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @instance - */ - OSPolicy.prototype.mode = 0; + /** + * Decodes a MSI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MSI.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * OSPolicy resourceGroups. - * @member {Array.} resourceGroups - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @instance - */ - OSPolicy.prototype.resourceGroups = $util.emptyArray; + /** + * Decodes a MSI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MSI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * OSPolicy allowNoResourceGroupMatch. - * @member {boolean} allowNoResourceGroupMatch - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @instance - */ - OSPolicy.prototype.allowNoResourceGroupMatch = false; - - /** - * Creates a new OSPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicy=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy instance - */ - OSPolicy.create = function create(properties) { - return new OSPolicy(properties); - }; + /** + * Verifies a MSI message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MSI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.source); + if (error) + return "source." + error; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!Array.isArray(message.properties)) + return "properties: array expected"; + for (var i = 0; i < message.properties.length; ++i) + if (!$util.isString(message.properties[i])) + return "properties: string[] expected"; + } + return null; + }; - /** - * Encodes the specified OSPolicy message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicy} message OSPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mode); - if (message.resourceGroups != null && message.resourceGroups.length) - for (var i = 0; i < message.resourceGroups.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.encode(message.resourceGroups[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.allowNoResourceGroupMatch != null && Object.hasOwnProperty.call(message, "allowNoResourceGroupMatch")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowNoResourceGroupMatch); - return writer; - }; + /** + * Creates a MSI message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI + */ + MSI.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.source: object expected"); + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.source); + } + if (object.properties) { + if (!Array.isArray(object.properties)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.properties: array expected"); + message.properties = []; + for (var i = 0; i < object.properties.length; ++i) + message.properties[i] = String(object.properties[i]); + } + return message; + }; - /** - * Encodes the specified OSPolicy message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicy} message OSPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from a MSI message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} message MSI + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MSI.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.properties = []; + if (options.defaults) + object.source = null; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.source, options); + if (message.properties && message.properties.length) { + object.properties = []; + for (var j = 0; j < message.properties.length; ++j) + object.properties[j] = message.properties[j]; + } + return object; + }; - /** - * Decodes a OSPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.mode = reader.int32(); - break; - case 4: - if (!(message.resourceGroups && message.resourceGroups.length)) - message.resourceGroups = []; - message.resourceGroups.push($root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.decode(reader, reader.uint32())); - break; - case 5: - message.allowNoResourceGroupMatch = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this MSI to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @instance + * @returns {Object.} JSON object + */ + MSI.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a OSPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return MSI; + })(); - /** - * Verifies a OSPolicy message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OSPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.resourceGroups != null && message.hasOwnProperty("resourceGroups")) { - if (!Array.isArray(message.resourceGroups)) - return "resourceGroups: array expected"; - for (var i = 0; i < message.resourceGroups.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify(message.resourceGroups[i]); - if (error) - return "resourceGroups." + error; - } - } - if (message.allowNoResourceGroupMatch != null && message.hasOwnProperty("allowNoResourceGroupMatch")) - if (typeof message.allowNoResourceGroupMatch !== "boolean") - return "allowNoResourceGroupMatch: boolean expected"; - return null; - }; + /** + * DesiredState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + * @enum {number} + * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value + * @property {number} INSTALLED=1 INSTALLED value + * @property {number} REMOVED=2 REMOVED value + */ + PackageResource.DesiredState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLED"] = 1; + values[valuesById[2] = "REMOVED"] = 2; + return values; + })(); - /** - * Creates a OSPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy} OSPolicy - */ - OSPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy(); - if (object.id != null) - message.id = String(object.id); - if (object.description != null) - message.description = String(object.description); - switch (object.mode) { - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "VALIDATION": - case 1: - message.mode = 1; - break; - case "ENFORCEMENT": - case 2: - message.mode = 2; - break; - } - if (object.resourceGroups) { - if (!Array.isArray(object.resourceGroups)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.resourceGroups: array expected"); - message.resourceGroups = []; - for (var i = 0; i < object.resourceGroups.length; ++i) { - if (typeof object.resourceGroups[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.resourceGroups: object expected"); - message.resourceGroups[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.fromObject(object.resourceGroups[i]); - } - } - if (object.allowNoResourceGroupMatch != null) - message.allowNoResourceGroupMatch = Boolean(object.allowNoResourceGroupMatch); - return message; - }; + return PackageResource; + })(); - /** - * Creates a plain object from a OSPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy} message OSPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OSPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceGroups = []; - if (options.defaults) { - object.id = ""; - object.description = ""; - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - object.allowNoResourceGroupMatch = false; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Mode[message.mode] : message.mode; - if (message.resourceGroups && message.resourceGroups.length) { - object.resourceGroups = []; - for (var j = 0; j < message.resourceGroups.length; ++j) - object.resourceGroups[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.toObject(message.resourceGroups[j], options); - } - if (message.allowNoResourceGroupMatch != null && message.hasOwnProperty("allowNoResourceGroupMatch")) - object.allowNoResourceGroupMatch = message.allowNoResourceGroupMatch; - return object; - }; + Resource.RepositoryResource = (function() { - /** - * Converts this OSPolicy to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @instance - * @returns {Object.} JSON object - */ - OSPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a RepositoryResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @interface IRepositoryResource + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null} [apt] RepositoryResource apt + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null} [yum] RepositoryResource yum + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null} [zypper] RepositoryResource zypper + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null} [goo] RepositoryResource goo + */ - OSPolicy.OSFilter = (function() { + /** + * Constructs a new RepositoryResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @classdesc Represents a RepositoryResource. + * @implements IRepositoryResource + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource=} [properties] Properties to set + */ + function RepositoryResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a OSFilter. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @interface IOSFilter - * @property {string|null} [osShortName] OSFilter osShortName - * @property {string|null} [osVersion] OSFilter osVersion - */ + /** + * RepositoryResource apt. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null|undefined} apt + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.apt = null; - /** - * Constructs a new OSFilter. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @classdesc Represents a OSFilter. - * @implements IOSFilter - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter=} [properties] Properties to set - */ - function OSFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * RepositoryResource yum. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null|undefined} yum + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.yum = null; - /** - * OSFilter osShortName. - * @member {string} osShortName - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @instance - */ - OSFilter.prototype.osShortName = ""; + /** + * RepositoryResource zypper. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null|undefined} zypper + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.zypper = null; - /** - * OSFilter osVersion. - * @member {string} osVersion - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @instance - */ - OSFilter.prototype.osVersion = ""; + /** + * RepositoryResource goo. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null|undefined} goo + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.goo = null; - /** - * Creates a new OSFilter instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter instance - */ - OSFilter.create = function create(properties) { - return new OSFilter(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified OSFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter} message OSFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osShortName != null && Object.hasOwnProperty.call(message, "osShortName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.osShortName); - if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.osVersion); - return writer; - }; + /** + * RepositoryResource repository. + * @member {"apt"|"yum"|"zypper"|"goo"|undefined} repository + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + */ + Object.defineProperty(RepositoryResource.prototype, "repository", { + get: $util.oneOfGetter($oneOfFields = ["apt", "yum", "zypper", "goo"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified OSFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter} message OSFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new RepositoryResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource instance + */ + RepositoryResource.create = function create(properties) { + return new RepositoryResource(properties); + }; - /** - * Decodes a OSFilter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.osShortName = reader.string(); - break; - case 2: - message.osVersion = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified RepositoryResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource} message RepositoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepositoryResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.encode(message.apt, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.encode(message.yum, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.encode(message.zypper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.goo != null && Object.hasOwnProperty.call(message, "goo")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.encode(message.goo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Decodes a OSFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified RepositoryResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource} message RepositoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepositoryResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a OSFilter message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OSFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osShortName != null && message.hasOwnProperty("osShortName")) - if (!$util.isString(message.osShortName)) - return "osShortName: string expected"; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - if (!$util.isString(message.osVersion)) - return "osVersion: string expected"; - return null; - }; + /** + * Decodes a RepositoryResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepositoryResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.decode(reader, reader.uint32()); + break; + case 2: + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.decode(reader, reader.uint32()); + break; + case 3: + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.decode(reader, reader.uint32()); + break; + case 4: + message.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a OSFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} OSFilter - */ - OSFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter(); - if (object.osShortName != null) - message.osShortName = String(object.osShortName); - if (object.osVersion != null) - message.osVersion = String(object.osVersion); - return message; - }; + /** + * Decodes a RepositoryResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepositoryResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a OSFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} message OSFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OSFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.osShortName = ""; - object.osVersion = ""; - } - if (message.osShortName != null && message.hasOwnProperty("osShortName")) - object.osShortName = message.osShortName; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - object.osVersion = message.osVersion; - return object; - }; + /** + * Verifies a RepositoryResource message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RepositoryResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.apt != null && message.hasOwnProperty("apt")) { + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify(message.apt); + if (error) + return "apt." + error; + } + } + if (message.yum != null && message.hasOwnProperty("yum")) { + if (properties.repository === 1) + return "repository: multiple values"; + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify(message.yum); + if (error) + return "yum." + error; + } + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + if (properties.repository === 1) + return "repository: multiple values"; + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify(message.zypper); + if (error) + return "zypper." + error; + } + } + if (message.goo != null && message.hasOwnProperty("goo")) { + if (properties.repository === 1) + return "repository: multiple values"; + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify(message.goo); + if (error) + return "goo." + error; + } + } + return null; + }; - /** - * Converts this OSFilter to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter - * @instance - * @returns {Object.} JSON object - */ - OSFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a RepositoryResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource + */ + RepositoryResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource(); + if (object.apt != null) { + if (typeof object.apt !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.apt: object expected"); + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.fromObject(object.apt); + } + if (object.yum != null) { + if (typeof object.yum !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.yum: object expected"); + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.fromObject(object.yum); + } + if (object.zypper != null) { + if (typeof object.zypper !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.zypper: object expected"); + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.fromObject(object.zypper); + } + if (object.goo != null) { + if (typeof object.goo !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.goo: object expected"); + message.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.fromObject(object.goo); + } + return message; + }; - return OSFilter; - })(); + /** + * Creates a plain object from a RepositoryResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} message RepositoryResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RepositoryResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.apt != null && message.hasOwnProperty("apt")) { + object.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.toObject(message.apt, options); + if (options.oneofs) + object.repository = "apt"; + } + if (message.yum != null && message.hasOwnProperty("yum")) { + object.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.toObject(message.yum, options); + if (options.oneofs) + object.repository = "yum"; + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + object.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.toObject(message.zypper, options); + if (options.oneofs) + object.repository = "zypper"; + } + if (message.goo != null && message.hasOwnProperty("goo")) { + object.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.toObject(message.goo, options); + if (options.oneofs) + object.repository = "goo"; + } + return object; + }; - OSPolicy.Resource = (function() { + /** + * Converts this RepositoryResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @instance + * @returns {Object.} JSON object + */ + RepositoryResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a Resource. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @interface IResource - * @property {string|null} [id] Resource id - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null} [pkg] Resource pkg - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null} [repository] Resource repository - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null} [exec] Resource exec - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null} [file] Resource file - */ + RepositoryResource.AptRepository = (function() { - /** - * Constructs a new Resource. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @classdesc Represents a Resource. - * @implements IResource - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResource=} [properties] Properties to set - */ - function Resource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an AptRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @interface IAptRepository + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|null} [archiveType] AptRepository archiveType + * @property {string|null} [uri] AptRepository uri + * @property {string|null} [distribution] AptRepository distribution + * @property {Array.|null} [components] AptRepository components + * @property {string|null} [gpgKey] AptRepository gpgKey + */ - /** - * Resource id. - * @member {string} id - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @instance - */ - Resource.prototype.id = ""; + /** + * Constructs a new AptRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @classdesc Represents an AptRepository. + * @implements IAptRepository + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository=} [properties] Properties to set + */ + function AptRepository(properties) { + this.components = []; + if (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 pkg. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource|null|undefined} pkg - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @instance - */ - Resource.prototype.pkg = null; + /** + * AptRepository archiveType. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType} archiveType + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.archiveType = 0; - /** - * Resource repository. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource|null|undefined} repository - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @instance - */ - Resource.prototype.repository = null; + /** + * AptRepository uri. + * @member {string} uri + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.uri = ""; - /** - * Resource exec. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource|null|undefined} exec - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @instance - */ - Resource.prototype.exec = null; + /** + * AptRepository distribution. + * @member {string} distribution + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.distribution = ""; - /** - * Resource file. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource|null|undefined} file - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @instance - */ - Resource.prototype.file = null; + /** + * AptRepository components. + * @member {Array.} components + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.components = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * AptRepository gpgKey. + * @member {string} gpgKey + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.gpgKey = ""; - /** - * Resource resourceType. - * @member {"pkg"|"repository"|"exec"|"file"|undefined} resourceType - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @instance - */ - Object.defineProperty(Resource.prototype, "resourceType", { - get: $util.oneOfGetter($oneOfFields = ["pkg", "repository", "exec", "file"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a new AptRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository instance + */ + AptRepository.create = function create(properties) { + return new AptRepository(properties); + }; - /** - * Creates a new Resource instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResource=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource} Resource instance - */ - Resource.create = function create(properties) { - return new Resource(properties); - }; + /** + * Encodes the specified AptRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository} message AptRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.archiveType != null && Object.hasOwnProperty.call(message, "archiveType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.archiveType); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.distribution != null && Object.hasOwnProperty.call(message, "distribution")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.distribution); + if (message.components != null && message.components.length) + for (var i = 0; i < message.components.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.components[i]); + if (message.gpgKey != null && Object.hasOwnProperty.call(message, "gpgKey")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.gpgKey); + return writer; + }; - /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.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.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.pkg != null && Object.hasOwnProperty.call(message, "pkg")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.encode(message.pkg, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.encode(message.repository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.exec != null && Object.hasOwnProperty.call(message, "exec")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.encode(message.exec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.file != null && Object.hasOwnProperty.call(message, "file")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.encode(message.file, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.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(); - }; + /** + * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository} message AptRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptRepository.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.osconfig.v1alpha.OSPolicy.Resource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.decode(reader, reader.uint32()); - break; - case 3: - message.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.decode(reader, reader.uint32()); - break; - case 4: - message.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.decode(reader, reader.uint32()); - break; - case 5: - message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes an AptRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.archiveType = reader.int32(); + break; + case 2: + message.uri = reader.string(); + break; + case 3: + message.distribution = reader.string(); + break; + case 4: + if (!(message.components && message.components.length)) + message.components = []; + message.components.push(reader.string()); + break; + case 5: + message.gpgKey = reader.string(); + 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.osconfig.v1alpha.OSPolicy.Resource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.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()); - }; + /** + * Decodes an AptRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptRepository.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.osconfig.v1alpha.OSPolicy.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"; - var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.pkg != null && message.hasOwnProperty("pkg")) { - properties.resourceType = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify(message.pkg); - if (error) - return "pkg." + error; - } - } - if (message.repository != null && message.hasOwnProperty("repository")) { - if (properties.resourceType === 1) - return "resourceType: multiple values"; - properties.resourceType = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify(message.repository); - if (error) - return "repository." + error; - } - } - if (message.exec != null && message.hasOwnProperty("exec")) { - if (properties.resourceType === 1) - return "resourceType: multiple values"; - properties.resourceType = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify(message.exec); - if (error) - return "exec." + error; - } - } - if (message.file != null && message.hasOwnProperty("file")) { - if (properties.resourceType === 1) - return "resourceType: multiple values"; - properties.resourceType = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify(message.file); - if (error) - return "file." + error; - } - } - return null; - }; + /** + * Verifies an AptRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AptRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.archiveType != null && message.hasOwnProperty("archiveType")) + switch (message.archiveType) { + default: + return "archiveType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.distribution != null && message.hasOwnProperty("distribution")) + if (!$util.isString(message.distribution)) + return "distribution: string expected"; + if (message.components != null && message.hasOwnProperty("components")) { + if (!Array.isArray(message.components)) + return "components: array expected"; + for (var i = 0; i < message.components.length; ++i) + if (!$util.isString(message.components[i])) + return "components: string[] expected"; + } + if (message.gpgKey != null && message.hasOwnProperty("gpgKey")) + if (!$util.isString(message.gpgKey)) + return "gpgKey: string expected"; + return null; + }; - /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource} Resource - */ - Resource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource(); - if (object.id != null) - message.id = String(object.id); - if (object.pkg != null) { - if (typeof object.pkg !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.pkg: object expected"); - message.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.fromObject(object.pkg); - } - if (object.repository != null) { - if (typeof object.repository !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.repository: object expected"); - message.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.fromObject(object.repository); - } - if (object.exec != null) { - if (typeof object.exec !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.exec: object expected"); - message.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.fromObject(object.exec); - } - if (object.file != null) { - if (typeof object.file !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.file: object expected"); - message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.fromObject(object.file); - } - return message; - }; + /** + * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository + */ + AptRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository(); + switch (object.archiveType) { + case "ARCHIVE_TYPE_UNSPECIFIED": + case 0: + message.archiveType = 0; + break; + case "DEB": + case 1: + message.archiveType = 1; + break; + case "DEB_SRC": + case 2: + message.archiveType = 2; + break; + } + if (object.uri != null) + message.uri = String(object.uri); + if (object.distribution != null) + message.distribution = String(object.distribution); + if (object.components) { + if (!Array.isArray(object.components)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.components: array expected"); + message.components = []; + for (var i = 0; i < object.components.length; ++i) + message.components[i] = String(object.components[i]); + } + if (object.gpgKey != null) + message.gpgKey = String(object.gpgKey); + return message; + }; - /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.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.defaults) - object.id = ""; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.pkg != null && message.hasOwnProperty("pkg")) { - object.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.toObject(message.pkg, options); - if (options.oneofs) - object.resourceType = "pkg"; - } - if (message.repository != null && message.hasOwnProperty("repository")) { - object.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.toObject(message.repository, options); - if (options.oneofs) - object.resourceType = "repository"; - } - if (message.exec != null && message.hasOwnProperty("exec")) { - object.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.toObject(message.exec, options); - if (options.oneofs) - object.resourceType = "exec"; - } - if (message.file != null && message.hasOwnProperty("file")) { - object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.toObject(message.file, options); - if (options.oneofs) - object.resourceType = "file"; - } - return object; - }; + /** + * Creates a plain object from an AptRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} message AptRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AptRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.components = []; + if (options.defaults) { + object.archiveType = options.enums === String ? "ARCHIVE_TYPE_UNSPECIFIED" : 0; + object.uri = ""; + object.distribution = ""; + object.gpgKey = ""; + } + if (message.archiveType != null && message.hasOwnProperty("archiveType")) + object.archiveType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] : message.archiveType; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.distribution != null && message.hasOwnProperty("distribution")) + object.distribution = message.distribution; + if (message.components && message.components.length) { + object.components = []; + for (var j = 0; j < message.components.length; ++j) + object.components[j] = message.components[j]; + } + if (message.gpgKey != null && message.hasOwnProperty("gpgKey")) + object.gpgKey = message.gpgKey; + return object; + }; - /** - * Converts this Resource to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @instance - * @returns {Object.} JSON object - */ - Resource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this AptRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + * @returns {Object.} JSON object + */ + AptRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Resource.File = (function() { + /** + * ArchiveType enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType + * @enum {number} + * @property {number} ARCHIVE_TYPE_UNSPECIFIED=0 ARCHIVE_TYPE_UNSPECIFIED value + * @property {number} DEB=1 DEB value + * @property {number} DEB_SRC=2 DEB_SRC value + */ + AptRepository.ArchiveType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ARCHIVE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEB"] = 1; + values[valuesById[2] = "DEB_SRC"] = 2; + return values; + })(); - /** - * Properties of a File. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @interface IFile - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null} [remote] File remote - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null} [gcs] File gcs - * @property {string|null} [localPath] File localPath - * @property {boolean|null} [allowInsecure] File allowInsecure - */ + return AptRepository; + })(); - /** - * Constructs a new File. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @classdesc Represents a File. - * @implements IFile - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile=} [properties] Properties to set - */ - function File(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + RepositoryResource.YumRepository = (function() { - /** - * File remote. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote|null|undefined} remote - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @instance - */ - File.prototype.remote = null; + /** + * Properties of a YumRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @interface IYumRepository + * @property {string|null} [id] YumRepository id + * @property {string|null} [displayName] YumRepository displayName + * @property {string|null} [baseUrl] YumRepository baseUrl + * @property {Array.|null} [gpgKeys] YumRepository gpgKeys + */ - /** - * File gcs. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs|null|undefined} gcs - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @instance - */ - File.prototype.gcs = null; + /** + * Constructs a new YumRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @classdesc Represents a YumRepository. + * @implements IYumRepository + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository=} [properties] Properties to set + */ + function YumRepository(properties) { + this.gpgKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * File localPath. - * @member {string|null|undefined} localPath - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @instance - */ - File.prototype.localPath = null; - - /** - * File allowInsecure. - * @member {boolean} allowInsecure - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @instance - */ - File.prototype.allowInsecure = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * File type. - * @member {"remote"|"gcs"|"localPath"|undefined} type - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @instance - */ - Object.defineProperty(File.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["remote", "gcs", "localPath"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new File instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File instance - */ - File.create = function create(properties) { - return new File(properties); - }; - - /** - * Encodes the specified File message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile} message File message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - File.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.remote != null && Object.hasOwnProperty.call(message, "remote")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.encode(message.remote, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.gcs != null && Object.hasOwnProperty.call(message, "gcs")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.encode(message.gcs, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.localPath); - if (message.allowInsecure != null && Object.hasOwnProperty.call(message, "allowInsecure")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowInsecure); - return writer; - }; - - /** - * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile} message File message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - File.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a File message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - File.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.decode(reader, reader.uint32()); - break; - case 2: - message.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.decode(reader, reader.uint32()); - break; - case 3: - message.localPath = reader.string(); - break; - case 4: - message.allowInsecure = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a File message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - File.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a File message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - File.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.remote != null && message.hasOwnProperty("remote")) { - properties.type = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify(message.remote); - if (error) - return "remote." + error; - } - } - if (message.gcs != null && message.hasOwnProperty("gcs")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify(message.gcs); - if (error) - return "gcs." + error; - } - } - if (message.localPath != null && message.hasOwnProperty("localPath")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - if (!$util.isString(message.localPath)) - return "localPath: string expected"; - } - if (message.allowInsecure != null && message.hasOwnProperty("allowInsecure")) - if (typeof message.allowInsecure !== "boolean") - return "allowInsecure: boolean expected"; - return null; - }; - - /** - * Creates a File message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} File - */ - File.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File(); - if (object.remote != null) { - if (typeof object.remote !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.remote: object expected"); - message.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.fromObject(object.remote); - } - if (object.gcs != null) { - if (typeof object.gcs !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.gcs: object expected"); - message.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.fromObject(object.gcs); - } - if (object.localPath != null) - message.localPath = String(object.localPath); - if (object.allowInsecure != null) - message.allowInsecure = Boolean(object.allowInsecure); - return message; - }; - - /** - * Creates a plain object from a File message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} message File - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - File.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.allowInsecure = false; - if (message.remote != null && message.hasOwnProperty("remote")) { - object.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.toObject(message.remote, options); - if (options.oneofs) - object.type = "remote"; - } - if (message.gcs != null && message.hasOwnProperty("gcs")) { - object.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.toObject(message.gcs, options); - if (options.oneofs) - object.type = "gcs"; - } - if (message.localPath != null && message.hasOwnProperty("localPath")) { - object.localPath = message.localPath; - if (options.oneofs) - object.type = "localPath"; - } - if (message.allowInsecure != null && message.hasOwnProperty("allowInsecure")) - object.allowInsecure = message.allowInsecure; - return object; - }; - - /** - * Converts this File to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @instance - * @returns {Object.} JSON object - */ - File.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - File.Remote = (function() { - - /** - * Properties of a Remote. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @interface IRemote - * @property {string|null} [uri] Remote uri - * @property {string|null} [sha256Checksum] Remote sha256Checksum - */ + /** + * YumRepository id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + */ + YumRepository.prototype.id = ""; /** - * Constructs a new Remote. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @classdesc Represents a Remote. - * @implements IRemote - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote=} [properties] Properties to set + * YumRepository displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance */ - function Remote(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + YumRepository.prototype.displayName = ""; /** - * Remote uri. - * @member {string} uri - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * YumRepository baseUrl. + * @member {string} baseUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @instance */ - Remote.prototype.uri = ""; + YumRepository.prototype.baseUrl = ""; /** - * Remote sha256Checksum. - * @member {string} sha256Checksum - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * YumRepository gpgKeys. + * @member {Array.} gpgKeys + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @instance */ - Remote.prototype.sha256Checksum = ""; + YumRepository.prototype.gpgKeys = $util.emptyArray; /** - * Creates a new Remote instance using the specified properties. + * Creates a new YumRepository instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote instance + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository instance */ - Remote.create = function create(properties) { - return new Remote(properties); + YumRepository.create = function create(properties) { + return new YumRepository(properties); }; /** - * Encodes the specified Remote message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * Encodes the specified YumRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote} message Remote message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository} message YumRepository message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Remote.encode = function encode(message, writer) { + YumRepository.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - if (message.sha256Checksum != null && Object.hasOwnProperty.call(message, "sha256Checksum")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sha256Checksum); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.baseUrl != null && Object.hasOwnProperty.call(message, "baseUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.baseUrl); + if (message.gpgKeys != null && message.gpgKeys.length) + for (var i = 0; i < message.gpgKeys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gpgKeys[i]); return writer; }; /** - * Encodes the specified Remote message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.verify|verify} messages. + * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IRemote} message Remote message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository} message YumRepository message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Remote.encodeDelimited = function encodeDelimited(message, writer) { + YumRepository.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Remote message from the specified reader or buffer. + * Decodes a YumRepository message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Remote.decode = function decode(reader, length) { + YumRepository.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.uri = reader.string(); + message.id = reader.string(); break; case 2: - message.sha256Checksum = reader.string(); + message.displayName = reader.string(); + break; + case 3: + message.baseUrl = reader.string(); + break; + case 4: + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -31098,118 +27821,149 @@ }; /** - * Decodes a Remote message from the specified reader or buffer, length delimited. + * Decodes a YumRepository message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Remote.decodeDelimited = function decodeDelimited(reader) { + YumRepository.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Remote message. + * Verifies a YumRepository message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Remote.verify = function verify(message) { + YumRepository.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.sha256Checksum != null && message.hasOwnProperty("sha256Checksum")) - if (!$util.isString(message.sha256Checksum)) - return "sha256Checksum: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + if (!$util.isString(message.baseUrl)) + return "baseUrl: string expected"; + if (message.gpgKeys != null && message.hasOwnProperty("gpgKeys")) { + if (!Array.isArray(message.gpgKeys)) + return "gpgKeys: array expected"; + for (var i = 0; i < message.gpgKeys.length; ++i) + if (!$util.isString(message.gpgKeys[i])) + return "gpgKeys: string[] expected"; + } return null; }; /** - * Creates a Remote message from a plain object. Also converts values to their respective internal types. + * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} Remote + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository */ - Remote.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) + YumRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository) return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote(); - if (object.uri != null) - message.uri = String(object.uri); - if (object.sha256Checksum != null) - message.sha256Checksum = String(object.sha256Checksum); + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.baseUrl != null) + message.baseUrl = String(object.baseUrl); + if (object.gpgKeys) { + if (!Array.isArray(object.gpgKeys)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.gpgKeys: array expected"); + message.gpgKeys = []; + for (var i = 0; i < object.gpgKeys.length; ++i) + message.gpgKeys[i] = String(object.gpgKeys[i]); + } return message; }; /** - * Creates a plain object from a Remote message. Also converts values to other types if specified. + * Creates a plain object from a YumRepository message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} message Remote + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} message YumRepository * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Remote.toObject = function toObject(message, options) { + YumRepository.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.gpgKeys = []; if (options.defaults) { - object.uri = ""; - object.sha256Checksum = ""; + object.id = ""; + object.displayName = ""; + object.baseUrl = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + object.baseUrl = message.baseUrl; + if (message.gpgKeys && message.gpgKeys.length) { + object.gpgKeys = []; + for (var j = 0; j < message.gpgKeys.length; ++j) + object.gpgKeys[j] = message.gpgKeys[j]; } - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.sha256Checksum != null && message.hasOwnProperty("sha256Checksum")) - object.sha256Checksum = message.sha256Checksum; return object; }; /** - * Converts this Remote to JSON. + * Converts this YumRepository to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository * @instance * @returns {Object.} JSON object */ - Remote.prototype.toJSON = function toJSON() { + YumRepository.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Remote; + return YumRepository; })(); - File.Gcs = (function() { + RepositoryResource.ZypperRepository = (function() { /** - * Properties of a Gcs. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @interface IGcs - * @property {string|null} [bucket] Gcs bucket - * @property {string|null} [object] Gcs object - * @property {number|Long|null} [generation] Gcs generation + * Properties of a ZypperRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @interface IZypperRepository + * @property {string|null} [id] ZypperRepository id + * @property {string|null} [displayName] ZypperRepository displayName + * @property {string|null} [baseUrl] ZypperRepository baseUrl + * @property {Array.|null} [gpgKeys] ZypperRepository gpgKeys */ /** - * Constructs a new Gcs. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File - * @classdesc Represents a Gcs. - * @implements IGcs + * Constructs a new ZypperRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @classdesc Represents a ZypperRepository. + * @implements IZypperRepository * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository=} [properties] Properties to set */ - function Gcs(properties) { + function ZypperRepository(properties) { + this.gpgKeys = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31217,101 +27971,117 @@ } /** - * Gcs bucket. - * @member {string} bucket - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * ZypperRepository id. + * @member {string} id + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @instance */ - Gcs.prototype.bucket = ""; + ZypperRepository.prototype.id = ""; /** - * Gcs object. - * @member {string} object - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * ZypperRepository displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @instance */ - Gcs.prototype.object = ""; + ZypperRepository.prototype.displayName = ""; /** - * Gcs generation. - * @member {number|Long} generation - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * ZypperRepository baseUrl. + * @member {string} baseUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @instance */ - Gcs.prototype.generation = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ZypperRepository.prototype.baseUrl = ""; /** - * Creates a new Gcs instance using the specified properties. + * ZypperRepository gpgKeys. + * @member {Array.} gpgKeys + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + */ + ZypperRepository.prototype.gpgKeys = $util.emptyArray; + + /** + * Creates a new ZypperRepository instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs instance + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository instance */ - Gcs.create = function create(properties) { - return new Gcs(properties); + ZypperRepository.create = function create(properties) { + return new ZypperRepository(properties); }; /** - * Encodes the specified Gcs message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * Encodes the specified ZypperRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs} message Gcs message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository} message ZypperRepository message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Gcs.encode = function encode(message, writer) { + ZypperRepository.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - if (message.object != null && Object.hasOwnProperty.call(message, "object")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); - if (message.generation != null && Object.hasOwnProperty.call(message, "generation")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generation); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.baseUrl != null && Object.hasOwnProperty.call(message, "baseUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.baseUrl); + if (message.gpgKeys != null && message.gpgKeys.length) + for (var i = 0; i < message.gpgKeys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gpgKeys[i]); return writer; }; /** - * Encodes the specified Gcs message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * Encodes the specified ZypperRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.IGcs} message Gcs message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository} message ZypperRepository message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Gcs.encodeDelimited = function encodeDelimited(message, writer) { + ZypperRepository.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Gcs message from the specified reader or buffer. + * Decodes a ZypperRepository message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Gcs.decode = function decode(reader, length) { + ZypperRepository.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.bucket = reader.string(); + message.id = reader.string(); break; case 2: - message.object = reader.string(); + message.displayName = reader.string(); break; case 3: - message.generation = reader.int64(); + message.baseUrl = reader.string(); + break; + case 4: + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -31322,148 +28092,359 @@ }; /** - * Decodes a Gcs message from the specified reader or buffer, length delimited. + * Decodes a ZypperRepository message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Gcs.decodeDelimited = function decodeDelimited(reader) { + ZypperRepository.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Gcs message. + * Verifies a ZypperRepository message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Gcs.verify = function verify(message) { + ZypperRepository.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - if (message.object != null && message.hasOwnProperty("object")) - if (!$util.isString(message.object)) - return "object: string expected"; - if (message.generation != null && message.hasOwnProperty("generation")) - if (!$util.isInteger(message.generation) && !(message.generation && $util.isInteger(message.generation.low) && $util.isInteger(message.generation.high))) - return "generation: integer|Long expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + if (!$util.isString(message.baseUrl)) + return "baseUrl: string expected"; + if (message.gpgKeys != null && message.hasOwnProperty("gpgKeys")) { + if (!Array.isArray(message.gpgKeys)) + return "gpgKeys: array expected"; + for (var i = 0; i < message.gpgKeys.length; ++i) + if (!$util.isString(message.gpgKeys[i])) + return "gpgKeys: string[] expected"; + } return null; }; /** - * Creates a Gcs message from a plain object. Also converts values to their respective internal types. + * Creates a ZypperRepository message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} Gcs + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository */ - Gcs.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) + ZypperRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository) return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs(); - if (object.bucket != null) - message.bucket = String(object.bucket); - if (object.object != null) - message.object = String(object.object); - if (object.generation != null) - if ($util.Long) - (message.generation = $util.Long.fromValue(object.generation)).unsigned = false; - else if (typeof object.generation === "string") - message.generation = parseInt(object.generation, 10); - else if (typeof object.generation === "number") - message.generation = object.generation; - else if (typeof object.generation === "object") - message.generation = new $util.LongBits(object.generation.low >>> 0, object.generation.high >>> 0).toNumber(); + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.baseUrl != null) + message.baseUrl = String(object.baseUrl); + if (object.gpgKeys) { + if (!Array.isArray(object.gpgKeys)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.gpgKeys: array expected"); + message.gpgKeys = []; + for (var i = 0; i < object.gpgKeys.length; ++i) + message.gpgKeys[i] = String(object.gpgKeys[i]); + } return message; }; /** - * Creates a plain object from a Gcs message. Also converts values to other types if specified. + * Creates a plain object from a ZypperRepository message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} message Gcs + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} message ZypperRepository * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Gcs.toObject = function toObject(message, options) { + ZypperRepository.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.gpgKeys = []; if (options.defaults) { - object.bucket = ""; - object.object = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.generation = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.generation = options.longs === String ? "0" : 0; + object.id = ""; + object.displayName = ""; + object.baseUrl = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + object.baseUrl = message.baseUrl; + if (message.gpgKeys && message.gpgKeys.length) { + object.gpgKeys = []; + for (var j = 0; j < message.gpgKeys.length; ++j) + object.gpgKeys[j] = message.gpgKeys[j]; } - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - if (message.object != null && message.hasOwnProperty("object")) - object.object = message.object; - if (message.generation != null && message.hasOwnProperty("generation")) - if (typeof message.generation === "number") - object.generation = options.longs === String ? String(message.generation) : message.generation; - else - object.generation = options.longs === String ? $util.Long.prototype.toString.call(message.generation) : options.longs === Number ? new $util.LongBits(message.generation.low >>> 0, message.generation.high >>> 0).toNumber() : message.generation; return object; }; /** - * Converts this Gcs to JSON. + * Converts this ZypperRepository to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository * @instance * @returns {Object.} JSON object */ - Gcs.prototype.toJSON = function toJSON() { + ZypperRepository.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Gcs; + return ZypperRepository; })(); - return File; + RepositoryResource.GooRepository = (function() { + + /** + * Properties of a GooRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @interface IGooRepository + * @property {string|null} [name] GooRepository name + * @property {string|null} [url] GooRepository url + */ + + /** + * Constructs a new GooRepository. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @classdesc Represents a GooRepository. + * @implements IGooRepository + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository=} [properties] Properties to set + */ + function GooRepository(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GooRepository name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @instance + */ + GooRepository.prototype.name = ""; + + /** + * GooRepository url. + * @member {string} url + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @instance + */ + GooRepository.prototype.url = ""; + + /** + * Creates a new GooRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository instance + */ + GooRepository.create = function create(properties) { + return new GooRepository(properties); + }; + + /** + * Encodes the specified GooRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository} message GooRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooRepository.encode = function encode(message, writer) { + 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.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + return writer; + }; + + /** + * Encodes the specified GooRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository} message GooRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GooRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.url = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GooRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GooRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GooRepository.verify = function verify(message) { + if (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.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates a GooRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository + */ + GooRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository(); + if (object.name != null) + message.name = String(object.name); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from a GooRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} message GooRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GooRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.url = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; + + /** + * Converts this GooRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @instance + * @returns {Object.} JSON object + */ + GooRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GooRepository; + })(); + + return RepositoryResource; })(); - Resource.PackageResource = (function() { + Resource.ExecResource = (function() { /** - * Properties of a PackageResource. + * Properties of an ExecResource. * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @interface IPackageResource - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState|null} [desiredState] PackageResource desiredState - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null} [apt] PackageResource apt - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null} [deb] PackageResource deb - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null} [yum] PackageResource yum - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null} [zypper] PackageResource zypper - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null} [rpm] PackageResource rpm - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null} [googet] PackageResource googet - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null} [msi] PackageResource msi + * @interface IExecResource + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null} [validate] ExecResource validate + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null} [enforce] ExecResource enforce */ /** - * Constructs a new PackageResource. + * Constructs a new ExecResource. * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @classdesc Represents a PackageResource. - * @implements IPackageResource + * @classdesc Represents an ExecResource. + * @implements IExecResource * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource=} [properties] Properties to set */ - function PackageResource(properties) { + function ExecResource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31471,180 +28452,88 @@ } /** - * PackageResource desiredState. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState} desiredState - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @instance - */ - PackageResource.prototype.desiredState = 0; - - /** - * PackageResource apt. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT|null|undefined} apt - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * ExecResource validate. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null|undefined} validate + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource * @instance */ - PackageResource.prototype.apt = null; + ExecResource.prototype.validate = null; /** - * PackageResource deb. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb|null|undefined} deb - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * ExecResource enforce. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null|undefined} enforce + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource * @instance */ - PackageResource.prototype.deb = null; + ExecResource.prototype.enforce = null; /** - * PackageResource yum. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM|null|undefined} yum - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @instance + * Creates a new ExecResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource instance */ - PackageResource.prototype.yum = null; + ExecResource.create = function create(properties) { + return new ExecResource(properties); + }; /** - * PackageResource zypper. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper|null|undefined} zypper - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @instance + * Encodes the specified ExecResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource} message ExecResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - PackageResource.prototype.zypper = null; + ExecResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validate != null && Object.hasOwnProperty.call(message, "validate")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.encode(message.validate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.enforce != null && Object.hasOwnProperty.call(message, "enforce")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.encode(message.enforce, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * PackageResource rpm. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM|null|undefined} rpm - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @instance + * Encodes the specified ExecResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource} message ExecResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - PackageResource.prototype.rpm = null; + ExecResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * PackageResource googet. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet|null|undefined} googet - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @instance + * Decodes an ExecResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PackageResource.prototype.googet = null; - - /** - * PackageResource msi. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI|null|undefined} msi - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @instance - */ - PackageResource.prototype.msi = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PackageResource systemPackage. - * @member {"apt"|"deb"|"yum"|"zypper"|"rpm"|"googet"|"msi"|undefined} systemPackage - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @instance - */ - Object.defineProperty(PackageResource.prototype, "systemPackage", { - get: $util.oneOfGetter($oneOfFields = ["apt", "deb", "yum", "zypper", "rpm", "googet", "msi"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PackageResource instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource instance - */ - PackageResource.create = function create(properties) { - return new PackageResource(properties); - }; - - /** - * Encodes the specified PackageResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource} message PackageResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PackageResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.desiredState != null && Object.hasOwnProperty.call(message, "desiredState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.desiredState); - if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.encode(message.apt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.deb != null && Object.hasOwnProperty.call(message, "deb")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.encode(message.deb, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.encode(message.yum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.encode(message.zypper, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.rpm != null && Object.hasOwnProperty.call(message, "rpm")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.encode(message.rpm, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.googet != null && Object.hasOwnProperty.call(message, "googet")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.encode(message.googet, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.msi != null && Object.hasOwnProperty.call(message, "msi")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.encode(message.msi, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PackageResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IPackageResource} message PackageResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PackageResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PackageResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PackageResource.decode = function decode(reader, length) { + ExecResource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.desiredState = reader.int32(); + message.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); break; case 2: - message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.decode(reader, reader.uint32()); - break; - case 3: - message.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.decode(reader, reader.uint32()); - break; - case 4: - message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.decode(reader, reader.uint32()); - break; - case 5: - message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.decode(reader, reader.uint32()); - break; - case 6: - message.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.decode(reader, reader.uint32()); - break; - case 7: - message.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.decode(reader, reader.uint32()); - break; - case 8: - message.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.decode(reader, reader.uint32()); + message.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -31655,262 +28544,128 @@ }; /** - * Decodes a PackageResource message from the specified reader or buffer, length delimited. + * Decodes an ExecResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PackageResource.decodeDelimited = function decodeDelimited(reader) { + ExecResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PackageResource message. + * Verifies an ExecResource message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PackageResource.verify = function verify(message) { + ExecResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.desiredState != null && message.hasOwnProperty("desiredState")) - switch (message.desiredState) { - default: - return "desiredState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.apt != null && message.hasOwnProperty("apt")) { - properties.systemPackage = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify(message.apt); - if (error) - return "apt." + error; - } - } - if (message.deb != null && message.hasOwnProperty("deb")) { - if (properties.systemPackage === 1) - return "systemPackage: multiple values"; - properties.systemPackage = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify(message.deb); - if (error) - return "deb." + error; - } - } - if (message.yum != null && message.hasOwnProperty("yum")) { - if (properties.systemPackage === 1) - return "systemPackage: multiple values"; - properties.systemPackage = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify(message.yum); - if (error) - return "yum." + error; - } - } - if (message.zypper != null && message.hasOwnProperty("zypper")) { - if (properties.systemPackage === 1) - return "systemPackage: multiple values"; - properties.systemPackage = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify(message.zypper); - if (error) - return "zypper." + error; - } - } - if (message.rpm != null && message.hasOwnProperty("rpm")) { - if (properties.systemPackage === 1) - return "systemPackage: multiple values"; - properties.systemPackage = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify(message.rpm); - if (error) - return "rpm." + error; - } - } - if (message.googet != null && message.hasOwnProperty("googet")) { - if (properties.systemPackage === 1) - return "systemPackage: multiple values"; - properties.systemPackage = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify(message.googet); - if (error) - return "googet." + error; - } + if (message.validate != null && message.hasOwnProperty("validate")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify(message.validate); + if (error) + return "validate." + error; } - if (message.msi != null && message.hasOwnProperty("msi")) { - if (properties.systemPackage === 1) - return "systemPackage: multiple values"; - properties.systemPackage = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify(message.msi); - if (error) - return "msi." + error; - } + if (message.enforce != null && message.hasOwnProperty("enforce")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify(message.enforce); + if (error) + return "enforce." + error; } return null; }; /** - * Creates a PackageResource message from a plain object. Also converts values to their respective internal types. + * Creates an ExecResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} PackageResource + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource */ - PackageResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + ExecResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource(); - switch (object.desiredState) { - case "DESIRED_STATE_UNSPECIFIED": - case 0: - message.desiredState = 0; - break; - case "INSTALLED": - case 1: - message.desiredState = 1; - break; - case "REMOVED": - case 2: - message.desiredState = 2; - break; - } - if (object.apt != null) { - if (typeof object.apt !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.apt: object expected"); - message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.fromObject(object.apt); - } - if (object.deb != null) { - if (typeof object.deb !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.deb: object expected"); - message.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.fromObject(object.deb); - } - if (object.yum != null) { - if (typeof object.yum !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.yum: object expected"); - message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.fromObject(object.yum); - } - if (object.zypper != null) { - if (typeof object.zypper !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.zypper: object expected"); - message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.fromObject(object.zypper); - } - if (object.rpm != null) { - if (typeof object.rpm !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.rpm: object expected"); - message.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.fromObject(object.rpm); - } - if (object.googet != null) { - if (typeof object.googet !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.googet: object expected"); - message.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.fromObject(object.googet); + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource(); + if (object.validate != null) { + if (typeof object.validate !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.validate: object expected"); + message.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.fromObject(object.validate); } - if (object.msi != null) { - if (typeof object.msi !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.msi: object expected"); - message.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.fromObject(object.msi); + if (object.enforce != null) { + if (typeof object.enforce !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.enforce: object expected"); + message.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.fromObject(object.enforce); } return message; }; /** - * Creates a plain object from a PackageResource message. Also converts values to other types if specified. + * Creates a plain object from an ExecResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} message PackageResource + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} message ExecResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PackageResource.toObject = function toObject(message, options) { + ExecResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.desiredState = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; - if (message.desiredState != null && message.hasOwnProperty("desiredState")) - object.desiredState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] : message.desiredState; - if (message.apt != null && message.hasOwnProperty("apt")) { - object.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.toObject(message.apt, options); - if (options.oneofs) - object.systemPackage = "apt"; - } - if (message.deb != null && message.hasOwnProperty("deb")) { - object.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.toObject(message.deb, options); - if (options.oneofs) - object.systemPackage = "deb"; - } - if (message.yum != null && message.hasOwnProperty("yum")) { - object.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.toObject(message.yum, options); - if (options.oneofs) - object.systemPackage = "yum"; - } - if (message.zypper != null && message.hasOwnProperty("zypper")) { - object.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.toObject(message.zypper, options); - if (options.oneofs) - object.systemPackage = "zypper"; - } - if (message.rpm != null && message.hasOwnProperty("rpm")) { - object.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.toObject(message.rpm, options); - if (options.oneofs) - object.systemPackage = "rpm"; - } - if (message.googet != null && message.hasOwnProperty("googet")) { - object.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.toObject(message.googet, options); - if (options.oneofs) - object.systemPackage = "googet"; - } - if (message.msi != null && message.hasOwnProperty("msi")) { - object.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.toObject(message.msi, options); - if (options.oneofs) - object.systemPackage = "msi"; + if (options.defaults) { + object.validate = null; + object.enforce = null; } + if (message.validate != null && message.hasOwnProperty("validate")) + object.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.toObject(message.validate, options); + if (message.enforce != null && message.hasOwnProperty("enforce")) + object.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.toObject(message.enforce, options); return object; }; /** - * Converts this PackageResource to JSON. + * Converts this ExecResource to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource * @instance * @returns {Object.} JSON object */ - PackageResource.prototype.toJSON = function toJSON() { + ExecResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - PackageResource.Deb = (function() { + ExecResource.Exec = (function() { /** - * Properties of a Deb. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @interface IDeb - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [source] Deb source - * @property {boolean|null} [pullDeps] Deb pullDeps + * Properties of an Exec. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @interface IExec + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [file] Exec file + * @property {string|null} [script] Exec script + * @property {Array.|null} [args] Exec args + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|null} [interpreter] Exec interpreter + * @property {string|null} [outputFilePath] Exec outputFilePath */ /** - * Constructs a new Deb. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @classdesc Represents a Deb. - * @implements IDeb + * Constructs a new Exec. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @classdesc Represents an Exec. + * @implements IExec * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec=} [properties] Properties to set */ - function Deb(properties) { + function Exec(properties) { + this.args = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31918,88 +28673,144 @@ } /** - * Deb source. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} source - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * Exec file. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} file + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @instance */ - Deb.prototype.source = null; + Exec.prototype.file = null; /** - * Deb pullDeps. - * @member {boolean} pullDeps - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * Exec script. + * @member {string|null|undefined} script + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @instance */ - Deb.prototype.pullDeps = false; + Exec.prototype.script = null; /** - * Creates a new Deb instance using the specified properties. + * Exec args. + * @member {Array.} args + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.args = $util.emptyArray; + + /** + * Exec interpreter. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter} interpreter + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.interpreter = 0; + + /** + * Exec outputFilePath. + * @member {string} outputFilePath + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.outputFilePath = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Exec source. + * @member {"file"|"script"|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Object.defineProperty(Exec.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["file", "script"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Exec instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb instance + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec instance */ - Deb.create = function create(properties) { - return new Deb(properties); + Exec.create = function create(properties) { + return new Exec(properties); }; /** - * Encodes the specified Deb message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * Encodes the specified Exec message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb} message Deb message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec} message Exec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Deb.encode = function encode(message, writer) { + Exec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pullDeps != null && Object.hasOwnProperty.call(message, "pullDeps")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.pullDeps); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.file, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.script != null && Object.hasOwnProperty.call(message, "script")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.script); + if (message.args != null && message.args.length) + for (var i = 0; i < message.args.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); + if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); + if (message.outputFilePath != null && Object.hasOwnProperty.call(message, "outputFilePath")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.outputFilePath); return writer; }; /** - * Encodes the specified Deb message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * Encodes the specified Exec message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IDeb} message Deb message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec} message Exec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Deb.encodeDelimited = function encodeDelimited(message, writer) { + Exec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Deb message from the specified reader or buffer. + * Decodes an Exec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Deb.decode = function decode(reader, length) { + Exec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); break; case 2: - message.pullDeps = reader.bool(); + message.script = reader.string(); + break; + case 3: + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); + break; + case 4: + message.interpreter = reader.int32(); + break; + case 5: + message.outputFilePath = reader.string(); break; default: reader.skipType(tag & 7); @@ -32010,4111 +28821,3665 @@ }; /** - * Decodes a Deb message from the specified reader or buffer, length delimited. + * Decodes an Exec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Deb.decodeDelimited = function decodeDelimited(reader) { + Exec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Deb message. + * Verifies an Exec message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Deb.verify = function verify(message) { + Exec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.source); - if (error) - return "source." + error; - } - if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) - if (typeof message.pullDeps !== "boolean") - return "pullDeps: boolean expected"; - return null; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.source = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.file); + if (error) + return "file." + error; + } + } + if (message.script != null && message.hasOwnProperty("script")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.script)) + return "script: string expected"; + } + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + switch (message.interpreter) { + default: + return "interpreter: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) + if (!$util.isString(message.outputFilePath)) + return "outputFilePath: string expected"; + return null; }; /** - * Creates a Deb message from a plain object. Also converts values to their respective internal types. + * Creates an Exec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} Deb + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec */ - Deb.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + Exec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.source: object expected"); - message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.source); + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec(); + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.file: object expected"); + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.file); } - if (object.pullDeps != null) - message.pullDeps = Boolean(object.pullDeps); + if (object.script != null) + message.script = String(object.script); + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); + } + switch (object.interpreter) { + case "INTERPRETER_UNSPECIFIED": + case 0: + message.interpreter = 0; + break; + case "NONE": + case 1: + message.interpreter = 1; + break; + case "SHELL": + case 2: + message.interpreter = 2; + break; + case "POWERSHELL": + case 3: + message.interpreter = 3; + break; + } + if (object.outputFilePath != null) + message.outputFilePath = String(object.outputFilePath); return message; }; /** - * Creates a plain object from a Deb message. Also converts values to other types if specified. + * Creates a plain object from an Exec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} message Deb + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} message Exec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Deb.toObject = function toObject(message, options) { + Exec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.args = []; if (options.defaults) { - object.source = null; - object.pullDeps = false; + object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; + object.outputFilePath = ""; } - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.source, options); - if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) - object.pullDeps = message.pullDeps; + if (message.file != null && message.hasOwnProperty("file")) { + object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.file, options); + if (options.oneofs) + object.source = "file"; + } + if (message.script != null && message.hasOwnProperty("script")) { + object.script = message.script; + if (options.oneofs) + object.source = "script"; + } + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] : message.interpreter; + if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) + object.outputFilePath = message.outputFilePath; return object; }; /** - * Converts this Deb to JSON. + * Converts this Exec to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec * @instance * @returns {Object.} JSON object */ - Deb.prototype.toJSON = function toJSON() { + Exec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Deb; - })(); - - PackageResource.APT = (function() { - /** - * Properties of a APT. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @interface IAPT - * @property {string|null} [name] APT name + * Interpreter enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + * @enum {number} + * @property {number} INTERPRETER_UNSPECIFIED=0 INTERPRETER_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} SHELL=2 SHELL value + * @property {number} POWERSHELL=3 POWERSHELL value */ + Exec.Interpreter = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTERPRETER_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "SHELL"] = 2; + values[valuesById[3] = "POWERSHELL"] = 3; + return values; + })(); - /** - * Constructs a new APT. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @classdesc Represents a APT. - * @implements IAPT - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT=} [properties] Properties to set - */ - function APT(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return Exec; + })(); - /** - * APT name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @instance - */ - APT.prototype.name = ""; + return ExecResource; + })(); - /** - * Creates a new APT instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT instance - */ - APT.create = function create(properties) { - return new APT(properties); - }; + Resource.FileResource = (function() { - /** - * Encodes the specified APT message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT} message APT message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - APT.encode = function encode(message, writer) { - 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; - }; + /** + * Properties of a FileResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @interface IFileResource + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [file] FileResource file + * @property {string|null} [content] FileResource content + * @property {string|null} [path] FileResource path + * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|null} [state] FileResource state + * @property {string|null} [permissions] FileResource permissions + */ - /** - * Encodes the specified APT message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IAPT} message APT message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - APT.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new FileResource. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource + * @classdesc Represents a FileResource. + * @implements IFileResource + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource=} [properties] Properties to set + */ + function FileResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a APT message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - APT.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileResource file. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} file + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.file = null; - /** - * Decodes a APT message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - APT.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileResource content. + * @member {string|null|undefined} content + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.content = null; - /** - * Verifies a APT message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - APT.verify = function verify(message) { - if (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; - }; + /** + * FileResource path. + * @member {string} path + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.path = ""; - /** - * Creates a APT message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} APT - */ - APT.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * FileResource state. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState} state + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.state = 0; - /** - * Creates a plain object from a APT message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} message APT - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - APT.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; - }; + /** + * FileResource permissions. + * @member {string} permissions + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.permissions = ""; - /** - * Converts this APT to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT - * @instance - * @returns {Object.} JSON object - */ - APT.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - return APT; - })(); + /** + * FileResource source. + * @member {"file"|"content"|undefined} source + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + */ + Object.defineProperty(FileResource.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["file", "content"]), + set: $util.oneOfSetter($oneOfFields) + }); - PackageResource.RPM = (function() { + /** + * Creates a new FileResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource instance + */ + FileResource.create = function create(properties) { + return new FileResource(properties); + }; - /** - * Properties of a RPM. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @interface IRPM - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [source] RPM source - * @property {boolean|null} [pullDeps] RPM pullDeps - */ + /** + * Encodes the specified FileResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource} message FileResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.file, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.permissions); + return writer; + }; - /** - * Constructs a new RPM. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @classdesc Represents a RPM. - * @implements IRPM - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM=} [properties] Properties to set - */ - function RPM(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Encodes the specified FileResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource} message FileResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.content = reader.string(); + break; + case 3: + message.path = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.permissions = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * RPM source. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} source - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @instance - */ - RPM.prototype.source = null; - - /** - * RPM pullDeps. - * @member {boolean} pullDeps - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @instance - */ - RPM.prototype.pullDeps = false; - - /** - * Creates a new RPM instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM instance - */ - RPM.create = function create(properties) { - return new RPM(properties); - }; - - /** - * Encodes the specified RPM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM} message RPM message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RPM.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pullDeps != null && Object.hasOwnProperty.call(message, "pullDeps")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.pullDeps); - return writer; - }; - - /** - * Encodes the specified RPM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IRPM} message RPM message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RPM.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RPM message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RPM.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.pullDeps = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RPM message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RPM.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a FileResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a RPM message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RPM.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.source); + /** + * Verifies a FileResource message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.source = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.file); if (error) - return "source." + error; + return "file." + error; } - if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) - if (typeof message.pullDeps !== "boolean") - return "pullDeps: boolean expected"; - return null; - }; - - /** - * Creates a RPM message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} RPM - */ - RPM.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.source: object expected"); - message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.source); + } + if (message.content != null && message.hasOwnProperty("content")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.content)) + return "content: string expected"; + } + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: 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 (object.pullDeps != null) - message.pullDeps = Boolean(object.pullDeps); - return message; - }; + if (message.permissions != null && message.hasOwnProperty("permissions")) + if (!$util.isString(message.permissions)) + return "permissions: string expected"; + return null; + }; - /** - * Creates a plain object from a RPM message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} message RPM - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RPM.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.source = null; - object.pullDeps = false; - } - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.source, options); - if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) - object.pullDeps = message.pullDeps; + /** + * Creates a FileResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource + */ + FileResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) return object; - }; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource(); + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.file: object expected"); + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.file); + } + if (object.content != null) + message.content = String(object.content); + if (object.path != null) + message.path = String(object.path); + switch (object.state) { + case "DESIRED_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PRESENT": + case 1: + message.state = 1; + break; + case "ABSENT": + case 2: + message.state = 2; + break; + case "CONTENTS_MATCH": + case 3: + message.state = 3; + break; + } + if (object.permissions != null) + message.permissions = String(object.permissions); + return message; + }; - /** - * Converts this RPM to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM - * @instance - * @returns {Object.} JSON object - */ - RPM.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FileResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} message FileResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.state = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; + object.permissions = ""; + } + if (message.file != null && message.hasOwnProperty("file")) { + object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.file, options); + if (options.oneofs) + object.source = "file"; + } + if (message.content != null && message.hasOwnProperty("content")) { + object.content = message.content; + if (options.oneofs) + object.source = "content"; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState[message.state] : message.state; + if (message.permissions != null && message.hasOwnProperty("permissions")) + object.permissions = message.permissions; + return object; + }; - return RPM; - })(); + /** + * Converts this FileResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @instance + * @returns {Object.} JSON object + */ + FileResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - PackageResource.YUM = (function() { + /** + * DesiredState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState + * @enum {number} + * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value + * @property {number} PRESENT=1 PRESENT value + * @property {number} ABSENT=2 ABSENT value + * @property {number} CONTENTS_MATCH=3 CONTENTS_MATCH value + */ + FileResource.DesiredState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRESENT"] = 1; + values[valuesById[2] = "ABSENT"] = 2; + values[valuesById[3] = "CONTENTS_MATCH"] = 3; + return values; + })(); - /** - * Properties of a YUM. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @interface IYUM - * @property {string|null} [name] YUM name - */ + return FileResource; + })(); - /** - * Constructs a new YUM. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @classdesc Represents a YUM. - * @implements IYUM - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM=} [properties] Properties to set - */ - function YUM(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return Resource; + })(); - /** - * YUM name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @instance - */ - YUM.prototype.name = ""; + OSPolicy.ResourceGroup = (function() { - /** - * Creates a new YUM instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM instance - */ - YUM.create = function create(properties) { - return new YUM(properties); - }; + /** + * Properties of a ResourceGroup. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @interface IResourceGroup + * @property {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null} [osFilter] ResourceGroup osFilter + * @property {Array.|null} [resources] ResourceGroup resources + */ - /** - * Encodes the specified YUM message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM} message YUM message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YUM.encode = function encode(message, writer) { - 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; - }; + /** + * Constructs a new ResourceGroup. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @classdesc Represents a ResourceGroup. + * @implements IResourceGroup + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup=} [properties] Properties to set + */ + function ResourceGroup(properties) { + this.resources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified YUM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IYUM} message YUM message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YUM.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ResourceGroup osFilter. + * @member {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null|undefined} osFilter + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @instance + */ + ResourceGroup.prototype.osFilter = null; - /** - * Decodes a YUM message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YUM.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ResourceGroup resources. + * @member {Array.} resources + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @instance + */ + ResourceGroup.prototype.resources = $util.emptyArray; - /** - * Decodes a YUM message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YUM.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new ResourceGroup instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup instance + */ + ResourceGroup.create = function create(properties) { + return new ResourceGroup(properties); + }; - /** - * Verifies a YUM message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - YUM.verify = function verify(message) { - if (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 YUM message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} YUM - */ - YUM.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a YUM message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} message YUM - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - YUM.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; - }; + /** + * Encodes the specified ResourceGroup message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup} message ResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osFilter != null && Object.hasOwnProperty.call(message, "osFilter")) + $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.encode(message.osFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.encode(message.resources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Converts this YUM to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM - * @instance - * @returns {Object.} JSON object - */ - YUM.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup} message ResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return YUM; - })(); + /** + * Decodes a ResourceGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceGroup.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - PackageResource.Zypper = (function() { + /** + * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a Zypper. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @interface IZypper - * @property {string|null} [name] Zypper name - */ + /** + * Verifies a ResourceGroup message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osFilter != null && message.hasOwnProperty("osFilter")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify(message.osFilter); + if (error) + return "osFilter." + error; + } + 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.osconfig.v1alpha.OSPolicy.Resource.verify(message.resources[i]); + if (error) + return "resources." + error; + } + } + return null; + }; - /** - * Constructs a new Zypper. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @classdesc Represents a Zypper. - * @implements IZypper - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper=} [properties] Properties to set - */ - function Zypper(properties) { - if (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 ResourceGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup + */ + ResourceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(); + if (object.osFilter != null) { + if (typeof object.osFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.osFilter: object expected"); + message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.fromObject(object.osFilter); + } + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.resources: object expected"); + message.resources[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.fromObject(object.resources[i]); } + } + return message; + }; - /** - * Zypper name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @instance - */ - Zypper.prototype.name = ""; + /** + * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} message ResourceGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resources = []; + if (options.defaults) + object.osFilter = null; + if (message.osFilter != null && message.hasOwnProperty("osFilter")) + object.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.toObject(message.osFilter, options); + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.toObject(message.resources[j], options); + } + return object; + }; - /** - * Creates a new Zypper instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper instance - */ - Zypper.create = function create(properties) { - return new Zypper(properties); - }; + /** + * Converts this ResourceGroup to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @instance + * @returns {Object.} JSON object + */ + ResourceGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified Zypper message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper} message Zypper message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Zypper.encode = function encode(message, writer) { - 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; - }; + return ResourceGroup; + })(); - /** - * Encodes the specified Zypper message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IZypper} message Zypper message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Zypper.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Mode enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} VALIDATION=1 VALIDATION value + * @property {number} ENFORCEMENT=2 ENFORCEMENT value + */ + OSPolicy.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VALIDATION"] = 1; + values[valuesById[2] = "ENFORCEMENT"] = 2; + return values; + })(); - /** - * Decodes a Zypper message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Zypper.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return OSPolicy; + })(); - /** - * Decodes a Zypper message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Zypper.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + v1alpha.OSPolicyAssignment = (function() { - /** - * Verifies a Zypper message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Zypper.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Properties of a OSPolicyAssignment. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyAssignment + * @property {string|null} [name] OSPolicyAssignment name + * @property {string|null} [description] OSPolicyAssignment description + * @property {Array.|null} [osPolicies] OSPolicyAssignment osPolicies + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null} [instanceFilter] OSPolicyAssignment instanceFilter + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null} [rollout] OSPolicyAssignment rollout + * @property {string|null} [revisionId] OSPolicyAssignment revisionId + * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] OSPolicyAssignment revisionCreateTime + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null} [rolloutState] OSPolicyAssignment rolloutState + * @property {boolean|null} [baseline] OSPolicyAssignment baseline + * @property {boolean|null} [deleted] OSPolicyAssignment deleted + * @property {boolean|null} [reconciling] OSPolicyAssignment reconciling + * @property {string|null} [uid] OSPolicyAssignment uid + */ - /** - * Creates a Zypper message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} Zypper - */ - Zypper.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Constructs a new OSPolicyAssignment. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyAssignment. + * @implements IOSPolicyAssignment + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set + */ + function OSPolicyAssignment(properties) { + this.osPolicies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a plain object from a Zypper message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} message Zypper - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Zypper.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; - }; + /** + * OSPolicyAssignment name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.name = ""; - /** - * Converts this Zypper to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper - * @instance - * @returns {Object.} JSON object - */ - Zypper.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * OSPolicyAssignment description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.description = ""; - return Zypper; - })(); + /** + * OSPolicyAssignment osPolicies. + * @member {Array.} osPolicies + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.osPolicies = $util.emptyArray; - PackageResource.GooGet = (function() { + /** + * OSPolicyAssignment instanceFilter. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.instanceFilter = null; - /** - * Properties of a GooGet. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @interface IGooGet - * @property {string|null} [name] GooGet name - */ + /** + * OSPolicyAssignment rollout. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.rollout = null; - /** - * Constructs a new GooGet. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @classdesc Represents a GooGet. - * @implements IGooGet - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet=} [properties] Properties to set - */ - function GooGet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * OSPolicyAssignment revisionId. + * @member {string} revisionId + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.revisionId = ""; - /** - * GooGet name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @instance - */ - GooGet.prototype.name = ""; - - /** - * Creates a new GooGet instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet instance - */ - GooGet.create = function create(properties) { - return new GooGet(properties); - }; - - /** - * Encodes the specified GooGet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet} message GooGet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GooGet.encode = function encode(message, writer) { - 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; - }; + /** + * OSPolicyAssignment revisionCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.revisionCreateTime = null; - /** - * Encodes the specified GooGet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IGooGet} message GooGet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GooGet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * OSPolicyAssignment rolloutState. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState} rolloutState + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.rolloutState = 0; - /** - * Decodes a GooGet message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GooGet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * OSPolicyAssignment baseline. + * @member {boolean} baseline + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.baseline = false; - /** - * Decodes a GooGet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GooGet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * OSPolicyAssignment deleted. + * @member {boolean} deleted + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.deleted = false; - /** - * Verifies a GooGet message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GooGet.verify = function verify(message) { - if (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; - }; + /** + * OSPolicyAssignment reconciling. + * @member {boolean} reconciling + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.reconciling = false; - /** - * Creates a GooGet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} GooGet - */ - GooGet.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * OSPolicyAssignment uid. + * @member {string} uid + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.uid = ""; - /** - * Creates a plain object from a GooGet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} message GooGet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GooGet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Creates a new OSPolicyAssignment instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment instance + */ + OSPolicyAssignment.create = function create(properties) { + return new OSPolicyAssignment(properties); + }; - /** - * Converts this GooGet to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet - * @instance - * @returns {Object.} JSON object - */ - GooGet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.osPolicies != null && message.osPolicies.length) + for (var i = 0; i < message.osPolicies.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicy.encode(message.osPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.encode(message.rollout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.revisionId); + if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rolloutState); + if (message.baseline != null && Object.hasOwnProperty.call(message, "baseline")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.baseline); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deleted); + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.reconciling); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.uid); + return writer; + }; - return GooGet; - })(); + /** + * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - PackageResource.MSI = (function() { + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.osPolicies && message.osPolicies.length)) + message.osPolicies = []; + message.osPolicies.push($root.google.cloud.osconfig.v1alpha.OSPolicy.decode(reader, reader.uint32())); + break; + case 4: + message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); + break; + case 5: + message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); + break; + case 6: + message.revisionId = reader.string(); + break; + case 7: + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.rolloutState = reader.int32(); + break; + case 10: + message.baseline = reader.bool(); + break; + case 11: + message.deleted = reader.bool(); + break; + case 12: + message.reconciling = reader.bool(); + break; + case 13: + message.uid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a MSI. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @interface IMSI - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [source] MSI source - * @property {Array.|null} [properties] MSI properties - */ + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new MSI. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - * @classdesc Represents a MSI. - * @implements IMSI - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI=} [properties] Properties to set - */ - function MSI(properties) { - this.properties = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a OSPolicyAssignment message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyAssignment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.osPolicies != null && message.hasOwnProperty("osPolicies")) { + if (!Array.isArray(message.osPolicies)) + return "osPolicies: array expected"; + for (var i = 0; i < message.osPolicies.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.verify(message.osPolicies[i]); + if (error) + return "osPolicies." + error; + } + } + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); + if (error) + return "revisionCreateTime." + error; + } + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + switch (message.rolloutState) { + default: + return "rolloutState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.baseline != null && message.hasOwnProperty("baseline")) + if (typeof message.baseline !== "boolean") + return "baseline: boolean expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (typeof message.reconciling !== "boolean") + return "reconciling: boolean expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + return null; + }; - /** - * MSI source. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} source - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @instance - */ - MSI.prototype.source = null; + /** + * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + */ + OSPolicyAssignment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.osPolicies) { + if (!Array.isArray(object.osPolicies)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: array expected"); + message.osPolicies = []; + for (var i = 0; i < object.osPolicies.length; ++i) { + if (typeof object.osPolicies[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: object expected"); + message.osPolicies[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.fromObject(object.osPolicies[i]); + } + } + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.fromObject(object.instanceFilter); + } + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.fromObject(object.rollout); + } + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.revisionCreateTime != null) { + if (typeof object.revisionCreateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.revisionCreateTime: object expected"); + message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + } + switch (object.rolloutState) { + case "ROLLOUT_STATE_UNSPECIFIED": + case 0: + message.rolloutState = 0; + break; + case "IN_PROGRESS": + case 1: + message.rolloutState = 1; + break; + case "CANCELLING": + case 2: + message.rolloutState = 2; + break; + case "CANCELLED": + case 3: + message.rolloutState = 3; + break; + case "SUCCEEDED": + case 4: + message.rolloutState = 4; + break; + } + if (object.baseline != null) + message.baseline = Boolean(object.baseline); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + if (object.reconciling != null) + message.reconciling = Boolean(object.reconciling); + if (object.uid != null) + message.uid = String(object.uid); + return message; + }; - /** - * MSI properties. - * @member {Array.} properties - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @instance - */ - MSI.prototype.properties = $util.emptyArray; + /** + * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} message OSPolicyAssignment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyAssignment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicies = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.instanceFilter = null; + object.rollout = null; + object.revisionId = ""; + object.revisionCreateTime = null; + object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; + object.baseline = false; + object.deleted = false; + object.reconciling = false; + object.uid = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.osPolicies && message.osPolicies.length) { + object.osPolicies = []; + for (var j = 0; j < message.osPolicies.length; ++j) + object.osPolicies[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.toObject(message.osPolicies[j], options); + } + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.toObject(message.instanceFilter, options); + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.toObject(message.rollout, options); + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) + object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; + if (message.baseline != null && message.hasOwnProperty("baseline")) + object.baseline = message.baseline; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + object.reconciling = message.reconciling; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + return object; + }; - /** - * Creates a new MSI instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI instance - */ - MSI.create = function create(properties) { - return new MSI(properties); - }; + /** + * Converts this OSPolicyAssignment to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + * @returns {Object.} JSON object + */ + OSPolicyAssignment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified MSI message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI} message MSI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MSI.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.properties != null && message.properties.length) - for (var i = 0; i < message.properties.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.properties[i]); - return writer; - }; + OSPolicyAssignment.LabelSet = (function() { - /** - * Encodes the specified MSI message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.IMSI} message MSI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MSI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a LabelSet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @interface ILabelSet + * @property {Object.|null} [labels] LabelSet labels + */ - /** - * Decodes a MSI message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MSI.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Constructs a new LabelSet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @classdesc Represents a LabelSet. + * @implements ILabelSet + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set + */ + function LabelSet(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelSet labels. + * @member {Object.} labels + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @instance + */ + LabelSet.prototype.labels = $util.emptyObject; + + /** + * Creates a new LabelSet instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet instance + */ + LabelSet.create = function create(properties) { + return new LabelSet(properties); + }; + + /** + * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified LabelSet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelSet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + 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: - message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + key = reader.string(); break; case 2: - if (!(message.properties && message.properties.length)) - message.properties = []; - message.properties.push(reader.string()); + value = reader.string(); break; default: - reader.skipType(tag & 7); + reader.skipType(tag2 & 7); break; } } - return message; - }; + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a MSI message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MSI.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LabelSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a MSI message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MSI.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.source); - if (error) - return "source." + error; - } - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!Array.isArray(message.properties)) - return "properties: array expected"; - for (var i = 0; i < message.properties.length; ++i) - if (!$util.isString(message.properties[i])) - return "properties: string[] expected"; - } - return null; - }; + /** + * Verifies a LabelSet message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; - /** - * Creates a MSI message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} MSI - */ - MSI.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.source: object expected"); - message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.source); - } - if (object.properties) { - if (!Array.isArray(object.properties)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.properties: array expected"); - message.properties = []; - for (var i = 0; i < object.properties.length; ++i) - message.properties[i] = String(object.properties[i]); - } - return message; - }; + /** + * Creates a LabelSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet + */ + LabelSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; - /** - * Creates a plain object from a MSI message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} message MSI - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MSI.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.properties = []; - if (options.defaults) - object.source = null; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.source, options); - if (message.properties && message.properties.length) { - object.properties = []; - for (var j = 0; j < message.properties.length; ++j) - object.properties[j] = message.properties[j]; - } - return object; - }; + /** + * Creates a plain object from a LabelSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} message LabelSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; - /** - * Converts this MSI to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI - * @instance - * @returns {Object.} JSON object - */ - MSI.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this LabelSet to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @instance + * @returns {Object.} JSON object + */ + LabelSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MSI; - })(); + return LabelSet; + })(); - /** - * DesiredState enum. - * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState - * @enum {number} - * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value - * @property {number} INSTALLED=1 INSTALLED value - * @property {number} REMOVED=2 REMOVED value - */ - PackageResource.DesiredState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTALLED"] = 1; - values[valuesById[2] = "REMOVED"] = 2; - return values; - })(); + OSPolicyAssignment.InstanceFilter = (function() { - return PackageResource; - })(); + /** + * Properties of an InstanceFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @interface IInstanceFilter + * @property {boolean|null} [all] InstanceFilter all + * @property {Array.|null} [osShortNames] InstanceFilter osShortNames + * @property {Array.|null} [inclusionLabels] InstanceFilter inclusionLabels + * @property {Array.|null} [exclusionLabels] InstanceFilter exclusionLabels + */ - Resource.RepositoryResource = (function() { + /** + * Constructs a new InstanceFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @classdesc Represents an InstanceFilter. + * @implements IInstanceFilter + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter=} [properties] Properties to set + */ + function InstanceFilter(properties) { + this.osShortNames = []; + this.inclusionLabels = []; + this.exclusionLabels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a RepositoryResource. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @interface IRepositoryResource - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null} [apt] RepositoryResource apt - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null} [yum] RepositoryResource yum - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null} [zypper] RepositoryResource zypper - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null} [goo] RepositoryResource goo - */ + /** + * InstanceFilter all. + * @member {boolean} all + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.all = false; - /** - * Constructs a new RepositoryResource. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @classdesc Represents a RepositoryResource. - * @implements IRepositoryResource - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource=} [properties] Properties to set - */ - function RepositoryResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RepositoryResource apt. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository|null|undefined} apt - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @instance - */ - RepositoryResource.prototype.apt = null; - - /** - * RepositoryResource yum. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository|null|undefined} yum - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @instance - */ - RepositoryResource.prototype.yum = null; - - /** - * RepositoryResource zypper. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository|null|undefined} zypper - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @instance - */ - RepositoryResource.prototype.zypper = null; - - /** - * RepositoryResource goo. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository|null|undefined} goo - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @instance - */ - RepositoryResource.prototype.goo = null; + /** + * InstanceFilter osShortNames. + * @member {Array.} osShortNames + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.osShortNames = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * InstanceFilter inclusionLabels. + * @member {Array.} inclusionLabels + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.inclusionLabels = $util.emptyArray; - /** - * RepositoryResource repository. - * @member {"apt"|"yum"|"zypper"|"goo"|undefined} repository - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @instance - */ - Object.defineProperty(RepositoryResource.prototype, "repository", { - get: $util.oneOfGetter($oneOfFields = ["apt", "yum", "zypper", "goo"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * InstanceFilter exclusionLabels. + * @member {Array.} exclusionLabels + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.exclusionLabels = $util.emptyArray; - /** - * Creates a new RepositoryResource instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource instance - */ - RepositoryResource.create = function create(properties) { - return new RepositoryResource(properties); - }; + /** + * Creates a new InstanceFilter instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter instance + */ + InstanceFilter.create = function create(properties) { + return new InstanceFilter(properties); + }; - /** - * Encodes the specified RepositoryResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource} message RepositoryResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RepositoryResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.encode(message.apt, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.encode(message.yum, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.encode(message.zypper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.goo != null && Object.hasOwnProperty.call(message, "goo")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.encode(message.goo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified InstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter} message InstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.all != null && Object.hasOwnProperty.call(message, "all")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all); + if (message.osShortNames != null && message.osShortNames.length) + for (var i = 0; i < message.osShortNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osShortNames[i]); + if (message.inclusionLabels != null && message.inclusionLabels.length) + for (var i = 0; i < message.inclusionLabels.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.encode(message.inclusionLabels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.exclusionLabels != null && message.exclusionLabels.length) + for (var i = 0; i < message.exclusionLabels.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.encode(message.exclusionLabels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified RepositoryResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IRepositoryResource} message RepositoryResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RepositoryResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified InstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter} message InstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a RepositoryResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RepositoryResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.decode(reader, reader.uint32()); - break; - case 2: - message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.decode(reader, reader.uint32()); - break; - case 3: - message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.decode(reader, reader.uint32()); - break; - case 4: - message.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes an InstanceFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.all = reader.bool(); + break; + case 2: + if (!(message.osShortNames && message.osShortNames.length)) + message.osShortNames = []; + message.osShortNames.push(reader.string()); + break; + case 3: + if (!(message.inclusionLabels && message.inclusionLabels.length)) + message.inclusionLabels = []; + message.inclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.exclusionLabels && message.exclusionLabels.length)) + message.exclusionLabels = []; + message.exclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a RepositoryResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RepositoryResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a RepositoryResource message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RepositoryResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.apt != null && message.hasOwnProperty("apt")) { - properties.repository = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify(message.apt); - if (error) - return "apt." + error; - } - } - if (message.yum != null && message.hasOwnProperty("yum")) { - if (properties.repository === 1) - return "repository: multiple values"; - properties.repository = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify(message.yum); - if (error) - return "yum." + error; - } - } - if (message.zypper != null && message.hasOwnProperty("zypper")) { - if (properties.repository === 1) - return "repository: multiple values"; - properties.repository = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify(message.zypper); - if (error) - return "zypper." + error; - } + /** + * Verifies an InstanceFilter message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.all != null && message.hasOwnProperty("all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; + if (message.osShortNames != null && message.hasOwnProperty("osShortNames")) { + if (!Array.isArray(message.osShortNames)) + return "osShortNames: array expected"; + for (var i = 0; i < message.osShortNames.length; ++i) + if (!$util.isString(message.osShortNames[i])) + return "osShortNames: string[] expected"; + } + if (message.inclusionLabels != null && message.hasOwnProperty("inclusionLabels")) { + if (!Array.isArray(message.inclusionLabels)) + return "inclusionLabels: array expected"; + for (var i = 0; i < message.inclusionLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.inclusionLabels[i]); + if (error) + return "inclusionLabels." + error; } - if (message.goo != null && message.hasOwnProperty("goo")) { - if (properties.repository === 1) - return "repository: multiple values"; - properties.repository = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify(message.goo); - if (error) - return "goo." + error; - } + } + if (message.exclusionLabels != null && message.hasOwnProperty("exclusionLabels")) { + if (!Array.isArray(message.exclusionLabels)) + return "exclusionLabels: array expected"; + for (var i = 0; i < message.exclusionLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.exclusionLabels[i]); + if (error) + return "exclusionLabels." + error; } - return null; - }; + } + return null; + }; - /** - * Creates a RepositoryResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} RepositoryResource - */ - RepositoryResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource(); - if (object.apt != null) { - if (typeof object.apt !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.apt: object expected"); - message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.fromObject(object.apt); - } - if (object.yum != null) { - if (typeof object.yum !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.yum: object expected"); - message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.fromObject(object.yum); - } - if (object.zypper != null) { - if (typeof object.zypper !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.zypper: object expected"); - message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.fromObject(object.zypper); + /** + * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter + */ + InstanceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); + if (object.all != null) + message.all = Boolean(object.all); + if (object.osShortNames) { + if (!Array.isArray(object.osShortNames)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.osShortNames: array expected"); + message.osShortNames = []; + for (var i = 0; i < object.osShortNames.length; ++i) + message.osShortNames[i] = String(object.osShortNames[i]); + } + if (object.inclusionLabels) { + if (!Array.isArray(object.inclusionLabels)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: array expected"); + message.inclusionLabels = []; + for (var i = 0; i < object.inclusionLabels.length; ++i) { + if (typeof object.inclusionLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: object expected"); + message.inclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.inclusionLabels[i]); } - if (object.goo != null) { - if (typeof object.goo !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.goo: object expected"); - message.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.fromObject(object.goo); + } + if (object.exclusionLabels) { + if (!Array.isArray(object.exclusionLabels)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: array expected"); + message.exclusionLabels = []; + for (var i = 0; i < object.exclusionLabels.length; ++i) { + if (typeof object.exclusionLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: object expected"); + message.exclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.exclusionLabels[i]); } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a RepositoryResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} message RepositoryResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RepositoryResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.apt != null && message.hasOwnProperty("apt")) { - object.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.toObject(message.apt, options); - if (options.oneofs) - object.repository = "apt"; - } - if (message.yum != null && message.hasOwnProperty("yum")) { - object.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.toObject(message.yum, options); - if (options.oneofs) - object.repository = "yum"; - } - if (message.zypper != null && message.hasOwnProperty("zypper")) { - object.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.toObject(message.zypper, options); - if (options.oneofs) - object.repository = "zypper"; - } - if (message.goo != null && message.hasOwnProperty("goo")) { - object.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.toObject(message.goo, options); - if (options.oneofs) - object.repository = "goo"; - } - return object; - }; + /** + * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} message InstanceFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.osShortNames = []; + object.inclusionLabels = []; + object.exclusionLabels = []; + } + if (options.defaults) + object.all = false; + if (message.all != null && message.hasOwnProperty("all")) + object.all = message.all; + if (message.osShortNames && message.osShortNames.length) { + object.osShortNames = []; + for (var j = 0; j < message.osShortNames.length; ++j) + object.osShortNames[j] = message.osShortNames[j]; + } + if (message.inclusionLabels && message.inclusionLabels.length) { + object.inclusionLabels = []; + for (var j = 0; j < message.inclusionLabels.length; ++j) + object.inclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.inclusionLabels[j], options); + } + if (message.exclusionLabels && message.exclusionLabels.length) { + object.exclusionLabels = []; + for (var j = 0; j < message.exclusionLabels.length; ++j) + object.exclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.exclusionLabels[j], options); + } + return object; + }; - /** - * Converts this RepositoryResource to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @instance - * @returns {Object.} JSON object - */ - RepositoryResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this InstanceFilter to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + * @returns {Object.} JSON object + */ + InstanceFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - RepositoryResource.AptRepository = (function() { + return InstanceFilter; + })(); - /** - * Properties of an AptRepository. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @interface IAptRepository - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|null} [archiveType] AptRepository archiveType - * @property {string|null} [uri] AptRepository uri - * @property {string|null} [distribution] AptRepository distribution - * @property {Array.|null} [components] AptRepository components - * @property {string|null} [gpgKey] AptRepository gpgKey - */ + OSPolicyAssignment.Rollout = (function() { - /** - * Constructs a new AptRepository. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @classdesc Represents an AptRepository. - * @implements IAptRepository - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository=} [properties] Properties to set - */ - function AptRepository(properties) { - this.components = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a Rollout. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @interface IRollout + * @property {google.cloud.osconfig.v1alpha.IFixedOrPercent|null} [disruptionBudget] Rollout disruptionBudget + * @property {google.protobuf.IDuration|null} [minWaitDuration] Rollout minWaitDuration + */ - /** - * AptRepository archiveType. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType} archiveType - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @instance - */ - AptRepository.prototype.archiveType = 0; + /** + * Constructs a new Rollout. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @classdesc Represents a Rollout. + * @implements IRollout + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout=} [properties] Properties to set + */ + function Rollout(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * AptRepository uri. - * @member {string} uri - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @instance - */ - AptRepository.prototype.uri = ""; + /** + * Rollout disruptionBudget. + * @member {google.cloud.osconfig.v1alpha.IFixedOrPercent|null|undefined} disruptionBudget + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @instance + */ + Rollout.prototype.disruptionBudget = null; - /** - * AptRepository distribution. - * @member {string} distribution - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @instance - */ - AptRepository.prototype.distribution = ""; + /** + * Rollout minWaitDuration. + * @member {google.protobuf.IDuration|null|undefined} minWaitDuration + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @instance + */ + Rollout.prototype.minWaitDuration = null; - /** - * AptRepository components. - * @member {Array.} components - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @instance - */ - AptRepository.prototype.components = $util.emptyArray; + /** + * Creates a new Rollout instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout instance + */ + Rollout.create = function create(properties) { + return new Rollout(properties); + }; - /** - * AptRepository gpgKey. - * @member {string} gpgKey - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @instance - */ - AptRepository.prototype.gpgKey = ""; + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disruptionBudget != null && Object.hasOwnProperty.call(message, "disruptionBudget")) + $root.google.cloud.osconfig.v1alpha.FixedOrPercent.encode(message.disruptionBudget, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minWaitDuration != null && Object.hasOwnProperty.call(message, "minWaitDuration")) + $root.google.protobuf.Duration.encode(message.minWaitDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Creates a new AptRepository instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository instance - */ - AptRepository.create = function create(properties) { - return new AptRepository(properties); - }; + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified AptRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository} message AptRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AptRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.archiveType != null && Object.hasOwnProperty.call(message, "archiveType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.archiveType); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.distribution != null && Object.hasOwnProperty.call(message, "distribution")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.distribution); - if (message.components != null && message.components.length) - for (var i = 0; i < message.components.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.components[i]); - if (message.gpgKey != null && Object.hasOwnProperty.call(message, "gpgKey")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.gpgKey); - return writer; - }; + /** + * Decodes a Rollout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.decode(reader, reader.uint32()); + break; + case 2: + message.minWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IAptRepository} message AptRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AptRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an AptRepository message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AptRepository.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.archiveType = reader.int32(); - break; - case 2: - message.uri = reader.string(); - break; - case 3: - message.distribution = reader.string(); - break; - case 4: - if (!(message.components && message.components.length)) - message.components = []; - message.components.push(reader.string()); - break; - case 5: - message.gpgKey = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a Rollout message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rollout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) { + var error = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.verify(message.disruptionBudget); + if (error) + return "disruptionBudget." + error; + } + if (message.minWaitDuration != null && message.hasOwnProperty("minWaitDuration")) { + var error = $root.google.protobuf.Duration.verify(message.minWaitDuration); + if (error) + return "minWaitDuration." + error; + } + return null; + }; - /** - * Decodes an AptRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AptRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout + */ + Rollout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout(); + if (object.disruptionBudget != null) { + if (typeof object.disruptionBudget !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.disruptionBudget: object expected"); + message.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.fromObject(object.disruptionBudget); + } + if (object.minWaitDuration != null) { + if (typeof object.minWaitDuration !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.minWaitDuration: object expected"); + message.minWaitDuration = $root.google.protobuf.Duration.fromObject(object.minWaitDuration); + } + return message; + }; - /** - * Verifies an AptRepository message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AptRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.archiveType != null && message.hasOwnProperty("archiveType")) - switch (message.archiveType) { - default: - return "archiveType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.distribution != null && message.hasOwnProperty("distribution")) - if (!$util.isString(message.distribution)) - return "distribution: string expected"; - if (message.components != null && message.hasOwnProperty("components")) { - if (!Array.isArray(message.components)) - return "components: array expected"; - for (var i = 0; i < message.components.length; ++i) - if (!$util.isString(message.components[i])) - return "components: string[] expected"; - } - if (message.gpgKey != null && message.hasOwnProperty("gpgKey")) - if (!$util.isString(message.gpgKey)) - return "gpgKey: string expected"; - return null; - }; + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} message Rollout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rollout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disruptionBudget = null; + object.minWaitDuration = null; + } + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) + object.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.toObject(message.disruptionBudget, options); + if (message.minWaitDuration != null && message.hasOwnProperty("minWaitDuration")) + object.minWaitDuration = $root.google.protobuf.Duration.toObject(message.minWaitDuration, options); + return object; + }; - /** - * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository - */ - AptRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository(); - switch (object.archiveType) { - case "ARCHIVE_TYPE_UNSPECIFIED": - case 0: - message.archiveType = 0; - break; - case "DEB": - case 1: - message.archiveType = 1; - break; - case "DEB_SRC": - case 2: - message.archiveType = 2; - break; - } - if (object.uri != null) - message.uri = String(object.uri); - if (object.distribution != null) - message.distribution = String(object.distribution); - if (object.components) { - if (!Array.isArray(object.components)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.components: array expected"); - message.components = []; - for (var i = 0; i < object.components.length; ++i) - message.components[i] = String(object.components[i]); - } - if (object.gpgKey != null) - message.gpgKey = String(object.gpgKey); - return message; - }; + /** + * Converts this Rollout to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @instance + * @returns {Object.} JSON object + */ + Rollout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from an AptRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} message AptRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AptRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.components = []; - if (options.defaults) { - object.archiveType = options.enums === String ? "ARCHIVE_TYPE_UNSPECIFIED" : 0; - object.uri = ""; - object.distribution = ""; - object.gpgKey = ""; - } - if (message.archiveType != null && message.hasOwnProperty("archiveType")) - object.archiveType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] : message.archiveType; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.distribution != null && message.hasOwnProperty("distribution")) - object.distribution = message.distribution; - if (message.components && message.components.length) { - object.components = []; - for (var j = 0; j < message.components.length; ++j) - object.components[j] = message.components[j]; - } - if (message.gpgKey != null && message.hasOwnProperty("gpgKey")) - object.gpgKey = message.gpgKey; - return object; - }; + return Rollout; + })(); - /** - * Converts this AptRepository to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository - * @instance - * @returns {Object.} JSON object - */ - AptRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ArchiveType enum. - * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType - * @enum {number} - * @property {number} ARCHIVE_TYPE_UNSPECIFIED=0 ARCHIVE_TYPE_UNSPECIFIED value - * @property {number} DEB=1 DEB value - * @property {number} DEB_SRC=2 DEB_SRC value - */ - AptRepository.ArchiveType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ARCHIVE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEB"] = 1; - values[valuesById[2] = "DEB_SRC"] = 2; - return values; - })(); - - return AptRepository; - })(); - - RepositoryResource.YumRepository = (function() { - - /** - * Properties of a YumRepository. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @interface IYumRepository - * @property {string|null} [id] YumRepository id - * @property {string|null} [displayName] YumRepository displayName - * @property {string|null} [baseUrl] YumRepository baseUrl - * @property {Array.|null} [gpgKeys] YumRepository gpgKeys - */ - - /** - * Constructs a new YumRepository. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @classdesc Represents a YumRepository. - * @implements IYumRepository - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository=} [properties] Properties to set - */ - function YumRepository(properties) { - this.gpgKeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * RolloutState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState + * @enum {number} + * @property {number} ROLLOUT_STATE_UNSPECIFIED=0 ROLLOUT_STATE_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + */ + OSPolicyAssignment.RolloutState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLLOUT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + return values; + })(); - /** - * YumRepository id. - * @member {string} id - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @instance - */ - YumRepository.prototype.id = ""; + return OSPolicyAssignment; + })(); - /** - * YumRepository displayName. - * @member {string} displayName - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @instance - */ - YumRepository.prototype.displayName = ""; + v1alpha.OSPolicyAssignmentOperationMetadata = (function() { - /** - * YumRepository baseUrl. - * @member {string} baseUrl - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @instance - */ - YumRepository.prototype.baseUrl = ""; + /** + * Properties of a OSPolicyAssignmentOperationMetadata. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyAssignmentOperationMetadata + * @property {string|null} [osPolicyAssignment] OSPolicyAssignmentOperationMetadata osPolicyAssignment + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|null} [apiMethod] OSPolicyAssignmentOperationMetadata apiMethod + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|null} [rolloutState] OSPolicyAssignmentOperationMetadata rolloutState + * @property {google.protobuf.ITimestamp|null} [rolloutStartTime] OSPolicyAssignmentOperationMetadata rolloutStartTime + * @property {google.protobuf.ITimestamp|null} [rolloutUpdateTime] OSPolicyAssignmentOperationMetadata rolloutUpdateTime + */ - /** - * YumRepository gpgKeys. - * @member {Array.} gpgKeys - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @instance - */ - YumRepository.prototype.gpgKeys = $util.emptyArray; + /** + * Constructs a new OSPolicyAssignmentOperationMetadata. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyAssignmentOperationMetadata. + * @implements IOSPolicyAssignmentOperationMetadata + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata=} [properties] Properties to set + */ + function OSPolicyAssignmentOperationMetadata(properties) { + if (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 YumRepository instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository instance - */ - YumRepository.create = function create(properties) { - return new YumRepository(properties); - }; + /** + * OSPolicyAssignmentOperationMetadata osPolicyAssignment. + * @member {string} osPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.osPolicyAssignment = ""; - /** - * Encodes the specified YumRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository} message YumRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YumRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.baseUrl != null && Object.hasOwnProperty.call(message, "baseUrl")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.baseUrl); - if (message.gpgKeys != null && message.gpgKeys.length) - for (var i = 0; i < message.gpgKeys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.gpgKeys[i]); - return writer; - }; + /** + * OSPolicyAssignmentOperationMetadata apiMethod. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod} apiMethod + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.apiMethod = 0; - /** - * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IYumRepository} message YumRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YumRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * OSPolicyAssignmentOperationMetadata rolloutState. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState} rolloutState + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.rolloutState = 0; - /** - * Decodes a YumRepository message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YumRepository.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.baseUrl = reader.string(); - break; - case 4: - if (!(message.gpgKeys && message.gpgKeys.length)) - message.gpgKeys = []; - message.gpgKeys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * OSPolicyAssignmentOperationMetadata rolloutStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} rolloutStartTime + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.rolloutStartTime = null; - /** - * Decodes a YumRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YumRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * OSPolicyAssignmentOperationMetadata rolloutUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} rolloutUpdateTime + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.rolloutUpdateTime = null; - /** - * Verifies a YumRepository message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - YumRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) - if (!$util.isString(message.baseUrl)) - return "baseUrl: string expected"; - if (message.gpgKeys != null && message.hasOwnProperty("gpgKeys")) { - if (!Array.isArray(message.gpgKeys)) - return "gpgKeys: array expected"; - for (var i = 0; i < message.gpgKeys.length; ++i) - if (!$util.isString(message.gpgKeys[i])) - return "gpgKeys: string[] expected"; - } - return null; - }; + /** + * Creates a new OSPolicyAssignmentOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata instance + */ + OSPolicyAssignmentOperationMetadata.create = function create(properties) { + return new OSPolicyAssignmentOperationMetadata(properties); + }; - /** - * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository - */ - YumRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository(); - if (object.id != null) - message.id = String(object.id); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.baseUrl != null) - message.baseUrl = String(object.baseUrl); - if (object.gpgKeys) { - if (!Array.isArray(object.gpgKeys)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.gpgKeys: array expected"); - message.gpgKeys = []; - for (var i = 0; i < object.gpgKeys.length; ++i) - message.gpgKeys[i] = String(object.gpgKeys[i]); - } - return message; - }; + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyAssignment); + if (message.apiMethod != null && Object.hasOwnProperty.call(message, "apiMethod")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.apiMethod); + if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rolloutState); + if (message.rolloutStartTime != null && Object.hasOwnProperty.call(message, "rolloutStartTime")) + $root.google.protobuf.Timestamp.encode(message.rolloutStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rolloutUpdateTime != null && Object.hasOwnProperty.call(message, "rolloutUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.rolloutUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from a YumRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} message YumRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - YumRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.gpgKeys = []; - if (options.defaults) { - object.id = ""; - object.displayName = ""; - object.baseUrl = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) - object.baseUrl = message.baseUrl; - if (message.gpgKeys && message.gpgKeys.length) { - object.gpgKeys = []; - for (var j = 0; j < message.gpgKeys.length; ++j) - object.gpgKeys[j] = message.gpgKeys[j]; - } - return object; - }; + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this YumRepository to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository - * @instance - * @returns {Object.} JSON object - */ - YumRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyAssignment = reader.string(); + break; + case 2: + message.apiMethod = reader.int32(); + break; + case 3: + message.rolloutState = reader.int32(); + break; + case 4: + message.rolloutStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.rolloutUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return YumRepository; - })(); + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - RepositoryResource.ZypperRepository = (function() { + /** + * Verifies a OSPolicyAssignmentOperationMetadata message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyAssignmentOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + if (!$util.isString(message.osPolicyAssignment)) + return "osPolicyAssignment: string expected"; + if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) + switch (message.apiMethod) { + default: + return "apiMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + switch (message.rolloutState) { + default: + return "rolloutState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.rolloutStartTime); + if (error) + return "rolloutStartTime." + error; + } + if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.rolloutUpdateTime); + if (error) + return "rolloutUpdateTime." + error; + } + return null; + }; - /** - * Properties of a ZypperRepository. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @interface IZypperRepository - * @property {string|null} [id] ZypperRepository id - * @property {string|null} [displayName] ZypperRepository displayName - * @property {string|null} [baseUrl] ZypperRepository baseUrl - * @property {Array.|null} [gpgKeys] ZypperRepository gpgKeys - */ - - /** - * Constructs a new ZypperRepository. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @classdesc Represents a ZypperRepository. - * @implements IZypperRepository - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository=} [properties] Properties to set - */ - function ZypperRepository(properties) { - this.gpgKeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ZypperRepository id. - * @member {string} id - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @instance - */ - ZypperRepository.prototype.id = ""; - - /** - * ZypperRepository displayName. - * @member {string} displayName - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @instance - */ - ZypperRepository.prototype.displayName = ""; - - /** - * ZypperRepository baseUrl. - * @member {string} baseUrl - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @instance - */ - ZypperRepository.prototype.baseUrl = ""; + /** + * Creates a OSPolicyAssignmentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata + */ + OSPolicyAssignmentOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata(); + if (object.osPolicyAssignment != null) + message.osPolicyAssignment = String(object.osPolicyAssignment); + switch (object.apiMethod) { + case "API_METHOD_UNSPECIFIED": + case 0: + message.apiMethod = 0; + break; + case "CREATE": + case 1: + message.apiMethod = 1; + break; + case "UPDATE": + case 2: + message.apiMethod = 2; + break; + case "DELETE": + case 3: + message.apiMethod = 3; + break; + } + switch (object.rolloutState) { + case "ROLLOUT_STATE_UNSPECIFIED": + case 0: + message.rolloutState = 0; + break; + case "IN_PROGRESS": + case 1: + message.rolloutState = 1; + break; + case "CANCELLING": + case 2: + message.rolloutState = 2; + break; + case "CANCELLED": + case 3: + message.rolloutState = 3; + break; + case "SUCCEEDED": + case 4: + message.rolloutState = 4; + break; + } + if (object.rolloutStartTime != null) { + if (typeof object.rolloutStartTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.rolloutStartTime: object expected"); + message.rolloutStartTime = $root.google.protobuf.Timestamp.fromObject(object.rolloutStartTime); + } + if (object.rolloutUpdateTime != null) { + if (typeof object.rolloutUpdateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.rolloutUpdateTime: object expected"); + message.rolloutUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.rolloutUpdateTime); + } + return message; + }; - /** - * ZypperRepository gpgKeys. - * @member {Array.} gpgKeys - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @instance - */ - ZypperRepository.prototype.gpgKeys = $util.emptyArray; + /** + * Creates a plain object from a OSPolicyAssignmentOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyAssignmentOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osPolicyAssignment = ""; + object.apiMethod = options.enums === String ? "API_METHOD_UNSPECIFIED" : 0; + object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; + object.rolloutStartTime = null; + object.rolloutUpdateTime = null; + } + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = message.osPolicyAssignment; + if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) + object.apiMethod = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] : message.apiMethod; + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] : message.rolloutState; + if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) + object.rolloutStartTime = $root.google.protobuf.Timestamp.toObject(message.rolloutStartTime, options); + if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) + object.rolloutUpdateTime = $root.google.protobuf.Timestamp.toObject(message.rolloutUpdateTime, options); + return object; + }; - /** - * Creates a new ZypperRepository instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository instance - */ - ZypperRepository.create = function create(properties) { - return new ZypperRepository(properties); - }; + /** + * Converts this OSPolicyAssignmentOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OSPolicyAssignmentOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified ZypperRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository} message ZypperRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ZypperRepository.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.baseUrl != null && Object.hasOwnProperty.call(message, "baseUrl")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.baseUrl); - if (message.gpgKeys != null && message.gpgKeys.length) - for (var i = 0; i < message.gpgKeys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.gpgKeys[i]); - return writer; - }; + /** + * APIMethod enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod + * @enum {number} + * @property {number} API_METHOD_UNSPECIFIED=0 API_METHOD_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} UPDATE=2 UPDATE value + * @property {number} DELETE=3 DELETE value + */ + OSPolicyAssignmentOperationMetadata.APIMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "API_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "UPDATE"] = 2; + values[valuesById[3] = "DELETE"] = 3; + return values; + })(); - /** - * Encodes the specified ZypperRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IZypperRepository} message ZypperRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ZypperRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * RolloutState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + * @enum {number} + * @property {number} ROLLOUT_STATE_UNSPECIFIED=0 ROLLOUT_STATE_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + */ + OSPolicyAssignmentOperationMetadata.RolloutState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLLOUT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + return values; + })(); - /** - * Decodes a ZypperRepository message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ZypperRepository.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.baseUrl = reader.string(); - break; - case 4: - if (!(message.gpgKeys && message.gpgKeys.length)) - message.gpgKeys = []; - message.gpgKeys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return OSPolicyAssignmentOperationMetadata; + })(); - /** - * Decodes a ZypperRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ZypperRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + v1alpha.CreateOSPolicyAssignmentRequest = (function() { - /** - * Verifies a ZypperRepository message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ZypperRepository.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) - if (!$util.isString(message.baseUrl)) - return "baseUrl: string expected"; - if (message.gpgKeys != null && message.hasOwnProperty("gpgKeys")) { - if (!Array.isArray(message.gpgKeys)) - return "gpgKeys: array expected"; - for (var i = 0; i < message.gpgKeys.length; ++i) - if (!$util.isString(message.gpgKeys[i])) - return "gpgKeys: string[] expected"; - } - return null; - }; + /** + * Properties of a CreateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface ICreateOSPolicyAssignmentRequest + * @property {string|null} [parent] CreateOSPolicyAssignmentRequest parent + * @property {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null} [osPolicyAssignment] CreateOSPolicyAssignmentRequest osPolicyAssignment + * @property {string|null} [osPolicyAssignmentId] CreateOSPolicyAssignmentRequest osPolicyAssignmentId + */ - /** - * Creates a ZypperRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository - */ - ZypperRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository(); - if (object.id != null) - message.id = String(object.id); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.baseUrl != null) - message.baseUrl = String(object.baseUrl); - if (object.gpgKeys) { - if (!Array.isArray(object.gpgKeys)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.gpgKeys: array expected"); - message.gpgKeys = []; - for (var i = 0; i < object.gpgKeys.length; ++i) - message.gpgKeys[i] = String(object.gpgKeys[i]); - } - return message; - }; + /** + * Constructs a new CreateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a CreateOSPolicyAssignmentRequest. + * @implements ICreateOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function CreateOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a plain object from a ZypperRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} message ZypperRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ZypperRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.gpgKeys = []; - if (options.defaults) { - object.id = ""; - object.displayName = ""; - object.baseUrl = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) - object.baseUrl = message.baseUrl; - if (message.gpgKeys && message.gpgKeys.length) { - object.gpgKeys = []; - for (var j = 0; j < message.gpgKeys.length; ++j) - object.gpgKeys[j] = message.gpgKeys[j]; - } - return object; - }; + /** + * CreateOSPolicyAssignmentRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @instance + */ + CreateOSPolicyAssignmentRequest.prototype.parent = ""; - /** - * Converts this ZypperRepository to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository - * @instance - * @returns {Object.} JSON object - */ - ZypperRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CreateOSPolicyAssignmentRequest osPolicyAssignment. + * @member {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null|undefined} osPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @instance + */ + CreateOSPolicyAssignmentRequest.prototype.osPolicyAssignment = null; - return ZypperRepository; - })(); + /** + * CreateOSPolicyAssignmentRequest osPolicyAssignmentId. + * @member {string} osPolicyAssignmentId + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @instance + */ + CreateOSPolicyAssignmentRequest.prototype.osPolicyAssignmentId = ""; - RepositoryResource.GooRepository = (function() { + /** + * Creates a new CreateOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest instance + */ + CreateOSPolicyAssignmentRequest.create = function create(properties) { + return new CreateOSPolicyAssignmentRequest(properties); + }; - /** - * Properties of a GooRepository. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @interface IGooRepository - * @property {string|null} [name] GooRepository name - * @property {string|null} [url] GooRepository url - */ + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateOSPolicyAssignmentRequest.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.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.osPolicyAssignmentId != null && Object.hasOwnProperty.call(message, "osPolicyAssignmentId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.osPolicyAssignmentId); + return writer; + }; - /** - * Constructs a new GooRepository. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - * @classdesc Represents a GooRepository. - * @implements IGooRepository - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository=} [properties] Properties to set - */ - function GooRepository(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * GooRepository name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @instance - */ - GooRepository.prototype.name = ""; + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + case 3: + message.osPolicyAssignmentId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * GooRepository url. - * @member {string} url - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @instance - */ - GooRepository.prototype.url = ""; + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new GooRepository instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository instance - */ - GooRepository.create = function create(properties) { - return new GooRepository(properties); - }; + /** + * Verifies a CreateOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateOSPolicyAssignmentRequest.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.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignment); + if (error) + return "osPolicyAssignment." + error; + } + if (message.osPolicyAssignmentId != null && message.hasOwnProperty("osPolicyAssignmentId")) + if (!$util.isString(message.osPolicyAssignmentId)) + return "osPolicyAssignmentId: string expected"; + return null; + }; - /** - * Encodes the specified GooRepository message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository} message GooRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GooRepository.encode = function encode(message, writer) { - 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.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); - return writer; - }; + /** + * Creates a CreateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest + */ + CreateOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.osPolicyAssignment != null) { + if (typeof object.osPolicyAssignment !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.osPolicyAssignment: object expected"); + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignment); + } + if (object.osPolicyAssignmentId != null) + message.osPolicyAssignmentId = String(object.osPolicyAssignmentId); + return message; + }; - /** - * Encodes the specified GooRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.IGooRepository} message GooRepository message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GooRepository.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from a CreateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateOSPolicyAssignmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.osPolicyAssignment = null; + object.osPolicyAssignmentId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignment, options); + if (message.osPolicyAssignmentId != null && message.hasOwnProperty("osPolicyAssignmentId")) + object.osPolicyAssignmentId = message.osPolicyAssignmentId; + return object; + }; - /** - * Decodes a GooRepository message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GooRepository.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.url = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this CreateOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a GooRepository message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GooRepository.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return CreateOSPolicyAssignmentRequest; + })(); - /** - * Verifies a GooRepository message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GooRepository.verify = function verify(message) { - if (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.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - return null; - }; + v1alpha.UpdateOSPolicyAssignmentRequest = (function() { - /** - * Creates a GooRepository message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository - */ - GooRepository.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository(); - if (object.name != null) - message.name = String(object.name); - if (object.url != null) - message.url = String(object.url); - return message; - }; + /** + * Properties of an UpdateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IUpdateOSPolicyAssignmentRequest + * @property {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null} [osPolicyAssignment] UpdateOSPolicyAssignmentRequest osPolicyAssignment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOSPolicyAssignmentRequest updateMask + */ - /** - * Creates a plain object from a GooRepository message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} message GooRepository - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GooRepository.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.url = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - return object; - }; + /** + * Constructs a new UpdateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents an UpdateOSPolicyAssignmentRequest. + * @implements IUpdateOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function UpdateOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Converts this GooRepository to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository - * @instance - * @returns {Object.} JSON object - */ - GooRepository.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * UpdateOSPolicyAssignmentRequest osPolicyAssignment. + * @member {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null|undefined} osPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @instance + */ + UpdateOSPolicyAssignmentRequest.prototype.osPolicyAssignment = null; - return GooRepository; - })(); + /** + * UpdateOSPolicyAssignmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @instance + */ + UpdateOSPolicyAssignmentRequest.prototype.updateMask = null; - return RepositoryResource; - })(); + /** + * Creates a new UpdateOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest instance + */ + UpdateOSPolicyAssignmentRequest.create = function create(properties) { + return new UpdateOSPolicyAssignmentRequest(properties); + }; - Resource.ExecResource = (function() { + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateOSPolicyAssignmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Properties of an ExecResource. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @interface IExecResource - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null} [validate] ExecResource validate - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null} [enforce] ExecResource enforce - */ + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new ExecResource. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @classdesc Represents an ExecResource. - * @implements IExecResource - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource=} [properties] Properties to set - */ - function ExecResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * ExecResource validate. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null|undefined} validate - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @instance - */ - ExecResource.prototype.validate = null; - - /** - * ExecResource enforce. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec|null|undefined} enforce - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @instance - */ - ExecResource.prototype.enforce = null; + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new ExecResource instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource instance - */ - ExecResource.create = function create(properties) { - return new ExecResource(properties); - }; + /** + * Verifies an UpdateOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateOSPolicyAssignmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignment); + if (error) + return "osPolicyAssignment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - /** - * Encodes the specified ExecResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource} message ExecResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validate != null && Object.hasOwnProperty.call(message, "validate")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.encode(message.validate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.enforce != null && Object.hasOwnProperty.call(message, "enforce")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.encode(message.enforce, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IExecResource} message ExecResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates an UpdateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest + */ + UpdateOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest(); + if (object.osPolicyAssignment != null) { + if (typeof object.osPolicyAssignment !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.osPolicyAssignment: object expected"); + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Decodes an ExecResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); - break; - case 2: - message.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from an UpdateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateOSPolicyAssignmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osPolicyAssignment = null; + object.updateMask = null; + } + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Decodes an ExecResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this UpdateOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies an ExecResource message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validate != null && message.hasOwnProperty("validate")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify(message.validate); - if (error) - return "validate." + error; - } - if (message.enforce != null && message.hasOwnProperty("enforce")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify(message.enforce); - if (error) - return "enforce." + error; - } - return null; - }; + return UpdateOSPolicyAssignmentRequest; + })(); - /** - * Creates an ExecResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} ExecResource - */ - ExecResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource(); - if (object.validate != null) { - if (typeof object.validate !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.validate: object expected"); - message.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.fromObject(object.validate); - } - if (object.enforce != null) { - if (typeof object.enforce !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.enforce: object expected"); - message.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.fromObject(object.enforce); - } - return message; - }; + v1alpha.GetOSPolicyAssignmentRequest = (function() { - /** - * Creates a plain object from an ExecResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} message ExecResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.validate = null; - object.enforce = null; - } - if (message.validate != null && message.hasOwnProperty("validate")) - object.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.toObject(message.validate, options); - if (message.enforce != null && message.hasOwnProperty("enforce")) - object.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.toObject(message.enforce, options); - return object; - }; + /** + * Properties of a GetOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IGetOSPolicyAssignmentRequest + * @property {string|null} [name] GetOSPolicyAssignmentRequest name + */ - /** - * Converts this ExecResource to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @instance - * @returns {Object.} JSON object - */ - ExecResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new GetOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a GetOSPolicyAssignmentRequest. + * @implements IGetOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function GetOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - ExecResource.Exec = (function() { + /** + * GetOSPolicyAssignmentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @instance + */ + GetOSPolicyAssignmentRequest.prototype.name = ""; - /** - * Properties of an Exec. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @interface IExec - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [file] Exec file - * @property {string|null} [script] Exec script - * @property {Array.|null} [args] Exec args - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter|null} [interpreter] Exec interpreter - * @property {string|null} [outputFilePath] Exec outputFilePath - */ + /** + * Creates a new GetOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest instance + */ + GetOSPolicyAssignmentRequest.create = function create(properties) { + return new GetOSPolicyAssignmentRequest(properties); + }; - /** - * Constructs a new Exec. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource - * @classdesc Represents an Exec. - * @implements IExec - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec=} [properties] Properties to set - */ - function Exec(properties) { - this.args = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified GetOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOSPolicyAssignmentRequest.encode = function encode(message, writer) { + 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; + }; - /** - * Exec file. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} file - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @instance - */ - Exec.prototype.file = null; + /** + * Encodes the specified GetOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Exec script. - * @member {string|null|undefined} script - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @instance - */ - Exec.prototype.script = null; + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Exec args. - * @member {Array.} args - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @instance - */ - Exec.prototype.args = $util.emptyArray; + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Exec interpreter. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter} interpreter - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @instance - */ - Exec.prototype.interpreter = 0; + /** + * Verifies a GetOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOSPolicyAssignmentRequest.verify = function verify(message) { + if (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; + }; - /** - * Exec outputFilePath. - * @member {string} outputFilePath - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @instance - */ - Exec.prototype.outputFilePath = ""; + /** + * Creates a GetOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest + */ + GetOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a plain object from a GetOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOSPolicyAssignmentRequest.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; + }; - /** - * Exec source. - * @member {"file"|"script"|undefined} source - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @instance - */ - Object.defineProperty(Exec.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["file", "script"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this GetOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new Exec instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec instance - */ - Exec.create = function create(properties) { - return new Exec(properties); - }; + return GetOSPolicyAssignmentRequest; + })(); - /** - * Encodes the specified Exec message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec} message Exec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && Object.hasOwnProperty.call(message, "file")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.file, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.script != null && Object.hasOwnProperty.call(message, "script")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.script); - if (message.args != null && message.args.length) - for (var i = 0; i < message.args.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); - if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); - if (message.outputFilePath != null && Object.hasOwnProperty.call(message, "outputFilePath")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.outputFilePath); - return writer; - }; + v1alpha.ListOSPolicyAssignmentsRequest = (function() { - /** - * Encodes the specified Exec message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.IExec} message Exec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ListOSPolicyAssignmentsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentsRequest + * @property {string|null} [parent] ListOSPolicyAssignmentsRequest parent + * @property {number|null} [pageSize] ListOSPolicyAssignmentsRequest pageSize + * @property {string|null} [pageToken] ListOSPolicyAssignmentsRequest pageToken + */ - /** - * Decodes an Exec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.script = reader.string(); - break; - case 3: - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); - break; - case 4: - message.interpreter = reader.int32(); - break; - case 5: - message.outputFilePath = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Exec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new ListOSPolicyAssignmentsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentsRequest. + * @implements IListOSPolicyAssignmentsRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest=} [properties] Properties to set + */ + function ListOSPolicyAssignmentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Verifies an Exec message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.file != null && message.hasOwnProperty("file")) { - properties.source = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.file); - if (error) - return "file." + error; - } - } - if (message.script != null && message.hasOwnProperty("script")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.script)) - return "script: string expected"; - } - if (message.args != null && message.hasOwnProperty("args")) { - if (!Array.isArray(message.args)) - return "args: array expected"; - for (var i = 0; i < message.args.length; ++i) - if (!$util.isString(message.args[i])) - return "args: string[] expected"; - } - if (message.interpreter != null && message.hasOwnProperty("interpreter")) - switch (message.interpreter) { - default: - return "interpreter: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) - if (!$util.isString(message.outputFilePath)) - return "outputFilePath: string expected"; - return null; - }; + /** + * ListOSPolicyAssignmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @instance + */ + ListOSPolicyAssignmentsRequest.prototype.parent = ""; - /** - * Creates an Exec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} Exec - */ - Exec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec(); - if (object.file != null) { - if (typeof object.file !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.file: object expected"); - message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.file); - } - if (object.script != null) - message.script = String(object.script); - if (object.args) { - if (!Array.isArray(object.args)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.args: array expected"); - message.args = []; - for (var i = 0; i < object.args.length; ++i) - message.args[i] = String(object.args[i]); - } - switch (object.interpreter) { - case "INTERPRETER_UNSPECIFIED": - case 0: - message.interpreter = 0; - break; - case "NONE": - case 1: - message.interpreter = 1; - break; - case "SHELL": - case 2: - message.interpreter = 2; - break; - case "POWERSHELL": - case 3: - message.interpreter = 3; - break; - } - if (object.outputFilePath != null) - message.outputFilePath = String(object.outputFilePath); - return message; - }; + /** + * ListOSPolicyAssignmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @instance + */ + ListOSPolicyAssignmentsRequest.prototype.pageSize = 0; - /** - * Creates a plain object from an Exec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} message Exec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.args = []; - if (options.defaults) { - object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; - object.outputFilePath = ""; - } - if (message.file != null && message.hasOwnProperty("file")) { - object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.file, options); - if (options.oneofs) - object.source = "file"; - } - if (message.script != null && message.hasOwnProperty("script")) { - object.script = message.script; - if (options.oneofs) - object.source = "script"; - } - if (message.args && message.args.length) { - object.args = []; - for (var j = 0; j < message.args.length; ++j) - object.args[j] = message.args[j]; - } - if (message.interpreter != null && message.hasOwnProperty("interpreter")) - object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] : message.interpreter; - if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) - object.outputFilePath = message.outputFilePath; - return object; - }; + /** + * ListOSPolicyAssignmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @instance + */ + ListOSPolicyAssignmentsRequest.prototype.pageToken = ""; - /** - * Converts this Exec to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec - * @instance - * @returns {Object.} JSON object - */ - Exec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new ListOSPolicyAssignmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest instance + */ + ListOSPolicyAssignmentsRequest.create = function create(properties) { + return new ListOSPolicyAssignmentsRequest(properties); + }; - /** - * Interpreter enum. - * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter - * @enum {number} - * @property {number} INTERPRETER_UNSPECIFIED=0 INTERPRETER_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} SHELL=2 SHELL value - * @property {number} POWERSHELL=3 POWERSHELL value - */ - Exec.Interpreter = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTERPRETER_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "SHELL"] = 2; - values[valuesById[3] = "POWERSHELL"] = 3; - return values; - })(); + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; - return Exec; - })(); + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return ExecResource; - })(); + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - Resource.FileResource = (function() { + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a FileResource. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @interface IFileResource - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null} [file] FileResource file - * @property {string|null} [content] FileResource content - * @property {string|null} [path] FileResource path - * @property {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState|null} [state] FileResource state - * @property {string|null} [permissions] FileResource permissions - */ + /** + * Verifies a ListOSPolicyAssignmentsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; - /** - * Constructs a new FileResource. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource - * @classdesc Represents a FileResource. - * @implements IFileResource - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource=} [properties] Properties to set - */ - function FileResource(properties) { - if (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 ListOSPolicyAssignmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest + */ + ListOSPolicyAssignmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * FileResource file. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFile|null|undefined} file - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @instance - */ - FileResource.prototype.file = null; + /** + * Creates a plain object from a ListOSPolicyAssignmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * FileResource content. - * @member {string|null|undefined} content - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @instance - */ - FileResource.prototype.content = null; + /** + * Converts this ListOSPolicyAssignmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileResource path. - * @member {string} path - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @instance - */ - FileResource.prototype.path = ""; + return ListOSPolicyAssignmentsRequest; + })(); - /** - * FileResource state. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState} state - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @instance - */ - FileResource.prototype.state = 0; + v1alpha.ListOSPolicyAssignmentsResponse = (function() { - /** - * FileResource permissions. - * @member {string} permissions - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @instance - */ - FileResource.prototype.permissions = ""; + /** + * Properties of a ListOSPolicyAssignmentsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentsResponse + * @property {Array.|null} [osPolicyAssignments] ListOSPolicyAssignmentsResponse osPolicyAssignments + * @property {string|null} [nextPageToken] ListOSPolicyAssignmentsResponse nextPageToken + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new ListOSPolicyAssignmentsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentsResponse. + * @implements IListOSPolicyAssignmentsResponse + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse=} [properties] Properties to set + */ + function ListOSPolicyAssignmentsResponse(properties) { + this.osPolicyAssignments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FileResource source. - * @member {"file"|"content"|undefined} source - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @instance - */ - Object.defineProperty(FileResource.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["file", "content"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FileResource instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource instance - */ - FileResource.create = function create(properties) { - return new FileResource(properties); - }; + /** + * ListOSPolicyAssignmentsResponse osPolicyAssignments. + * @member {Array.} osPolicyAssignments + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @instance + */ + ListOSPolicyAssignmentsResponse.prototype.osPolicyAssignments = $util.emptyArray; - /** - * Encodes the specified FileResource message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource} message FileResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && Object.hasOwnProperty.call(message, "file")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.encode(message.file, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.permissions); - return writer; - }; + /** + * ListOSPolicyAssignmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @instance + */ + ListOSPolicyAssignmentsResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified FileResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.IFileResource} message FileResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ListOSPolicyAssignmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse instance + */ + ListOSPolicyAssignmentsResponse.create = function create(properties) { + return new ListOSPolicyAssignmentsResponse(properties); + }; - /** - * Decodes a FileResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.content = reader.string(); - break; - case 3: - message.path = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.permissions = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignments != null && message.osPolicyAssignments.length) + for (var i = 0; i < message.osPolicyAssignments.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignments[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; + }; - /** - * Decodes a FileResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a FileResource message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.file != null && message.hasOwnProperty("file")) { - properties.source = 1; - { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.verify(message.file); - if (error) - return "file." + error; - } - } - if (message.content != null && message.hasOwnProperty("content")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.content)) - return "content: string expected"; - } - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: 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.permissions != null && message.hasOwnProperty("permissions")) - if (!$util.isString(message.permissions)) - return "permissions: string expected"; - return null; - }; + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a FileResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} FileResource - */ - FileResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource(); - if (object.file != null) { - if (typeof object.file !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.file: object expected"); - message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.fromObject(object.file); - } - if (object.content != null) - message.content = String(object.content); - if (object.path != null) - message.path = String(object.path); - switch (object.state) { - case "DESIRED_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PRESENT": - case 1: - message.state = 1; - break; - case "ABSENT": - case 2: - message.state = 2; - break; - case "CONTENTS_MATCH": - case 3: - message.state = 3; - break; - } - if (object.permissions != null) - message.permissions = String(object.permissions); - return message; - }; + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a FileResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} message FileResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.path = ""; - object.state = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; - object.permissions = ""; - } - if (message.file != null && message.hasOwnProperty("file")) { - object.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.toObject(message.file, options); - if (options.oneofs) - object.source = "file"; - } - if (message.content != null && message.hasOwnProperty("content")) { - object.content = message.content; - if (options.oneofs) - object.source = "content"; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState[message.state] : message.state; - if (message.permissions != null && message.hasOwnProperty("permissions")) - object.permissions = message.permissions; - return object; - }; + /** + * Verifies a ListOSPolicyAssignmentsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignments != null && message.hasOwnProperty("osPolicyAssignments")) { + if (!Array.isArray(message.osPolicyAssignments)) + return "osPolicyAssignments: array expected"; + for (var i = 0; i < message.osPolicyAssignments.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignments[i]); + if (error) + return "osPolicyAssignments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Converts this FileResource to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource - * @instance - * @returns {Object.} JSON object - */ - FileResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a ListOSPolicyAssignmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse + */ + ListOSPolicyAssignmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse(); + if (object.osPolicyAssignments) { + if (!Array.isArray(object.osPolicyAssignments)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.osPolicyAssignments: array expected"); + message.osPolicyAssignments = []; + for (var i = 0; i < object.osPolicyAssignments.length; ++i) { + if (typeof object.osPolicyAssignments[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.osPolicyAssignments: object expected"); + message.osPolicyAssignments[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * DesiredState enum. - * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState - * @enum {number} - * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value - * @property {number} PRESENT=1 PRESENT value - * @property {number} ABSENT=2 ABSENT value - * @property {number} CONTENTS_MATCH=3 CONTENTS_MATCH value - */ - FileResource.DesiredState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRESENT"] = 1; - values[valuesById[2] = "ABSENT"] = 2; - values[valuesById[3] = "CONTENTS_MATCH"] = 3; - return values; - })(); + /** + * Creates a plain object from a ListOSPolicyAssignmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyAssignments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.osPolicyAssignments && message.osPolicyAssignments.length) { + object.osPolicyAssignments = []; + for (var j = 0; j < message.osPolicyAssignments.length; ++j) + object.osPolicyAssignments[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - return FileResource; - })(); + /** + * Converts this ListOSPolicyAssignmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Resource; - })(); + return ListOSPolicyAssignmentsResponse; + })(); - OSPolicy.ResourceGroup = (function() { + v1alpha.ListOSPolicyAssignmentRevisionsRequest = (function() { - /** - * Properties of a ResourceGroup. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @interface IResourceGroup - * @property {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null} [osFilter] ResourceGroup osFilter - * @property {Array.|null} [resources] ResourceGroup resources - */ + /** + * Properties of a ListOSPolicyAssignmentRevisionsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentRevisionsRequest + * @property {string|null} [name] ListOSPolicyAssignmentRevisionsRequest name + * @property {number|null} [pageSize] ListOSPolicyAssignmentRevisionsRequest pageSize + * @property {string|null} [pageToken] ListOSPolicyAssignmentRevisionsRequest pageToken + */ - /** - * Constructs a new ResourceGroup. - * @memberof google.cloud.osconfig.v1alpha.OSPolicy - * @classdesc Represents a ResourceGroup. - * @implements IResourceGroup - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup=} [properties] Properties to set - */ - function ResourceGroup(properties) { - this.resources = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceGroup osFilter. - * @member {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null|undefined} osFilter - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @instance - */ - ResourceGroup.prototype.osFilter = null; - - /** - * ResourceGroup resources. - * @member {Array.} resources - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @instance - */ - ResourceGroup.prototype.resources = $util.emptyArray; - - /** - * Creates a new ResourceGroup instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup instance - */ - ResourceGroup.create = function create(properties) { - return new ResourceGroup(properties); - }; - - /** - * Encodes the specified ResourceGroup message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup} message ResourceGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osFilter != null && Object.hasOwnProperty.call(message, "osFilter")) - $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.encode(message.osFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.encode(message.resources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup} message ResourceGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceGroup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceGroup.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceGroup message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osFilter != null && message.hasOwnProperty("osFilter")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.verify(message.osFilter); - if (error) - return "osFilter." + error; - } - 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.osconfig.v1alpha.OSPolicy.Resource.verify(message.resources[i]); - if (error) - return "resources." + error; - } - } - return null; - }; - - /** - * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} ResourceGroup - */ - ResourceGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(); - if (object.osFilter != null) { - if (typeof object.osFilter !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.osFilter: object expected"); - message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.fromObject(object.osFilter); - } - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) { - if (typeof object.resources[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.resources: object expected"); - message.resources[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.fromObject(object.resources[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} message ResourceGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resources = []; - if (options.defaults) - object.osFilter = null; - if (message.osFilter != null && message.hasOwnProperty("osFilter")) - object.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.toObject(message.osFilter, options); - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.toObject(message.resources[j], options); - } - return object; - }; - - /** - * Converts this ResourceGroup to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup - * @instance - * @returns {Object.} JSON object - */ - ResourceGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResourceGroup; - })(); - - /** - * Mode enum. - * @name google.cloud.osconfig.v1alpha.OSPolicy.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} VALIDATION=1 VALIDATION value - * @property {number} ENFORCEMENT=2 ENFORCEMENT value - */ - OSPolicy.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VALIDATION"] = 1; - values[valuesById[2] = "ENFORCEMENT"] = 2; - return values; - })(); - - return OSPolicy; - })(); - - v1alpha.OSPolicyAssignment = (function() { - - /** - * Properties of a OSPolicyAssignment. - * @memberof google.cloud.osconfig.v1alpha - * @interface IOSPolicyAssignment - * @property {string|null} [name] OSPolicyAssignment name - * @property {string|null} [description] OSPolicyAssignment description - * @property {Array.|null} [osPolicies] OSPolicyAssignment osPolicies - * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null} [instanceFilter] OSPolicyAssignment instanceFilter - * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null} [rollout] OSPolicyAssignment rollout - * @property {string|null} [revisionId] OSPolicyAssignment revisionId - * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] OSPolicyAssignment revisionCreateTime - * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null} [rolloutState] OSPolicyAssignment rolloutState - * @property {boolean|null} [baseline] OSPolicyAssignment baseline - * @property {boolean|null} [deleted] OSPolicyAssignment deleted - * @property {boolean|null} [reconciling] OSPolicyAssignment reconciling - * @property {string|null} [uid] OSPolicyAssignment uid - */ - - /** - * Constructs a new OSPolicyAssignment. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a OSPolicyAssignment. - * @implements IOSPolicyAssignment - * @constructor - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set - */ - function OSPolicyAssignment(properties) { - this.osPolicies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ListOSPolicyAssignmentRevisionsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentRevisionsRequest. + * @implements IListOSPolicyAssignmentRevisionsRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest=} [properties] Properties to set + */ + function ListOSPolicyAssignmentRevisionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * OSPolicyAssignment name. + * ListOSPolicyAssignmentRevisionsRequest name. * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.name = ""; - - /** - * OSPolicyAssignment description. - * @member {string} description - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.description = ""; - - /** - * OSPolicyAssignment osPolicies. - * @member {Array.} osPolicies - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.osPolicies = $util.emptyArray; - - /** - * OSPolicyAssignment instanceFilter. - * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null|undefined} instanceFilter - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.instanceFilter = null; - - /** - * OSPolicyAssignment rollout. - * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null|undefined} rollout - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.rollout = null; - - /** - * OSPolicyAssignment revisionId. - * @member {string} revisionId - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.revisionId = ""; - - /** - * OSPolicyAssignment revisionCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.revisionCreateTime = null; - - /** - * OSPolicyAssignment rolloutState. - * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState} rolloutState - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.rolloutState = 0; - - /** - * OSPolicyAssignment baseline. - * @member {boolean} baseline - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.baseline = false; - - /** - * OSPolicyAssignment deleted. - * @member {boolean} deleted - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @instance */ - OSPolicyAssignment.prototype.deleted = false; + ListOSPolicyAssignmentRevisionsRequest.prototype.name = ""; /** - * OSPolicyAssignment reconciling. - * @member {boolean} reconciling - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * ListOSPolicyAssignmentRevisionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @instance */ - OSPolicyAssignment.prototype.reconciling = false; + ListOSPolicyAssignmentRevisionsRequest.prototype.pageSize = 0; /** - * OSPolicyAssignment uid. - * @member {string} uid - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * ListOSPolicyAssignmentRevisionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @instance */ - OSPolicyAssignment.prototype.uid = ""; + ListOSPolicyAssignmentRevisionsRequest.prototype.pageToken = ""; /** - * Creates a new OSPolicyAssignment instance using the specified properties. + * Creates a new ListOSPolicyAssignmentRevisionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest instance */ - OSPolicyAssignment.create = function create(properties) { - return new OSPolicyAssignment(properties); + ListOSPolicyAssignmentRevisionsRequest.create = function create(properties) { + return new ListOSPolicyAssignmentRevisionsRequest(properties); }; /** - * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OSPolicyAssignment.encode = function encode(message, writer) { + ListOSPolicyAssignmentRevisionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.osPolicies != null && message.osPolicies.length) - for (var i = 0; i < message.osPolicies.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicy.encode(message.osPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.encode(message.rollout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.revisionId); - if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) - $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rolloutState); - if (message.baseline != null && Object.hasOwnProperty.call(message, "baseline")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.baseline); - if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deleted); - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.reconciling); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.uid); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OSPolicyAssignment.encodeDelimited = function encodeDelimited(message, writer) { + ListOSPolicyAssignmentRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OSPolicyAssignment.decode = function decode(reader, length) { + ListOSPolicyAssignmentRevisionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -36122,39 +32487,10 @@ message.name = reader.string(); break; case 2: - message.description = reader.string(); + message.pageSize = reader.int32(); break; case 3: - if (!(message.osPolicies && message.osPolicies.length)) - message.osPolicies = []; - message.osPolicies.push($root.google.cloud.osconfig.v1alpha.OSPolicy.decode(reader, reader.uint32())); - break; - case 4: - message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); - break; - case 5: - message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); - break; - case 6: - message.revisionId = reader.string(); - break; - case 7: - message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.rolloutState = reader.int32(); - break; - case 10: - message.baseline = reader.bool(); - break; - case 11: - message.deleted = reader.bool(); - break; - case 12: - message.reconciling = reader.bool(); - break; - case 13: - message.uid = reader.string(); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -36165,6302 +32501,13961 @@ }; /** - * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OSPolicyAssignment.decodeDelimited = function decodeDelimited(reader) { + ListOSPolicyAssignmentRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a OSPolicyAssignment message. + * Verifies a ListOSPolicyAssignmentRevisionsRequest message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OSPolicyAssignment.verify = function verify(message) { + ListOSPolicyAssignmentRevisionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.osPolicies != null && message.hasOwnProperty("osPolicies")) { - if (!Array.isArray(message.osPolicies)) - return "osPolicies: array expected"; - for (var i = 0; i < message.osPolicies.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.verify(message.osPolicies[i]); - if (error) - return "osPolicies." + error; - } - } - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify(message.instanceFilter); - if (error) - return "instanceFilter." + error; - } - if (message.rollout != null && message.hasOwnProperty("rollout")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify(message.rollout); - if (error) - return "rollout." + error; - } - if (message.revisionId != null && message.hasOwnProperty("revisionId")) - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); - if (error) - return "revisionCreateTime." + error; - } - if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - switch (message.rolloutState) { - default: - return "rolloutState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.baseline != null && message.hasOwnProperty("baseline")) - if (typeof message.baseline !== "boolean") - return "baseline: boolean expected"; - if (message.deleted != null && message.hasOwnProperty("deleted")) - if (typeof message.deleted !== "boolean") - return "deleted: boolean expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - if (typeof message.reconciling !== "boolean") - return "reconciling: boolean expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: 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 OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * Creates a ListOSPolicyAssignmentRevisionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest */ - OSPolicyAssignment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment) + ListOSPolicyAssignmentRevisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest(); if (object.name != null) message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.osPolicies) { - if (!Array.isArray(object.osPolicies)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: array expected"); - message.osPolicies = []; - for (var i = 0; i < object.osPolicies.length; ++i) { - if (typeof object.osPolicies[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: object expected"); - message.osPolicies[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.fromObject(object.osPolicies[i]); - } - } - if (object.instanceFilter != null) { - if (typeof object.instanceFilter !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.instanceFilter: object expected"); - message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.fromObject(object.instanceFilter); - } - if (object.rollout != null) { - if (typeof object.rollout !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.rollout: object expected"); - message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.fromObject(object.rollout); - } - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - if (object.revisionCreateTime != null) { - if (typeof object.revisionCreateTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.revisionCreateTime: object expected"); - message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); - } - switch (object.rolloutState) { - case "ROLLOUT_STATE_UNSPECIFIED": - case 0: - message.rolloutState = 0; - break; - case "IN_PROGRESS": - case 1: - message.rolloutState = 1; - break; - case "CANCELLING": - case 2: - message.rolloutState = 2; - break; - case "CANCELLED": - case 3: - message.rolloutState = 3; - break; - case "SUCCEEDED": - case 4: - message.rolloutState = 4; - break; - } - if (object.baseline != null) - message.baseline = Boolean(object.baseline); - if (object.deleted != null) - message.deleted = Boolean(object.deleted); - if (object.reconciling != null) - message.reconciling = Boolean(object.reconciling); - if (object.uid != null) - message.uid = String(object.uid); + 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 OSPolicyAssignment message. Also converts values to other types if specified. + * Creates a plain object from a ListOSPolicyAssignmentRevisionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} message OSPolicyAssignment + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OSPolicyAssignment.toObject = function toObject(message, options) { + ListOSPolicyAssignmentRevisionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.osPolicies = []; if (options.defaults) { object.name = ""; - object.description = ""; - object.instanceFilter = null; - object.rollout = null; - object.revisionId = ""; - object.revisionCreateTime = null; - object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; - object.baseline = false; - object.deleted = false; - object.reconciling = false; - object.uid = ""; + object.pageSize = 0; + object.pageToken = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.osPolicies && message.osPolicies.length) { - object.osPolicies = []; - for (var j = 0; j < message.osPolicies.length; ++j) - object.osPolicies[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.toObject(message.osPolicies[j], options); - } - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) - object.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.toObject(message.instanceFilter, options); - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.toObject(message.rollout, options); - if (message.revisionId != null && message.hasOwnProperty("revisionId")) - object.revisionId = message.revisionId; - if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) - object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); - if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; - if (message.baseline != null && message.hasOwnProperty("baseline")) - object.baseline = message.baseline; - if (message.deleted != null && message.hasOwnProperty("deleted")) - object.deleted = message.deleted; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - object.reconciling = message.reconciling; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this OSPolicyAssignment to JSON. + * Converts this ListOSPolicyAssignmentRevisionsRequest to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest * @instance * @returns {Object.} JSON object */ - OSPolicyAssignment.prototype.toJSON = function toJSON() { + ListOSPolicyAssignmentRevisionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - OSPolicyAssignment.LabelSet = (function() { + return ListOSPolicyAssignmentRevisionsRequest; + })(); - /** - * Properties of a LabelSet. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @interface ILabelSet - * @property {Object.|null} [labels] LabelSet labels - */ + v1alpha.ListOSPolicyAssignmentRevisionsResponse = (function() { - /** - * Constructs a new LabelSet. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @classdesc Represents a LabelSet. - * @implements ILabelSet - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set - */ - function LabelSet(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ListOSPolicyAssignmentRevisionsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentRevisionsResponse + * @property {Array.|null} [osPolicyAssignments] ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments + * @property {string|null} [nextPageToken] ListOSPolicyAssignmentRevisionsResponse nextPageToken + */ - /** - * LabelSet labels. - * @member {Object.} labels - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @instance - */ - LabelSet.prototype.labels = $util.emptyObject; + /** + * Constructs a new ListOSPolicyAssignmentRevisionsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentRevisionsResponse. + * @implements IListOSPolicyAssignmentRevisionsResponse + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse=} [properties] Properties to set + */ + function ListOSPolicyAssignmentRevisionsResponse(properties) { + this.osPolicyAssignments = []; + if (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 LabelSet instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet instance - */ - LabelSet.create = function create(properties) { - return new LabelSet(properties); - }; + /** + * ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments. + * @member {Array.} osPolicyAssignments + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @instance + */ + ListOSPolicyAssignmentRevisionsResponse.prototype.osPolicyAssignments = $util.emptyArray; - /** - * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; + /** + * ListOSPolicyAssignmentRevisionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @instance + */ + ListOSPolicyAssignmentRevisionsResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified LabelSet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ListOSPolicyAssignmentRevisionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse instance + */ + ListOSPolicyAssignmentRevisionsResponse.create = function create(properties) { + return new ListOSPolicyAssignmentRevisionsResponse(properties); + }; - /** - * Decodes a LabelSet message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignments != null && message.osPolicyAssignments.length) + for (var i = 0; i < message.osPolicyAssignments.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignments[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; + }; - /** - * Decodes a LabelSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a LabelSet message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LabelSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a LabelSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet - */ - LabelSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet(); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a LabelSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} message LabelSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LabelSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - 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]]; + /** + * Verifies a ListOSPolicyAssignmentRevisionsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentRevisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignments != null && message.hasOwnProperty("osPolicyAssignments")) { + if (!Array.isArray(message.osPolicyAssignments)) + return "osPolicyAssignments: array expected"; + for (var i = 0; i < message.osPolicyAssignments.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignments[i]); + if (error) + return "osPolicyAssignments." + error; } - return object; - }; - - /** - * Converts this LabelSet to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @instance - * @returns {Object.} JSON object - */ - LabelSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LabelSet; - })(); - - OSPolicyAssignment.InstanceFilter = (function() { + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Properties of an InstanceFilter. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @interface IInstanceFilter - * @property {boolean|null} [all] InstanceFilter all - * @property {Array.|null} [osShortNames] InstanceFilter osShortNames - * @property {Array.|null} [inclusionLabels] InstanceFilter inclusionLabels - * @property {Array.|null} [exclusionLabels] InstanceFilter exclusionLabels - */ + /** + * Creates a ListOSPolicyAssignmentRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse + */ + ListOSPolicyAssignmentRevisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse(); + if (object.osPolicyAssignments) { + if (!Array.isArray(object.osPolicyAssignments)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.osPolicyAssignments: array expected"); + message.osPolicyAssignments = []; + for (var i = 0; i < object.osPolicyAssignments.length; ++i) { + if (typeof object.osPolicyAssignments[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.osPolicyAssignments: object expected"); + message.osPolicyAssignments[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Constructs a new InstanceFilter. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @classdesc Represents an InstanceFilter. - * @implements IInstanceFilter - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter=} [properties] Properties to set - */ - function InstanceFilter(properties) { - this.osShortNames = []; - this.inclusionLabels = []; - this.exclusionLabels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentRevisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyAssignments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.osPolicyAssignments && message.osPolicyAssignments.length) { + object.osPolicyAssignments = []; + for (var j = 0; j < message.osPolicyAssignments.length; ++j) + object.osPolicyAssignments[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignments[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * InstanceFilter all. - * @member {boolean} all - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @instance - */ - InstanceFilter.prototype.all = false; + /** + * Converts this ListOSPolicyAssignmentRevisionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentRevisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * InstanceFilter osShortNames. - * @member {Array.} osShortNames - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @instance - */ - InstanceFilter.prototype.osShortNames = $util.emptyArray; + return ListOSPolicyAssignmentRevisionsResponse; + })(); - /** - * InstanceFilter inclusionLabels. - * @member {Array.} inclusionLabels - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @instance - */ - InstanceFilter.prototype.inclusionLabels = $util.emptyArray; + v1alpha.DeleteOSPolicyAssignmentRequest = (function() { - /** - * InstanceFilter exclusionLabels. - * @member {Array.} exclusionLabels - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @instance - */ - InstanceFilter.prototype.exclusionLabels = $util.emptyArray; + /** + * Properties of a DeleteOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IDeleteOSPolicyAssignmentRequest + * @property {string|null} [name] DeleteOSPolicyAssignmentRequest name + */ - /** - * Creates a new InstanceFilter instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter instance - */ - InstanceFilter.create = function create(properties) { - return new InstanceFilter(properties); - }; + /** + * Constructs a new DeleteOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a DeleteOSPolicyAssignmentRequest. + * @implements IDeleteOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function DeleteOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified InstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter} message InstanceFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.all != null && Object.hasOwnProperty.call(message, "all")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all); - if (message.osShortNames != null && message.osShortNames.length) - for (var i = 0; i < message.osShortNames.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.osShortNames[i]); - if (message.inclusionLabels != null && message.inclusionLabels.length) - for (var i = 0; i < message.inclusionLabels.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.encode(message.inclusionLabels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.exclusionLabels != null && message.exclusionLabels.length) - for (var i = 0; i < message.exclusionLabels.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.encode(message.exclusionLabels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * DeleteOSPolicyAssignmentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @instance + */ + DeleteOSPolicyAssignmentRequest.prototype.name = ""; - /** - * Encodes the specified InstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter} message InstanceFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new DeleteOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest instance + */ + DeleteOSPolicyAssignmentRequest.create = function create(properties) { + return new DeleteOSPolicyAssignmentRequest(properties); + }; - /** - * Decodes an InstanceFilter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.all = reader.bool(); - break; - case 2: - if (!(message.osShortNames && message.osShortNames.length)) - message.osShortNames = []; - message.osShortNames.push(reader.string()); - break; - case 3: - if (!(message.inclusionLabels && message.inclusionLabels.length)) - message.inclusionLabels = []; - message.inclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.exclusionLabels && message.exclusionLabels.length)) - message.exclusionLabels = []; - message.exclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified DeleteOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOSPolicyAssignmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DeleteOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an InstanceFilter message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.all != null && message.hasOwnProperty("all")) - if (typeof message.all !== "boolean") - return "all: boolean expected"; - if (message.osShortNames != null && message.hasOwnProperty("osShortNames")) { - if (!Array.isArray(message.osShortNames)) - return "osShortNames: array expected"; - for (var i = 0; i < message.osShortNames.length; ++i) - if (!$util.isString(message.osShortNames[i])) - return "osShortNames: string[] expected"; - } - if (message.inclusionLabels != null && message.hasOwnProperty("inclusionLabels")) { - if (!Array.isArray(message.inclusionLabels)) - return "inclusionLabels: array expected"; - for (var i = 0; i < message.inclusionLabels.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.inclusionLabels[i]); - if (error) - return "inclusionLabels." + error; - } - } - if (message.exclusionLabels != null && message.hasOwnProperty("exclusionLabels")) { - if (!Array.isArray(message.exclusionLabels)) - return "exclusionLabels: array expected"; - for (var i = 0; i < message.exclusionLabels.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.exclusionLabels[i]); - if (error) - return "exclusionLabels." + error; - } + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter - */ - InstanceFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); - if (object.all != null) - message.all = Boolean(object.all); - if (object.osShortNames) { - if (!Array.isArray(object.osShortNames)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.osShortNames: array expected"); - message.osShortNames = []; - for (var i = 0; i < object.osShortNames.length; ++i) - message.osShortNames[i] = String(object.osShortNames[i]); - } - if (object.inclusionLabels) { - if (!Array.isArray(object.inclusionLabels)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: array expected"); - message.inclusionLabels = []; - for (var i = 0; i < object.inclusionLabels.length; ++i) { - if (typeof object.inclusionLabels[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: object expected"); - message.inclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.inclusionLabels[i]); - } - } - if (object.exclusionLabels) { - if (!Array.isArray(object.exclusionLabels)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: array expected"); - message.exclusionLabels = []; - for (var i = 0; i < object.exclusionLabels.length; ++i) { - if (typeof object.exclusionLabels[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: object expected"); - message.exclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.exclusionLabels[i]); - } - } - return message; - }; + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} message InstanceFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.osShortNames = []; - object.inclusionLabels = []; - object.exclusionLabels = []; - } - if (options.defaults) - object.all = false; - if (message.all != null && message.hasOwnProperty("all")) - object.all = message.all; - if (message.osShortNames && message.osShortNames.length) { - object.osShortNames = []; - for (var j = 0; j < message.osShortNames.length; ++j) - object.osShortNames[j] = message.osShortNames[j]; - } - if (message.inclusionLabels && message.inclusionLabels.length) { - object.inclusionLabels = []; - for (var j = 0; j < message.inclusionLabels.length; ++j) - object.inclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.inclusionLabels[j], options); - } - if (message.exclusionLabels && message.exclusionLabels.length) { - object.exclusionLabels = []; - for (var j = 0; j < message.exclusionLabels.length; ++j) - object.exclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.exclusionLabels[j], options); - } - return object; - }; + /** + * Verifies a DeleteOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOSPolicyAssignmentRequest.verify = function verify(message) { + if (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; + }; - /** - * Converts this InstanceFilter to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @instance - * @returns {Object.} JSON object - */ - InstanceFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a DeleteOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest + */ + DeleteOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - return InstanceFilter; - })(); + /** + * Creates a plain object from a DeleteOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOSPolicyAssignmentRequest.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; + }; - OSPolicyAssignment.Rollout = (function() { + /** + * Converts this DeleteOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a Rollout. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @interface IRollout - * @property {google.cloud.osconfig.v1alpha.IFixedOrPercent|null} [disruptionBudget] Rollout disruptionBudget - * @property {google.protobuf.IDuration|null} [minWaitDuration] Rollout minWaitDuration - */ + return DeleteOSPolicyAssignmentRequest; + })(); - /** - * Constructs a new Rollout. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @classdesc Represents a Rollout. - * @implements IRollout - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout=} [properties] Properties to set - */ - function Rollout(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1alpha.FixedOrPercent = (function() { - /** - * Rollout disruptionBudget. - * @member {google.cloud.osconfig.v1alpha.IFixedOrPercent|null|undefined} disruptionBudget - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @instance - */ - Rollout.prototype.disruptionBudget = null; + /** + * Properties of a FixedOrPercent. + * @memberof google.cloud.osconfig.v1alpha + * @interface IFixedOrPercent + * @property {number|null} [fixed] FixedOrPercent fixed + * @property {number|null} [percent] FixedOrPercent percent + */ - /** - * Rollout minWaitDuration. - * @member {google.protobuf.IDuration|null|undefined} minWaitDuration - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @instance - */ - Rollout.prototype.minWaitDuration = null; + /** + * Constructs a new FixedOrPercent. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a FixedOrPercent. + * @implements IFixedOrPercent + * @constructor + * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent=} [properties] Properties to set + */ + function FixedOrPercent(properties) { + if (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 Rollout instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout instance - */ - Rollout.create = function create(properties) { - return new Rollout(properties); - }; + /** + * FixedOrPercent fixed. + * @member {number|null|undefined} fixed + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @instance + */ + FixedOrPercent.prototype.fixed = null; - /** - * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout} message Rollout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rollout.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disruptionBudget != null && Object.hasOwnProperty.call(message, "disruptionBudget")) - $root.google.cloud.osconfig.v1alpha.FixedOrPercent.encode(message.disruptionBudget, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minWaitDuration != null && Object.hasOwnProperty.call(message, "minWaitDuration")) - $root.google.protobuf.Duration.encode(message.minWaitDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * FixedOrPercent percent. + * @member {number|null|undefined} percent + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @instance + */ + FixedOrPercent.prototype.percent = null; - /** - * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout} message Rollout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rollout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes a Rollout message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rollout.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.decode(reader, reader.uint32()); - break; - case 2: - message.minWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FixedOrPercent mode. + * @member {"fixed"|"percent"|undefined} mode + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @instance + */ + Object.defineProperty(FixedOrPercent.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["fixed", "percent"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a Rollout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rollout.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new FixedOrPercent instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent instance + */ + FixedOrPercent.create = function create(properties) { + return new FixedOrPercent(properties); + }; - /** - * Verifies a Rollout message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Rollout.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) { - var error = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.verify(message.disruptionBudget); - if (error) - return "disruptionBudget." + error; - } - if (message.minWaitDuration != null && message.hasOwnProperty("minWaitDuration")) { - var error = $root.google.protobuf.Duration.verify(message.minWaitDuration); - if (error) - return "minWaitDuration." + error; - } - return null; - }; + /** + * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedOrPercent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fixed != null && Object.hasOwnProperty.call(message, "fixed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fixed); + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.percent); + return writer; + }; - /** - * Creates a Rollout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} Rollout - */ - Rollout.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout(); - if (object.disruptionBudget != null) { - if (typeof object.disruptionBudget !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.disruptionBudget: object expected"); - message.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.fromObject(object.disruptionBudget); - } - if (object.minWaitDuration != null) { - if (typeof object.minWaitDuration !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.minWaitDuration: object expected"); - message.minWaitDuration = $root.google.protobuf.Duration.fromObject(object.minWaitDuration); - } - return message; - }; + /** + * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent} message FixedOrPercent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedOrPercent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a Rollout message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} message Rollout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Rollout.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.disruptionBudget = null; - object.minWaitDuration = null; + /** + * Decodes a FixedOrPercent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedOrPercent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.FixedOrPercent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fixed = reader.int32(); + break; + case 2: + message.percent = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) - object.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.toObject(message.disruptionBudget, options); - if (message.minWaitDuration != null && message.hasOwnProperty("minWaitDuration")) - object.minWaitDuration = $root.google.protobuf.Duration.toObject(message.minWaitDuration, options); + } + return message; + }; + + /** + * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedOrPercent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FixedOrPercent message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FixedOrPercent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + properties.mode = 1; + if (!$util.isInteger(message.fixed)) + return "fixed: integer expected"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + if (!$util.isInteger(message.percent)) + return "percent: integer expected"; + } + return null; + }; + + /** + * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent + */ + FixedOrPercent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.FixedOrPercent) return object; - }; + var message = new $root.google.cloud.osconfig.v1alpha.FixedOrPercent(); + if (object.fixed != null) + message.fixed = object.fixed | 0; + if (object.percent != null) + message.percent = object.percent | 0; + return message; + }; - /** - * Converts this Rollout to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout - * @instance - * @returns {Object.} JSON object - */ - Rollout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {google.cloud.osconfig.v1alpha.FixedOrPercent} message FixedOrPercent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FixedOrPercent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.fixed != null && message.hasOwnProperty("fixed")) { + object.fixed = message.fixed; + if (options.oneofs) + object.mode = "fixed"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + object.percent = message.percent; + if (options.oneofs) + object.mode = "percent"; + } + return object; + }; + + /** + * Converts this FixedOrPercent to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @instance + * @returns {Object.} JSON object + */ + FixedOrPercent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FixedOrPercent; + })(); + + v1alpha.OsConfigZonalService = (function() { + + /** + * Constructs a new OsConfigZonalService service. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents an OsConfigZonalService + * @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 OsConfigZonalService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (OsConfigZonalService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsConfigZonalService; + + /** + * Creates new OsConfigZonalService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @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 {OsConfigZonalService} RPC service. Useful where requests and/or responses are streamed. + */ + OsConfigZonalService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#createOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef CreateOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateOSPolicyAssignment. + * @function createOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} request CreateOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.createOSPolicyAssignment = function createOSPolicyAssignment(request, callback) { + return this.rpcCall(createOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateOSPolicyAssignment" }); + + /** + * Calls CreateOSPolicyAssignment. + * @function createOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} request CreateOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#updateOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef UpdateOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateOSPolicyAssignment. + * @function updateOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} request UpdateOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.updateOSPolicyAssignment = function updateOSPolicyAssignment(request, callback) { + return this.rpcCall(updateOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateOSPolicyAssignment" }); + + /** + * Calls UpdateOSPolicyAssignment. + * @function updateOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} request UpdateOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef GetOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} [response] OSPolicyAssignment + */ + + /** + * Calls GetOSPolicyAssignment. + * @function getOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} request GetOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and OSPolicyAssignment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getOSPolicyAssignment = function getOSPolicyAssignment(request, callback) { + return this.rpcCall(getOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment, request, callback); + }, "name", { value: "GetOSPolicyAssignment" }); + + /** + * Calls GetOSPolicyAssignment. + * @function getOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} request GetOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignments}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListOSPolicyAssignmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} [response] ListOSPolicyAssignmentsResponse + */ + + /** + * Calls ListOSPolicyAssignments. + * @function listOSPolicyAssignments + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} request ListOSPolicyAssignmentsRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignments = function listOSPolicyAssignments(request, callback) { + return this.rpcCall(listOSPolicyAssignments, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse, request, callback); + }, "name", { value: "ListOSPolicyAssignments" }); + + /** + * Calls ListOSPolicyAssignments. + * @function listOSPolicyAssignments + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} request ListOSPolicyAssignmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListOSPolicyAssignmentRevisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} [response] ListOSPolicyAssignmentRevisionsResponse + */ + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @function listOSPolicyAssignmentRevisions + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisionsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentRevisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignmentRevisions = function listOSPolicyAssignmentRevisions(request, callback) { + return this.rpcCall(listOSPolicyAssignmentRevisions, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse, request, callback); + }, "name", { value: "ListOSPolicyAssignmentRevisions" }); + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @function listOSPolicyAssignmentRevisions + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#deleteOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef DeleteOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteOSPolicyAssignment. + * @function deleteOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} request DeleteOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.deleteOSPolicyAssignment = function deleteOSPolicyAssignment(request, callback) { + return this.rpcCall(deleteOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteOSPolicyAssignment" }); + + /** + * Calls DeleteOSPolicyAssignment. + * @function deleteOSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} request DeleteOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInstanceOSPoliciesCompliance}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef GetInstanceOSPoliciesComplianceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} [response] InstanceOSPoliciesCompliance + */ + + /** + * Calls GetInstanceOSPoliciesCompliance. + * @function getInstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} request GetInstanceOSPoliciesComplianceRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesComplianceCallback} callback Node-style callback called with the error, if any, and InstanceOSPoliciesCompliance + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getInstanceOSPoliciesCompliance = function getInstanceOSPoliciesCompliance(request, callback) { + return this.rpcCall(getInstanceOSPoliciesCompliance, $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance, request, callback); + }, "name", { value: "GetInstanceOSPoliciesCompliance" }); + + /** + * Calls GetInstanceOSPoliciesCompliance. + * @function getInstanceOSPoliciesCompliance + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} request GetInstanceOSPoliciesComplianceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInstanceOSPoliciesCompliances}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListInstanceOSPoliciesCompliancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} [response] ListInstanceOSPoliciesCompliancesResponse + */ + + /** + * Calls ListInstanceOSPoliciesCompliances. + * @function listInstanceOSPoliciesCompliances + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} request ListInstanceOSPoliciesCompliancesRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliancesCallback} callback Node-style callback called with the error, if any, and ListInstanceOSPoliciesCompliancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listInstanceOSPoliciesCompliances = function listInstanceOSPoliciesCompliances(request, callback) { + return this.rpcCall(listInstanceOSPoliciesCompliances, $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse, request, callback); + }, "name", { value: "ListInstanceOSPoliciesCompliances" }); + + /** + * Calls ListInstanceOSPoliciesCompliances. + * @function listInstanceOSPoliciesCompliances + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} request ListInstanceOSPoliciesCompliancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef GetInventoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.Inventory} [response] Inventory + */ + + /** + * Calls GetInventory. + * @function getInventory + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} request GetInventoryRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventoryCallback} callback Node-style callback called with the error, if any, and Inventory + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getInventory = function getInventory(request, callback) { + return this.rpcCall(getInventory, $root.google.cloud.osconfig.v1alpha.GetInventoryRequest, $root.google.cloud.osconfig.v1alpha.Inventory, request, callback); + }, "name", { value: "GetInventory" }); + + /** + * Calls GetInventory. + * @function getInventory + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} request GetInventoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInventories}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListInventoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListInventoriesResponse} [response] ListInventoriesResponse + */ + + /** + * Calls ListInventories. + * @function listInventories + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} request ListInventoriesRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventoriesCallback} callback Node-style callback called with the error, if any, and ListInventoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listInventories = function listInventories(request, callback) { + return this.rpcCall(listInventories, $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest, $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse, request, callback); + }, "name", { value: "ListInventories" }); + + /** + * Calls ListInventories. + * @function listInventories + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} request ListInventoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getVulnerabilityReport}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef GetVulnerabilityReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport} [response] VulnerabilityReport + */ + + /** + * Calls GetVulnerabilityReport. + * @function getVulnerabilityReport + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} request GetVulnerabilityReportRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReportCallback} callback Node-style callback called with the error, if any, and VulnerabilityReport + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getVulnerabilityReport = function getVulnerabilityReport(request, callback) { + return this.rpcCall(getVulnerabilityReport, $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, $root.google.cloud.osconfig.v1alpha.VulnerabilityReport, request, callback); + }, "name", { value: "GetVulnerabilityReport" }); + + /** + * Calls GetVulnerabilityReport. + * @function getVulnerabilityReport + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} request GetVulnerabilityReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listVulnerabilityReports}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListVulnerabilityReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} [response] ListVulnerabilityReportsResponse + */ + + /** + * Calls ListVulnerabilityReports. + * @function listVulnerabilityReports + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} request ListVulnerabilityReportsRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReportsCallback} callback Node-style callback called with the error, if any, and ListVulnerabilityReportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listVulnerabilityReports = function listVulnerabilityReports(request, callback) { + return this.rpcCall(listVulnerabilityReports, $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse, request, callback); + }, "name", { value: "ListVulnerabilityReports" }); + + /** + * Calls ListVulnerabilityReports. + * @function listVulnerabilityReports + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} request ListVulnerabilityReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return OsConfigZonalService; + })(); + + v1alpha.VulnerabilityReport = (function() { + + /** + * Properties of a VulnerabilityReport. + * @memberof google.cloud.osconfig.v1alpha + * @interface IVulnerabilityReport + * @property {string|null} [name] VulnerabilityReport name + * @property {Array.|null} [vulnerabilities] VulnerabilityReport vulnerabilities + * @property {google.protobuf.ITimestamp|null} [updateTime] VulnerabilityReport updateTime + */ + + /** + * Constructs a new VulnerabilityReport. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a VulnerabilityReport. + * @implements IVulnerabilityReport + * @constructor + * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport=} [properties] Properties to set + */ + function VulnerabilityReport(properties) { + this.vulnerabilities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VulnerabilityReport name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @instance + */ + VulnerabilityReport.prototype.name = ""; + + /** + * VulnerabilityReport vulnerabilities. + * @member {Array.} vulnerabilities + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @instance + */ + VulnerabilityReport.prototype.vulnerabilities = $util.emptyArray; + + /** + * VulnerabilityReport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @instance + */ + VulnerabilityReport.prototype.updateTime = null; + + /** + * Creates a new VulnerabilityReport instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport instance + */ + VulnerabilityReport.create = function create(properties) { + return new VulnerabilityReport(properties); + }; + + /** + * Encodes the specified VulnerabilityReport message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport} message VulnerabilityReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VulnerabilityReport.encode = function encode(message, writer) { + 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.vulnerabilities != null && message.vulnerabilities.length) + for (var i = 0; i < message.vulnerabilities.length; ++i) + $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.encode(message.vulnerabilities[i], 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(); + return writer; + }; + + /** + * Encodes the specified VulnerabilityReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport} message VulnerabilityReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VulnerabilityReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VulnerabilityReport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VulnerabilityReport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.vulnerabilities && message.vulnerabilities.length)) + message.vulnerabilities = []; + message.vulnerabilities.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.decode(reader, reader.uint32())); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VulnerabilityReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VulnerabilityReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VulnerabilityReport message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VulnerabilityReport.verify = function verify(message) { + if (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.vulnerabilities != null && message.hasOwnProperty("vulnerabilities")) { + if (!Array.isArray(message.vulnerabilities)) + return "vulnerabilities: array expected"; + for (var i = 0; i < message.vulnerabilities.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify(message.vulnerabilities[i]); + if (error) + return "vulnerabilities." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a VulnerabilityReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport + */ + VulnerabilityReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport(); + if (object.name != null) + message.name = String(object.name); + if (object.vulnerabilities) { + if (!Array.isArray(object.vulnerabilities)) + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.vulnerabilities: array expected"); + message.vulnerabilities = []; + for (var i = 0; i < object.vulnerabilities.length; ++i) { + if (typeof object.vulnerabilities[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.vulnerabilities: object expected"); + message.vulnerabilities[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.fromObject(object.vulnerabilities[i]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a VulnerabilityReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport} message VulnerabilityReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VulnerabilityReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.vulnerabilities = []; + if (options.defaults) { + object.name = ""; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.vulnerabilities && message.vulnerabilities.length) { + object.vulnerabilities = []; + for (var j = 0; j < message.vulnerabilities.length; ++j) + object.vulnerabilities[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.toObject(message.vulnerabilities[j], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this VulnerabilityReport to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @instance + * @returns {Object.} JSON object + */ + VulnerabilityReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + VulnerabilityReport.Vulnerability = (function() { + + /** + * Properties of a Vulnerability. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @interface IVulnerability + * @property {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null} [details] Vulnerability details + * @property {Array.|null} [installedInventoryItemIds] Vulnerability installedInventoryItemIds + * @property {Array.|null} [availableInventoryItemIds] Vulnerability availableInventoryItemIds + * @property {google.protobuf.ITimestamp|null} [createTime] Vulnerability createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Vulnerability updateTime + */ + + /** + * Constructs a new Vulnerability. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @classdesc Represents a Vulnerability. + * @implements IVulnerability + * @constructor + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability=} [properties] Properties to set + */ + function Vulnerability(properties) { + this.installedInventoryItemIds = []; + this.availableInventoryItemIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vulnerability details. + * @member {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null|undefined} details + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.details = null; + + /** + * Vulnerability installedInventoryItemIds. + * @member {Array.} installedInventoryItemIds + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.installedInventoryItemIds = $util.emptyArray; + + /** + * Vulnerability availableInventoryItemIds. + * @member {Array.} availableInventoryItemIds + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.availableInventoryItemIds = $util.emptyArray; + + /** + * Vulnerability createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.createTime = null; + + /** + * Vulnerability updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.updateTime = null; + + /** + * Creates a new Vulnerability instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability instance + */ + Vulnerability.create = function create(properties) { + return new Vulnerability(properties); + }; + + /** + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability} message Vulnerability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vulnerability.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.encode(message.details, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.installedInventoryItemIds != null && message.installedInventoryItemIds.length) + for (var i = 0; i < message.installedInventoryItemIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.installedInventoryItemIds[i]); + if (message.availableInventoryItemIds != null && message.availableInventoryItemIds.length) + for (var i = 0; i < message.availableInventoryItemIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.availableInventoryItemIds[i]); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability} message Vulnerability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vulnerability.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vulnerability message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vulnerability.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.installedInventoryItemIds && message.installedInventoryItemIds.length)) + message.installedInventoryItemIds = []; + message.installedInventoryItemIds.push(reader.string()); + break; + case 3: + if (!(message.availableInventoryItemIds && message.availableInventoryItemIds.length)) + message.availableInventoryItemIds = []; + message.availableInventoryItemIds.push(reader.string()); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vulnerability.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vulnerability message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vulnerability.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.details != null && message.hasOwnProperty("details")) { + var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify(message.details); + if (error) + return "details." + error; + } + if (message.installedInventoryItemIds != null && message.hasOwnProperty("installedInventoryItemIds")) { + if (!Array.isArray(message.installedInventoryItemIds)) + return "installedInventoryItemIds: array expected"; + for (var i = 0; i < message.installedInventoryItemIds.length; ++i) + if (!$util.isString(message.installedInventoryItemIds[i])) + return "installedInventoryItemIds: string[] expected"; + } + if (message.availableInventoryItemIds != null && message.hasOwnProperty("availableInventoryItemIds")) { + if (!Array.isArray(message.availableInventoryItemIds)) + return "availableInventoryItemIds: array expected"; + for (var i = 0; i < message.availableInventoryItemIds.length; ++i) + if (!$util.isString(message.availableInventoryItemIds[i])) + return "availableInventoryItemIds: 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; + } + return null; + }; + + /** + * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability + */ + Vulnerability.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability(); + if (object.details != null) { + if (typeof object.details !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.details: object expected"); + message.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.fromObject(object.details); + } + if (object.installedInventoryItemIds) { + if (!Array.isArray(object.installedInventoryItemIds)) + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.installedInventoryItemIds: array expected"); + message.installedInventoryItemIds = []; + for (var i = 0; i < object.installedInventoryItemIds.length; ++i) + message.installedInventoryItemIds[i] = String(object.installedInventoryItemIds[i]); + } + if (object.availableInventoryItemIds) { + if (!Array.isArray(object.availableInventoryItemIds)) + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.availableInventoryItemIds: array expected"); + message.availableInventoryItemIds = []; + for (var i = 0; i < object.availableInventoryItemIds.length; ++i) + message.availableInventoryItemIds[i] = String(object.availableInventoryItemIds[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.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.osconfig.v1alpha.VulnerabilityReport.Vulnerability.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} message Vulnerability + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vulnerability.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.installedInventoryItemIds = []; + object.availableInventoryItemIds = []; + } + if (options.defaults) { + object.details = null; + object.createTime = null; + object.updateTime = null; + } + if (message.details != null && message.hasOwnProperty("details")) + object.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.toObject(message.details, options); + if (message.installedInventoryItemIds && message.installedInventoryItemIds.length) { + object.installedInventoryItemIds = []; + for (var j = 0; j < message.installedInventoryItemIds.length; ++j) + object.installedInventoryItemIds[j] = message.installedInventoryItemIds[j]; + } + if (message.availableInventoryItemIds && message.availableInventoryItemIds.length) { + object.availableInventoryItemIds = []; + for (var j = 0; j < message.availableInventoryItemIds.length; ++j) + object.availableInventoryItemIds[j] = message.availableInventoryItemIds[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this Vulnerability to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + * @returns {Object.} JSON object + */ + Vulnerability.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Vulnerability.Details = (function() { + + /** + * Properties of a Details. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @interface IDetails + * @property {string|null} [cve] Details cve + * @property {number|null} [cvssV2Score] Details cvssV2Score + * @property {google.cloud.osconfig.v1alpha.ICVSSv3|null} [cvssV3] Details cvssV3 + * @property {string|null} [severity] Details severity + * @property {string|null} [description] Details description + * @property {Array.|null} [references] Details references + */ + + /** + * Constructs a new Details. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @classdesc Represents a Details. + * @implements IDetails + * @constructor + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails=} [properties] Properties to set + */ + function Details(properties) { + this.references = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Details cve. + * @member {string} cve + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.cve = ""; + + /** + * Details cvssV2Score. + * @member {number} cvssV2Score + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.cvssV2Score = 0; + + /** + * Details cvssV3. + * @member {google.cloud.osconfig.v1alpha.ICVSSv3|null|undefined} cvssV3 + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.cvssV3 = null; + + /** + * Details severity. + * @member {string} severity + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.severity = ""; + + /** + * Details description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.description = ""; + + /** + * Details references. + * @member {Array.} references + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + */ + Details.prototype.references = $util.emptyArray; + + /** + * Creates a new Details instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details instance + */ + Details.create = function create(properties) { + return new Details(properties); + }; + + /** + * Encodes the specified Details message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails} message Details message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Details.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cve != null && Object.hasOwnProperty.call(message, "cve")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cve); + if (message.cvssV2Score != null && Object.hasOwnProperty.call(message, "cvssV2Score")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.cvssV2Score); + if (message.cvssV3 != null && Object.hasOwnProperty.call(message, "cvssV3")) + $root.google.cloud.osconfig.v1alpha.CVSSv3.encode(message.cvssV3, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.severity); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.encode(message.references[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails} message Details message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Details.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Details message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Details.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cve = reader.string(); + break; + case 2: + message.cvssV2Score = reader.float(); + break; + case 3: + message.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.decode(reader, reader.uint32()); + break; + case 4: + message.severity = reader.string(); + break; + case 5: + message.description = reader.string(); + break; + case 6: + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Details message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Details.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Details message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Details.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cve != null && message.hasOwnProperty("cve")) + if (!$util.isString(message.cve)) + return "cve: string expected"; + if (message.cvssV2Score != null && message.hasOwnProperty("cvssV2Score")) + if (typeof message.cvssV2Score !== "number") + return "cvssV2Score: number expected"; + if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) { + var error = $root.google.cloud.osconfig.v1alpha.CVSSv3.verify(message.cvssV3); + if (error) + return "cvssV3." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify(message.references[i]); + if (error) + return "references." + error; + } + } + return null; + }; + + /** + * Creates a Details message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details + */ + Details.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details(); + if (object.cve != null) + message.cve = String(object.cve); + if (object.cvssV2Score != null) + message.cvssV2Score = Number(object.cvssV2Score); + if (object.cvssV3 != null) { + if (typeof object.cvssV3 !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.cvssV3: object expected"); + message.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.fromObject(object.cvssV3); + } + if (object.severity != null) + message.severity = String(object.severity); + if (object.description != null) + message.description = String(object.description); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.references: object expected"); + message.references[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.fromObject(object.references[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Details message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} message Details + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Details.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.references = []; + if (options.defaults) { + object.cve = ""; + object.cvssV2Score = 0; + object.cvssV3 = null; + object.severity = ""; + object.description = ""; + } + if (message.cve != null && message.hasOwnProperty("cve")) + object.cve = message.cve; + if (message.cvssV2Score != null && message.hasOwnProperty("cvssV2Score")) + object.cvssV2Score = options.json && !isFinite(message.cvssV2Score) ? String(message.cvssV2Score) : message.cvssV2Score; + if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) + object.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.toObject(message.cvssV3, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.toObject(message.references[j], options); + } + return object; + }; + + /** + * Converts this Details to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @instance + * @returns {Object.} JSON object + */ + Details.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Details.Reference = (function() { + + /** + * Properties of a Reference. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @interface IReference + * @property {string|null} [url] Reference url + */ + + /** + * Constructs a new Reference. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @classdesc Represents a Reference. + * @implements IReference + * @constructor + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference=} [properties] Properties to set + */ + function Reference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Reference url. + * @member {string} url + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @instance + */ + Reference.prototype.url = ""; + + /** + * Creates a new Reference instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference instance + */ + Reference.create = function create(properties) { + return new Reference(properties); + }; + + /** + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference} message Reference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + return writer; + }; + + /** + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference} message Reference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Reference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.url = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Reference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Reference message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Reference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates a Reference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference + */ + Reference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference(); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from a Reference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} message Reference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Reference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.url = ""; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; + + /** + * Converts this Reference to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @instance + * @returns {Object.} JSON object + */ + Reference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Reference; + })(); + + return Details; + })(); + + return Vulnerability; + })(); + + return VulnerabilityReport; + })(); + + v1alpha.GetVulnerabilityReportRequest = (function() { + + /** + * Properties of a GetVulnerabilityReportRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IGetVulnerabilityReportRequest + * @property {string|null} [name] GetVulnerabilityReportRequest name + */ + + /** + * Constructs a new GetVulnerabilityReportRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a GetVulnerabilityReportRequest. + * @implements IGetVulnerabilityReportRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest=} [properties] Properties to set + */ + function GetVulnerabilityReportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVulnerabilityReportRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @instance + */ + GetVulnerabilityReportRequest.prototype.name = ""; + + /** + * Creates a new GetVulnerabilityReportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest instance + */ + GetVulnerabilityReportRequest.create = function create(properties) { + return new GetVulnerabilityReportRequest(properties); + }; + + /** + * Encodes the specified GetVulnerabilityReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} message GetVulnerabilityReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVulnerabilityReportRequest.encode = function encode(message, writer) { + 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 GetVulnerabilityReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} message GetVulnerabilityReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVulnerabilityReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVulnerabilityReportRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVulnerabilityReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVulnerabilityReportRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVulnerabilityReportRequest.verify = function verify(message) { + if (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 GetVulnerabilityReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest + */ + GetVulnerabilityReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVulnerabilityReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} message GetVulnerabilityReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVulnerabilityReportRequest.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 GetVulnerabilityReportRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @instance + * @returns {Object.} JSON object + */ + GetVulnerabilityReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetVulnerabilityReportRequest; + })(); + + v1alpha.ListVulnerabilityReportsRequest = (function() { + + /** + * Properties of a ListVulnerabilityReportsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListVulnerabilityReportsRequest + * @property {string|null} [parent] ListVulnerabilityReportsRequest parent + * @property {number|null} [pageSize] ListVulnerabilityReportsRequest pageSize + * @property {string|null} [pageToken] ListVulnerabilityReportsRequest pageToken + * @property {string|null} [filter] ListVulnerabilityReportsRequest filter + */ + + /** + * Constructs a new ListVulnerabilityReportsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListVulnerabilityReportsRequest. + * @implements IListVulnerabilityReportsRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest=} [properties] Properties to set + */ + function ListVulnerabilityReportsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVulnerabilityReportsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + */ + ListVulnerabilityReportsRequest.prototype.parent = ""; + + /** + * ListVulnerabilityReportsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + */ + ListVulnerabilityReportsRequest.prototype.pageSize = 0; + + /** + * ListVulnerabilityReportsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + */ + ListVulnerabilityReportsRequest.prototype.pageToken = ""; + + /** + * ListVulnerabilityReportsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + */ + ListVulnerabilityReportsRequest.prototype.filter = ""; + + /** + * Creates a new ListVulnerabilityReportsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest instance + */ + ListVulnerabilityReportsRequest.create = function create(properties) { + return new ListVulnerabilityReportsRequest(properties); + }; + + /** + * Encodes the specified ListVulnerabilityReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVulnerabilityReportsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListVulnerabilityReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVulnerabilityReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVulnerabilityReportsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVulnerabilityReportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVulnerabilityReportsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVulnerabilityReportsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListVulnerabilityReportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest + */ + ListVulnerabilityReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListVulnerabilityReportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVulnerabilityReportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListVulnerabilityReportsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVulnerabilityReportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListVulnerabilityReportsRequest; + })(); + + v1alpha.ListVulnerabilityReportsResponse = (function() { + + /** + * Properties of a ListVulnerabilityReportsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListVulnerabilityReportsResponse + * @property {Array.|null} [vulnerabilityReports] ListVulnerabilityReportsResponse vulnerabilityReports + * @property {string|null} [nextPageToken] ListVulnerabilityReportsResponse nextPageToken + */ + + /** + * Constructs a new ListVulnerabilityReportsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListVulnerabilityReportsResponse. + * @implements IListVulnerabilityReportsResponse + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse=} [properties] Properties to set + */ + function ListVulnerabilityReportsResponse(properties) { + this.vulnerabilityReports = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVulnerabilityReportsResponse vulnerabilityReports. + * @member {Array.} vulnerabilityReports + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @instance + */ + ListVulnerabilityReportsResponse.prototype.vulnerabilityReports = $util.emptyArray; + + /** + * ListVulnerabilityReportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @instance + */ + ListVulnerabilityReportsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListVulnerabilityReportsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse instance + */ + ListVulnerabilityReportsResponse.create = function create(properties) { + return new ListVulnerabilityReportsResponse(properties); + }; + + /** + * Encodes the specified ListVulnerabilityReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVulnerabilityReportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vulnerabilityReports != null && message.vulnerabilityReports.length) + for (var i = 0; i < message.vulnerabilityReports.length; ++i) + $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.encode(message.vulnerabilityReports[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 ListVulnerabilityReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVulnerabilityReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVulnerabilityReportsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.vulnerabilityReports && message.vulnerabilityReports.length)) + message.vulnerabilityReports = []; + message.vulnerabilityReports.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVulnerabilityReportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVulnerabilityReportsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVulnerabilityReportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vulnerabilityReports != null && message.hasOwnProperty("vulnerabilityReports")) { + if (!Array.isArray(message.vulnerabilityReports)) + return "vulnerabilityReports: array expected"; + for (var i = 0; i < message.vulnerabilityReports.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.verify(message.vulnerabilityReports[i]); + if (error) + return "vulnerabilityReports." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListVulnerabilityReportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse + */ + ListVulnerabilityReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse(); + if (object.vulnerabilityReports) { + if (!Array.isArray(object.vulnerabilityReports)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.vulnerabilityReports: array expected"); + message.vulnerabilityReports = []; + for (var i = 0; i < object.vulnerabilityReports.length; ++i) { + if (typeof object.vulnerabilityReports[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.vulnerabilityReports: object expected"); + message.vulnerabilityReports[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.fromObject(object.vulnerabilityReports[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListVulnerabilityReportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVulnerabilityReportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.vulnerabilityReports = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.vulnerabilityReports && message.vulnerabilityReports.length) { + object.vulnerabilityReports = []; + for (var j = 0; j < message.vulnerabilityReports.length; ++j) + object.vulnerabilityReports[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.toObject(message.vulnerabilityReports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListVulnerabilityReportsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVulnerabilityReportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListVulnerabilityReportsResponse; + })(); + + v1alpha.CVSSv3 = (function() { + + /** + * Properties of a CVSSv3. + * @memberof google.cloud.osconfig.v1alpha + * @interface ICVSSv3 + * @property {number|null} [baseScore] CVSSv3 baseScore + * @property {number|null} [exploitabilityScore] CVSSv3 exploitabilityScore + * @property {number|null} [impactScore] CVSSv3 impactScore + * @property {google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|null} [attackVector] CVSSv3 attackVector + * @property {google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|null} [attackComplexity] CVSSv3 attackComplexity + * @property {google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|null} [privilegesRequired] CVSSv3 privilegesRequired + * @property {google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|null} [userInteraction] CVSSv3 userInteraction + * @property {google.cloud.osconfig.v1alpha.CVSSv3.Scope|null} [scope] CVSSv3 scope + * @property {google.cloud.osconfig.v1alpha.CVSSv3.Impact|null} [confidentialityImpact] CVSSv3 confidentialityImpact + * @property {google.cloud.osconfig.v1alpha.CVSSv3.Impact|null} [integrityImpact] CVSSv3 integrityImpact + * @property {google.cloud.osconfig.v1alpha.CVSSv3.Impact|null} [availabilityImpact] CVSSv3 availabilityImpact + */ + + /** + * Constructs a new CVSSv3. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a CVSSv3. + * @implements ICVSSv3 + * @constructor + * @param {google.cloud.osconfig.v1alpha.ICVSSv3=} [properties] Properties to set + */ + function CVSSv3(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CVSSv3 baseScore. + * @member {number} baseScore + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.baseScore = 0; + + /** + * CVSSv3 exploitabilityScore. + * @member {number} exploitabilityScore + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.exploitabilityScore = 0; + + /** + * CVSSv3 impactScore. + * @member {number} impactScore + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.impactScore = 0; + + /** + * CVSSv3 attackVector. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.AttackVector} attackVector + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.attackVector = 0; + + /** + * CVSSv3 attackComplexity. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity} attackComplexity + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.attackComplexity = 0; + + /** + * CVSSv3 privilegesRequired. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired} privilegesRequired + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.privilegesRequired = 0; + + /** + * CVSSv3 userInteraction. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction} userInteraction + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.userInteraction = 0; + + /** + * CVSSv3 scope. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.Scope} scope + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.scope = 0; + + /** + * CVSSv3 confidentialityImpact. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.Impact} confidentialityImpact + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.confidentialityImpact = 0; + + /** + * CVSSv3 integrityImpact. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.Impact} integrityImpact + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.integrityImpact = 0; + + /** + * CVSSv3 availabilityImpact. + * @member {google.cloud.osconfig.v1alpha.CVSSv3.Impact} availabilityImpact + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + */ + CVSSv3.prototype.availabilityImpact = 0; + + /** + * Creates a new CVSSv3 instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {google.cloud.osconfig.v1alpha.ICVSSv3=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 instance + */ + CVSSv3.create = function create(properties) { + return new CVSSv3(properties); + }; + + /** + * Encodes the specified CVSSv3 message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {google.cloud.osconfig.v1alpha.ICVSSv3} message CVSSv3 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CVSSv3.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.baseScore); + if (message.exploitabilityScore != null && Object.hasOwnProperty.call(message, "exploitabilityScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.exploitabilityScore); + if (message.impactScore != null && Object.hasOwnProperty.call(message, "impactScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.impactScore); + if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attackVector); + if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.attackComplexity); + if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.privilegesRequired); + if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userInteraction); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scope); + if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.confidentialityImpact); + if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.integrityImpact); + if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.availabilityImpact); + return writer; + }; + + /** + * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {google.cloud.osconfig.v1alpha.ICVSSv3} message CVSSv3 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CVSSv3.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CVSSv3 message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CVSSv3.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.CVSSv3(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseScore = reader.float(); + break; + case 2: + message.exploitabilityScore = reader.float(); + break; + case 3: + message.impactScore = reader.float(); + break; + case 5: + message.attackVector = reader.int32(); + break; + case 6: + message.attackComplexity = reader.int32(); + break; + case 7: + message.privilegesRequired = reader.int32(); + break; + case 8: + message.userInteraction = reader.int32(); + break; + case 9: + message.scope = reader.int32(); + break; + case 10: + message.confidentialityImpact = reader.int32(); + break; + case 11: + message.integrityImpact = reader.int32(); + break; + case 12: + message.availabilityImpact = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CVSSv3.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CVSSv3 message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CVSSv3.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + if (typeof message.baseScore !== "number") + return "baseScore: number expected"; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + if (typeof message.exploitabilityScore !== "number") + return "exploitabilityScore: number expected"; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + if (typeof message.impactScore !== "number") + return "impactScore: number expected"; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + switch (message.attackVector) { + default: + return "attackVector: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + switch (message.attackComplexity) { + default: + return "attackComplexity: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + switch (message.privilegesRequired) { + default: + return "privilegesRequired: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + switch (message.userInteraction) { + default: + return "userInteraction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + switch (message.confidentialityImpact) { + default: + return "confidentialityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + switch (message.integrityImpact) { + default: + return "integrityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + switch (message.availabilityImpact) { + default: + return "availabilityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 + */ + CVSSv3.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.CVSSv3) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.CVSSv3(); + if (object.baseScore != null) + message.baseScore = Number(object.baseScore); + if (object.exploitabilityScore != null) + message.exploitabilityScore = Number(object.exploitabilityScore); + if (object.impactScore != null) + message.impactScore = Number(object.impactScore); + switch (object.attackVector) { + case "ATTACK_VECTOR_UNSPECIFIED": + case 0: + message.attackVector = 0; + break; + case "ATTACK_VECTOR_NETWORK": + case 1: + message.attackVector = 1; + break; + case "ATTACK_VECTOR_ADJACENT": + case 2: + message.attackVector = 2; + break; + case "ATTACK_VECTOR_LOCAL": + case 3: + message.attackVector = 3; + break; + case "ATTACK_VECTOR_PHYSICAL": + case 4: + message.attackVector = 4; + break; + } + switch (object.attackComplexity) { + case "ATTACK_COMPLEXITY_UNSPECIFIED": + case 0: + message.attackComplexity = 0; + break; + case "ATTACK_COMPLEXITY_LOW": + case 1: + message.attackComplexity = 1; + break; + case "ATTACK_COMPLEXITY_HIGH": + case 2: + message.attackComplexity = 2; + break; + } + switch (object.privilegesRequired) { + case "PRIVILEGES_REQUIRED_UNSPECIFIED": + case 0: + message.privilegesRequired = 0; + break; + case "PRIVILEGES_REQUIRED_NONE": + case 1: + message.privilegesRequired = 1; + break; + case "PRIVILEGES_REQUIRED_LOW": + case 2: + message.privilegesRequired = 2; + break; + case "PRIVILEGES_REQUIRED_HIGH": + case 3: + message.privilegesRequired = 3; + break; + } + switch (object.userInteraction) { + case "USER_INTERACTION_UNSPECIFIED": + case 0: + message.userInteraction = 0; + break; + case "USER_INTERACTION_NONE": + case 1: + message.userInteraction = 1; + break; + case "USER_INTERACTION_REQUIRED": + case 2: + message.userInteraction = 2; + break; + } + switch (object.scope) { + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "SCOPE_UNCHANGED": + case 1: + message.scope = 1; + break; + case "SCOPE_CHANGED": + case 2: + message.scope = 2; + break; + } + switch (object.confidentialityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.confidentialityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.confidentialityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.confidentialityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.confidentialityImpact = 3; + break; + } + switch (object.integrityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.integrityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.integrityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.integrityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.integrityImpact = 3; + break; + } + switch (object.availabilityImpact) { + case "IMPACT_UNSPECIFIED": + case 0: + message.availabilityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.availabilityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.availabilityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.availabilityImpact = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {google.cloud.osconfig.v1alpha.CVSSv3} message CVSSv3 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CVSSv3.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.baseScore = 0; + object.exploitabilityScore = 0; + object.impactScore = 0; + object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; + object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; + object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; + object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; + object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + } + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; + if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) + object.exploitabilityScore = options.json && !isFinite(message.exploitabilityScore) ? String(message.exploitabilityScore) : message.exploitabilityScore; + if (message.impactScore != null && message.hasOwnProperty("impactScore")) + object.impactScore = options.json && !isFinite(message.impactScore) ? String(message.impactScore) : message.impactScore; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + object.attackVector = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector[message.attackVector] : message.attackVector; + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + object.attackComplexity = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + object.privilegesRequired = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + object.userInteraction = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Scope[message.scope] : message.scope; + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + object.confidentialityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + object.integrityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + object.availabilityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; + return object; + }; + + /** + * Converts this CVSSv3 to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @instance + * @returns {Object.} JSON object + */ + CVSSv3.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * AttackVector enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.AttackVector + * @enum {number} + * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value + * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value + * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value + * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value + * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value + */ + CVSSv3.AttackVector = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; + values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; + values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; + values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; + return values; + })(); + + /** + * AttackComplexity enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity + * @enum {number} + * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value + * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value + * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value + */ + CVSSv3.AttackComplexity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; + values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; + return values; + })(); + + /** + * PrivilegesRequired enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired + * @enum {number} + * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value + * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value + * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value + * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value + */ + CVSSv3.PrivilegesRequired = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; + values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; + values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; + return values; + })(); + + /** + * UserInteraction enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction + * @enum {number} + * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value + * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value + * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value + */ + CVSSv3.UserInteraction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; + values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; + return values; + })(); + + /** + * Scope enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value + * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value + */ + CVSSv3.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; + values[valuesById[2] = "SCOPE_CHANGED"] = 2; + return values; + })(); + + /** + * Impact enum. + * @name google.cloud.osconfig.v1alpha.CVSSv3.Impact + * @enum {number} + * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value + * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value + * @property {number} IMPACT_LOW=2 IMPACT_LOW value + * @property {number} IMPACT_NONE=3 IMPACT_NONE value + */ + CVSSv3.Impact = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPACT_HIGH"] = 1; + values[valuesById[2] = "IMPACT_LOW"] = 2; + values[valuesById[3] = "IMPACT_NONE"] = 3; + return values; + })(); + + return CVSSv3; + })(); + + return v1alpha; + })(); + + return osconfig; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); - return Rollout; - })(); + return FieldDescriptorProto; + })(); - /** - * RolloutState enum. - * @name google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState - * @enum {number} - * @property {number} ROLLOUT_STATE_UNSPECIFIED=0 ROLLOUT_STATE_UNSPECIFIED value - * @property {number} IN_PROGRESS=1 IN_PROGRESS value - * @property {number} CANCELLING=2 CANCELLING value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} SUCCEEDED=4 SUCCEEDED value - */ - OSPolicyAssignment.RolloutState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROLLOUT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN_PROGRESS"] = 1; - values[valuesById[2] = "CANCELLING"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - return values; - })(); + protobuf.OneofDescriptorProto = (function() { - return OSPolicyAssignment; - })(); + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ - v1alpha.OSPolicyAssignmentOperationMetadata = (function() { + /** + * 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]]; + } - /** - * Properties of a OSPolicyAssignmentOperationMetadata. - * @memberof google.cloud.osconfig.v1alpha - * @interface IOSPolicyAssignmentOperationMetadata - * @property {string|null} [osPolicyAssignment] OSPolicyAssignmentOperationMetadata osPolicyAssignment - * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod|null} [apiMethod] OSPolicyAssignmentOperationMetadata apiMethod - * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState|null} [rolloutState] OSPolicyAssignmentOperationMetadata rolloutState - * @property {google.protobuf.ITimestamp|null} [rolloutStartTime] OSPolicyAssignmentOperationMetadata rolloutStartTime - * @property {google.protobuf.ITimestamp|null} [rolloutUpdateTime] OSPolicyAssignmentOperationMetadata rolloutUpdateTime - */ + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; - /** - * Constructs a new OSPolicyAssignmentOperationMetadata. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a OSPolicyAssignmentOperationMetadata. - * @implements IOSPolicyAssignmentOperationMetadata - * @constructor - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata=} [properties] Properties to set - */ - function OSPolicyAssignmentOperationMetadata(properties) { - if (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 options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; - /** - * OSPolicyAssignmentOperationMetadata osPolicyAssignment. - * @member {string} osPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @instance - */ - OSPolicyAssignmentOperationMetadata.prototype.osPolicyAssignment = ""; + /** + * 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); + }; - /** - * OSPolicyAssignmentOperationMetadata apiMethod. - * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod} apiMethod - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @instance - */ - OSPolicyAssignmentOperationMetadata.prototype.apiMethod = 0; + /** + * 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; + }; - /** - * OSPolicyAssignmentOperationMetadata rolloutState. - * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState} rolloutState - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @instance - */ - OSPolicyAssignmentOperationMetadata.prototype.rolloutState = 0; + /** + * 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(); + }; - /** - * OSPolicyAssignmentOperationMetadata rolloutStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} rolloutStartTime - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @instance - */ - OSPolicyAssignmentOperationMetadata.prototype.rolloutStartTime = null; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * OSPolicyAssignmentOperationMetadata rolloutUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} rolloutUpdateTime - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @instance - */ - OSPolicyAssignmentOperationMetadata.prototype.rolloutUpdateTime = null; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new OSPolicyAssignmentOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata instance - */ - OSPolicyAssignmentOperationMetadata.create = function create(properties) { - return new OSPolicyAssignmentOperationMetadata(properties); - }; + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Encodes the specified OSPolicyAssignmentOperationMetadata message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicyAssignmentOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyAssignment); - if (message.apiMethod != null && Object.hasOwnProperty.call(message, "apiMethod")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.apiMethod); - if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rolloutState); - if (message.rolloutStartTime != null && Object.hasOwnProperty.call(message, "rolloutStartTime")) - $root.google.protobuf.Timestamp.encode(message.rolloutStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.rolloutUpdateTime != null && Object.hasOwnProperty.call(message, "rolloutUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.rolloutUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; - /** - * Encodes the specified OSPolicyAssignmentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OSPolicyAssignmentOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; - /** - * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicyAssignmentOperationMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.osPolicyAssignment = reader.string(); - break; - case 2: - message.apiMethod = reader.int32(); - break; - case 3: - message.rolloutState = reader.int32(); - break; - case 4: - message.rolloutStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.rolloutUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OSPolicyAssignmentOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return OneofDescriptorProto; + })(); - /** - * Verifies a OSPolicyAssignmentOperationMetadata message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OSPolicyAssignmentOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) - if (!$util.isString(message.osPolicyAssignment)) - return "osPolicyAssignment: string expected"; - if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) - switch (message.apiMethod) { - default: - return "apiMethod: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - switch (message.rolloutState) { - default: - return "rolloutState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.rolloutStartTime); - if (error) - return "rolloutStartTime." + error; - } - if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.rolloutUpdateTime); - if (error) - return "rolloutUpdateTime." + error; - } - return null; - }; + protobuf.EnumDescriptorProto = (function() { - /** - * Creates a OSPolicyAssignmentOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata - */ - OSPolicyAssignmentOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata(); - if (object.osPolicyAssignment != null) - message.osPolicyAssignment = String(object.osPolicyAssignment); - switch (object.apiMethod) { - case "API_METHOD_UNSPECIFIED": - case 0: - message.apiMethod = 0; - break; - case "CREATE": - case 1: - message.apiMethod = 1; - break; - case "UPDATE": - case 2: - message.apiMethod = 2; - break; - case "DELETE": - case 3: - message.apiMethod = 3; - break; - } - switch (object.rolloutState) { - case "ROLLOUT_STATE_UNSPECIFIED": - case 0: - message.rolloutState = 0; - break; - case "IN_PROGRESS": - case 1: - message.rolloutState = 1; - break; - case "CANCELLING": - case 2: - message.rolloutState = 2; - break; - case "CANCELLED": - case 3: - message.rolloutState = 3; - break; - case "SUCCEEDED": - case 4: - message.rolloutState = 4; - break; - } - if (object.rolloutStartTime != null) { - if (typeof object.rolloutStartTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.rolloutStartTime: object expected"); - message.rolloutStartTime = $root.google.protobuf.Timestamp.fromObject(object.rolloutStartTime); - } - if (object.rolloutUpdateTime != null) { - if (typeof object.rolloutUpdateTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.rolloutUpdateTime: object expected"); - message.rolloutUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.rolloutUpdateTime); - } - return message; - }; + /** + * 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 + */ - /** - * Creates a plain object from a OSPolicyAssignmentOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OSPolicyAssignmentOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.osPolicyAssignment = ""; - object.apiMethod = options.enums === String ? "API_METHOD_UNSPECIFIED" : 0; - object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; - object.rolloutStartTime = null; - object.rolloutUpdateTime = null; - } - if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) - object.osPolicyAssignment = message.osPolicyAssignment; - if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) - object.apiMethod = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] : message.apiMethod; - if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] : message.rolloutState; - if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) - object.rolloutStartTime = $root.google.protobuf.Timestamp.toObject(message.rolloutStartTime, options); - if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) - object.rolloutUpdateTime = $root.google.protobuf.Timestamp.toObject(message.rolloutUpdateTime, options); - return object; - }; + /** + * 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]]; + } - /** - * Converts this OSPolicyAssignmentOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - OSPolicyAssignmentOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; - /** - * APIMethod enum. - * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod - * @enum {number} - * @property {number} API_METHOD_UNSPECIFIED=0 API_METHOD_UNSPECIFIED value - * @property {number} CREATE=1 CREATE value - * @property {number} UPDATE=2 UPDATE value - * @property {number} DELETE=3 DELETE value - */ - OSPolicyAssignmentOperationMetadata.APIMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "API_METHOD_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATE"] = 1; - values[valuesById[2] = "UPDATE"] = 2; - values[valuesById[3] = "DELETE"] = 3; - return values; - })(); + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; - /** - * RolloutState enum. - * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState - * @enum {number} - * @property {number} ROLLOUT_STATE_UNSPECIFIED=0 ROLLOUT_STATE_UNSPECIFIED value - * @property {number} IN_PROGRESS=1 IN_PROGRESS value - * @property {number} CANCELLING=2 CANCELLING value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} SUCCEEDED=4 SUCCEEDED value - */ - OSPolicyAssignmentOperationMetadata.RolloutState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROLLOUT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN_PROGRESS"] = 1; - values[valuesById[2] = "CANCELLING"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - return values; - })(); + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; - return OSPolicyAssignmentOperationMetadata; - })(); + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - v1alpha.CreateOSPolicyAssignmentRequest = (function() { + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Properties of a CreateOSPolicyAssignmentRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface ICreateOSPolicyAssignmentRequest - * @property {string|null} [parent] CreateOSPolicyAssignmentRequest parent - * @property {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null} [osPolicyAssignment] CreateOSPolicyAssignmentRequest osPolicyAssignment - * @property {string|null} [osPolicyAssignmentId] CreateOSPolicyAssignmentRequest osPolicyAssignmentId - */ + /** + * 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); + }; - /** - * Constructs a new CreateOSPolicyAssignmentRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a CreateOSPolicyAssignmentRequest. - * @implements ICreateOSPolicyAssignmentRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest=} [properties] Properties to set - */ - function CreateOSPolicyAssignmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; - /** - * CreateOSPolicyAssignmentRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @instance - */ - CreateOSPolicyAssignmentRequest.prototype.parent = ""; + /** + * 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; + }; - /** - * CreateOSPolicyAssignmentRequest osPolicyAssignment. - * @member {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null|undefined} osPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @instance - */ - CreateOSPolicyAssignmentRequest.prototype.osPolicyAssignment = null; + /** + * 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; + }; - /** - * CreateOSPolicyAssignmentRequest osPolicyAssignmentId. - * @member {string} osPolicyAssignmentId - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @instance - */ - CreateOSPolicyAssignmentRequest.prototype.osPolicyAssignmentId = ""; + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new CreateOSPolicyAssignmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest instance - */ - CreateOSPolicyAssignmentRequest.create = function create(properties) { - return new CreateOSPolicyAssignmentRequest(properties); - }; + EnumDescriptorProto.EnumReservedRange = (function() { - /** - * Encodes the specified CreateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateOSPolicyAssignmentRequest.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.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.osPolicyAssignmentId != null && Object.hasOwnProperty.call(message, "osPolicyAssignmentId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.osPolicyAssignmentId); - return writer; - }; + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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; - /** - * Encodes the specified CreateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateOSPolicyAssignmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); - break; - case 3: - message.osPolicyAssignmentId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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(); + }; - /** - * Verifies a CreateOSPolicyAssignmentRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateOSPolicyAssignmentRequest.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.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignment); - if (error) - return "osPolicyAssignment." + error; + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.osPolicyAssignmentId != null && message.hasOwnProperty("osPolicyAssignmentId")) - if (!$util.isString(message.osPolicyAssignmentId)) - return "osPolicyAssignmentId: string expected"; - return null; - }; + } + return message; + }; - /** - * Creates a CreateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest - */ - CreateOSPolicyAssignmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.osPolicyAssignment != null) { - if (typeof object.osPolicyAssignment !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.osPolicyAssignment: object expected"); - message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignment); - } - if (object.osPolicyAssignmentId != null) - message.osPolicyAssignmentId = String(object.osPolicyAssignmentId); - 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()); + }; - /** - * Creates a plain object from a CreateOSPolicyAssignmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateOSPolicyAssignmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.osPolicyAssignment = null; - object.osPolicyAssignmentId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) - object.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignment, options); - if (message.osPolicyAssignmentId != null && message.hasOwnProperty("osPolicyAssignmentId")) - object.osPolicyAssignmentId = message.osPolicyAssignmentId; - return object; - }; + /** + * 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; + }; - /** - * Converts this CreateOSPolicyAssignmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest - * @instance - * @returns {Object.} JSON object - */ - CreateOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; - return CreateOSPolicyAssignmentRequest; - })(); + /** + * 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; + }; - v1alpha.UpdateOSPolicyAssignmentRequest = (function() { + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of an UpdateOSPolicyAssignmentRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IUpdateOSPolicyAssignmentRequest - * @property {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null} [osPolicyAssignment] UpdateOSPolicyAssignmentRequest osPolicyAssignment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOSPolicyAssignmentRequest updateMask - */ + return EnumReservedRange; + })(); - /** - * Constructs a new UpdateOSPolicyAssignmentRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents an UpdateOSPolicyAssignmentRequest. - * @implements IUpdateOSPolicyAssignmentRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest=} [properties] Properties to set - */ - function UpdateOSPolicyAssignmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return EnumDescriptorProto; + })(); - /** - * UpdateOSPolicyAssignmentRequest osPolicyAssignment. - * @member {google.cloud.osconfig.v1alpha.IOSPolicyAssignment|null|undefined} osPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @instance - */ - UpdateOSPolicyAssignmentRequest.prototype.osPolicyAssignment = null; + protobuf.EnumValueDescriptorProto = (function() { - /** - * UpdateOSPolicyAssignmentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @instance - */ - UpdateOSPolicyAssignmentRequest.prototype.updateMask = null; + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ - /** - * Creates a new UpdateOSPolicyAssignmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest instance - */ - UpdateOSPolicyAssignmentRequest.create = function create(properties) { - return new UpdateOSPolicyAssignmentRequest(properties); - }; + /** + * 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]]; + } - /** - * Encodes the specified UpdateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateOSPolicyAssignmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; - /** - * Encodes the specified UpdateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; - /** - * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateOSPolicyAssignmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; - /** - * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies an UpdateOSPolicyAssignmentRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateOSPolicyAssignmentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignment); - if (error) - return "osPolicyAssignment." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + /** + * 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; + }; - /** - * Creates an UpdateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest - */ - UpdateOSPolicyAssignmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest(); - if (object.osPolicyAssignment != null) { - if (typeof object.osPolicyAssignment !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.osPolicyAssignment: object expected"); - message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignment); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + /** + * 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(); + }; - /** - * Creates a plain object from an UpdateOSPolicyAssignmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateOSPolicyAssignmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.osPolicyAssignment = null; - object.updateMask = null; - } - if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) - object.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignment, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this UpdateOSPolicyAssignmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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()); + }; - return UpdateOSPolicyAssignmentRequest; - })(); + /** + * 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; + }; - v1alpha.GetOSPolicyAssignmentRequest = (function() { + /** + * 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; + }; - /** - * Properties of a GetOSPolicyAssignmentRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IGetOSPolicyAssignmentRequest - * @property {string|null} [name] GetOSPolicyAssignmentRequest name - */ + /** + * 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; + }; - /** - * Constructs a new GetOSPolicyAssignmentRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a GetOSPolicyAssignmentRequest. - * @implements IGetOSPolicyAssignmentRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest=} [properties] Properties to set - */ - function GetOSPolicyAssignmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this 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); + }; - /** - * GetOSPolicyAssignmentRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @instance - */ - GetOSPolicyAssignmentRequest.prototype.name = ""; + return EnumValueDescriptorProto; + })(); - /** - * Creates a new GetOSPolicyAssignmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest instance - */ - GetOSPolicyAssignmentRequest.create = function create(properties) { - return new GetOSPolicyAssignmentRequest(properties); - }; + protobuf.ServiceDescriptorProto = (function() { - /** - * Encodes the specified GetOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOSPolicyAssignmentRequest.encode = function encode(message, writer) { - 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; - }; + /** + * 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 + */ - /** - * Encodes the specified GetOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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]]; + } - /** - * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOSPolicyAssignmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; - /** - * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; - /** - * Verifies a GetOSPolicyAssignmentRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOSPolicyAssignmentRequest.verify = function verify(message) { - if (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; - }; + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; - /** - * Creates a GetOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest - */ - GetOSPolicyAssignmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; - /** - * Creates a plain object from a GetOSPolicyAssignmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOSPolicyAssignmentRequest.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; - }; + /** + * 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; + }; - /** - * Converts this GetOSPolicyAssignmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest - * @instance - * @returns {Object.} JSON object - */ - GetOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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(); + }; - return GetOSPolicyAssignmentRequest; - })(); + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - v1alpha.ListOSPolicyAssignmentsRequest = (function() { + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a ListOSPolicyAssignmentsRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IListOSPolicyAssignmentsRequest - * @property {string|null} [parent] ListOSPolicyAssignmentsRequest parent - * @property {number|null} [pageSize] ListOSPolicyAssignmentsRequest pageSize - * @property {string|null} [pageToken] ListOSPolicyAssignmentsRequest pageToken - */ + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Constructs a new ListOSPolicyAssignmentsRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListOSPolicyAssignmentsRequest. - * @implements IListOSPolicyAssignmentsRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest=} [properties] Properties to set - */ - function ListOSPolicyAssignmentsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; - /** - * ListOSPolicyAssignmentsRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @instance - */ - ListOSPolicyAssignmentsRequest.prototype.parent = ""; + /** + * 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; + }; - /** - * ListOSPolicyAssignmentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @instance - */ - ListOSPolicyAssignmentsRequest.prototype.pageSize = 0; + /** + * 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); + }; - /** - * ListOSPolicyAssignmentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @instance - */ - ListOSPolicyAssignmentsRequest.prototype.pageToken = ""; + return ServiceDescriptorProto; + })(); - /** - * Creates a new ListOSPolicyAssignmentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest instance - */ - ListOSPolicyAssignmentsRequest.create = function create(properties) { - return new ListOSPolicyAssignmentsRequest(properties); - }; + protobuf.MethodDescriptorProto = (function() { - /** - * Encodes the specified ListOSPolicyAssignmentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOSPolicyAssignmentsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + /** + * 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 + */ - /** - * Encodes the specified ListOSPolicyAssignmentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOSPolicyAssignmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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]]; + } - /** - * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOSPolicyAssignmentsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; - /** - * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOSPolicyAssignmentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; - /** - * Verifies a ListOSPolicyAssignmentsRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOSPolicyAssignmentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; - /** - * Creates a ListOSPolicyAssignmentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest - */ - ListOSPolicyAssignmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; - /** - * Creates a plain object from a ListOSPolicyAssignmentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOSPolicyAssignmentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; - /** - * Converts this ListOSPolicyAssignmentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOSPolicyAssignmentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; - return ListOSPolicyAssignmentsRequest; - })(); + /** + * 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); + }; - v1alpha.ListOSPolicyAssignmentsResponse = (function() { + /** + * 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; + }; - /** - * Properties of a ListOSPolicyAssignmentsResponse. - * @memberof google.cloud.osconfig.v1alpha - * @interface IListOSPolicyAssignmentsResponse - * @property {Array.|null} [osPolicyAssignments] ListOSPolicyAssignmentsResponse osPolicyAssignments - * @property {string|null} [nextPageToken] ListOSPolicyAssignmentsResponse nextPageToken - */ + /** + * 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(); + }; - /** - * Constructs a new ListOSPolicyAssignmentsResponse. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListOSPolicyAssignmentsResponse. - * @implements IListOSPolicyAssignmentsResponse - * @constructor - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse=} [properties] Properties to set - */ - function ListOSPolicyAssignmentsResponse(properties) { - this.osPolicyAssignments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * ListOSPolicyAssignmentsResponse osPolicyAssignments. - * @member {Array.} osPolicyAssignments - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @instance - */ - ListOSPolicyAssignmentsResponse.prototype.osPolicyAssignments = $util.emptyArray; - - /** - * ListOSPolicyAssignmentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @instance - */ - ListOSPolicyAssignmentsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOSPolicyAssignmentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse instance - */ - ListOSPolicyAssignmentsResponse.create = function create(properties) { - return new ListOSPolicyAssignmentsResponse(properties); - }; - - /** - * Encodes the specified ListOSPolicyAssignmentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOSPolicyAssignmentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osPolicyAssignments != null && message.osPolicyAssignments.length) - for (var i = 0; i < message.osPolicyAssignments.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignments[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 ListOSPolicyAssignmentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOSPolicyAssignmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOSPolicyAssignmentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) - message.osPolicyAssignments = []; - message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; - /** - * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOSPolicyAssignmentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; - /** - * Verifies a ListOSPolicyAssignmentsResponse message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOSPolicyAssignmentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osPolicyAssignments != null && message.hasOwnProperty("osPolicyAssignments")) { - if (!Array.isArray(message.osPolicyAssignments)) - return "osPolicyAssignments: array expected"; - for (var i = 0; i < message.osPolicyAssignments.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignments[i]); - if (error) - return "osPolicyAssignments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; - /** - * Creates a ListOSPolicyAssignmentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse - */ - ListOSPolicyAssignmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse(); - if (object.osPolicyAssignments) { - if (!Array.isArray(object.osPolicyAssignments)) - throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.osPolicyAssignments: array expected"); - message.osPolicyAssignments = []; - for (var i = 0; i < object.osPolicyAssignments.length; ++i) { - if (typeof object.osPolicyAssignments[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.osPolicyAssignments: object expected"); - message.osPolicyAssignments[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a ListOSPolicyAssignmentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOSPolicyAssignmentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.osPolicyAssignments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.osPolicyAssignments && message.osPolicyAssignments.length) { - object.osPolicyAssignments = []; - for (var j = 0; j < message.osPolicyAssignments.length; ++j) - object.osPolicyAssignments[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + return MethodDescriptorProto; + })(); - /** - * Converts this ListOSPolicyAssignmentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOSPolicyAssignmentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + protobuf.FileOptions = (function() { - return ListOSPolicyAssignmentsResponse; - })(); + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ - v1alpha.ListOSPolicyAssignmentRevisionsRequest = (function() { + /** + * 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]]; + } - /** - * Properties of a ListOSPolicyAssignmentRevisionsRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IListOSPolicyAssignmentRevisionsRequest - * @property {string|null} [name] ListOSPolicyAssignmentRevisionsRequest name - * @property {number|null} [pageSize] ListOSPolicyAssignmentRevisionsRequest pageSize - * @property {string|null} [pageToken] ListOSPolicyAssignmentRevisionsRequest pageToken - */ + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; - /** - * Constructs a new ListOSPolicyAssignmentRevisionsRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListOSPolicyAssignmentRevisionsRequest. - * @implements IListOSPolicyAssignmentRevisionsRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest=} [properties] Properties to set - */ - function ListOSPolicyAssignmentRevisionsRequest(properties) { - if (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 javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; - /** - * ListOSPolicyAssignmentRevisionsRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @instance - */ - ListOSPolicyAssignmentRevisionsRequest.prototype.name = ""; + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; - /** - * ListOSPolicyAssignmentRevisionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @instance - */ - ListOSPolicyAssignmentRevisionsRequest.prototype.pageSize = 0; + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; - /** - * ListOSPolicyAssignmentRevisionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @instance - */ - ListOSPolicyAssignmentRevisionsRequest.prototype.pageToken = ""; + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; - /** - * Creates a new ListOSPolicyAssignmentRevisionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest instance - */ - ListOSPolicyAssignmentRevisionsRequest.create = function create(properties) { - return new ListOSPolicyAssignmentRevisionsRequest(properties); - }; + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; - /** - * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOSPolicyAssignmentRevisionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; - /** - * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOSPolicyAssignmentRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; - /** - * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOSPolicyAssignmentRevisionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; - /** - * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOSPolicyAssignmentRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; - /** - * Verifies a ListOSPolicyAssignmentRevisionsRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOSPolicyAssignmentRevisionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; - /** - * Creates a ListOSPolicyAssignmentRevisionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest - */ - ListOSPolicyAssignmentRevisionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; - /** - * Creates a plain object from a ListOSPolicyAssignmentRevisionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOSPolicyAssignmentRevisionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; - /** - * Converts this ListOSPolicyAssignmentRevisionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOSPolicyAssignmentRevisionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; - return ListOSPolicyAssignmentRevisionsRequest; - })(); + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; - v1alpha.ListOSPolicyAssignmentRevisionsResponse = (function() { + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; - /** - * Properties of a ListOSPolicyAssignmentRevisionsResponse. - * @memberof google.cloud.osconfig.v1alpha - * @interface IListOSPolicyAssignmentRevisionsResponse - * @property {Array.|null} [osPolicyAssignments] ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments - * @property {string|null} [nextPageToken] ListOSPolicyAssignmentRevisionsResponse nextPageToken - */ + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; - /** - * Constructs a new ListOSPolicyAssignmentRevisionsResponse. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListOSPolicyAssignmentRevisionsResponse. - * @implements IListOSPolicyAssignmentRevisionsResponse - * @constructor - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse=} [properties] Properties to set - */ - function ListOSPolicyAssignmentRevisionsResponse(properties) { - this.osPolicyAssignments = []; - if (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 phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; - /** - * ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments. - * @member {Array.} osPolicyAssignments - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @instance - */ - ListOSPolicyAssignmentRevisionsResponse.prototype.osPolicyAssignments = $util.emptyArray; + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; - /** - * ListOSPolicyAssignmentRevisionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @instance - */ - ListOSPolicyAssignmentRevisionsResponse.prototype.nextPageToken = ""; + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; - /** - * Creates a new ListOSPolicyAssignmentRevisionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse instance - */ - ListOSPolicyAssignmentRevisionsResponse.create = function create(properties) { - return new ListOSPolicyAssignmentRevisionsResponse(properties); - }; + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOSPolicyAssignmentRevisionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.osPolicyAssignments != null && message.osPolicyAssignments.length) - for (var i = 0; i < message.osPolicyAssignments.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.encode(message.osPolicyAssignments[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; - }; + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - /** - * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOSPolicyAssignmentRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOSPolicyAssignmentRevisionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) - message.osPolicyAssignments = []; - message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; - /** - * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOSPolicyAssignmentRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a ListOSPolicyAssignmentRevisionsResponse message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOSPolicyAssignmentRevisionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.osPolicyAssignments != null && message.hasOwnProperty("osPolicyAssignments")) { - if (!Array.isArray(message.osPolicyAssignments)) - return "osPolicyAssignments: array expected"; - for (var i = 0; i < message.osPolicyAssignments.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify(message.osPolicyAssignments[i]); - if (error) - return "osPolicyAssignments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ListOSPolicyAssignmentRevisionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse - */ - ListOSPolicyAssignmentRevisionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse(); - if (object.osPolicyAssignments) { - if (!Array.isArray(object.osPolicyAssignments)) - throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.osPolicyAssignments: array expected"); - message.osPolicyAssignments = []; - for (var i = 0; i < object.osPolicyAssignments.length; ++i) { - if (typeof object.osPolicyAssignments[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.osPolicyAssignments: object expected"); - message.osPolicyAssignments[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.fromObject(object.osPolicyAssignments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; - /** - * Creates a plain object from a ListOSPolicyAssignmentRevisionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOSPolicyAssignmentRevisionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.osPolicyAssignments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.osPolicyAssignments && message.osPolicyAssignments.length) { - object.osPolicyAssignments = []; - for (var j = 0; j < message.osPolicyAssignments.length; ++j) - object.osPolicyAssignments[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.toObject(message.osPolicyAssignments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; - /** - * Converts this ListOSPolicyAssignmentRevisionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOSPolicyAssignmentRevisionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; - return ListOSPolicyAssignmentRevisionsResponse; - })(); + /** + * 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); + }; - v1alpha.DeleteOSPolicyAssignmentRequest = (function() { + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); - /** - * Properties of a DeleteOSPolicyAssignmentRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IDeleteOSPolicyAssignmentRequest - * @property {string|null} [name] DeleteOSPolicyAssignmentRequest name - */ + return FileOptions; + })(); - /** - * Constructs a new DeleteOSPolicyAssignmentRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a DeleteOSPolicyAssignmentRequest. - * @implements IDeleteOSPolicyAssignmentRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest=} [properties] Properties to set - */ - function DeleteOSPolicyAssignmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.MessageOptions = (function() { - /** - * DeleteOSPolicyAssignmentRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @instance - */ - DeleteOSPolicyAssignmentRequest.prototype.name = ""; + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ - /** - * Creates a new DeleteOSPolicyAssignmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest instance - */ - DeleteOSPolicyAssignmentRequest.create = function create(properties) { - return new DeleteOSPolicyAssignmentRequest(properties); - }; + /** + * 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]]; + } - /** - * Encodes the specified DeleteOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOSPolicyAssignmentRequest.encode = function encode(message, writer) { - 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; - }; + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; - /** - * Encodes the specified DeleteOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; - /** - * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOSPolicyAssignmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; - /** - * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; - /** - * Verifies a DeleteOSPolicyAssignmentRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOSPolicyAssignmentRequest.verify = function verify(message) { - if (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; - }; + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Creates a DeleteOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest - */ - DeleteOSPolicyAssignmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * 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 plain object from a DeleteOSPolicyAssignmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @static - * @param {google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteOSPolicyAssignmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Creates a 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); + }; - /** - * Converts this DeleteOSPolicyAssignmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; - return DeleteOSPolicyAssignmentRequest; - })(); + /** + * 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(); + }; - v1alpha.FixedOrPercent = (function() { + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a FixedOrPercent. - * @memberof google.cloud.osconfig.v1alpha - * @interface IFixedOrPercent - * @property {number|null} [fixed] FixedOrPercent fixed - * @property {number|null} [percent] FixedOrPercent percent - */ + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new FixedOrPercent. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a FixedOrPercent. - * @implements IFixedOrPercent - * @constructor - * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent=} [properties] Properties to set - */ - function FixedOrPercent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; - /** - * FixedOrPercent fixed. - * @member {number|null|undefined} fixed - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @instance - */ - FixedOrPercent.prototype.fixed = null; + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; - /** - * FixedOrPercent percent. - * @member {number|null|undefined} percent - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @instance - */ - FixedOrPercent.prototype.percent = null; + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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); + }; - /** - * FixedOrPercent mode. - * @member {"fixed"|"percent"|undefined} mode - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @instance - */ - Object.defineProperty(FixedOrPercent.prototype, "mode", { - get: $util.oneOfGetter($oneOfFields = ["fixed", "percent"]), - set: $util.oneOfSetter($oneOfFields) - }); + return MessageOptions; + })(); - /** - * Creates a new FixedOrPercent instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @static - * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent instance - */ - FixedOrPercent.create = function create(properties) { - return new FixedOrPercent(properties); - }; + protobuf.FieldOptions = (function() { - /** - * Encodes the specified FixedOrPercent message. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @static - * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent} message FixedOrPercent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FixedOrPercent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fixed != null && Object.hasOwnProperty.call(message, "fixed")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fixed); - if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.percent); - return writer; - }; + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ - /** - * Encodes the specified FixedOrPercent message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.FixedOrPercent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @static - * @param {google.cloud.osconfig.v1alpha.IFixedOrPercent} message FixedOrPercent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FixedOrPercent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a FixedOrPercent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FixedOrPercent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.FixedOrPercent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fixed = reader.int32(); - break; - case 2: - message.percent = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; - /** - * Decodes a FixedOrPercent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FixedOrPercent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; - /** - * Verifies a FixedOrPercent message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FixedOrPercent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.fixed != null && message.hasOwnProperty("fixed")) { - properties.mode = 1; - if (!$util.isInteger(message.fixed)) - return "fixed: integer expected"; - } - if (message.percent != null && message.hasOwnProperty("percent")) { - if (properties.mode === 1) - return "mode: multiple values"; - properties.mode = 1; - if (!$util.isInteger(message.percent)) - return "percent: integer expected"; - } - return null; - }; + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; - /** - * Creates a FixedOrPercent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.FixedOrPercent} FixedOrPercent - */ - FixedOrPercent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.FixedOrPercent) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.FixedOrPercent(); - if (object.fixed != null) - message.fixed = object.fixed | 0; - if (object.percent != null) - message.percent = object.percent | 0; - return message; - }; + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; - /** - * Creates a plain object from a FixedOrPercent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @static - * @param {google.cloud.osconfig.v1alpha.FixedOrPercent} message FixedOrPercent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FixedOrPercent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.fixed != null && message.hasOwnProperty("fixed")) { - object.fixed = message.fixed; - if (options.oneofs) - object.mode = "fixed"; - } - if (message.percent != null && message.hasOwnProperty("percent")) { - object.percent = message.percent; - if (options.oneofs) - object.mode = "percent"; - } - return object; - }; + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; - /** - * Converts this FixedOrPercent to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent - * @instance - * @returns {Object.} JSON object - */ - FixedOrPercent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; - return FixedOrPercent; - })(); + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - v1alpha.OsConfigZonalService = (function() { + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - /** - * Constructs a new OsConfigZonalService service. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents an OsConfigZonalService - * @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 OsConfigZonalService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; - (OsConfigZonalService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsConfigZonalService; + /** + * 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); + }; - /** - * Creates new OsConfigZonalService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @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 {OsConfigZonalService} RPC service. Useful where requests and/or responses are streamed. - */ - OsConfigZonalService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#createOSPolicyAssignment}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef CreateOSPolicyAssignmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * 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(); + }; - /** - * Calls CreateOSPolicyAssignment. - * @function createOSPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} request CreateOSPolicyAssignmentRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.createOSPolicyAssignment = function createOSPolicyAssignment(request, callback) { - return this.rpcCall(createOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateOSPolicyAssignment" }); + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls CreateOSPolicyAssignment. - * @function createOSPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest} request CreateOSPolicyAssignmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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()); + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#updateOSPolicyAssignment}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef UpdateOSPolicyAssignmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; - /** - * Calls UpdateOSPolicyAssignment. - * @function updateOSPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} request UpdateOSPolicyAssignmentRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.updateOSPolicyAssignment = function updateOSPolicyAssignment(request, callback) { - return this.rpcCall(updateOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateOSPolicyAssignment" }); + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; - /** - * Calls UpdateOSPolicyAssignment. - * @function updateOSPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest} request UpdateOSPolicyAssignmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignment}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef GetOSPolicyAssignmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} [response] OSPolicyAssignment - */ + /** + * 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); + }; - /** - * Calls GetOSPolicyAssignment. - * @function getOSPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} request GetOSPolicyAssignmentRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and OSPolicyAssignment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.getOSPolicyAssignment = function getOSPolicyAssignment(request, callback) { - return this.rpcCall(getOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment, request, callback); - }, "name", { value: "GetOSPolicyAssignment" }); + /** + * 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; + })(); - /** - * Calls GetOSPolicyAssignment. - * @function getOSPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest} request GetOSPolicyAssignmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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; + })(); - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignments}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef ListOSPolicyAssignmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} [response] ListOSPolicyAssignmentsResponse - */ + return FieldOptions; + })(); - /** - * Calls ListOSPolicyAssignments. - * @function listOSPolicyAssignments - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} request ListOSPolicyAssignmentsRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignments = function listOSPolicyAssignments(request, callback) { - return this.rpcCall(listOSPolicyAssignments, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse, request, callback); - }, "name", { value: "ListOSPolicyAssignments" }); + protobuf.OneofOptions = (function() { - /** - * Calls ListOSPolicyAssignments. - * @function listOSPolicyAssignments - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest} request ListOSPolicyAssignmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentRevisions}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef ListOSPolicyAssignmentRevisionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} [response] ListOSPolicyAssignmentRevisionsResponse - */ + /** + * 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]]; + } - /** - * Calls ListOSPolicyAssignmentRevisions. - * @function listOSPolicyAssignmentRevisions - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} request ListOSPolicyAssignmentRevisionsRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisionsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentRevisionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignmentRevisions = function listOSPolicyAssignmentRevisions(request, callback) { - return this.rpcCall(listOSPolicyAssignmentRevisions, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse, request, callback); - }, "name", { value: "ListOSPolicyAssignmentRevisions" }); + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Calls ListOSPolicyAssignmentRevisions. - * @function listOSPolicyAssignmentRevisions - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest} request ListOSPolicyAssignmentRevisionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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); + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#deleteOSPolicyAssignment}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef DeleteOSPolicyAssignmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; - /** - * Calls DeleteOSPolicyAssignment. - * @function deleteOSPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} request DeleteOSPolicyAssignmentRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.deleteOSPolicyAssignment = function deleteOSPolicyAssignment(request, callback) { - return this.rpcCall(deleteOSPolicyAssignment, $root.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteOSPolicyAssignment" }); + /** + * 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(); + }; - /** - * Calls DeleteOSPolicyAssignment. - * @function deleteOSPolicyAssignment - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest} request DeleteOSPolicyAssignmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInstanceOSPoliciesCompliance}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef GetInstanceOSPoliciesComplianceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} [response] InstanceOSPoliciesCompliance - */ + /** + * 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()); + }; - /** - * Calls GetInstanceOSPoliciesCompliance. - * @function getInstanceOSPoliciesCompliance - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} request GetInstanceOSPoliciesComplianceRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesComplianceCallback} callback Node-style callback called with the error, if any, and InstanceOSPoliciesCompliance - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.getInstanceOSPoliciesCompliance = function getInstanceOSPoliciesCompliance(request, callback) { - return this.rpcCall(getInstanceOSPoliciesCompliance, $root.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, $root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance, request, callback); - }, "name", { value: "GetInstanceOSPoliciesCompliance" }); + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; - /** - * Calls GetInstanceOSPoliciesCompliance. - * @function getInstanceOSPoliciesCompliance - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest} request GetInstanceOSPoliciesComplianceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInstanceOSPoliciesCompliances}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef ListInstanceOSPoliciesCompliancesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} [response] ListInstanceOSPoliciesCompliancesResponse - */ + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * Calls ListInstanceOSPoliciesCompliances. - * @function listInstanceOSPoliciesCompliances - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} request ListInstanceOSPoliciesCompliancesRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliancesCallback} callback Node-style callback called with the error, if any, and ListInstanceOSPoliciesCompliancesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.listInstanceOSPoliciesCompliances = function listInstanceOSPoliciesCompliances(request, callback) { - return this.rpcCall(listInstanceOSPoliciesCompliances, $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, $root.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse, request, callback); - }, "name", { value: "ListInstanceOSPoliciesCompliances" }); + /** + * 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); + }; - /** - * Calls ListInstanceOSPoliciesCompliances. - * @function listInstanceOSPoliciesCompliances - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest} request ListInstanceOSPoliciesCompliancesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return OneofOptions; + })(); - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef GetInventoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1alpha.Inventory} [response] Inventory - */ + protobuf.EnumOptions = (function() { - /** - * Calls GetInventory. - * @function getInventory - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} request GetInventoryRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventoryCallback} callback Node-style callback called with the error, if any, and Inventory - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.getInventory = function getInventory(request, callback) { - return this.rpcCall(getInventory, $root.google.cloud.osconfig.v1alpha.GetInventoryRequest, $root.google.cloud.osconfig.v1alpha.Inventory, request, callback); - }, "name", { value: "GetInventory" }); + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ - /** - * Calls GetInventory. - * @function getInventory - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IGetInventoryRequest} request GetInventoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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]]; + } - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInventories}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef ListInventoriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1alpha.ListInventoriesResponse} [response] ListInventoriesResponse - */ + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; - /** - * Calls ListInventories. - * @function listInventories - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} request ListInventoriesRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventoriesCallback} callback Node-style callback called with the error, if any, and ListInventoriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.listInventories = function listInventories(request, callback) { - return this.rpcCall(listInventories, $root.google.cloud.osconfig.v1alpha.ListInventoriesRequest, $root.google.cloud.osconfig.v1alpha.ListInventoriesResponse, request, callback); - }, "name", { value: "ListInventories" }); + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; - /** - * Calls ListInventories. - * @function listInventories - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListInventoriesRequest} request ListInventoriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getVulnerabilityReport}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef GetVulnerabilityReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport} [response] VulnerabilityReport - */ + /** + * 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); + }; - /** - * Calls GetVulnerabilityReport. - * @function getVulnerabilityReport - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} request GetVulnerabilityReportRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReportCallback} callback Node-style callback called with the error, if any, and VulnerabilityReport - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.getVulnerabilityReport = function getVulnerabilityReport(request, callback) { - return this.rpcCall(getVulnerabilityReport, $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, $root.google.cloud.osconfig.v1alpha.VulnerabilityReport, request, callback); - }, "name", { value: "GetVulnerabilityReport" }); + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; - /** - * Calls GetVulnerabilityReport. - * @function getVulnerabilityReport - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} request GetVulnerabilityReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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(); + }; - /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listVulnerabilityReports}. - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @typedef ListVulnerabilityReportsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} [response] ListVulnerabilityReportsResponse - */ + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls ListVulnerabilityReports. - * @function listVulnerabilityReports - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} request ListVulnerabilityReportsRequest message or plain object - * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReportsCallback} callback Node-style callback called with the error, if any, and ListVulnerabilityReportsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsConfigZonalService.prototype.listVulnerabilityReports = function listVulnerabilityReports(request, callback) { - return this.rpcCall(listVulnerabilityReports, $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse, request, callback); - }, "name", { value: "ListVulnerabilityReports" }); + /** + * 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()); + }; - /** - * Calls ListVulnerabilityReports. - * @function listVulnerabilityReports - * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService - * @instance - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} request ListVulnerabilityReportsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; - return OsConfigZonalService; - })(); + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - v1alpha.VulnerabilityReport = (function() { + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * Properties of a VulnerabilityReport. - * @memberof google.cloud.osconfig.v1alpha - * @interface IVulnerabilityReport - * @property {string|null} [name] VulnerabilityReport name - * @property {Array.|null} [vulnerabilities] VulnerabilityReport vulnerabilities - * @property {google.protobuf.ITimestamp|null} [updateTime] VulnerabilityReport updateTime - */ + /** + * 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); + }; - /** - * Constructs a new VulnerabilityReport. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a VulnerabilityReport. - * @implements IVulnerabilityReport - * @constructor - * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport=} [properties] Properties to set - */ - function VulnerabilityReport(properties) { - this.vulnerabilities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return EnumOptions; + })(); - /** - * VulnerabilityReport name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @instance - */ - VulnerabilityReport.prototype.name = ""; + protobuf.EnumValueOptions = (function() { - /** - * VulnerabilityReport vulnerabilities. - * @member {Array.} vulnerabilities - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @instance - */ - VulnerabilityReport.prototype.vulnerabilities = $util.emptyArray; + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ - /** - * VulnerabilityReport updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @instance - */ - VulnerabilityReport.prototype.updateTime = null; + /** + * 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]]; + } - /** - * Creates a new VulnerabilityReport instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @static - * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport instance - */ - VulnerabilityReport.create = function create(properties) { - return new VulnerabilityReport(properties); - }; + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; - /** - * Encodes the specified VulnerabilityReport message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @static - * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport} message VulnerabilityReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VulnerabilityReport.encode = function encode(message, writer) { - 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.vulnerabilities != null && message.vulnerabilities.length) - for (var i = 0; i < message.vulnerabilities.length; ++i) - $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.encode(message.vulnerabilities[i], 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(); - return writer; - }; + /** + * 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 VulnerabilityReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @static - * @param {google.cloud.osconfig.v1alpha.IVulnerabilityReport} message VulnerabilityReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VulnerabilityReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; - /** - * Decodes a VulnerabilityReport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VulnerabilityReport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.vulnerabilities && message.vulnerabilities.length)) - message.vulnerabilities = []; - message.vulnerabilities.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.decode(reader, reader.uint32())); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a VulnerabilityReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VulnerabilityReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a VulnerabilityReport message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VulnerabilityReport.verify = function verify(message) { - if (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.vulnerabilities != null && message.hasOwnProperty("vulnerabilities")) { - if (!Array.isArray(message.vulnerabilities)) - return "vulnerabilities: array expected"; - for (var i = 0; i < message.vulnerabilities.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify(message.vulnerabilities[i]); - if (error) - return "vulnerabilities." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a VulnerabilityReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport} VulnerabilityReport - */ - VulnerabilityReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport(); - if (object.name != null) - message.name = String(object.name); - if (object.vulnerabilities) { - if (!Array.isArray(object.vulnerabilities)) - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.vulnerabilities: array expected"); - message.vulnerabilities = []; - for (var i = 0; i < object.vulnerabilities.length; ++i) { - if (typeof object.vulnerabilities[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.vulnerabilities: object expected"); - message.vulnerabilities[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.fromObject(object.vulnerabilities[i]); - } - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; - /** - * Creates a plain object from a VulnerabilityReport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport} message VulnerabilityReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VulnerabilityReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.vulnerabilities = []; - if (options.defaults) { - object.name = ""; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.vulnerabilities && message.vulnerabilities.length) { - object.vulnerabilities = []; - for (var j = 0; j < message.vulnerabilities.length; ++j) - object.vulnerabilities[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.toObject(message.vulnerabilities[j], options); - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * Converts this VulnerabilityReport to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @instance - * @returns {Object.} JSON object - */ - VulnerabilityReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - VulnerabilityReport.Vulnerability = (function() { + /** + * 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); + }; - /** - * Properties of a Vulnerability. - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @interface IVulnerability - * @property {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null} [details] Vulnerability details - * @property {Array.|null} [installedInventoryItemIds] Vulnerability installedInventoryItemIds - * @property {Array.|null} [availableInventoryItemIds] Vulnerability availableInventoryItemIds - * @property {google.protobuf.ITimestamp|null} [createTime] Vulnerability createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Vulnerability updateTime - */ + return EnumValueOptions; + })(); - /** - * Constructs a new Vulnerability. - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport - * @classdesc Represents a Vulnerability. - * @implements IVulnerability - * @constructor - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability=} [properties] Properties to set - */ - function Vulnerability(properties) { - this.installedInventoryItemIds = []; - this.availableInventoryItemIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.ServiceOptions = (function() { - /** - * Vulnerability details. - * @member {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails|null|undefined} details - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @instance - */ - Vulnerability.prototype.details = null; + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ - /** - * Vulnerability installedInventoryItemIds. - * @member {Array.} installedInventoryItemIds - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @instance - */ - Vulnerability.prototype.installedInventoryItemIds = $util.emptyArray; + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Vulnerability availableInventoryItemIds. - * @member {Array.} availableInventoryItemIds - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @instance - */ - Vulnerability.prototype.availableInventoryItemIds = $util.emptyArray; + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; - /** - * Vulnerability createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @instance - */ - Vulnerability.prototype.createTime = null; + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Vulnerability updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @instance - */ - Vulnerability.prototype.updateTime = null; + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; - /** - * Creates a new Vulnerability instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability instance - */ - Vulnerability.create = function create(properties) { - return new Vulnerability(properties); - }; + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - /** - * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability} message Vulnerability message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Vulnerability.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.encode(message.details, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.installedInventoryItemIds != null && message.installedInventoryItemIds.length) - for (var i = 0; i < message.installedInventoryItemIds.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.installedInventoryItemIds[i]); - if (message.availableInventoryItemIds != null && message.availableInventoryItemIds.length) - for (var i = 0; i < message.availableInventoryItemIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.availableInventoryItemIds[i]); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; - /** - * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.IVulnerability} message Vulnerability message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Vulnerability.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Vulnerability message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Vulnerability.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.installedInventoryItemIds && message.installedInventoryItemIds.length)) - message.installedInventoryItemIds = []; - message.installedInventoryItemIds.push(reader.string()); - break; - case 3: - if (!(message.availableInventoryItemIds && message.availableInventoryItemIds.length)) - message.availableInventoryItemIds = []; - message.availableInventoryItemIds.push(reader.string()); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a Vulnerability message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Vulnerability.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Vulnerability message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Vulnerability.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) { - var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify(message.details); - if (error) - return "details." + error; - } - if (message.installedInventoryItemIds != null && message.hasOwnProperty("installedInventoryItemIds")) { - if (!Array.isArray(message.installedInventoryItemIds)) - return "installedInventoryItemIds: array expected"; - for (var i = 0; i < message.installedInventoryItemIds.length; ++i) - if (!$util.isString(message.installedInventoryItemIds[i])) - return "installedInventoryItemIds: string[] expected"; - } - if (message.availableInventoryItemIds != null && message.hasOwnProperty("availableInventoryItemIds")) { - if (!Array.isArray(message.availableInventoryItemIds)) - return "availableInventoryItemIds: array expected"; - for (var i = 0; i < message.availableInventoryItemIds.length; ++i) - if (!$util.isString(message.availableInventoryItemIds[i])) - return "availableInventoryItemIds: 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; - } - return null; - }; + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; - /** - * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} Vulnerability - */ - Vulnerability.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability(); - if (object.details != null) { - if (typeof object.details !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.details: object expected"); - message.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.fromObject(object.details); - } - if (object.installedInventoryItemIds) { - if (!Array.isArray(object.installedInventoryItemIds)) - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.installedInventoryItemIds: array expected"); - message.installedInventoryItemIds = []; - for (var i = 0; i < object.installedInventoryItemIds.length; ++i) - message.installedInventoryItemIds[i] = String(object.installedInventoryItemIds[i]); - } - if (object.availableInventoryItemIds) { - if (!Array.isArray(object.availableInventoryItemIds)) - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.availableInventoryItemIds: array expected"); - message.availableInventoryItemIds = []; - for (var i = 0; i < object.availableInventoryItemIds.length; ++i) - message.availableInventoryItemIds[i] = String(object.availableInventoryItemIds[i]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.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.osconfig.v1alpha.VulnerabilityReport.Vulnerability.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; - /** - * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} message Vulnerability - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Vulnerability.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.installedInventoryItemIds = []; - object.availableInventoryItemIds = []; - } - if (options.defaults) { - object.details = null; - object.createTime = null; - object.updateTime = null; - } - if (message.details != null && message.hasOwnProperty("details")) - object.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.toObject(message.details, options); - if (message.installedInventoryItemIds && message.installedInventoryItemIds.length) { - object.installedInventoryItemIds = []; - for (var j = 0; j < message.installedInventoryItemIds.length; ++j) - object.installedInventoryItemIds[j] = message.installedInventoryItemIds[j]; - } - if (message.availableInventoryItemIds && message.availableInventoryItemIds.length) { - object.availableInventoryItemIds = []; - for (var j = 0; j < message.availableInventoryItemIds.length; ++j) - object.availableInventoryItemIds[j] = message.availableInventoryItemIds[j]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; - /** - * Converts this Vulnerability to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @instance - * @returns {Object.} JSON object - */ - Vulnerability.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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); + }; - Vulnerability.Details = (function() { + return ServiceOptions; + })(); - /** - * Properties of a Details. - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @interface IDetails - * @property {string|null} [cve] Details cve - * @property {number|null} [cvssV2Score] Details cvssV2Score - * @property {google.cloud.osconfig.v1alpha.ICVSSv3|null} [cvssV3] Details cvssV3 - * @property {string|null} [severity] Details severity - * @property {string|null} [description] Details description - * @property {Array.|null} [references] Details references - */ + protobuf.MethodOptions = (function() { - /** - * Constructs a new Details. - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability - * @classdesc Represents a Details. - * @implements IDetails - * @constructor - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails=} [properties] Properties to set - */ - function Details(properties) { - this.references = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ - /** - * Details cve. - * @member {string} cve - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @instance - */ - Details.prototype.cve = ""; + /** + * 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]]; + } - /** - * Details cvssV2Score. - * @member {number} cvssV2Score - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @instance - */ - Details.prototype.cvssV2Score = 0; + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; - /** - * Details cvssV3. - * @member {google.cloud.osconfig.v1alpha.ICVSSv3|null|undefined} cvssV3 - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @instance - */ - Details.prototype.cvssV3 = null; + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; - /** - * Details severity. - * @member {string} severity - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @instance - */ - Details.prototype.severity = ""; + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Details description. - * @member {string} description - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @instance - */ - Details.prototype.description = ""; + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; - /** - * Details references. - * @member {Array.} references - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @instance - */ - Details.prototype.references = $util.emptyArray; + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - /** - * Creates a new Details instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details instance - */ - Details.create = function create(properties) { - return new Details(properties); - }; + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - /** - * Encodes the specified Details message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails} message Details message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Details.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cve != null && Object.hasOwnProperty.call(message, "cve")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cve); - if (message.cvssV2Score != null && Object.hasOwnProperty.call(message, "cvssV2Score")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.cvssV2Score); - if (message.cvssV3 != null && Object.hasOwnProperty.call(message, "cvssV3")) - $root.google.cloud.osconfig.v1alpha.CVSSv3.encode(message.cvssV3, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.severity); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.references != null && message.references.length) - for (var i = 0; i < message.references.length; ++i) - $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.encode(message.references[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * 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 Details message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IDetails} message Details message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Details.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; - /** - * Decodes a Details message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Details.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cve = reader.string(); - break; - case 2: - message.cvssV2Score = reader.float(); - break; - case 3: - message.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.decode(reader, reader.uint32()); - break; - case 4: - message.severity = reader.string(); - break; - case 5: - message.description = reader.string(); - break; - case 6: - if (!(message.references && message.references.length)) - message.references = []; - message.references.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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 Details message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Details.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a Details message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Details.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cve != null && message.hasOwnProperty("cve")) - if (!$util.isString(message.cve)) - return "cve: string expected"; - if (message.cvssV2Score != null && message.hasOwnProperty("cvssV2Score")) - if (typeof message.cvssV2Score !== "number") - return "cvssV2Score: number expected"; - if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) { - var error = $root.google.cloud.osconfig.v1alpha.CVSSv3.verify(message.cvssV3); - if (error) - return "cvssV3." + error; - } - if (message.severity != null && message.hasOwnProperty("severity")) - if (!$util.isString(message.severity)) - return "severity: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.references != null && message.hasOwnProperty("references")) { - if (!Array.isArray(message.references)) - return "references: array expected"; - for (var i = 0; i < message.references.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify(message.references[i]); - if (error) - return "references." + error; - } - } - return null; - }; + /** + * 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()); + }; - /** - * Creates a Details message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} Details - */ - Details.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details(); - if (object.cve != null) - message.cve = String(object.cve); - if (object.cvssV2Score != null) - message.cvssV2Score = Number(object.cvssV2Score); - if (object.cvssV3 != null) { - if (typeof object.cvssV3 !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.cvssV3: object expected"); - message.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.fromObject(object.cvssV3); - } - if (object.severity != null) - message.severity = String(object.severity); - if (object.description != null) - message.description = String(object.description); - if (object.references) { - if (!Array.isArray(object.references)) - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.references: array expected"); - message.references = []; - for (var i = 0; i < object.references.length; ++i) { - if (typeof object.references[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.references: object expected"); - message.references[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.fromObject(object.references[i]); - } - } - return message; - }; + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; - /** - * Creates a plain object from a Details message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} message Details - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Details.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.references = []; - if (options.defaults) { - object.cve = ""; - object.cvssV2Score = 0; - object.cvssV3 = null; - object.severity = ""; - object.description = ""; - } - if (message.cve != null && message.hasOwnProperty("cve")) - object.cve = message.cve; - if (message.cvssV2Score != null && message.hasOwnProperty("cvssV2Score")) - object.cvssV2Score = options.json && !isFinite(message.cvssV2Score) ? String(message.cvssV2Score) : message.cvssV2Score; - if (message.cvssV3 != null && message.hasOwnProperty("cvssV3")) - object.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.toObject(message.cvssV3, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = message.severity; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.references && message.references.length) { - object.references = []; - for (var j = 0; j < message.references.length; ++j) - object.references[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.toObject(message.references[j], options); - } - return object; - }; + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; - /** - * Converts this Details to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @instance - * @returns {Object.} JSON object - */ - Details.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Details.Reference = (function() { + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); - /** - * Properties of a Reference. - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @interface IReference - * @property {string|null} [url] Reference url - */ + return MethodOptions; + })(); - /** - * Constructs a new Reference. - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - * @classdesc Represents a Reference. - * @implements IReference - * @constructor - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference=} [properties] Properties to set - */ - function Reference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.UninterpretedOption = (function() { - /** - * Reference url. - * @member {string} url - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @instance - */ - Reference.prototype.url = ""; + /** + * 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 + */ - /** - * Creates a new Reference instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference instance - */ - Reference.create = function create(properties) { - return new Reference(properties); - }; + /** + * 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]]; + } - /** - * Encodes the specified Reference message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference} message Reference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Reference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); - return writer; - }; + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; - /** - * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.IReference} message Reference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Reference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; - /** - * Decodes a Reference message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Reference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * Decodes a Reference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Reference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Verifies a Reference message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Reference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - return null; - }; + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; - /** - * Creates a Reference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} Reference - */ - Reference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference(); - if (object.url != null) - message.url = String(object.url); - return message; - }; + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - /** - * Creates a plain object from a Reference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @static - * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} message Reference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Reference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.url = ""; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - return object; - }; + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; - /** - * Converts this Reference to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference - * @instance - * @returns {Object.} JSON object - */ - Reference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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); + }; - return Reference; - })(); + /** + * 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; + }; - return Details; - })(); + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; - return Vulnerability; - })(); + /** + * 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); + }; - return VulnerabilityReport; - })(); + UninterpretedOption.NamePart = (function() { - v1alpha.GetVulnerabilityReportRequest = (function() { + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ - /** - * Properties of a GetVulnerabilityReportRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IGetVulnerabilityReportRequest - * @property {string|null} [name] GetVulnerabilityReportRequest name - */ + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new GetVulnerabilityReportRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a GetVulnerabilityReportRequest. - * @implements IGetVulnerabilityReportRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest=} [properties] Properties to set - */ - function GetVulnerabilityReportRequest(properties) { - if (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 = ""; - /** - * GetVulnerabilityReportRequest name. - * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @instance - */ - GetVulnerabilityReportRequest.prototype.name = ""; + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; - /** - * Creates a new GetVulnerabilityReportRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest instance - */ - GetVulnerabilityReportRequest.create = function create(properties) { - return new GetVulnerabilityReportRequest(properties); - }; + /** + * 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 GetVulnerabilityReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} message GetVulnerabilityReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVulnerabilityReportRequest.encode = function encode(message, writer) { - 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 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 GetVulnerabilityReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest} message GetVulnerabilityReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVulnerabilityReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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 GetVulnerabilityReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVulnerabilityReportRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a GetVulnerabilityReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVulnerabilityReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + 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; + }; - /** - * Verifies a GetVulnerabilityReportRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVulnerabilityReportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a GetVulnerabilityReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} GetVulnerabilityReportRequest - */ - GetVulnerabilityReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * 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 plain object from a GetVulnerabilityReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @static - * @param {google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} message GetVulnerabilityReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVulnerabilityReportRequest.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; + /** + * 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; + }; - /** - * Converts this GetVulnerabilityReportRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest - * @instance - * @returns {Object.} JSON object - */ - GetVulnerabilityReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return GetVulnerabilityReportRequest; - })(); + /** + * 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); + }; - v1alpha.ListVulnerabilityReportsRequest = (function() { + return NamePart; + })(); - /** - * Properties of a ListVulnerabilityReportsRequest. - * @memberof google.cloud.osconfig.v1alpha - * @interface IListVulnerabilityReportsRequest - * @property {string|null} [parent] ListVulnerabilityReportsRequest parent - * @property {number|null} [pageSize] ListVulnerabilityReportsRequest pageSize - * @property {string|null} [pageToken] ListVulnerabilityReportsRequest pageToken - * @property {string|null} [filter] ListVulnerabilityReportsRequest filter - */ + return UninterpretedOption; + })(); - /** - * Constructs a new ListVulnerabilityReportsRequest. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListVulnerabilityReportsRequest. - * @implements IListVulnerabilityReportsRequest - * @constructor - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest=} [properties] Properties to set - */ - function ListVulnerabilityReportsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.SourceCodeInfo = (function() { - /** - * ListVulnerabilityReportsRequest parent. - * @member {string} parent - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @instance - */ - ListVulnerabilityReportsRequest.prototype.parent = ""; + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ - /** - * ListVulnerabilityReportsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @instance - */ - ListVulnerabilityReportsRequest.prototype.pageSize = 0; + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListVulnerabilityReportsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @instance - */ - ListVulnerabilityReportsRequest.prototype.pageToken = ""; + /** + * 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); + }; - /** - * ListVulnerabilityReportsRequest filter. - * @member {string} filter - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @instance - */ - ListVulnerabilityReportsRequest.prototype.filter = ""; + /** + * 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; + }; - /** - * Creates a new ListVulnerabilityReportsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest instance - */ - ListVulnerabilityReportsRequest.create = function create(properties) { - return new ListVulnerabilityReportsRequest(properties); - }; + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ListVulnerabilityReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVulnerabilityReportsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - return writer; - }; + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListVulnerabilityReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVulnerabilityReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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()); + }; - /** - * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVulnerabilityReportsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes a ListVulnerabilityReportsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVulnerabilityReportsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies a ListVulnerabilityReportsRequest message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVulnerabilityReportsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; + /** + * Creates a 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; + }; - /** - * Creates a ListVulnerabilityReportsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} ListVulnerabilityReportsRequest - */ - ListVulnerabilityReportsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; + /** + * 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); + }; - /** - * Creates a plain object from a ListVulnerabilityReportsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @static - * @param {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} message ListVulnerabilityReportsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVulnerabilityReportsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; + SourceCodeInfo.Location = (function() { - /** - * Converts this ListVulnerabilityReportsRequest to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest - * @instance - * @returns {Object.} JSON object - */ - ListVulnerabilityReportsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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 + */ - return ListVulnerabilityReportsRequest; - })(); + /** + * 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]]; + } - v1alpha.ListVulnerabilityReportsResponse = (function() { + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; - /** - * Properties of a ListVulnerabilityReportsResponse. - * @memberof google.cloud.osconfig.v1alpha - * @interface IListVulnerabilityReportsResponse - * @property {Array.|null} [vulnerabilityReports] ListVulnerabilityReportsResponse vulnerabilityReports - * @property {string|null} [nextPageToken] ListVulnerabilityReportsResponse nextPageToken - */ + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; - /** - * Constructs a new ListVulnerabilityReportsResponse. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a ListVulnerabilityReportsResponse. - * @implements IListVulnerabilityReportsResponse - * @constructor - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse=} [properties] Properties to set - */ - function ListVulnerabilityReportsResponse(properties) { - this.vulnerabilityReports = []; - if (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 leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; - /** - * ListVulnerabilityReportsResponse vulnerabilityReports. - * @member {Array.} vulnerabilityReports - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @instance - */ - ListVulnerabilityReportsResponse.prototype.vulnerabilityReports = $util.emptyArray; + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; - /** - * ListVulnerabilityReportsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @instance - */ - ListVulnerabilityReportsResponse.prototype.nextPageToken = ""; + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; - /** - * Creates a new ListVulnerabilityReportsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse instance - */ - ListVulnerabilityReportsResponse.create = function create(properties) { - return new ListVulnerabilityReportsResponse(properties); - }; + /** + * 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 ListVulnerabilityReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVulnerabilityReportsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vulnerabilityReports != null && message.vulnerabilityReports.length) - for (var i = 0; i < message.vulnerabilityReports.length; ++i) - $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.encode(message.vulnerabilityReports[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 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 ListVulnerabilityReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVulnerabilityReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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 ListVulnerabilityReportsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVulnerabilityReportsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.vulnerabilityReports && message.vulnerabilityReports.length)) - message.vulnerabilityReports = []; - message.vulnerabilityReports.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ListVulnerabilityReportsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVulnerabilityReportsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a ListVulnerabilityReportsResponse message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVulnerabilityReportsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.vulnerabilityReports != null && message.hasOwnProperty("vulnerabilityReports")) { - if (!Array.isArray(message.vulnerabilityReports)) - return "vulnerabilityReports: array expected"; - for (var i = 0; i < message.vulnerabilityReports.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.verify(message.vulnerabilityReports[i]); - if (error) - return "vulnerabilityReports." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ListVulnerabilityReportsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} ListVulnerabilityReportsResponse - */ - ListVulnerabilityReportsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse(); - if (object.vulnerabilityReports) { - if (!Array.isArray(object.vulnerabilityReports)) - throw TypeError(".google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.vulnerabilityReports: array expected"); - message.vulnerabilityReports = []; - for (var i = 0; i < object.vulnerabilityReports.length; ++i) { - if (typeof object.vulnerabilityReports[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.vulnerabilityReports: object expected"); - message.vulnerabilityReports[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.fromObject(object.vulnerabilityReports[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * 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 plain object from a ListVulnerabilityReportsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @static - * @param {google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} message ListVulnerabilityReportsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVulnerabilityReportsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.vulnerabilityReports = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.vulnerabilityReports && message.vulnerabilityReports.length) { - object.vulnerabilityReports = []; - for (var j = 0; j < message.vulnerabilityReports.length; ++j) - object.vulnerabilityReports[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.toObject(message.vulnerabilityReports[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; - }; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; - /** - * Converts this ListVulnerabilityReportsResponse to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse - * @instance - * @returns {Object.} JSON object - */ - ListVulnerabilityReportsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; - return ListVulnerabilityReportsResponse; - })(); + /** + * 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); + }; - v1alpha.CVSSv3 = (function() { + return Location; + })(); - /** - * Properties of a CVSSv3. - * @memberof google.cloud.osconfig.v1alpha - * @interface ICVSSv3 - * @property {number|null} [baseScore] CVSSv3 baseScore - * @property {number|null} [exploitabilityScore] CVSSv3 exploitabilityScore - * @property {number|null} [impactScore] CVSSv3 impactScore - * @property {google.cloud.osconfig.v1alpha.CVSSv3.AttackVector|null} [attackVector] CVSSv3 attackVector - * @property {google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity|null} [attackComplexity] CVSSv3 attackComplexity - * @property {google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired|null} [privilegesRequired] CVSSv3 privilegesRequired - * @property {google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction|null} [userInteraction] CVSSv3 userInteraction - * @property {google.cloud.osconfig.v1alpha.CVSSv3.Scope|null} [scope] CVSSv3 scope - * @property {google.cloud.osconfig.v1alpha.CVSSv3.Impact|null} [confidentialityImpact] CVSSv3 confidentialityImpact - * @property {google.cloud.osconfig.v1alpha.CVSSv3.Impact|null} [integrityImpact] CVSSv3 integrityImpact - * @property {google.cloud.osconfig.v1alpha.CVSSv3.Impact|null} [availabilityImpact] CVSSv3 availabilityImpact - */ + return SourceCodeInfo; + })(); - /** - * Constructs a new CVSSv3. - * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a CVSSv3. - * @implements ICVSSv3 - * @constructor - * @param {google.cloud.osconfig.v1alpha.ICVSSv3=} [properties] Properties to set - */ - function CVSSv3(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.GeneratedCodeInfo = (function() { - /** - * CVSSv3 baseScore. - * @member {number} baseScore - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.baseScore = 0; + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ - /** - * CVSSv3 exploitabilityScore. - * @member {number} exploitabilityScore - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.exploitabilityScore = 0; + /** + * 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]]; + } - /** - * CVSSv3 impactScore. - * @member {number} impactScore - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.impactScore = 0; + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - /** - * CVSSv3 attackVector. - * @member {google.cloud.osconfig.v1alpha.CVSSv3.AttackVector} attackVector - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.attackVector = 0; + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * CVSSv3 attackComplexity. - * @member {google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity} attackComplexity - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.attackComplexity = 0; + /** + * 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()); + }; - /** - * CVSSv3 privilegesRequired. - * @member {google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired} privilegesRequired - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.privilegesRequired = 0; + /** + * 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; + }; - /** - * CVSSv3 userInteraction. - * @member {google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction} userInteraction - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.userInteraction = 0; + /** + * 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; + }; - /** - * CVSSv3 scope. - * @member {google.cloud.osconfig.v1alpha.CVSSv3.Scope} scope - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.scope = 0; + /** + * 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; + }; - /** - * CVSSv3 confidentialityImpact. - * @member {google.cloud.osconfig.v1alpha.CVSSv3.Impact} confidentialityImpact - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.confidentialityImpact = 0; + /** + * 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); + }; - /** - * CVSSv3 integrityImpact. - * @member {google.cloud.osconfig.v1alpha.CVSSv3.Impact} integrityImpact - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.integrityImpact = 0; + GeneratedCodeInfo.Annotation = (function() { - /** - * CVSSv3 availabilityImpact. - * @member {google.cloud.osconfig.v1alpha.CVSSv3.Impact} availabilityImpact - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - */ - CVSSv3.prototype.availabilityImpact = 0; + /** + * 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 + */ - /** - * Creates a new CVSSv3 instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @static - * @param {google.cloud.osconfig.v1alpha.ICVSSv3=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 instance - */ - CVSSv3.create = function create(properties) { - return new CVSSv3(properties); - }; + /** + * 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]]; + } - /** - * Encodes the specified CVSSv3 message. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @static - * @param {google.cloud.osconfig.v1alpha.ICVSSv3} message CVSSv3 message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CVSSv3.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.baseScore); - if (message.exploitabilityScore != null && Object.hasOwnProperty.call(message, "exploitabilityScore")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.exploitabilityScore); - if (message.impactScore != null && Object.hasOwnProperty.call(message, "impactScore")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.impactScore); - if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attackVector); - if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.attackComplexity); - if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.privilegesRequired); - if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userInteraction); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scope); - if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.confidentialityImpact); - if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.integrityImpact); - if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.availabilityImpact); - return writer; - }; + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; - /** - * Encodes the specified CVSSv3 message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.CVSSv3.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @static - * @param {google.cloud.osconfig.v1alpha.ICVSSv3} message CVSSv3 message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CVSSv3.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; - /** - * Decodes a CVSSv3 message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CVSSv3.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.CVSSv3(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseScore = reader.float(); - break; - case 2: - message.exploitabilityScore = reader.float(); - break; - case 3: - message.impactScore = reader.float(); - break; - case 5: - message.attackVector = reader.int32(); - break; - case 6: - message.attackComplexity = reader.int32(); - break; - case 7: - message.privilegesRequired = reader.int32(); - break; - case 8: - message.userInteraction = reader.int32(); - break; - case 9: - message.scope = reader.int32(); - break; - case 10: - message.confidentialityImpact = reader.int32(); - break; - case 11: - message.integrityImpact = reader.int32(); - break; - case 12: - message.availabilityImpact = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; - /** - * Decodes a CVSSv3 message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CVSSv3.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; - /** - * Verifies a CVSSv3 message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CVSSv3.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - if (typeof message.baseScore !== "number") - return "baseScore: number expected"; - if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) - if (typeof message.exploitabilityScore !== "number") - return "exploitabilityScore: number expected"; - if (message.impactScore != null && message.hasOwnProperty("impactScore")) - if (typeof message.impactScore !== "number") - return "impactScore: number expected"; - if (message.attackVector != null && message.hasOwnProperty("attackVector")) - switch (message.attackVector) { - default: - return "attackVector: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - switch (message.attackComplexity) { - default: - return "attackComplexity: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - switch (message.privilegesRequired) { - default: - return "privilegesRequired: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - switch (message.userInteraction) { - default: - return "userInteraction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - switch (message.confidentialityImpact) { - default: - return "confidentialityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - switch (message.integrityImpact) { - default: - return "integrityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - switch (message.availabilityImpact) { - default: - return "availabilityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; + /** + * 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); + }; - /** - * Creates a CVSSv3 message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.CVSSv3} CVSSv3 - */ - CVSSv3.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.CVSSv3) - return object; - var message = new $root.google.cloud.osconfig.v1alpha.CVSSv3(); - if (object.baseScore != null) - message.baseScore = Number(object.baseScore); - if (object.exploitabilityScore != null) - message.exploitabilityScore = Number(object.exploitabilityScore); - if (object.impactScore != null) - message.impactScore = Number(object.impactScore); - switch (object.attackVector) { - case "ATTACK_VECTOR_UNSPECIFIED": - case 0: - message.attackVector = 0; - break; - case "ATTACK_VECTOR_NETWORK": + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.attackVector = 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 "ATTACK_VECTOR_ADJACENT": case 2: - message.attackVector = 2; + message.sourceFile = reader.string(); break; - case "ATTACK_VECTOR_LOCAL": case 3: - message.attackVector = 3; + message.begin = reader.int32(); break; - case "ATTACK_VECTOR_PHYSICAL": case 4: - message.attackVector = 4; - break; - } - switch (object.attackComplexity) { - case "ATTACK_COMPLEXITY_UNSPECIFIED": - case 0: - message.attackComplexity = 0; - break; - case "ATTACK_COMPLEXITY_LOW": - case 1: - message.attackComplexity = 1; - break; - case "ATTACK_COMPLEXITY_HIGH": - case 2: - message.attackComplexity = 2; - break; - } - switch (object.privilegesRequired) { - case "PRIVILEGES_REQUIRED_UNSPECIFIED": - case 0: - message.privilegesRequired = 0; - break; - case "PRIVILEGES_REQUIRED_NONE": - case 1: - message.privilegesRequired = 1; - break; - case "PRIVILEGES_REQUIRED_LOW": - case 2: - message.privilegesRequired = 2; - break; - case "PRIVILEGES_REQUIRED_HIGH": - case 3: - message.privilegesRequired = 3; - break; - } - switch (object.userInteraction) { - case "USER_INTERACTION_UNSPECIFIED": - case 0: - message.userInteraction = 0; - break; - case "USER_INTERACTION_NONE": - case 1: - message.userInteraction = 1; - break; - case "USER_INTERACTION_REQUIRED": - case 2: - message.userInteraction = 2; - break; - } - switch (object.scope) { - case "SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "SCOPE_UNCHANGED": - case 1: - message.scope = 1; - break; - case "SCOPE_CHANGED": - case 2: - message.scope = 2; - break; - } - switch (object.confidentialityImpact) { - case "IMPACT_UNSPECIFIED": - case 0: - message.confidentialityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.confidentialityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.confidentialityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.confidentialityImpact = 3; - break; - } - switch (object.integrityImpact) { - case "IMPACT_UNSPECIFIED": - case 0: - message.integrityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.integrityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.integrityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.integrityImpact = 3; - break; - } - switch (object.availabilityImpact) { - case "IMPACT_UNSPECIFIED": - case 0: - message.availabilityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.availabilityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.availabilityImpact = 2; + message.end = reader.int32(); break; - case "IMPACT_NONE": - case 3: - message.availabilityImpact = 3; + default: + reader.skipType(tag & 7); break; } - return message; - }; - - /** - * Creates a plain object from a CVSSv3 message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @static - * @param {google.cloud.osconfig.v1alpha.CVSSv3} message CVSSv3 - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CVSSv3.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.baseScore = 0; - object.exploitabilityScore = 0; - object.impactScore = 0; - object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; - object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; - object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; - object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; - object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; - object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; - object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; - object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; - } - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; - if (message.exploitabilityScore != null && message.hasOwnProperty("exploitabilityScore")) - object.exploitabilityScore = options.json && !isFinite(message.exploitabilityScore) ? String(message.exploitabilityScore) : message.exploitabilityScore; - if (message.impactScore != null && message.hasOwnProperty("impactScore")) - object.impactScore = options.json && !isFinite(message.impactScore) ? String(message.impactScore) : message.impactScore; - if (message.attackVector != null && message.hasOwnProperty("attackVector")) - object.attackVector = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector[message.attackVector] : message.attackVector; - if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - object.attackComplexity = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; - if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - object.privilegesRequired = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; - if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - object.userInteraction = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Scope[message.scope] : message.scope; - if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - object.confidentialityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; - if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - object.integrityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; - if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - object.availabilityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; - return object; - }; - - /** - * Converts this CVSSv3 to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.CVSSv3 - * @instance - * @returns {Object.} JSON object - */ - CVSSv3.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * AttackVector enum. - * @name google.cloud.osconfig.v1alpha.CVSSv3.AttackVector - * @enum {number} - * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value - * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value - * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value - * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value - * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value - */ - CVSSv3.AttackVector = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; - values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; - values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; - values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; - return values; - })(); - - /** - * AttackComplexity enum. - * @name google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity - * @enum {number} - * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value - * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value - * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value - */ - CVSSv3.AttackComplexity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; - values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; - return values; - })(); + } + return message; + }; - /** - * PrivilegesRequired enum. - * @name google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired - * @enum {number} - * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value - * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value - * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value - * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value - */ - CVSSv3.PrivilegesRequired = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; - values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; - values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; - return values; - })(); + /** + * 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()); + }; - /** - * UserInteraction enum. - * @name google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction - * @enum {number} - * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value - * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value - * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value - */ - CVSSv3.UserInteraction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; - values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; - return values; - })(); + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; - /** - * Scope enum. - * @name google.cloud.osconfig.v1alpha.CVSSv3.Scope - * @enum {number} - * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value - * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value - * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value - */ - CVSSv3.Scope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; - values[valuesById[2] = "SCOPE_CHANGED"] = 2; - return values; - })(); + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; - /** - * Impact enum. - * @name google.cloud.osconfig.v1alpha.CVSSv3.Impact - * @enum {number} - * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value - * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value - * @property {number} IMPACT_LOW=2 IMPACT_LOW value - * @property {number} IMPACT_NONE=3 IMPACT_NONE value - */ - CVSSv3.Impact = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; - values[valuesById[1] = "IMPACT_HIGH"] = 1; - values[valuesById[2] = "IMPACT_LOW"] = 2; - values[valuesById[3] = "IMPACT_NONE"] = 3; - return values; - })(); + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; - return CVSSv3; - })(); + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return v1alpha; + return Annotation; })(); - return osconfig; + return GeneratedCodeInfo; })(); - return cloud; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Date = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a Date. - * @memberof google.type - * @interface IDate - * @property {number|null} [year] Date year - * @property {number|null} [month] Date month - * @property {number|null} [day] Date day + * 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 Date. - * @memberof google.type - * @classdesc Represents a Date. - * @implements IDate + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.type.IDate=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function Date(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42468,101 +46463,88 @@ } /** - * Date year. - * @member {number} year - * @memberof google.type.Date - * @instance - */ - Date.prototype.year = 0; - - /** - * Date month. - * @member {number} month - * @memberof google.type.Date + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - Date.prototype.month = 0; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Date day. - * @member {number} day - * @memberof google.type.Date + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp * @instance */ - Date.prototype.day = 0; + Timestamp.prototype.nanos = 0; /** - * Creates a new Date instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.type.Date + * @memberof google.protobuf.Timestamp * @static - * @param {google.type.IDate=} [properties] Properties to set - * @returns {google.type.Date} Date instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - Date.create = function create(properties) { - return new Date(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.type.Date + * @memberof google.protobuf.Timestamp * @static - * @param {google.type.IDate} message Date message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Date.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + 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 Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.Date + * @memberof google.protobuf.Timestamp * @static - * @param {google.type.IDate} message Date message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Date.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Date message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.type.Date + * @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.type.Date} Date + * @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 */ - Date.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.year = reader.int32(); + message.seconds = reader.int64(); break; case 2: - message.month = reader.int32(); - break; - case 3: - message.day = reader.int32(); + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -42573,132 +46555,131 @@ }; /** - * Decodes a Date message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.Date + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Date} Date + * @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 */ - Date.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Date message. + * Verifies a Timestamp message. * @function verify - * @memberof google.type.Date + * @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 */ - Date.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; + 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 Date message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.Date + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.type.Date} Date + * @returns {google.protobuf.Timestamp} Timestamp */ - Date.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Date) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.type.Date(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; + 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 Date message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.Date + * @memberof google.protobuf.Timestamp * @static - * @param {google.type.Date} message Date + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Date.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; + 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.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; + 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 Date to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.type.Date + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - Date.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Date; + return Timestamp; })(); - type.DateTime = (function() { + protobuf.Duration = (function() { /** - * Properties of a DateTime. - * @memberof google.type - * @interface IDateTime - * @property {number|null} [year] DateTime year - * @property {number|null} [month] DateTime month - * @property {number|null} [day] DateTime day - * @property {number|null} [hours] DateTime hours - * @property {number|null} [minutes] DateTime minutes - * @property {number|null} [seconds] DateTime seconds - * @property {number|null} [nanos] DateTime nanos - * @property {google.protobuf.IDuration|null} [utcOffset] DateTime utcOffset - * @property {google.type.ITimeZone|null} [timeZone] DateTime timeZone + * 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 DateTime. - * @memberof google.type - * @classdesc Represents a DateTime. - * @implements IDateTime + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.type.IDateTime=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function DateTime(properties) { + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42706,194 +46687,89 @@ } /** - * DateTime year. - * @member {number} year - * @memberof google.type.DateTime - * @instance - */ - DateTime.prototype.year = 0; - - /** - * DateTime month. - * @member {number} month - * @memberof google.type.DateTime - * @instance - */ - DateTime.prototype.month = 0; - - /** - * DateTime day. - * @member {number} day - * @memberof google.type.DateTime - * @instance - */ - DateTime.prototype.day = 0; - - /** - * DateTime hours. - * @member {number} hours - * @memberof google.type.DateTime - * @instance - */ - DateTime.prototype.hours = 0; - - /** - * DateTime minutes. - * @member {number} minutes - * @memberof google.type.DateTime - * @instance - */ - DateTime.prototype.minutes = 0; - - /** - * DateTime seconds. - * @member {number} seconds - * @memberof google.type.DateTime + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - DateTime.prototype.seconds = 0; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * DateTime nanos. + * Duration nanos. * @member {number} nanos - * @memberof google.type.DateTime - * @instance - */ - DateTime.prototype.nanos = 0; - - /** - * DateTime utcOffset. - * @member {google.protobuf.IDuration|null|undefined} utcOffset - * @memberof google.type.DateTime - * @instance - */ - DateTime.prototype.utcOffset = null; - - /** - * DateTime timeZone. - * @member {google.type.ITimeZone|null|undefined} timeZone - * @memberof google.type.DateTime - * @instance - */ - DateTime.prototype.timeZone = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DateTime timeOffset. - * @member {"utcOffset"|"timeZone"|undefined} timeOffset - * @memberof google.type.DateTime + * @memberof google.protobuf.Duration * @instance */ - Object.defineProperty(DateTime.prototype, "timeOffset", { - get: $util.oneOfGetter($oneOfFields = ["utcOffset", "timeZone"]), - set: $util.oneOfSetter($oneOfFields) - }); + Duration.prototype.nanos = 0; /** - * Creates a new DateTime instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.type.DateTime + * @memberof google.protobuf.Duration * @static - * @param {google.type.IDateTime=} [properties] Properties to set - * @returns {google.type.DateTime} DateTime instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - DateTime.create = function create(properties) { - return new DateTime(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.type.DateTime + * @memberof google.protobuf.Duration * @static - * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DateTime.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); - if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hours); - if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minutes); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.seconds); + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.nanos); - if (message.utcOffset != null && Object.hasOwnProperty.call(message, "utcOffset")) - $root.google.protobuf.Duration.encode(message.utcOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.DateTime + * @memberof google.protobuf.Duration * @static - * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DateTime.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DateTime message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.type.DateTime + * @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.type.DateTime} DateTime + * @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 */ - DateTime.decode = function decode(reader, length) { + Duration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.DateTime(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.year = reader.int32(); + message.seconds = reader.int64(); break; case 2: - message.month = reader.int32(); - break; - case 3: - message.day = reader.int32(); - break; - case 4: - message.hours = reader.int32(); - break; - case 5: - message.minutes = reader.int32(); - break; - case 6: - message.seconds = reader.int32(); - break; - case 7: message.nanos = reader.int32(); break; - case 8: - message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 9: - message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -42903,196 +46779,129 @@ }; /** - * Decodes a DateTime message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.DateTime + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.DateTime} DateTime + * @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 */ - DateTime.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DateTime message. + * Verifies a Duration message. * @function verify - * @memberof google.type.DateTime + * @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 */ - DateTime.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; - if (message.hours != null && message.hasOwnProperty("hours")) - if (!$util.isInteger(message.hours)) - return "hours: integer expected"; - if (message.minutes != null && message.hasOwnProperty("minutes")) - if (!$util.isInteger(message.minutes)) - return "minutes: integer expected"; if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds)) - return "seconds: integer expected"; + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; if (message.nanos != null && message.hasOwnProperty("nanos")) if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; - if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { - properties.timeOffset = 1; - { - var error = $root.google.protobuf.Duration.verify(message.utcOffset); - if (error) - return "utcOffset." + error; - } - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - if (properties.timeOffset === 1) - return "timeOffset: multiple values"; - properties.timeOffset = 1; - { - var error = $root.google.type.TimeZone.verify(message.timeZone); - if (error) - return "timeZone." + error; - } - } return null; }; /** - * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.DateTime + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.type.DateTime} DateTime + * @returns {google.protobuf.Duration} Duration */ - DateTime.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.DateTime) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.type.DateTime(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; - if (object.hours != null) - message.hours = object.hours | 0; - if (object.minutes != null) - message.minutes = object.minutes | 0; + var message = new $root.google.protobuf.Duration(); if (object.seconds != null) - message.seconds = object.seconds | 0; + 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; - if (object.utcOffset != null) { - if (typeof object.utcOffset !== "object") - throw TypeError(".google.type.DateTime.utcOffset: object expected"); - message.utcOffset = $root.google.protobuf.Duration.fromObject(object.utcOffset); - } - if (object.timeZone != null) { - if (typeof object.timeZone !== "object") - throw TypeError(".google.type.DateTime.timeZone: object expected"); - message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); - } return message; }; /** - * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.DateTime + * @memberof google.protobuf.Duration * @static - * @param {google.type.DateTime} message DateTime + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DateTime.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - object.hours = 0; - object.minutes = 0; - object.seconds = 0; + 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.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; - if (message.hours != null && message.hasOwnProperty("hours")) - object.hours = message.hours; - if (message.minutes != null && message.hasOwnProperty("minutes")) - object.minutes = message.minutes; if (message.seconds != null && message.hasOwnProperty("seconds")) - object.seconds = message.seconds; + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; if (message.nanos != null && message.hasOwnProperty("nanos")) object.nanos = message.nanos; - if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { - object.utcOffset = $root.google.protobuf.Duration.toObject(message.utcOffset, options); - if (options.oneofs) - object.timeOffset = "utcOffset"; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) { - object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); - if (options.oneofs) - object.timeOffset = "timeZone"; - } return object; }; /** - * Converts this DateTime to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.type.DateTime + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - DateTime.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DateTime; + return Duration; })(); - type.TimeZone = (function() { + protobuf.Empty = (function() { /** - * Properties of a TimeZone. - * @memberof google.type - * @interface ITimeZone - * @property {string|null} [id] TimeZone id - * @property {string|null} [version] TimeZone version + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty */ /** - * Constructs a new TimeZone. - * @memberof google.type - * @classdesc Represents a TimeZone. - * @implements ITimeZone + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.type.ITimeZone=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function TimeZone(properties) { + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43100,89 +46909,63 @@ } /** - * TimeZone id. - * @member {string} id - * @memberof google.type.TimeZone - * @instance - */ - TimeZone.prototype.id = ""; - - /** - * TimeZone version. - * @member {string} version - * @memberof google.type.TimeZone - * @instance - */ - TimeZone.prototype.version = ""; - - /** - * Creates a new TimeZone instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.type.TimeZone + * @memberof google.protobuf.Empty * @static - * @param {google.type.ITimeZone=} [properties] Properties to set - * @returns {google.type.TimeZone} TimeZone instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - TimeZone.create = function create(properties) { - return new TimeZone(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.type.TimeZone + * @memberof google.protobuf.Empty * @static - * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeZone.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); return writer; }; /** - * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.TimeZone + * @memberof google.protobuf.Empty * @static - * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeZone.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeZone message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.type.TimeZone + * @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.type.TimeZone} TimeZone + * @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 */ - TimeZone.decode = function decode(reader, length) { + Empty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeZone(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.version = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -43192,145 +46975,95 @@ }; /** - * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.TimeZone + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.TimeZone} TimeZone + * @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 */ - TimeZone.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeZone message. + * Verifies an Empty message. * @function verify - * @memberof google.type.TimeZone + * @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 */ - TimeZone.verify = function verify(message) { + Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; return null; }; /** - * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.TimeZone + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.type.TimeZone} TimeZone + * @returns {google.protobuf.Empty} Empty */ - TimeZone.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.TimeZone) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.type.TimeZone(); - if (object.id != null) - message.id = String(object.id); - if (object.version != null) - message.version = String(object.version); - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.TimeZone + * @memberof google.protobuf.Empty * @static - * @param {google.type.TimeZone} message TimeZone + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeZone.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.version = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this TimeZone to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.type.TimeZone + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - TimeZone.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeZone; - })(); - - /** - * DayOfWeek enum. - * @name google.type.DayOfWeek - * @enum {number} - * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value - * @property {number} MONDAY=1 MONDAY value - * @property {number} TUESDAY=2 TUESDAY value - * @property {number} WEDNESDAY=3 WEDNESDAY value - * @property {number} THURSDAY=4 THURSDAY value - * @property {number} FRIDAY=5 FRIDAY value - * @property {number} SATURDAY=6 SATURDAY value - * @property {number} SUNDAY=7 SUNDAY value - */ - type.DayOfWeek = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; - values[valuesById[1] = "MONDAY"] = 1; - values[valuesById[2] = "TUESDAY"] = 2; - values[valuesById[3] = "WEDNESDAY"] = 3; - values[valuesById[4] = "THURSDAY"] = 4; - values[valuesById[5] = "FRIDAY"] = 5; - values[valuesById[6] = "SATURDAY"] = 6; - values[valuesById[7] = "SUNDAY"] = 7; - return values; + return Empty; })(); - type.TimeOfDay = (function() { + protobuf.FieldMask = (function() { /** - * Properties of a TimeOfDay. - * @memberof google.type - * @interface ITimeOfDay - * @property {number|null} [hours] TimeOfDay hours - * @property {number|null} [minutes] TimeOfDay minutes - * @property {number|null} [seconds] TimeOfDay seconds - * @property {number|null} [nanos] TimeOfDay nanos + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new TimeOfDay. - * @memberof google.type - * @classdesc Represents a TimeOfDay. - * @implements ITimeOfDay + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function TimeOfDay(properties) { + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43338,114 +47071,78 @@ } /** - * TimeOfDay hours. - * @member {number} hours - * @memberof google.type.TimeOfDay - * @instance - */ - TimeOfDay.prototype.hours = 0; - - /** - * TimeOfDay minutes. - * @member {number} minutes - * @memberof google.type.TimeOfDay - * @instance - */ - TimeOfDay.prototype.minutes = 0; - - /** - * TimeOfDay seconds. - * @member {number} seconds - * @memberof google.type.TimeOfDay - * @instance - */ - TimeOfDay.prototype.seconds = 0; - - /** - * TimeOfDay nanos. - * @member {number} nanos - * @memberof google.type.TimeOfDay + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - TimeOfDay.prototype.nanos = 0; + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new TimeOfDay instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.type.TimeOfDay + * @memberof google.protobuf.FieldMask * @static - * @param {google.type.ITimeOfDay=} [properties] Properties to set - * @returns {google.type.TimeOfDay} TimeOfDay instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - TimeOfDay.create = function create(properties) { - return new TimeOfDay(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.type.TimeOfDay + * @memberof google.protobuf.FieldMask * @static - * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeOfDay.encode = function encode(message, writer) { + FieldMask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); - if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); + 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 TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.TimeOfDay + * @memberof google.protobuf.FieldMask * @static - * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeOfDay message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.type.TimeOfDay + * @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.type.TimeOfDay} TimeOfDay + * @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 */ - TimeOfDay.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.hours = reader.int32(); - break; - case 2: - message.minutes = reader.int32(); - break; - case 3: - message.seconds = reader.int32(); - break; - case 4: - message.nanos = reader.int32(); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -43456,146 +47153,120 @@ }; /** - * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.TimeOfDay + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.TimeOfDay} TimeOfDay + * @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 */ - TimeOfDay.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeOfDay message. + * Verifies a FieldMask message. * @function verify - * @memberof google.type.TimeOfDay + * @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 */ - TimeOfDay.verify = function verify(message) { + FieldMask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hours != null && message.hasOwnProperty("hours")) - if (!$util.isInteger(message.hours)) - return "hours: integer expected"; - if (message.minutes != null && message.hasOwnProperty("minutes")) - if (!$util.isInteger(message.minutes)) - return "minutes: integer expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds)) - return "seconds: integer expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer 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 TimeOfDay message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.TimeOfDay + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.type.TimeOfDay} TimeOfDay + * @returns {google.protobuf.FieldMask} FieldMask */ - TimeOfDay.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.TimeOfDay) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) return object; - var message = new $root.google.type.TimeOfDay(); - if (object.hours != null) - message.hours = object.hours | 0; - if (object.minutes != null) - message.minutes = object.minutes | 0; - if (object.seconds != null) - message.seconds = object.seconds | 0; - if (object.nanos != null) - message.nanos = object.nanos | 0; + 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 TimeOfDay message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.TimeOfDay + * @memberof google.protobuf.FieldMask * @static - * @param {google.type.TimeOfDay} message TimeOfDay + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeOfDay.toObject = function toObject(message, options) { + FieldMask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.hours = 0; - object.minutes = 0; - object.seconds = 0; - object.nanos = 0; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; } - if (message.hours != null && message.hasOwnProperty("hours")) - object.hours = message.hours; - if (message.minutes != null && message.hasOwnProperty("minutes")) - object.minutes = message.minutes; - if (message.seconds != null && message.hasOwnProperty("seconds")) - object.seconds = message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this TimeOfDay to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.type.TimeOfDay + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - TimeOfDay.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeOfDay; + return FieldMask; })(); - return type; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { + protobuf.Any = (function() { /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * 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 Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43603,91 +47274,88 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - Http.prototype.rules = $util.emptyArray; + Any.prototype.type_url = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new Http instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.protobuf.Any * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Http.create = function create(properties) { - return new Http(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.protobuf.Any * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.type_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 Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.protobuf.Any * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @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 */ - Http.decode = function decode(reader, length) { + Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type_url = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -43698,143 +47366,139 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - /** - * Verifies a 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"; + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.protobuf.Any} Any */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.protobuf.Any * @static - * @param {google.api.Http} message Http + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + 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 Http to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return Any; })(); - api.HttpRule = (function() { + return protobuf; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Date = (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 + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day */ /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.type.IDate=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function Date(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43842,209 +47506,101 @@ } /** - * 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 + * Date year. + * @member {number} year + * @memberof google.type.Date * @instance */ - HttpRule.prototype.responseBody = ""; + Date.prototype.year = 0; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * Date month. + * @member {number} month + * @memberof google.type.Date * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Date.prototype.month = 0; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * Date day. + * @member {number} day + * @memberof google.type.Date * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + Date.prototype.day = 0; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new Date instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.type.Date * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + Date.create = function create(properties) { + return new Date(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.type.Date * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + Date.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.type.Date * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + Date.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a Date message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + Date.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.year = reader.int32(); break; case 2: - message.get = reader.string(); + message.month = reader.int32(); break; case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.day = reader.int32(); break; default: reader.skipType(tag & 7); @@ -44055,240 +47611,132 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a Date message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + Date.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a Date message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.type.Date * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + Date.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a Date message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.type.Date * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.type.Date} Date */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a Date 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); + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this Date to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.type.Date * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + Date.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return Date; })(); - api.CustomHttpPattern = (function() { + type.DateTime = (function() { /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * Properties of a DateTime. + * @memberof google.type + * @interface IDateTime + * @property {number|null} [year] DateTime year + * @property {number|null} [month] DateTime month + * @property {number|null} [day] DateTime day + * @property {number|null} [hours] DateTime hours + * @property {number|null} [minutes] DateTime minutes + * @property {number|null} [seconds] DateTime seconds + * @property {number|null} [nanos] DateTime nanos + * @property {google.protobuf.IDuration|null} [utcOffset] DateTime utcOffset + * @property {google.type.ITimeZone|null} [timeZone] DateTime timeZone */ /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * Constructs a new DateTime. + * @memberof google.type + * @classdesc Represents a DateTime. + * @implements IDateTime * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.type.IDateTime=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function DateTime(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44296,88 +47744,193 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * DateTime year. + * @member {number} year + * @memberof google.type.DateTime * @instance */ - CustomHttpPattern.prototype.kind = ""; + DateTime.prototype.year = 0; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * DateTime month. + * @member {number} month + * @memberof google.type.DateTime * @instance */ - CustomHttpPattern.prototype.path = ""; + DateTime.prototype.month = 0; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * DateTime day. + * @member {number} day + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.day = 0; + + /** + * DateTime hours. + * @member {number} hours + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.hours = 0; + + /** + * DateTime minutes. + * @member {number} minutes + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.minutes = 0; + + /** + * DateTime seconds. + * @member {number} seconds + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.seconds = 0; + + /** + * DateTime nanos. + * @member {number} nanos + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.nanos = 0; + + /** + * DateTime utcOffset. + * @member {google.protobuf.IDuration|null|undefined} utcOffset + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.utcOffset = null; + + /** + * DateTime timeZone. + * @member {google.type.ITimeZone|null|undefined} timeZone + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.timeZone = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DateTime timeOffset. + * @member {"utcOffset"|"timeZone"|undefined} timeOffset + * @memberof google.type.DateTime + * @instance + */ + Object.defineProperty(DateTime.prototype, "timeOffset", { + get: $util.oneOfGetter($oneOfFields = ["utcOffset", "timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DateTime instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.type.DateTime * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.type.IDateTime=} [properties] Properties to set + * @returns {google.type.DateTime} DateTime instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + DateTime.create = function create(properties) { + return new DateTime(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.type.DateTime * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.type.IDateTime} message DateTime message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + DateTime.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.nanos); + if (message.utcOffset != null && Object.hasOwnProperty.call(message, "utcOffset")) + $root.google.protobuf.Duration.encode(message.utcOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.type.DateTime * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.type.IDateTime} message DateTime message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + DateTime.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a DateTime message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.type.DateTime * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.type.DateTime} DateTime * @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) { + DateTime.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.DateTime(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + message.year = reader.int32(); break; case 2: - message.path = reader.string(); + message.month = reader.int32(); + break; + case 3: + message.day = reader.int32(); + break; + case 4: + message.hours = reader.int32(); + break; + case 5: + message.minutes = reader.int32(); + break; + case 6: + message.seconds = reader.int32(); + break; + case 7: + message.nanos = reader.int32(); + break; + case 8: + message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 9: + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -44388,124 +47941,196 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a DateTime message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.type.DateTime * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.type.DateTime} DateTime * @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) { + DateTime.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a DateTime message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.type.DateTime * @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) { + DateTime.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"; + var properties = {}; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + properties.timeOffset = 1; + { + var error = $root.google.protobuf.Duration.verify(message.utcOffset); + if (error) + return "utcOffset." + error; + } + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + if (properties.timeOffset === 1) + return "timeOffset: multiple values"; + properties.timeOffset = 1; + { + var error = $root.google.type.TimeZone.verify(message.timeZone); + if (error) + return "timeZone." + error; + } + } return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.type.DateTime * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.type.DateTime} DateTime */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + DateTime.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.DateTime) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.type.DateTime(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; + if (object.utcOffset != null) { + if (typeof object.utcOffset !== "object") + throw TypeError(".google.type.DateTime.utcOffset: object expected"); + message.utcOffset = $root.google.protobuf.Duration.fromObject(object.utcOffset); + } + if (object.timeZone != null) { + if (typeof object.timeZone !== "object") + throw TypeError(".google.type.DateTime.timeZone: object expected"); + message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); + } return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a DateTime message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.type.DateTime * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.type.DateTime} message DateTime * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + DateTime.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.year = 0; + object.month = 0; + object.day = 0; + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + object.utcOffset = $root.google.protobuf.Duration.toObject(message.utcOffset, options); + if (options.oneofs) + object.timeOffset = "utcOffset"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); + if (options.oneofs) + object.timeOffset = "timeZone"; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this DateTime to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.type.DateTime * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + DateTime.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + return DateTime; })(); - api.ResourceDescriptor = (function() { + type.TimeZone = (function() { /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * Properties of a TimeZone. + * @memberof google.type + * @interface ITimeZone + * @property {string|null} [id] TimeZone id + * @property {string|null} [version] TimeZone version */ /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * Constructs a new TimeZone. + * @memberof google.type + * @classdesc Represents a TimeZone. + * @implements ITimeZone * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.type.ITimeZone=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function TimeZone(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44513,167 +48138,88 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * TimeZone id. + * @member {string} id + * @memberof google.type.TimeZone * @instance */ - ResourceDescriptor.prototype.singular = ""; + TimeZone.prototype.id = ""; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * TimeZone version. + * @member {string} version + * @memberof google.type.TimeZone * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + TimeZone.prototype.version = ""; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new TimeZone instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeZone * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.type.ITimeZone=} [properties] Properties to set + * @returns {google.type.TimeZone} TimeZone instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + TimeZone.create = function create(properties) { + return new TimeZone(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeZone * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + TimeZone.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(); - } + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeZone * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + TimeZone.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a TimeZone message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeZone * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.type.TimeZone} TimeZone * @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) { + TimeZone.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeZone(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.id = reader.string(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); + message.version = reader.string(); break; default: reader.skipType(tag & 7); @@ -44684,246 +48230,145 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a TimeZone message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeZone * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.type.TimeZone} TimeZone * @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) { + TimeZone.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a TimeZone message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeZone * @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) { + TimeZone.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeZone * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.type.TimeZone} TimeZone */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + TimeZone.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeZone) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } + var message = new $root.google.type.TimeZone(); + if (object.id != null) + message.id = String(object.id); + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeZone * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.type.TimeZone} message TimeZone * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + TimeZone.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + object.id = ""; + object.version = ""; } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this TimeZone to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.type.TimeZone * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + TimeZone.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); + return TimeZone; + })(); - return ResourceDescriptor; + /** + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; })(); - api.ResourceReference = (function() { + type.TimeOfDay = (function() { /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * Properties of a TimeOfDay. + * @memberof google.type + * @interface ITimeOfDay + * @property {number|null} [hours] TimeOfDay hours + * @property {number|null} [minutes] TimeOfDay minutes + * @property {number|null} [seconds] TimeOfDay seconds + * @property {number|null} [nanos] TimeOfDay nanos */ /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * Constructs a new TimeOfDay. + * @memberof google.type + * @classdesc Represents a TimeOfDay. + * @implements ITimeOfDay * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.type.ITimeOfDay=} [properties] Properties to set */ - function ResourceReference(properties) { + function TimeOfDay(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44931,88 +48376,114 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * TimeOfDay hours. + * @member {number} hours + * @memberof google.type.TimeOfDay * @instance */ - ResourceReference.prototype.type = ""; + TimeOfDay.prototype.hours = 0; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * TimeOfDay minutes. + * @member {number} minutes + * @memberof google.type.TimeOfDay * @instance */ - ResourceReference.prototype.childType = ""; + TimeOfDay.prototype.minutes = 0; /** - * Creates a new ResourceReference instance using the specified properties. + * TimeOfDay seconds. + * @member {number} seconds + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.seconds = 0; + + /** + * TimeOfDay nanos. + * @member {number} nanos + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.nanos = 0; + + /** + * Creates a new TimeOfDay instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.type.TimeOfDay * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @returns {google.type.TimeOfDay} TimeOfDay instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + TimeOfDay.create = function create(properties) { + return new TimeOfDay(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.type.TimeOfDay * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + TimeOfDay.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.type.TimeOfDay * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a TimeOfDay message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.type.TimeOfDay * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.type.TimeOfDay} TimeOfDay * @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) { + TimeOfDay.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.hours = reader.int32(); break; case 2: - message.childType = reader.string(); + message.minutes = reader.int32(); + break; + case 3: + message.seconds = reader.int32(); + break; + case 4: + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -45023,123 +48494,115 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.type.TimeOfDay * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.type.TimeOfDay} TimeOfDay * @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) { + TimeOfDay.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a TimeOfDay message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.type.TimeOfDay * @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) { + TimeOfDay.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.type.TimeOfDay * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.type.TimeOfDay} TimeOfDay */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + TimeOfDay.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeOfDay) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.type.TimeOfDay(); + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.type.TimeOfDay * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.type.TimeOfDay} message TimeOfDay * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + TimeOfDay.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this TimeOfDay to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.type.TimeOfDay * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + TimeOfDay.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - return values; + return TimeOfDay; })(); - return api; + return type; })(); google.longrunning = (function() { diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index cbcfe6f7523..939dd8af801 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -2,970 +2,36 @@ "nested": { "google": { "nested": { - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, + "cloud": { "nested": { - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, + "osconfig": { "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "phpGenericServices": { - "type": "bool", - "id": 42, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - } - } - }, - "OneofOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - } - } - }, - "cloud": { - "nested": { - "osconfig": { - "nested": { - "v1": { + "v1": { "options": { "csharp_namespace": "Google.Cloud.OsConfig.V1", "go_package": "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig", "java_multiple_files": true, - "java_outer_classname": "PatchJobs", + "java_outer_classname": "VulnerabilityProto", "java_package": "com.google.cloud.osconfig.v1", "php_namespace": "Google\\Cloud\\OsConfig\\V1", "ruby_package": "Google::Cloud::OsConfig::V1", "(google.api.resource_definition).type": "compute.googleapis.com/Instance", - "(google.api.resource_definition).pattern": "projects/{project}/zones/{zone}/instances/{instance}" + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/instances/{instance}" }, "nested": { "Inventory": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/Inventory", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/inventory" + }, "fields": { + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "osInfo": { "type": "OsInfo", "id": 1 @@ -974,6 +40,13 @@ "keyType": "string", "type": "Item", "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -1139,6 +212,26 @@ } } }, + "ZypperPatch": { + "fields": { + "patchName": { + "type": "string", + "id": 5 + }, + "category": { + "type": "string", + "id": 2 + }, + "severity": { + "type": "string", + "id": 3 + }, + "summary": { + "type": "string", + "id": 4 + } + } + }, "WindowsUpdatePackage": { "fields": { "title": { @@ -1196,26 +289,6 @@ } } }, - "ZypperPatch": { - "fields": { - "patchName": { - "type": "string", - "id": 5 - }, - "category": { - "type": "string", - "id": 2 - }, - "severity": { - "type": "string", - "id": 3 - }, - "summary": { - "type": "string", - "id": 4 - } - } - }, "WindowsQuickFixEngineeringPackage": { "fields": { "caption": { @@ -1262,6 +335,70 @@ } } }, + "GetInventoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/Inventory" + } + }, + "view": { + "type": "InventoryView", + "id": 2 + } + } + }, + "ListInventoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/Instance" + } + }, + "view": { + "type": "InventoryView", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListInventoriesResponse": { + "fields": { + "inventories": { + "rule": "repeated", + "type": "Inventory", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "InventoryView": { + "values": { + "INVENTORY_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2 + } + }, "FixedOrPercent": { "oneofs": { "mode": { @@ -2156,268 +1293,596 @@ } } }, - "CancelPatchJobRequest": { + "CancelPatchJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" + } + } + } + }, + "AptSettings": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "exclusivePackages": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "DIST": 1, + "UPGRADE": 2 + } + } + } + }, + "YumSettings": { + "fields": { + "security": { + "type": "bool", + "id": 1 + }, + "minimal": { + "type": "bool", + "id": 2 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "exclusivePackages": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "GooSettings": { + "fields": {} + }, + "ZypperSettings": { + "fields": { + "withOptional": { + "type": "bool", + "id": 1 + }, + "withUpdate": { + "type": "bool", + "id": 2 + }, + "categories": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "severities": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "exclusivePatches": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "WindowsUpdateSettings": { + "fields": { + "classifications": { + "rule": "repeated", + "type": "Classification", + "id": 1 + }, + "excludes": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "exclusivePatches": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Classification": { + "values": { + "CLASSIFICATION_UNSPECIFIED": 0, + "CRITICAL": 1, + "SECURITY": 2, + "DEFINITION": 3, + "DRIVER": 4, + "FEATURE_PACK": 5, + "SERVICE_PACK": 6, + "TOOL": 7, + "UPDATE_ROLLUP": 8, + "UPDATE": 9 + } + } + } + }, + "ExecStep": { + "fields": { + "linuxExecStepConfig": { + "type": "ExecStepConfig", + "id": 1 + }, + "windowsExecStepConfig": { + "type": "ExecStepConfig", + "id": 2 + } + } + }, + "ExecStepConfig": { + "oneofs": { + "executable": { + "oneof": [ + "localPath", + "gcsObject" + ] + } + }, + "fields": { + "localPath": { + "type": "string", + "id": 1 + }, + "gcsObject": { + "type": "GcsObject", + "id": 2 + }, + "allowedSuccessCodes": { + "rule": "repeated", + "type": "int32", + "id": 3 + }, + "interpreter": { + "type": "Interpreter", + "id": 4 + } + }, + "nested": { + "Interpreter": { + "values": { + "INTERPRETER_UNSPECIFIED": 0, + "SHELL": 1, + "POWERSHELL": 2 + } + } + } + }, + "GcsObject": { "fields": { - "name": { + "bucket": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchJob" + "(google.api.field_behavior)": "REQUIRED" + } + }, + "object": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "generationNumber": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "AptSettings": { + "PatchInstanceFilter": { "fields": { - "type": { - "type": "Type", + "all": { + "type": "bool", "id": 1 }, - "excludes": { + "groupLabels": { "rule": "repeated", - "type": "string", + "type": "GroupLabel", "id": 2 }, - "exclusivePackages": { + "zones": { "rule": "repeated", "type": "string", "id": 3 + }, + "instances": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "instanceNamePrefixes": { + "rule": "repeated", + "type": "string", + "id": 5 } }, "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "DIST": 1, - "UPGRADE": 2 + "GroupLabel": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } } } } }, - "YumSettings": { + "PatchRollout": { "fields": { - "security": { - "type": "bool", + "mode": { + "type": "Mode", "id": 1 }, - "minimal": { - "type": "bool", + "disruptionBudget": { + "type": "FixedOrPercent", "id": 2 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "ZONE_BY_ZONE": 1, + "CONCURRENT_ZONES": 2 + } + } + } + }, + "OsConfigZonalService": { + "options": { + "(google.api.default_host)": "osconfig.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetInventory": { + "requestType": "GetInventoryRequest", + "responseType": "Inventory", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/instances/*/inventory}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/instances/*/inventory}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "excludes": { - "rule": "repeated", + "ListInventories": { + "requestType": "ListInventoriesRequest", + "responseType": "ListInventoriesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/instances/*}/inventories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/instances/*}/inventories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVulnerabilityReport": { + "requestType": "GetVulnerabilityReportRequest", + "responseType": "VulnerabilityReport", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListVulnerabilityReports": { + "requestType": "ListVulnerabilityReportsRequest", + "responseType": "ListVulnerabilityReportsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "VulnerabilityReport": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/VulnerabilityReport", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport" + }, + "fields": { + "name": { "type": "string", - "id": 3 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "exclusivePackages": { + "vulnerabilities": { "rule": "repeated", - "type": "string", - "id": 4 + "type": "Vulnerability", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Vulnerability": { + "fields": { + "details": { + "type": "Details", + "id": 1 + }, + "installedInventoryItemIds": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "availableInventoryItemIds": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + }, + "nested": { + "Details": { + "fields": { + "cve": { + "type": "string", + "id": 1 + }, + "cvssV2Score": { + "type": "float", + "id": 2 + }, + "cvssV3": { + "type": "CVSSv3", + "id": 3 + }, + "severity": { + "type": "string", + "id": 4 + }, + "description": { + "type": "string", + "id": 5 + }, + "references": { + "rule": "repeated", + "type": "Reference", + "id": 6 + } + }, + "nested": { + "Reference": { + "fields": { + "url": { + "type": "string", + "id": 1 + }, + "source": { + "type": "string", + "id": 2 + } + } + } + } + } + } } } }, - "GooSettings": { - "fields": {} + "GetVulnerabilityReportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/VulnerabilityReport" + } + } + } }, - "ZypperSettings": { + "ListVulnerabilityReportsRequest": { "fields": { - "withOptional": { - "type": "bool", - "id": 1 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/Instance" + } }, - "withUpdate": { - "type": "bool", + "pageSize": { + "type": "int32", "id": 2 }, - "categories": { - "rule": "repeated", + "pageToken": { "type": "string", "id": 3 }, - "severities": { - "rule": "repeated", + "filter": { "type": "string", "id": 4 - }, - "excludes": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "exclusivePatches": { - "rule": "repeated", - "type": "string", - "id": 6 } } }, - "WindowsUpdateSettings": { + "ListVulnerabilityReportsResponse": { "fields": { - "classifications": { + "vulnerabilityReports": { "rule": "repeated", - "type": "Classification", + "type": "VulnerabilityReport", "id": 1 }, - "excludes": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "exclusivePatches": { - "rule": "repeated", + "nextPageToken": { "type": "string", - "id": 3 - } - }, - "nested": { - "Classification": { - "values": { - "CLASSIFICATION_UNSPECIFIED": 0, - "CRITICAL": 1, - "SECURITY": 2, - "DEFINITION": 3, - "DRIVER": 4, - "FEATURE_PACK": 5, - "SERVICE_PACK": 6, - "TOOL": 7, - "UPDATE_ROLLUP": 8, - "UPDATE": 9 - } - } - } - }, - "ExecStep": { - "fields": { - "linuxExecStepConfig": { - "type": "ExecStepConfig", - "id": 1 - }, - "windowsExecStepConfig": { - "type": "ExecStepConfig", "id": 2 } } }, - "ExecStepConfig": { - "oneofs": { - "executable": { - "oneof": [ - "localPath", - "gcsObject" - ] - } - }, + "CVSSv3": { "fields": { - "localPath": { - "type": "string", + "baseScore": { + "type": "float", "id": 1 }, - "gcsObject": { - "type": "GcsObject", + "exploitabilityScore": { + "type": "float", "id": 2 }, - "allowedSuccessCodes": { - "rule": "repeated", - "type": "int32", + "impactScore": { + "type": "float", "id": 3 }, - "interpreter": { - "type": "Interpreter", - "id": 4 + "attackVector": { + "type": "AttackVector", + "id": 5 + }, + "attackComplexity": { + "type": "AttackComplexity", + "id": 6 + }, + "privilegesRequired": { + "type": "PrivilegesRequired", + "id": 7 + }, + "userInteraction": { + "type": "UserInteraction", + "id": 8 + }, + "scope": { + "type": "Scope", + "id": 9 + }, + "confidentialityImpact": { + "type": "Impact", + "id": 10 + }, + "integrityImpact": { + "type": "Impact", + "id": 11 + }, + "availabilityImpact": { + "type": "Impact", + "id": 12 } }, "nested": { - "Interpreter": { + "AttackVector": { "values": { - "INTERPRETER_UNSPECIFIED": 0, - "SHELL": 1, - "POWERSHELL": 2 - } - } - } - }, - "GcsObject": { - "fields": { - "bucket": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "ATTACK_VECTOR_UNSPECIFIED": 0, + "ATTACK_VECTOR_NETWORK": 1, + "ATTACK_VECTOR_ADJACENT": 2, + "ATTACK_VECTOR_LOCAL": 3, + "ATTACK_VECTOR_PHYSICAL": 4 } }, - "object": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "AttackComplexity": { + "values": { + "ATTACK_COMPLEXITY_UNSPECIFIED": 0, + "ATTACK_COMPLEXITY_LOW": 1, + "ATTACK_COMPLEXITY_HIGH": 2 } }, - "generationNumber": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "PrivilegesRequired": { + "values": { + "PRIVILEGES_REQUIRED_UNSPECIFIED": 0, + "PRIVILEGES_REQUIRED_NONE": 1, + "PRIVILEGES_REQUIRED_LOW": 2, + "PRIVILEGES_REQUIRED_HIGH": 3 } - } - } - }, - "PatchInstanceFilter": { - "fields": { - "all": { - "type": "bool", - "id": 1 - }, - "groupLabels": { - "rule": "repeated", - "type": "GroupLabel", - "id": 2 }, - "zones": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "instances": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "instanceNamePrefixes": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "GroupLabel": { - "fields": { - "labels": { - "keyType": "string", - "type": "string", - "id": 1 - } + "UserInteraction": { + "values": { + "USER_INTERACTION_UNSPECIFIED": 0, + "USER_INTERACTION_NONE": 1, + "USER_INTERACTION_REQUIRED": 2 } - } - } - }, - "PatchRollout": { - "fields": { - "mode": { - "type": "Mode", - "id": 1 }, - "disruptionBudget": { - "type": "FixedOrPercent", - "id": 2 - } - }, - "nested": { - "Mode": { + "Scope": { + "values": { + "SCOPE_UNSPECIFIED": 0, + "SCOPE_UNCHANGED": 1, + "SCOPE_CHANGED": 2 + } + }, + "Impact": { "values": { - "MODE_UNSPECIFIED": 0, - "ZONE_BY_ZONE": 1, - "CONCURRENT_ZONES": 2 + "IMPACT_UNSPECIFIED": 0, + "IMPACT_HIGH": 1, + "IMPACT_LOW": 2, + "IMPACT_NONE": 3 } } } @@ -3634,264 +3099,725 @@ } } }, - "OSPolicyAssignment": { - "options": { - "(google.api.resource).type": "osconfig.googleapis.com/OSPolicyAssignment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}" - }, + "OSPolicyAssignment": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/OSPolicyAssignment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "osPolicies": { + "rule": "repeated", + "type": "OSPolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instanceFilter": { + "type": "InstanceFilter", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rollout": { + "type": "Rollout", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "revisionId": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revisionCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rolloutState": { + "type": "RolloutState", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "baseline": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleted": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reconciling": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LabelSet": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "InstanceFilter": { + "fields": { + "all": { + "type": "bool", + "id": 1 + }, + "osShortNames": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "inclusionLabels": { + "rule": "repeated", + "type": "LabelSet", + "id": 3 + }, + "exclusionLabels": { + "rule": "repeated", + "type": "LabelSet", + "id": 4 + } + } + }, + "Rollout": { + "fields": { + "disruptionBudget": { + "type": "FixedOrPercent", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "minWaitDuration": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RolloutState": { + "values": { + "ROLLOUT_STATE_UNSPECIFIED": 0, + "IN_PROGRESS": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4 + } + } + } + }, + "OSPolicyAssignmentOperationMetadata": { + "fields": { + "osPolicyAssignment": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + }, + "apiMethod": { + "type": "APIMethod", + "id": 2 + }, + "rolloutState": { + "type": "RolloutState", + "id": 3 + }, + "rolloutStartTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "rolloutUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + }, + "nested": { + "APIMethod": { + "values": { + "API_METHOD_UNSPECIFIED": 0, + "CREATE": 1, + "UPDATE": 2, + "DELETE": 3 + } + }, + "RolloutState": { + "values": { + "ROLLOUT_STATE_UNSPECIFIED": 0, + "IN_PROGRESS": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4 + } + } + } + }, + "CreateOSPolicyAssignmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "osPolicyAssignment": { + "type": "OSPolicyAssignment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "osPolicyAssignmentId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateOSPolicyAssignmentRequest": { + "fields": { + "osPolicyAssignment": { + "type": "OSPolicyAssignment", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetOSPolicyAssignmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + } + } + }, + "ListOSPolicyAssignmentsRequest": { "fields": { - "name": { + "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 + } + } + }, + "ListOSPolicyAssignmentsResponse": { + "fields": { + "osPolicyAssignments": { + "rule": "repeated", + "type": "OSPolicyAssignment", "id": 1 }, - "description": { + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListOSPolicyAssignmentRevisionsRequest": { + "fields": { + "name": { "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + }, + "pageSize": { + "type": "int32", "id": 2 }, - "osPolicies": { + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOSPolicyAssignmentRevisionsResponse": { + "fields": { + "osPolicyAssignments": { "rule": "repeated", - "type": "OSPolicy", - "id": 3, + "type": "OSPolicyAssignment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteOSPolicyAssignmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" } + } + } + }, + "FixedOrPercent": { + "oneofs": { + "mode": { + "oneof": [ + "fixed", + "percent" + ] + } + }, + "fields": { + "fixed": { + "type": "int32", + "id": 1 }, - "instanceFilter": { - "type": "InstanceFilter", - "id": 4, + "percent": { + "type": "int32", + "id": 2 + } + } + }, + "OsConfigZonalService": { + "options": { + "(google.api.default_host)": "osconfig.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateOSPolicyAssignment": { + "requestType": "CreateOSPolicyAssignmentRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments", + "(google.api.http).body": "os_policy_assignment", + "(google.api.method_signature)": "parent,os_policy_assignment,os_policy_assignment_id", + "(google.longrunning.operation_info).response_type": "OSPolicyAssignment", + "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments", + "body": "os_policy_assignment" + } + }, + { + "(google.api.method_signature)": "parent,os_policy_assignment,os_policy_assignment_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "OSPolicyAssignment", + "metadata_type": "OSPolicyAssignmentOperationMetadata" + } + } + ] }, - "rollout": { - "type": "Rollout", - "id": 5, + "UpdateOSPolicyAssignment": { + "requestType": "UpdateOSPolicyAssignmentRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "(google.api.http).patch": "/v1alpha/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}", + "(google.api.http).body": "os_policy_assignment", + "(google.api.method_signature)": "os_policy_assignment,update_mask", + "(google.longrunning.operation_info).response_type": "OSPolicyAssignment", + "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}", + "body": "os_policy_assignment" + } + }, + { + "(google.api.method_signature)": "os_policy_assignment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "OSPolicyAssignment", + "metadata_type": "OSPolicyAssignmentOperationMetadata" + } + } + ] }, - "revisionId": { - "type": "string", - "id": 6, + "GetOSPolicyAssignment": { + "requestType": "GetOSPolicyAssignmentRequest", + "responseType": "OSPolicyAssignment", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "revisionCreateTime": { - "type": "google.protobuf.Timestamp", - "id": 7, + "ListOSPolicyAssignments": { + "requestType": "ListOSPolicyAssignmentsRequest", + "responseType": "ListOSPolicyAssignmentsResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "rolloutState": { - "type": "RolloutState", - "id": 9, + "ListOSPolicyAssignmentRevisions": { + "requestType": "ListOSPolicyAssignmentRevisionsRequest", + "responseType": "ListOSPolicyAssignmentRevisionsResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOSPolicyAssignment": { + "requestType": "DeleteOSPolicyAssignmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OSPolicyAssignmentOperationMetadata" + } + } + ] }, - "baseline": { - "type": "bool", - "id": 10, + "GetInstanceOSPoliciesCompliance": { + "requestType": "GetInstanceOSPoliciesComplianceRequest", + "responseType": "InstanceOSPoliciesCompliance", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "deleted": { - "type": "bool", - "id": 11, + "ListInstanceOSPoliciesCompliances": { + "requestType": "ListInstanceOSPoliciesCompliancesRequest", + "responseType": "ListInstanceOSPoliciesCompliancesResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "reconciling": { - "type": "bool", - "id": 12, + "GetInventory": { + "requestType": "GetInventoryRequest", + "responseType": "Inventory", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instances/*/inventory}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/instances/*/inventory}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "uid": { - "type": "string", - "id": 13, + "ListInventories": { + "requestType": "ListInventoriesRequest", + "responseType": "ListInventoriesResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "LabelSet": { - "fields": { - "labels": { - "keyType": "string", - "type": "string", - "id": 1 + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/inventories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/inventories" + } + }, + { + "(google.api.method_signature)": "parent" } - } + ] }, - "InstanceFilter": { - "fields": { - "all": { - "type": "bool", - "id": 1 - }, - "osShortNames": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "inclusionLabels": { - "rule": "repeated", - "type": "LabelSet", - "id": 3 + "GetVulnerabilityReport": { + "requestType": "GetVulnerabilityReportRequest", + "responseType": "VulnerabilityReport", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instances/*/vulnerabilityReport}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/instances/*/vulnerabilityReport}" + } }, - "exclusionLabels": { - "rule": "repeated", - "type": "LabelSet", - "id": 4 + { + "(google.api.method_signature)": "name" } - } + ] }, - "Rollout": { - "fields": { - "disruptionBudget": { - "type": "FixedOrPercent", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "ListVulnerabilityReports": { + "requestType": "ListVulnerabilityReportsRequest", + "responseType": "ListVulnerabilityReportsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports" } }, - "minWaitDuration": { - "type": "google.protobuf.Duration", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + { + "(google.api.method_signature)": "parent" } - } - }, - "RolloutState": { - "values": { - "ROLLOUT_STATE_UNSPECIFIED": 0, - "IN_PROGRESS": 1, - "CANCELLING": 2, - "CANCELLED": 3, - "SUCCEEDED": 4 - } + ] } } }, - "OSPolicyAssignmentOperationMetadata": { - "fields": { - "osPolicyAssignment": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" - } - }, - "apiMethod": { - "type": "APIMethod", - "id": 2 - }, - "rolloutState": { - "type": "RolloutState", - "id": 3 - }, - "rolloutStartTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "rolloutUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - } + "VulnerabilityReport": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/VulnerabilityReport", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport" }, - "nested": { - "APIMethod": { - "values": { - "API_METHOD_UNSPECIFIED": 0, - "CREATE": 1, - "UPDATE": 2, - "DELETE": 3 - } - }, - "RolloutState": { - "values": { - "ROLLOUT_STATE_UNSPECIFIED": 0, - "IN_PROGRESS": 1, - "CANCELLING": 2, - "CANCELLED": 3, - "SUCCEEDED": 4 - } - } - } - }, - "CreateOSPolicyAssignmentRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "osPolicyAssignment": { - "type": "OSPolicyAssignment", + "vulnerabilities": { + "rule": "repeated", + "type": "Vulnerability", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "osPolicyAssignmentId": { - "type": "string", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } } - } - }, - "UpdateOSPolicyAssignmentRequest": { - "fields": { - "osPolicyAssignment": { - "type": "OSPolicyAssignment", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + }, + "nested": { + "Vulnerability": { + "fields": { + "details": { + "type": "Details", + "id": 1 + }, + "installedInventoryItemIds": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "availableInventoryItemIds": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + }, + "nested": { + "Details": { + "fields": { + "cve": { + "type": "string", + "id": 1 + }, + "cvssV2Score": { + "type": "float", + "id": 2 + }, + "cvssV3": { + "type": "CVSSv3", + "id": 3 + }, + "severity": { + "type": "string", + "id": 4 + }, + "description": { + "type": "string", + "id": 5 + }, + "references": { + "rule": "repeated", + "type": "Reference", + "id": 6 + } + }, + "nested": { + "Reference": { + "fields": { + "url": { + "type": "string", + "id": 1 + } + } + } + } + } } } } }, - "GetOSPolicyAssignmentRequest": { + "GetVulnerabilityReportRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + "(google.api.resource_reference).type": "osconfig.googleapis.com/VulnerabilityReport" } } } }, - "ListOSPolicyAssignmentsRequest": { + "ListVulnerabilityReportsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).type": "compute.googleapis.com/Instance" } }, "pageSize": { @@ -3901,14 +3827,18 @@ "pageToken": { "type": "string", "id": 3 + }, + "filter": { + "type": "string", + "id": 4 } } }, - "ListOSPolicyAssignmentsResponse": { + "ListVulnerabilityReportsResponse": { "fields": { - "osPolicyAssignments": { + "vulnerabilityReports": { "rule": "repeated", - "type": "OSPolicyAssignment", + "type": "VulnerabilityReport", "id": 1 }, "nextPageToken": { @@ -3917,570 +3847,1259 @@ } } }, - "ListOSPolicyAssignmentRevisionsRequest": { + "CVSSv3": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" - } + "baseScore": { + "type": "float", + "id": 1 }, - "pageSize": { - "type": "int32", + "exploitabilityScore": { + "type": "float", "id": 2 }, - "pageToken": { - "type": "string", + "impactScore": { + "type": "float", "id": 3 - } - } - }, - "ListOSPolicyAssignmentRevisionsResponse": { - "fields": { - "osPolicyAssignments": { - "rule": "repeated", - "type": "OSPolicyAssignment", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "DeleteOSPolicyAssignmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" - } - } - } - }, - "FixedOrPercent": { - "oneofs": { - "mode": { - "oneof": [ - "fixed", - "percent" - ] - } - }, - "fields": { - "fixed": { - "type": "int32", - "id": 1 + "attackVector": { + "type": "AttackVector", + "id": 5 }, - "percent": { - "type": "int32", - "id": 2 - } - } - }, - "OsConfigZonalService": { - "options": { - "(google.api.default_host)": "osconfig.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateOSPolicyAssignment": { - "requestType": "CreateOSPolicyAssignmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments", - "(google.api.http).body": "os_policy_assignment", - "(google.api.method_signature)": "parent,os_policy_assignment,os_policy_assignment_id", - "(google.longrunning.operation_info).response_type": "OSPolicyAssignment", - "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments", - "body": "os_policy_assignment" - } - }, - { - "(google.api.method_signature)": "parent,os_policy_assignment,os_policy_assignment_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "OSPolicyAssignment", - "metadata_type": "OSPolicyAssignmentOperationMetadata" - } - } - ] + "attackComplexity": { + "type": "AttackComplexity", + "id": 6 }, - "UpdateOSPolicyAssignment": { - "requestType": "UpdateOSPolicyAssignmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1alpha/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}", - "(google.api.http).body": "os_policy_assignment", - "(google.api.method_signature)": "os_policy_assignment,update_mask", - "(google.longrunning.operation_info).response_type": "OSPolicyAssignment", - "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1alpha/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}", - "body": "os_policy_assignment" - } - }, - { - "(google.api.method_signature)": "os_policy_assignment,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "OSPolicyAssignment", - "metadata_type": "OSPolicyAssignmentOperationMetadata" - } - } - ] + "privilegesRequired": { + "type": "PrivilegesRequired", + "id": 7 }, - "GetOSPolicyAssignment": { - "requestType": "GetOSPolicyAssignmentRequest", - "responseType": "OSPolicyAssignment", - "options": { - "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "userInteraction": { + "type": "UserInteraction", + "id": 8 }, - "ListOSPolicyAssignments": { - "requestType": "ListOSPolicyAssignmentsRequest", - "responseType": "ListOSPolicyAssignmentsResponse", - "options": { - "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "scope": { + "type": "Scope", + "id": 9 }, - "ListOSPolicyAssignmentRevisions": { - "requestType": "ListOSPolicyAssignmentRevisionsRequest", - "responseType": "ListOSPolicyAssignmentRevisionsResponse", - "options": { - "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "confidentialityImpact": { + "type": "Impact", + "id": 10 }, - "DeleteOSPolicyAssignment": { - "requestType": "DeleteOSPolicyAssignmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OSPolicyAssignmentOperationMetadata" - } - } - ] + "integrityImpact": { + "type": "Impact", + "id": 11 }, - "GetInstanceOSPoliciesCompliance": { - "requestType": "GetInstanceOSPoliciesComplianceRequest", - "responseType": "InstanceOSPoliciesCompliance", - "options": { - "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "availabilityImpact": { + "type": "Impact", + "id": 12 + } + }, + "nested": { + "AttackVector": { + "values": { + "ATTACK_VECTOR_UNSPECIFIED": 0, + "ATTACK_VECTOR_NETWORK": 1, + "ATTACK_VECTOR_ADJACENT": 2, + "ATTACK_VECTOR_LOCAL": 3, + "ATTACK_VECTOR_PHYSICAL": 4 + } }, - "ListInstanceOSPoliciesCompliances": { - "requestType": "ListInstanceOSPoliciesCompliancesRequest", - "responseType": "ListInstanceOSPoliciesCompliancesResponse", - "options": { - "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "AttackComplexity": { + "values": { + "ATTACK_COMPLEXITY_UNSPECIFIED": 0, + "ATTACK_COMPLEXITY_LOW": 1, + "ATTACK_COMPLEXITY_HIGH": 2 + } }, - "GetInventory": { - "requestType": "GetInventoryRequest", - "responseType": "Inventory", - "options": { - "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instances/*/inventory}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=projects/*/locations/*/instances/*/inventory}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "PrivilegesRequired": { + "values": { + "PRIVILEGES_REQUIRED_UNSPECIFIED": 0, + "PRIVILEGES_REQUIRED_NONE": 1, + "PRIVILEGES_REQUIRED_LOW": 2, + "PRIVILEGES_REQUIRED_HIGH": 3 + } }, - "ListInventories": { - "requestType": "ListInventoriesRequest", - "responseType": "ListInventoriesResponse", - "options": { - "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/inventories", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/inventories" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "UserInteraction": { + "values": { + "USER_INTERACTION_UNSPECIFIED": 0, + "USER_INTERACTION_NONE": 1, + "USER_INTERACTION_REQUIRED": 2 + } }, - "GetVulnerabilityReport": { - "requestType": "GetVulnerabilityReportRequest", - "responseType": "VulnerabilityReport", - "options": { - "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instances/*/vulnerabilityReport}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{name=projects/*/locations/*/instances/*/vulnerabilityReport}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "Scope": { + "values": { + "SCOPE_UNSPECIFIED": 0, + "SCOPE_UNCHANGED": 1, + "SCOPE_CHANGED": 2 + } }, - "ListVulnerabilityReports": { - "requestType": "ListVulnerabilityReportsRequest", - "responseType": "ListVulnerabilityReportsResponse", - "options": { - "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1alpha/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "Impact": { + "values": { + "IMPACT_UNSPECIFIED": 0, + "IMPACT_HIGH": 1, + "IMPACT_LOW": 2, + "IMPACT_NONE": 3 + } } } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "VulnerabilityReport": { - "options": { - "(google.api.resource).type": "osconfig.googleapis.com/VulnerabilityReport", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "vulnerabilities": { - "rule": "repeated", - "type": "Vulnerability", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Vulnerability": { - "fields": { - "details": { - "type": "Details", - "id": 1 - }, - "installedInventoryItemIds": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "availableInventoryItemIds": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - } - }, - "nested": { - "Details": { - "fields": { - "cve": { - "type": "string", - "id": 1 - }, - "cvssV2Score": { - "type": "float", - "id": 2 - }, - "cvssV3": { - "type": "CVSSv3", - "id": 3 - }, - "severity": { - "type": "string", - "id": 4 - }, - "description": { - "type": "string", - "id": 5 - }, - "references": { - "rule": "repeated", - "type": "Reference", - "id": 6 - } - }, - "nested": { - "Reference": { - "fields": { - "url": { - "type": "string", - "id": 1 - } - } - } - } - } - } - } - } + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 }, - "GetVulnerabilityReportRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "osconfig.googleapis.com/VulnerabilityReport" - } - } - } + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 }, - "ListVulnerabilityReportsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "compute.googleapis.com/Instance" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - } - } + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 }, - "ListVulnerabilityReportsResponse": { - "fields": { - "vulnerabilityReports": { - "rule": "repeated", - "type": "VulnerabilityReport", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } + "leadingComments": { + "type": "string", + "id": 3 }, - "CVSSv3": { - "fields": { - "baseScore": { - "type": "float", - "id": 1 - }, - "exploitabilityScore": { - "type": "float", - "id": 2 - }, - "impactScore": { - "type": "float", - "id": 3 - }, - "attackVector": { - "type": "AttackVector", - "id": 5 - }, - "attackComplexity": { - "type": "AttackComplexity", - "id": 6 - }, - "privilegesRequired": { - "type": "PrivilegesRequired", - "id": 7 - }, - "userInteraction": { - "type": "UserInteraction", - "id": 8 - }, - "scope": { - "type": "Scope", - "id": 9 - }, - "confidentialityImpact": { - "type": "Impact", - "id": 10 - }, - "integrityImpact": { - "type": "Impact", - "id": 11 - }, - "availabilityImpact": { - "type": "Impact", - "id": 12 - } - }, - "nested": { - "AttackVector": { - "values": { - "ATTACK_VECTOR_UNSPECIFIED": 0, - "ATTACK_VECTOR_NETWORK": 1, - "ATTACK_VECTOR_ADJACENT": 2, - "ATTACK_VECTOR_LOCAL": 3, - "ATTACK_VECTOR_PHYSICAL": 4 - } - }, - "AttackComplexity": { - "values": { - "ATTACK_COMPLEXITY_UNSPECIFIED": 0, - "ATTACK_COMPLEXITY_LOW": 1, - "ATTACK_COMPLEXITY_HIGH": 2 - } - }, - "PrivilegesRequired": { - "values": { - "PRIVILEGES_REQUIRED_UNSPECIFIED": 0, - "PRIVILEGES_REQUIRED_NONE": 1, - "PRIVILEGES_REQUIRED_LOW": 2, - "PRIVILEGES_REQUIRED_HIGH": 3 - } - }, - "UserInteraction": { - "values": { - "USER_INTERACTION_UNSPECIFIED": 0, - "USER_INTERACTION_NONE": 1, - "USER_INTERACTION_REQUIRED": 2 - } - }, - "Scope": { - "values": { - "SCOPE_UNSPECIFIED": 0, - "SCOPE_UNCHANGED": 1, - "SCOPE_CHANGED": 2 - } - }, - "Impact": { - "values": { - "IMPACT_UNSPECIFIED": 0, - "IMPACT_HIGH": 1, - "IMPACT_LOW": 2, - "IMPACT_NONE": 3 - } - } - } + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 } } } } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } } } }, @@ -4604,215 +5223,6 @@ } } }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "FieldBehaviorProto", - "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" - }, - "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 - } - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6 - } - } - } - }, "longrunning": { "options": { "cc_enable_arenas": true, diff --git a/packages/google-cloud-osconfig/src/index.ts b/packages/google-cloud-osconfig/src/index.ts index 0035f7ef758..11dd47215c0 100644 --- a/packages/google-cloud-osconfig/src/index.ts +++ b/packages/google-cloud-osconfig/src/index.ts @@ -21,8 +21,10 @@ import * as v1alpha from './v1alpha'; const OsConfigServiceClient = v1.OsConfigServiceClient; type OsConfigServiceClient = v1.OsConfigServiceClient; +const OsConfigZonalServiceClient = v1.OsConfigZonalServiceClient; +type OsConfigZonalServiceClient = v1.OsConfigZonalServiceClient; -export {v1, v1alpha, OsConfigServiceClient}; -export default {v1, v1alpha, OsConfigServiceClient}; +export {v1, v1alpha, OsConfigServiceClient, OsConfigZonalServiceClient}; +export default {v1, v1alpha, OsConfigServiceClient, OsConfigZonalServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-osconfig/src/v1/gapic_metadata.json b/packages/google-cloud-osconfig/src/v1/gapic_metadata.json index 25450e990d1..c5775aa09a5 100644 --- a/packages/google-cloud-osconfig/src/v1/gapic_metadata.json +++ b/packages/google-cloud-osconfig/src/v1/gapic_metadata.json @@ -120,6 +120,68 @@ } } } + }, + "OsConfigZonalService": { + "clients": { + "grpc": { + "libraryClient": "OsConfigZonalServiceClient", + "rpcs": { + "GetInventory": { + "methods": [ + "getInventory" + ] + }, + "GetVulnerabilityReport": { + "methods": [ + "getVulnerabilityReport" + ] + }, + "ListInventories": { + "methods": [ + "listInventories", + "listInventoriesStream", + "listInventoriesAsync" + ] + }, + "ListVulnerabilityReports": { + "methods": [ + "listVulnerabilityReports", + "listVulnerabilityReportsStream", + "listVulnerabilityReportsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "OsConfigZonalServiceClient", + "rpcs": { + "GetInventory": { + "methods": [ + "getInventory" + ] + }, + "GetVulnerabilityReport": { + "methods": [ + "getVulnerabilityReport" + ] + }, + "ListInventories": { + "methods": [ + "listInventories", + "listInventoriesStream", + "listInventoriesAsync" + ] + }, + "ListVulnerabilityReports": { + "methods": [ + "listVulnerabilityReports", + "listVulnerabilityReportsStream", + "listVulnerabilityReportsAsync" + ] + } + } + } + } } } } diff --git a/packages/google-cloud-osconfig/src/v1/index.ts b/packages/google-cloud-osconfig/src/v1/index.ts index 3706f0aec96..57834269e82 100644 --- a/packages/google-cloud-osconfig/src/v1/index.ts +++ b/packages/google-cloud-osconfig/src/v1/index.ts @@ -17,3 +17,4 @@ // ** All changes to this file may be overwritten. ** export {OsConfigServiceClient} from './os_config_service_client'; +export {OsConfigZonalServiceClient} from './os_config_zonal_service_client'; diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 799ac830de2..77678b9fb40 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -167,12 +167,18 @@ export class OsConfigServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + inventoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/inventory' + ), patchDeploymentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/patchDeployments/{patch_deployment}' ), patchJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/patchJobs/{patch_job}' ), + vulnerabilityReportPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport' + ), }; // Some of the methods on this service return "paged" results, @@ -1523,6 +1529,58 @@ export class OsConfigServiceClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified inventory resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + inventoryPath(project: string, location: string, instance: string) { + return this.pathTemplates.inventoryPathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from Inventory resource. + * + * @param {string} inventoryName + * A fully-qualified path representing Inventory resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInventoryName(inventoryName: string) { + return this.pathTemplates.inventoryPathTemplate.match(inventoryName) + .project; + } + + /** + * Parse the location from Inventory resource. + * + * @param {string} inventoryName + * A fully-qualified path representing Inventory resource. + * @returns {string} A string representing the location. + */ + matchLocationFromInventoryName(inventoryName: string) { + return this.pathTemplates.inventoryPathTemplate.match(inventoryName) + .location; + } + + /** + * Parse the instance from Inventory resource. + * + * @param {string} inventoryName + * A fully-qualified path representing Inventory resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInventoryName(inventoryName: string) { + return this.pathTemplates.inventoryPathTemplate.match(inventoryName) + .instance; + } + /** * Return a fully-qualified patchDeployment resource name string. * @@ -1600,6 +1658,61 @@ export class OsConfigServiceClient { .patch_job; } + /** + * Return a fully-qualified vulnerabilityReport resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + vulnerabilityReportPath(project: string, location: string, instance: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from VulnerabilityReport resource. + * + * @param {string} vulnerabilityReportName + * A fully-qualified path representing VulnerabilityReport resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVulnerabilityReportName(vulnerabilityReportName: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.match( + vulnerabilityReportName + ).project; + } + + /** + * Parse the location from VulnerabilityReport resource. + * + * @param {string} vulnerabilityReportName + * A fully-qualified path representing VulnerabilityReport resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVulnerabilityReportName(vulnerabilityReportName: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.match( + vulnerabilityReportName + ).location; + } + + /** + * Parse the instance from VulnerabilityReport resource. + * + * @param {string} vulnerabilityReportName + * A fully-qualified path representing VulnerabilityReport resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromVulnerabilityReportName(vulnerabilityReportName: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.match( + vulnerabilityReportName + ).instance; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json b/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json index 07f48f3fa6c..1300be8f625 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json @@ -2,6 +2,8 @@ "../../protos/google/cloud/osconfig/v1/inventory.proto", "../../protos/google/cloud/osconfig/v1/osconfig_common.proto", "../../protos/google/cloud/osconfig/v1/osconfig_service.proto", + "../../protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto", "../../protos/google/cloud/osconfig/v1/patch_deployments.proto", - "../../protos/google/cloud/osconfig/v1/patch_jobs.proto" + "../../protos/google/cloud/osconfig/v1/patch_jobs.proto", + "../../protos/google/cloud/osconfig/v1/vulnerability.proto" ] diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts new file mode 100644 index 00000000000..e058f3f25e0 --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -0,0 +1,1195 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/os_config_zonal_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './os_config_zonal_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Zonal OS Config API + * + * The OS Config service is the server-side component that allows users to + * manage package installations and patch jobs for Compute Engine VM instances. + * @class + * @memberof v1 + */ +export class OsConfigZonalServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + osConfigZonalServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of OsConfigZonalServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof OsConfigZonalServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + inventoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/inventory' + ), + patchDeploymentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/patchDeployments/{patch_deployment}' + ), + patchJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/patchJobs/{patch_job}' + ), + vulnerabilityReportPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport' + ), + }; + + // 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 = { + listInventories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'inventories' + ), + listVulnerabilityReports: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'vulnerabilityReports' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.osconfig.v1.OsConfigZonalService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.osConfigZonalServiceStub) { + return this.osConfigZonalServiceStub; + } + + // Put together the "service stub" for + // google.cloud.osconfig.v1.OsConfigZonalService. + this.osConfigZonalServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.osconfig.v1.OsConfigZonalService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.osconfig.v1.OsConfigZonalService, + 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 osConfigZonalServiceStubMethods = [ + 'getInventory', + 'listInventories', + 'getVulnerabilityReport', + 'listVulnerabilityReports', + ]; + for (const methodName of osConfigZonalServiceStubMethods) { + const callPromise = this.osConfigZonalServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.osConfigZonalServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'osconfig.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'osconfig.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getInventory( + request?: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IInventory, + protos.google.cloud.osconfig.v1.IGetInventoryRequest | undefined, + {} | undefined + ] + >; + getInventory( + request: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IInventory, + protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, + {} | null | undefined + > + ): void; + getInventory( + request: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IInventory, + protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Get inventory data for the specified VM instance. If the VM has no + * associated inventory, the message `NOT_FOUND` is returned. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for inventory resource. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * @param {google.cloud.osconfig.v1.InventoryView} request.view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Inventory]{@link google.cloud.osconfig.v1.Inventory}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getInventory(request); + */ + getInventory( + request?: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IInventory, + | protos.google.cloud.osconfig.v1.IGetInventoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IInventory, + protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IInventory, + protos.google.cloud.osconfig.v1.IGetInventoryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getInventory(request, options, callback); + } + getVulnerabilityReport( + request?: protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IVulnerabilityReport, + ( + | protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest + | undefined + ), + {} | undefined + ] + >; + getVulnerabilityReport( + request: protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IVulnerabilityReport, + | protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVulnerabilityReport( + request: protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IVulnerabilityReport, + | protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Gets the vulnerability report for the specified VM instance. Only VMs with + * inventory data have vulnerability reports associated with them. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for vulnerability resource. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [VulnerabilityReport]{@link google.cloud.osconfig.v1.VulnerabilityReport}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getVulnerabilityReport(request); + */ + getVulnerabilityReport( + request?: protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IVulnerabilityReport, + | protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IVulnerabilityReport, + | protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IVulnerabilityReport, + ( + | protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getVulnerabilityReport( + request, + options, + callback + ); + } + + listInventories( + request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IInventory[], + protos.google.cloud.osconfig.v1.IListInventoriesRequest | null, + protos.google.cloud.osconfig.v1.IListInventoriesResponse + ] + >; + listInventories( + request: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IInventory + > + ): void; + listInventories( + request: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IInventory + > + ): void; + /** + * List inventory data for all VM instances in the specified zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/-` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * @param {google.cloud.osconfig.v1.InventoryView} request.view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Inventory]{@link google.cloud.osconfig.v1.Inventory}. + * 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 `listInventoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listInventories( + request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IInventory + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IInventory + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IInventory[], + protos.google.cloud.osconfig.v1.IListInventoriesRequest | null, + protos.google.cloud.osconfig.v1.IListInventoriesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listInventories(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/-` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * @param {google.cloud.osconfig.v1.InventoryView} request.view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Inventory]{@link google.cloud.osconfig.v1.Inventory} 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 `listInventoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listInventoriesStream( + request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listInventories.createStream( + this.innerApiCalls.listInventories as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listInventories`, 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 resource name. + * + * Format: `projects/{project}/locations/{location}/instances/-` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * @param {google.cloud.osconfig.v1.InventoryView} request.view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Inventory]{@link google.cloud.osconfig.v1.Inventory}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listInventoriesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listInventoriesAsync( + request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listInventories.asyncIterate( + this.innerApiCalls['listInventories'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + listVulnerabilityReports( + request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IVulnerabilityReport[], + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest | null, + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse + ] + >; + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IVulnerabilityReport + > + ): void; + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IVulnerabilityReport + > + ): void; + /** + * List vulnerability reports for all VM instances in the specified zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/-` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [VulnerabilityReport]{@link google.cloud.osconfig.v1.VulnerabilityReport}. + * 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 `listVulnerabilityReportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listVulnerabilityReports( + request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IVulnerabilityReport + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IVulnerabilityReport + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IVulnerabilityReport[], + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest | null, + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listVulnerabilityReports( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/-` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [VulnerabilityReport]{@link google.cloud.osconfig.v1.VulnerabilityReport} 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 `listVulnerabilityReportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listVulnerabilityReportsStream( + request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listVulnerabilityReports.createStream( + this.innerApiCalls.listVulnerabilityReports as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listVulnerabilityReports`, 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 resource name. + * + * Format: `projects/{project}/locations/{location}/instances/-` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [VulnerabilityReport]{@link google.cloud.osconfig.v1.VulnerabilityReport}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listVulnerabilityReportsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listVulnerabilityReportsAsync( + request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listVulnerabilityReports.asyncIterate( + this.innerApiCalls['listVulnerabilityReports'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified inventory resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + inventoryPath(project: string, location: string, instance: string) { + return this.pathTemplates.inventoryPathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from Inventory resource. + * + * @param {string} inventoryName + * A fully-qualified path representing Inventory resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInventoryName(inventoryName: string) { + return this.pathTemplates.inventoryPathTemplate.match(inventoryName) + .project; + } + + /** + * Parse the location from Inventory resource. + * + * @param {string} inventoryName + * A fully-qualified path representing Inventory resource. + * @returns {string} A string representing the location. + */ + matchLocationFromInventoryName(inventoryName: string) { + return this.pathTemplates.inventoryPathTemplate.match(inventoryName) + .location; + } + + /** + * Parse the instance from Inventory resource. + * + * @param {string} inventoryName + * A fully-qualified path representing Inventory resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInventoryName(inventoryName: string) { + return this.pathTemplates.inventoryPathTemplate.match(inventoryName) + .instance; + } + + /** + * Return a fully-qualified patchDeployment resource name string. + * + * @param {string} project + * @param {string} patch_deployment + * @returns {string} Resource name string. + */ + patchDeploymentPath(project: string, patchDeployment: string) { + return this.pathTemplates.patchDeploymentPathTemplate.render({ + project: project, + patch_deployment: patchDeployment, + }); + } + + /** + * Parse the project from PatchDeployment resource. + * + * @param {string} patchDeploymentName + * A fully-qualified path representing PatchDeployment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPatchDeploymentName(patchDeploymentName: string) { + return this.pathTemplates.patchDeploymentPathTemplate.match( + patchDeploymentName + ).project; + } + + /** + * Parse the patch_deployment from PatchDeployment resource. + * + * @param {string} patchDeploymentName + * A fully-qualified path representing PatchDeployment resource. + * @returns {string} A string representing the patch_deployment. + */ + matchPatchDeploymentFromPatchDeploymentName(patchDeploymentName: string) { + return this.pathTemplates.patchDeploymentPathTemplate.match( + patchDeploymentName + ).patch_deployment; + } + + /** + * Return a fully-qualified patchJob resource name string. + * + * @param {string} project + * @param {string} patch_job + * @returns {string} Resource name string. + */ + patchJobPath(project: string, patchJob: string) { + return this.pathTemplates.patchJobPathTemplate.render({ + project: project, + patch_job: patchJob, + }); + } + + /** + * Parse the project from PatchJob resource. + * + * @param {string} patchJobName + * A fully-qualified path representing PatchJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPatchJobName(patchJobName: string) { + return this.pathTemplates.patchJobPathTemplate.match(patchJobName).project; + } + + /** + * Parse the patch_job from PatchJob resource. + * + * @param {string} patchJobName + * A fully-qualified path representing PatchJob resource. + * @returns {string} A string representing the patch_job. + */ + matchPatchJobFromPatchJobName(patchJobName: string) { + return this.pathTemplates.patchJobPathTemplate.match(patchJobName) + .patch_job; + } + + /** + * Return a fully-qualified vulnerabilityReport resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + vulnerabilityReportPath(project: string, location: string, instance: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from VulnerabilityReport resource. + * + * @param {string} vulnerabilityReportName + * A fully-qualified path representing VulnerabilityReport resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVulnerabilityReportName(vulnerabilityReportName: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.match( + vulnerabilityReportName + ).project; + } + + /** + * Parse the location from VulnerabilityReport resource. + * + * @param {string} vulnerabilityReportName + * A fully-qualified path representing VulnerabilityReport resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVulnerabilityReportName(vulnerabilityReportName: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.match( + vulnerabilityReportName + ).location; + } + + /** + * Parse the instance from VulnerabilityReport resource. + * + * @param {string} vulnerabilityReportName + * A fully-qualified path representing VulnerabilityReport resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromVulnerabilityReportName(vulnerabilityReportName: string) { + return this.pathTemplates.vulnerabilityReportPathTemplate.match( + vulnerabilityReportName + ).instance; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.osConfigZonalServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client_config.json b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client_config.json new file mode 100644 index 00000000000..aefecc67234 --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.cloud.osconfig.v1.OsConfigZonalService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetInventory": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListInventories": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetVulnerabilityReport": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListVulnerabilityReports": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_proto_list.json b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_proto_list.json new file mode 100644 index 00000000000..1300be8f625 --- /dev/null +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_proto_list.json @@ -0,0 +1,9 @@ +[ + "../../protos/google/cloud/osconfig/v1/inventory.proto", + "../../protos/google/cloud/osconfig/v1/osconfig_common.proto", + "../../protos/google/cloud/osconfig/v1/osconfig_service.proto", + "../../protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto", + "../../protos/google/cloud/osconfig/v1/patch_deployments.proto", + "../../protos/google/cloud/osconfig/v1/patch_jobs.proto", + "../../protos/google/cloud/osconfig/v1/vulnerability.proto" +] diff --git a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js index 8892c338a6f..2f22eb87e37 100644 --- a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js @@ -21,6 +21,7 @@ const osconfig = require('@google-cloud/os-config'); function main() { const osConfigServiceClient = new osconfig.OsConfigServiceClient(); + const osConfigZonalServiceClient = new osconfig.OsConfigZonalServiceClient(); } main(); diff --git a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts index 5a24c05fa22..6460d4869ea 100644 --- a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts @@ -16,17 +16,28 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {OsConfigServiceClient} from '@google-cloud/os-config'; +import { + OsConfigServiceClient, + OsConfigZonalServiceClient, +} from '@google-cloud/os-config'; // check that the client class type name can be used function doStuffWithOsConfigServiceClient(client: OsConfigServiceClient) { client.close(); } +function doStuffWithOsConfigZonalServiceClient( + client: OsConfigZonalServiceClient +) { + client.close(); +} function main() { // check that the client instance can be created const osConfigServiceClient = new OsConfigServiceClient(); doStuffWithOsConfigServiceClient(osConfigServiceClient); + // check that the client instance can be created + const osConfigZonalServiceClient = new OsConfigZonalServiceClient(); + doStuffWithOsConfigZonalServiceClient(osConfigZonalServiceClient); } main(); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index f7c6f01a71c..0dfdc087c4a 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -1790,6 +1790,70 @@ describe('v1.OsConfigServiceClient', () => { }); describe('Path templates', () => { + describe('inventory', () => { + const fakePath = '/rendered/path/inventory'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + }; + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.inventoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.inventoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('inventoryPath', () => { + const result = client.inventoryPath( + 'projectValue', + 'locationValue', + 'instanceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.inventoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromInventoryName', () => { + const result = client.matchProjectFromInventoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.inventoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromInventoryName', () => { + const result = client.matchLocationFromInventoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.inventoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromInventoryName', () => { + const result = client.matchInstanceFromInventoryName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.inventoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('patchDeployment', () => { const fakePath = '/rendered/path/patchDeployment'; const expectedParameters = { @@ -1891,5 +1955,83 @@ describe('v1.OsConfigServiceClient', () => { ); }); }); + + describe('vulnerabilityReport', () => { + const fakePath = '/rendered/path/vulnerabilityReport'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + }; + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vulnerabilityReportPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.vulnerabilityReportPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('vulnerabilityReportPath', () => { + const result = client.vulnerabilityReportPath( + 'projectValue', + 'locationValue', + 'instanceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVulnerabilityReportName', () => { + const result = client.matchProjectFromVulnerabilityReportName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVulnerabilityReportName', () => { + const result = + client.matchLocationFromVulnerabilityReportName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromVulnerabilityReportName', () => { + const result = + client.matchInstanceFromVulnerabilityReportName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); }); }); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts new file mode 100644 index 00000000000..91ff785ff62 --- /dev/null +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -0,0 +1,1312 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as osconfigzonalserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.OsConfigZonalServiceClient', () => { + it('has servicePath', () => { + const servicePath = + osconfigzonalserviceModule.v1.OsConfigZonalServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + osconfigzonalserviceModule.v1.OsConfigZonalServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = osconfigzonalserviceModule.v1.OsConfigZonalServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.osConfigZonalServiceStub, undefined); + await client.initialize(); + assert(client.osConfigZonalServiceStub); + }); + + it('has close method', () => { + const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( + { + 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 osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( + { + 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('getInventory', () => { + it('invokes getInventory without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetInventoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.Inventory() + ); + client.innerApiCalls.getInventory = stubSimpleCall(expectedResponse); + const [response] = await client.getInventory(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getInventory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getInventory without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetInventoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.Inventory() + ); + client.innerApiCalls.getInventory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getInventory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IInventory | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getInventory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getInventory with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetInventoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getInventory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getInventory(request), expectedError); + assert( + (client.innerApiCalls.getInventory as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getVulnerabilityReport', () => { + it('invokes getVulnerabilityReport without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ); + client.innerApiCalls.getVulnerabilityReport = + stubSimpleCall(expectedResponse); + const [response] = await client.getVulnerabilityReport(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getVulnerabilityReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getVulnerabilityReport without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ); + client.innerApiCalls.getVulnerabilityReport = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVulnerabilityReport( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IVulnerabilityReport | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getVulnerabilityReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getVulnerabilityReport with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getVulnerabilityReport = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getVulnerabilityReport(request), + expectedError + ); + assert( + (client.innerApiCalls.getVulnerabilityReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listInventories', () => { + it('invokes listInventories without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + ]; + client.innerApiCalls.listInventories = stubSimpleCall(expectedResponse); + const [response] = await client.listInventories(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listInventories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listInventories without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + ]; + client.innerApiCalls.listInventories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listInventories( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IInventory[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listInventories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listInventories with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listInventories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listInventories(request), expectedError); + assert( + (client.innerApiCalls.listInventories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listInventoriesStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + ]; + client.descriptors.page.listInventories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listInventoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.Inventory[] = []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.Inventory) => { + 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.listInventories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listInventories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listInventories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listInventoriesStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listInventories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listInventoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.Inventory[] = []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.Inventory) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listInventories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listInventories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listInventories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listInventories without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), + ]; + client.descriptors.page.listInventories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1.IInventory[] = []; + const iterable = client.listInventoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listInventories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listInventories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listInventories with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListInventoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listInventories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listInventoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1.IInventory[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listInventories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listInventories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listVulnerabilityReports', () => { + it('invokes listVulnerabilityReports without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + ]; + client.innerApiCalls.listVulnerabilityReports = + stubSimpleCall(expectedResponse); + const [response] = await client.listVulnerabilityReports(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listVulnerabilityReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listVulnerabilityReports without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + ]; + client.innerApiCalls.listVulnerabilityReports = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVulnerabilityReports( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1.IVulnerabilityReport[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listVulnerabilityReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listVulnerabilityReports with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listVulnerabilityReports = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listVulnerabilityReports(request), + expectedError + ); + assert( + (client.innerApiCalls.listVulnerabilityReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listVulnerabilityReportsStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + ]; + client.descriptors.page.listVulnerabilityReports.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listVulnerabilityReportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.VulnerabilityReport[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.VulnerabilityReport) => { + 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.listVulnerabilityReports + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listVulnerabilityReports, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listVulnerabilityReportsStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listVulnerabilityReports.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listVulnerabilityReportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.VulnerabilityReport[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.VulnerabilityReport) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listVulnerabilityReports + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listVulnerabilityReports, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listVulnerabilityReports without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ), + ]; + client.descriptors.page.listVulnerabilityReports.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1.IVulnerabilityReport[] = + []; + const iterable = client.listVulnerabilityReportsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listVulnerabilityReports with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listVulnerabilityReports.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVulnerabilityReportsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1.IVulnerabilityReport[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listVulnerabilityReports + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('inventory', () => { + const fakePath = '/rendered/path/inventory'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + }; + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.inventoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.inventoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('inventoryPath', () => { + const result = client.inventoryPath( + 'projectValue', + 'locationValue', + 'instanceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.inventoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromInventoryName', () => { + const result = client.matchProjectFromInventoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.inventoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromInventoryName', () => { + const result = client.matchLocationFromInventoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.inventoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromInventoryName', () => { + const result = client.matchInstanceFromInventoryName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.inventoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('patchDeployment', () => { + const fakePath = '/rendered/path/patchDeployment'; + const expectedParameters = { + project: 'projectValue', + patch_deployment: 'patchDeploymentValue', + }; + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.patchDeploymentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.patchDeploymentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('patchDeploymentPath', () => { + const result = client.patchDeploymentPath( + 'projectValue', + 'patchDeploymentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.patchDeploymentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPatchDeploymentName', () => { + const result = client.matchProjectFromPatchDeploymentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.patchDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPatchDeploymentFromPatchDeploymentName', () => { + const result = + client.matchPatchDeploymentFromPatchDeploymentName(fakePath); + assert.strictEqual(result, 'patchDeploymentValue'); + assert( + (client.pathTemplates.patchDeploymentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('patchJob', () => { + const fakePath = '/rendered/path/patchJob'; + const expectedParameters = { + project: 'projectValue', + patch_job: 'patchJobValue', + }; + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.patchJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.patchJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('patchJobPath', () => { + const result = client.patchJobPath('projectValue', 'patchJobValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.patchJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPatchJobName', () => { + const result = client.matchProjectFromPatchJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.patchJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPatchJobFromPatchJobName', () => { + const result = client.matchPatchJobFromPatchJobName(fakePath); + assert.strictEqual(result, 'patchJobValue'); + assert( + (client.pathTemplates.patchJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('vulnerabilityReport', () => { + const fakePath = '/rendered/path/vulnerabilityReport'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + }; + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vulnerabilityReportPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.vulnerabilityReportPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('vulnerabilityReportPath', () => { + const result = client.vulnerabilityReportPath( + 'projectValue', + 'locationValue', + 'instanceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVulnerabilityReportName', () => { + const result = client.matchProjectFromVulnerabilityReportName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVulnerabilityReportName', () => { + const result = + client.matchLocationFromVulnerabilityReportName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromVulnerabilityReportName', () => { + const result = + client.matchInstanceFromVulnerabilityReportName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + ( + client.pathTemplates.vulnerabilityReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); From c13b59eb6bebb36a35c31f5c06fae872f42b712f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 7 Sep 2021 16:50:13 +0000 Subject: [PATCH 100/154] chore: release 1.9.0 (#145) :robot: I have created a release \*beep\* \*boop\* --- ## [1.9.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.8.0...v1.9.0) (2021-09-07) ### Features * add OSConfigZonalService API Committer: [@jaiminsh](https://www.github.com/jaiminsh) ([#144](https://www.github.com/googleapis/nodejs-os-config/issues/144)) ([317a7a2](https://www.github.com/googleapis/nodejs-os-config/commit/317a7a2c3ea899b28fd0a5f2f4abe18524df1f7a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 82c62de160c..86aeb62a691 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.9.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.8.0...v1.9.0) (2021-09-07) + + +### Features + +* add OSConfigZonalService API Committer: [@jaiminsh](https://www.github.com/jaiminsh) ([#144](https://www.github.com/googleapis/nodejs-os-config/issues/144)) ([317a7a2](https://www.github.com/googleapis/nodejs-os-config/commit/317a7a2c3ea899b28fd0a5f2f4abe18524df1f7a)) + ## [1.8.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.7.0...v1.8.0) (2021-08-30) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index e9a41b69904..6e9209bb4d9 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.8.0", + "version": "1.9.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index df4f44f3b98..3be3898c132 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.8.0" + "@google-cloud/os-config": "^1.9.0" }, "devDependencies": { "c8": "^7.1.0", From 4dbe9e7e48cd34d546a6e5b66a36ae647d93ec8b Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 8 Sep 2021 20:39:28 -0400 Subject: [PATCH 101/154] fix(build): switch primary branch to main (#146) --- packages/google-cloud-osconfig/README.md | 12 ++++++------ packages/google-cloud-osconfig/samples/README.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index 96b35b92753..6b723d568d3 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/os-config.svg)](https://www.npmjs.org/package/@google-cloud/os-config) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-os-config/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-os-config) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-os-config/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-os-config) @@ -15,7 +15,7 @@ Osconfig client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-os-config/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-os-config/blob/main/CHANGELOG.md). * [OS Config API Node.js Client API Reference][client-docs] * [OS Config API Documentation][product-docs] @@ -80,11 +80,11 @@ const listPatchDeploymentsResponse = listPatchDeployments(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-os-config/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-os-config/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-os-config/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-os-config&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-os-config/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-os-config&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -133,7 +133,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-os-config/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-os-config/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -145,7 +145,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-os-config/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-os-config/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/os-config/latest [product-docs]: https://cloud.google.com/compute/docs/os-patch-management diff --git a/packages/google-cloud-osconfig/samples/README.md b/packages/google-cloud-osconfig/samples/README.md index 46c752d6b30..0efd805e9f6 100644 --- a/packages/google-cloud-osconfig/samples/README.md +++ b/packages/google-cloud-osconfig/samples/README.md @@ -31,7 +31,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-os-config/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-os-config/blob/main/samples/quickstart.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-os-config&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From 4ab590ffbebc1b1b082ab8cc0d7636365130deb4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 8 Sep 2021 19:04:53 -0700 Subject: [PATCH 102/154] chore: release 1.9.1 (#147) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 86aeb62a691..5f5023abb30 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.9.1](https://www.github.com/googleapis/nodejs-os-config/compare/v1.9.0...v1.9.1) (2021-09-09) + + +### Bug Fixes + +* **build:** switch primary branch to main ([#146](https://www.github.com/googleapis/nodejs-os-config/issues/146)) ([3947132](https://www.github.com/googleapis/nodejs-os-config/commit/39471322fa54f12943ff74e4ff4548034a99c5e6)) + ## [1.9.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.8.0...v1.9.0) (2021-09-07) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 6e9209bb4d9..07d0c214539 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.9.0", + "version": "1.9.1", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 3be3898c132..e10e08119b9 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.9.0" + "@google-cloud/os-config": "^1.9.1" }, "devDependencies": { "c8": "^7.1.0", From 1041d1f71a44f1ee3f4bfe9d0787748812111abc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:45:20 +0000 Subject: [PATCH 103/154] build(node): update deps used during postprocessing (#1243) (#154) --- packages/google-cloud-osconfig/protos/protos.d.ts | 3 ++- packages/google-cloud-osconfig/protos/protos.js | 7 +++++++ packages/google-cloud-osconfig/protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 393b6c67653..054f440425c 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -14191,7 +14191,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 1909b83ad0c..a660a52c04c 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -36166,6 +36166,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -36176,6 +36177,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); @@ -43248,6 +43250,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -43352,6 +43355,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 939dd8af801..5dda780dd29 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -3973,7 +3973,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -4719,6 +4720,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From d282afbd234e71990ff0cd979182fd11b967d1e3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 08:33:33 -0700 Subject: [PATCH 104/154] build(nodejs): correct artifact name for npm (#156) feat: Update osconfig v1 and v1alpha RecurringSchedule.Frequency with DAILY frequency docs: add generated samples PiperOrigin-RevId: 404388044 PiperOrigin-RevId: 403998997 Source-Link: https://github.com/googleapis/googleapis/commit/4df8a3950f68130d8f911e5067a3b20a0f22991d Source-Link: https://github.com/googleapis/googleapis-gen/commit/0814549d4318d645fcca82205246cc860909c2f5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDgxNDU0OWQ0MzE4ZDY0NWZjY2E4MjIwNTI0NmNjODYwOTA5YzJmNSJ9 --- .../cloud/osconfig/v1/patch_deployments.proto | 4 + .../google-cloud-osconfig/protos/protos.d.ts | 3 +- .../google-cloud-osconfig/protos/protos.js | 7 ++ .../google-cloud-osconfig/protos/protos.json | 3 +- .../v1/os_config_service.cancel_patch_job.js | 52 +++++++++++ ..._config_service.create_patch_deployment.js | 69 +++++++++++++++ ..._config_service.delete_patch_deployment.js | 53 ++++++++++++ .../v1/os_config_service.execute_patch_job.js | 86 +++++++++++++++++++ .../os_config_service.get_patch_deployment.js | 53 ++++++++++++ .../v1/os_config_service.get_patch_job.js | 52 +++++++++++ ...s_config_service.list_patch_deployments.js | 65 ++++++++++++++ ...service.list_patch_job_instance_details.js | 72 ++++++++++++++++ .../v1/os_config_service.list_patch_jobs.js | 69 +++++++++++++++ .../os_config_zonal_service.get_inventory.js | 62 +++++++++++++ ..._zonal_service.get_vulnerability_report.js | 57 ++++++++++++ ...s_config_zonal_service.list_inventories.js | 76 ++++++++++++++++ ...onal_service.list_vulnerability_reports.js | 73 ++++++++++++++++ ...al_service.create_o_s_policy_assignment.js | 71 +++++++++++++++ ...al_service.delete_o_s_policy_assignment.js | 54 ++++++++++++ ...ce.get_instance_o_s_policies_compliance.js | 61 +++++++++++++ .../os_config_zonal_service.get_inventory.js | 63 ++++++++++++++ ...zonal_service.get_o_s_policy_assignment.js | 55 ++++++++++++ ..._zonal_service.get_vulnerability_report.js | 58 +++++++++++++ ....list_instance_o_s_policies_compliances.js | 74 ++++++++++++++++ ...s_config_zonal_service.list_inventories.js | 79 +++++++++++++++++ ...ce.list_o_s_policy_assignment_revisions.js | 67 +++++++++++++++ ...nal_service.list_o_s_policy_assignments.js | 65 ++++++++++++++ ...onal_service.list_vulnerability_reports.js | 76 ++++++++++++++++ ...al_service.update_o_s_policy_assignment.js | 58 +++++++++++++ .../src/v1/os_config_service_client.ts | 18 ++-- .../src/v1/os_config_zonal_service_client.ts | 12 ++- .../src/v1alpha/gapic_metadata.json | 2 +- .../v1alpha/os_config_zonal_service_client.ts | 34 +++++--- 33 files changed, 1680 insertions(+), 23 deletions(-) create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto index d8bb84a91e5..8cf85288297 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto @@ -118,6 +118,10 @@ message RecurringSchedule { // Indicates that the frequency should be expressed in terms of // months. MONTHLY = 2; + + // Indicates that the frequency should be expressed in terms of + // days. + DAILY = 3; } // Required. Defines the time zone that `time_of_day` is relative to. diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 054f440425c..7d25dee9d98 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -2239,7 +2239,8 @@ export namespace google { enum Frequency { FREQUENCY_UNSPECIFIED = 0, WEEKLY = 1, - MONTHLY = 2 + MONTHLY = 2, + DAILY = 3 } } diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index a660a52c04c..66c7a37ac70 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -5576,6 +5576,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.weekly != null && message.hasOwnProperty("weekly")) { @@ -5654,6 +5655,10 @@ case 2: message.frequency = 2; break; + case "DAILY": + case 3: + message.frequency = 3; + break; } if (object.weekly != null) { if (typeof object.weekly !== "object") @@ -5745,12 +5750,14 @@ * @property {number} FREQUENCY_UNSPECIFIED=0 FREQUENCY_UNSPECIFIED value * @property {number} WEEKLY=1 WEEKLY value * @property {number} MONTHLY=2 MONTHLY value + * @property {number} DAILY=3 DAILY value */ RecurringSchedule.Frequency = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "FREQUENCY_UNSPECIFIED"] = 0; values[valuesById[1] = "WEEKLY"] = 1; values[valuesById[2] = "MONTHLY"] = 2; + values[valuesById[3] = "DAILY"] = 3; return values; })(); diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 5dda780dd29..9e065a9a463 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -767,7 +767,8 @@ "values": { "FREQUENCY_UNSPECIFIED": 0, "WEEKLY": 1, - "MONTHLY": 2 + "MONTHLY": 2, + "DAILY": 3 } } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js new file mode 100644 index 00000000000..9d8c7811db0 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js @@ -0,0 +1,52 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigService_CancelPatchJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the patch in the form `projects/* /patchJobs/*` + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function cancelPatchJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.cancelPatchJob(request); + console.log(response); + } + + cancelPatchJob(); + // [END osconfig_v1_generated_OsConfigService_CancelPatchJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js new file mode 100644 index 00000000000..557c7f7316b --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, patchDeploymentId, patchDeployment) { + // [START osconfig_v1_generated_OsConfigService_CreatePatchDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project to apply this patch deployment to in the form + * `projects/*`. + */ + // const parent = 'abc123' + /** + * Required. A name for the patch deployment in the project. When creating a + * name the following rules apply: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + */ + // const patchDeploymentId = 'abc123' + /** + * Required. The patch deployment to create. + */ + // const patchDeployment = '' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function createPatchDeployment() { + // Construct request + const request = { + parent, + patchDeploymentId, + patchDeployment, + }; + + // Run request + const response = await osconfigClient.createPatchDeployment(request); + console.log(response); + } + + createPatchDeployment(); + // [END osconfig_v1_generated_OsConfigService_CreatePatchDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js new file mode 100644 index 00000000000..0d0b71ee146 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigService_DeletePatchDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function deletePatchDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.deletePatchDeployment(request); + console.log(response); + } + + deletePatchDeployment(); + // [END osconfig_v1_generated_OsConfigService_DeletePatchDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js new file mode 100644 index 00000000000..2449e8aeaba --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js @@ -0,0 +1,86 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, instanceFilter) { + // [START osconfig_v1_generated_OsConfigService_ExecutePatchJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project in which to run this patch in the form `projects/*` + */ + // const parent = 'abc123' + /** + * Description of the patch job. Length of the description is limited + * to 1024 characters. + */ + // const description = 'abc123' + /** + * Required. Instances to patch, either explicitly or filtered by some + * criteria such as zone or labels. + */ + // const instanceFilter = '' + /** + * Patch configuration being applied. If omitted, instances are + * patched using the default configurations. + */ + // const patchConfig = '' + /** + * Duration of the patch job. After the duration ends, the patch job + * times out. + */ + // const duration = '' + /** + * If this patch is a dry-run only, instances are contacted but + * will do nothing. + */ + // const dryRun = true + /** + * Display name for this patch job. This does not have to be unique. + */ + // const displayName = 'abc123' + /** + * Rollout strategy of the patch job. + */ + // const rollout = '' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function executePatchJob() { + // Construct request + const request = { + parent, + instanceFilter, + }; + + // Run request + const response = await osconfigClient.executePatchJob(request); + console.log(response); + } + + executePatchJob(); + // [END osconfig_v1_generated_OsConfigService_ExecutePatchJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js new file mode 100644 index 00000000000..bb1b4422be6 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigService_GetPatchDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function getPatchDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getPatchDeployment(request); + console.log(response); + } + + getPatchDeployment(); + // [END osconfig_v1_generated_OsConfigService_GetPatchDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js new file mode 100644 index 00000000000..cb3d0222cbb --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js @@ -0,0 +1,52 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigService_GetPatchJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the patch in the form `projects/* /patchJobs/*` + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function getPatchJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getPatchJob(request); + console.log(response); + } + + getPatchJob(); + // [END osconfig_v1_generated_OsConfigService_GetPatchJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js new file mode 100644 index 00000000000..5eb0b0f4420 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1_generated_OsConfigService_ListPatchDeployments_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent in the form `projects/*`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of patch deployments to return. Default is + * 100. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous call to + * ListPatchDeployments that indicates where this listing should continue + * from. + */ + // const pageToken = 'abc123' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function listPatchDeployments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listPatchDeploymentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listPatchDeployments(); + // [END osconfig_v1_generated_OsConfigService_ListPatchDeployments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js new file mode 100644 index 00000000000..a714072a02d --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js @@ -0,0 +1,72 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent for the instances are in the form of + * `projects/* /patchJobs/*`. + */ + // const parent = 'abc123' + /** + * The maximum number of instance details records to return. Default is 100. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + */ + // const pageToken = 'abc123' + /** + * A filter expression that filters results listed in the response. This + * field supports filtering results by instance zone, name, state, or + * `failure_reason`. + */ + // const filter = 'abc123' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function listPatchJobInstanceDetails() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listPatchJobInstanceDetailsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + listPatchJobInstanceDetails(); + // [END osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js new file mode 100644 index 00000000000..6f893a63333 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1_generated_OsConfigService_ListPatchJobs_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. In the form of `projects/*` + */ + // const parent = 'abc123' + /** + * The maximum number of instance status to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + */ + // const pageToken = 'abc123' + /** + * If provided, this field specifies the criteria that must be met by patch + * jobs to be included in the response. + * Currently, filtering is only available on the patch_deployment field. + */ + // const filter = 'abc123' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function listPatchJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listPatchJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listPatchJobs(); + // [END osconfig_v1_generated_OsConfigService_ListPatchJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js new file mode 100644 index 00000000000..9b7b12a1c52 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js @@ -0,0 +1,62 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigZonalService_GetInventory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. API resource name for inventory resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + */ + // const name = 'abc123' + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + */ + // const view = '' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function getInventory() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getInventory(request); + console.log(response); + } + + getInventory(); + // [END osconfig_v1_generated_OsConfigZonalService_GetInventory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js new file mode 100644 index 00000000000..3484f283c0c --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js @@ -0,0 +1,57 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. API resource name for vulnerability resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function getVulnerabilityReport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getVulnerabilityReport(request); + console.log(response); + } + + getVulnerabilityReport(); + // [END osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js new file mode 100644 index 00000000000..cc8db8fad94 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1_generated_OsConfigZonalService_ListInventories_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + */ + // const parent = 'abc123' + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + */ + // const view = '' + /** + * The maximum number of results to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + */ + // const pageToken = 'abc123' + /** + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + */ + // const filter = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function listInventories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listInventoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listInventories(); + // [END osconfig_v1_generated_OsConfigZonalService_ListInventories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js new file mode 100644 index 00000000000..dbb069499e9 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js @@ -0,0 +1,73 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + */ + // const parent = 'abc123' + /** + * The maximum number of results to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + */ + // const pageToken = 'abc123' + /** + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + */ + // const filter = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function listVulnerabilityReports() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listVulnerabilityReportsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + listVulnerabilityReports(); + // [END osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js new file mode 100644 index 00000000000..bc798db177b --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js @@ -0,0 +1,71 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, osPolicyAssignment, osPolicyAssignmentId) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_CreateOSPolicyAssignment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name in the form: + * projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Required. The OS policy assignment to be created. + */ + // const osPolicyAssignment = '' + /** + * Required. The logical name of the OS policy assignment in the project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + */ + // const osPolicyAssignmentId = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function createOSPolicyAssignment() { + // Construct request + const request = { + parent, + osPolicyAssignment, + osPolicyAssignmentId, + }; + + // Run request + const [operation] = await osconfigClient.createOSPolicyAssignment(request); + const [response] = await operation.promise(); + console.log(response); + } + + createOSPolicyAssignment(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_CreateOSPolicyAssignment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js new file mode 100644 index 00000000000..07ba72fe87e --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the OS policy assignment to be deleted + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function deleteOSPolicyAssignment() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await osconfigClient.deleteOSPolicyAssignment(request); + const [response] = await operation.promise(); + console.log(response); + } + + deleteOSPolicyAssignment(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js new file mode 100644 index 00000000000..d54be2abd86 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_GetInstanceOSPoliciesCompliance_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. API resource name for instance OS policies compliance resource. + * Format: + * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` + * For `{project}`, either Compute Engine project-number or project-id can be + * provided. + * For `{instance}`, either Compute Engine VM instance-id or instance-name can + * be provided. + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function getInstanceOSPoliciesCompliance() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getInstanceOSPoliciesCompliance( + request + ); + console.log(response); + } + + getInstanceOSPoliciesCompliance(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_GetInstanceOSPoliciesCompliance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js new file mode 100644 index 00000000000..68f47e1464e --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js @@ -0,0 +1,63 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_GetInventory_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. API resource name for inventory resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + */ + // const name = 'abc123' + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + */ + // const view = '' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function getInventory() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getInventory(request); + console.log(response); + } + + getInventory(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_GetInventory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js new file mode 100644 index 00000000000..68d3c18016f --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of OS policy assignment. + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function getOSPolicyAssignment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getOSPolicyAssignment(request); + console.log(response); + } + + getOSPolicyAssignment(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js new file mode 100644 index 00000000000..895ce54270e --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_GetVulnerabilityReport_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. API resource name for vulnerability resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function getVulnerabilityReport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getVulnerabilityReport(request); + console.log(response); + } + + getVulnerabilityReport(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_GetVulnerabilityReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js new file mode 100644 index 00000000000..f25d1b383bd --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js @@ -0,0 +1,74 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_ListInstanceOSPoliciesCompliances_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}` + * For `{project}`, either Compute Engine project-number or project-id can be + * provided. + */ + // const parent = 'abc123' + /** + * The maximum number of results to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call to + * `ListInstanceOSPoliciesCompliances` that indicates where this listing + * should continue from. + */ + // const pageToken = 'abc123' + /** + * If provided, this field specifies the criteria that must be met by a + * `InstanceOSPoliciesCompliance` API resource to be included in the response. + */ + // const filter = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function listInstanceOSPoliciesCompliances() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = + await osconfigClient.listInstanceOSPoliciesCompliancesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listInstanceOSPoliciesCompliances(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_ListInstanceOSPoliciesCompliances_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js new file mode 100644 index 00000000000..c8b0ce0421c --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js @@ -0,0 +1,79 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_ListInventories_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * For `{project}`, either `project-number` or `project-id` can be + * provided. For `{instance}`, only hyphen or dash character is supported to + * list inventories across VMs. + */ + // const parent = 'abc123' + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + */ + // const view = '' + /** + * The maximum number of results to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + */ + // const pageToken = 'abc123' + /** + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + */ + // const filter = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function listInventories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listInventoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listInventories(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_ListInventories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js new file mode 100644 index 00000000000..f60d1a2f4ec --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js @@ -0,0 +1,67 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the OS policy assignment to list revisions for. + */ + // const name = 'abc123' + /** + * The maximum number of revisions to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + */ + // const pageToken = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function listOSPolicyAssignmentRevisions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await osconfigClient.listOSPolicyAssignmentRevisionsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + listOSPolicyAssignmentRevisions(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js new file mode 100644 index 00000000000..fefdbb64156 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignments_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + */ + // const parent = 'abc123' + /** + * The maximum number of assignments to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + */ + // const pageToken = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function listOSPolicyAssignments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listOSPolicyAssignmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listOSPolicyAssignments(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js new file mode 100644 index 00000000000..a09df075ea7 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_ListVulnerabilityReports_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/{instance}` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, only `-` character is supported to list vulnerability + * reports across VMs. + */ + // const parent = 'abc123' + /** + * The maximum number of results to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + */ + // const pageToken = 'abc123' + /** + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + */ + // const filter = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function listVulnerabilityReports() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listVulnerabilityReportsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + listVulnerabilityReports(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_ListVulnerabilityReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js new file mode 100644 index 00000000000..09223663bc5 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(osPolicyAssignment) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The updated OS policy assignment. + */ + // const osPolicyAssignment = '' + /** + * Optional. Field mask that controls which fields of the assignment should be updated. + */ + // const updateMask = '' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = + require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function updateOSPolicyAssignment() { + // Construct request + const request = { + osPolicyAssignment, + }; + + // Run request + const [operation] = await osconfigClient.updateOSPolicyAssignment(request); + const [response] = await operation.promise(); + console.log(response); + } + + updateOSPolicyAssignment(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 77678b9fb40..ba4e5fbbad5 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -1049,7 +1049,8 @@ export class OsConfigServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listPatchJobs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPatchJobs.createStream( this.innerApiCalls.listPatchJobs as gax.GaxCall, @@ -1104,7 +1105,8 @@ export class OsConfigServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listPatchJobs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPatchJobs.asyncIterate( this.innerApiCalls['listPatchJobs'] as GaxCall, @@ -1261,7 +1263,8 @@ export class OsConfigServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPatchJobInstanceDetails.createStream( this.innerApiCalls.listPatchJobInstanceDetails as gax.GaxCall, @@ -1317,7 +1320,8 @@ export class OsConfigServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPatchJobInstanceDetails.asyncIterate( this.innerApiCalls['listPatchJobInstanceDetails'] as GaxCall, @@ -1464,7 +1468,8 @@ export class OsConfigServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listPatchDeployments']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPatchDeployments.createStream( this.innerApiCalls.listPatchDeployments as gax.GaxCall, @@ -1517,7 +1522,8 @@ export class OsConfigServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listPatchDeployments']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPatchDeployments.asyncIterate( this.innerApiCalls['listPatchDeployments'] as GaxCall, diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts index e058f3f25e0..24c218fcc1e 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -696,7 +696,8 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listInventories']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInventories.createStream( this.innerApiCalls.listInventories as gax.GaxCall, @@ -758,7 +759,8 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listInventories']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInventories.asyncIterate( this.innerApiCalls['listInventories'] as GaxCall, @@ -921,7 +923,8 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listVulnerabilityReports']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVulnerabilityReports.createStream( this.innerApiCalls.listVulnerabilityReports as gax.GaxCall, @@ -980,7 +983,8 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listVulnerabilityReports']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVulnerabilityReports.asyncIterate( this.innerApiCalls['listVulnerabilityReports'] as GaxCall, diff --git a/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json b/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json index e96d954fe16..9b8221378b1 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json +++ b/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json @@ -3,7 +3,7 @@ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", "language": "typescript", "protoPackage": "google.cloud.osconfig.v1alpha", - "libraryPackage": "@google-cloud/osconfig", + "libraryPackage": "@google-cloud/os-config", "services": { "OsConfigZonalService": { "clients": { diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index fbb93206e80..1fa372f058c 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -1469,7 +1469,8 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listOSPolicyAssignments']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignments.createStream( this.innerApiCalls.listOSPolicyAssignments as gax.GaxCall, @@ -1521,7 +1522,8 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listOSPolicyAssignments']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignments.asyncIterate( this.innerApiCalls['listOSPolicyAssignments'] as GaxCall, @@ -1670,7 +1672,9 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ name: request.name || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = + this._defaults['listOSPolicyAssignmentRevisions']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.createStream( this.innerApiCalls.listOSPolicyAssignmentRevisions as gax.GaxCall, @@ -1722,7 +1726,9 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = + this._defaults['listOSPolicyAssignmentRevisions']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate( this.innerApiCalls['listOSPolicyAssignmentRevisions'] as GaxCall, @@ -1888,7 +1894,9 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = + this._defaults['listInstanceOSPoliciesCompliances']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInstanceOSPoliciesCompliances.createStream( this.innerApiCalls.listInstanceOSPoliciesCompliances as gax.GaxCall, @@ -1948,7 +1956,9 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = + this._defaults['listInstanceOSPoliciesCompliances']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInstanceOSPoliciesCompliances.asyncIterate( this.innerApiCalls['listInstanceOSPoliciesCompliances'] as GaxCall, @@ -2117,7 +2127,8 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listInventories']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInventories.createStream( this.innerApiCalls.listInventories as gax.GaxCall, @@ -2181,7 +2192,8 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listInventories']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInventories.asyncIterate( this.innerApiCalls['listInventories'] as GaxCall, @@ -2348,7 +2360,8 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listVulnerabilityReports']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVulnerabilityReports.createStream( this.innerApiCalls.listVulnerabilityReports as gax.GaxCall, @@ -2409,7 +2422,8 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listVulnerabilityReports']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVulnerabilityReports.asyncIterate( this.innerApiCalls['listVulnerabilityReports'] as GaxCall, From 088d15e477eac812a79d100e87dc46262324d7e0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 15:42:17 +0000 Subject: [PATCH 105/154] chore: release 1.10.0 (#157) :robot: I have created a release \*beep\* \*boop\* --- ## [1.10.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.9.1...v1.10.0) (2021-10-20) ### Features * Update osconfig v1 and v1alpha RecurringSchedule.Frequency with DAILY frequency ([0a79eba](https://www.github.com/googleapis/nodejs-os-config/commit/0a79eba9f2a3e0939a74c9aa437b8890801ebd2a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 5f5023abb30..7722d37c5ca 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.10.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.9.1...v1.10.0) (2021-10-20) + + +### Features + +* Update osconfig v1 and v1alpha RecurringSchedule.Frequency with DAILY frequency ([0a79eba](https://www.github.com/googleapis/nodejs-os-config/commit/0a79eba9f2a3e0939a74c9aa437b8890801ebd2a)) + ### [1.9.1](https://www.github.com/googleapis/nodejs-os-config/compare/v1.9.0...v1.9.1) (2021-09-09) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 07d0c214539..0913ce513c5 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.9.1", + "version": "1.10.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index e10e08119b9..272fc4ebf37 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.9.1" + "@google-cloud/os-config": "^1.10.0" }, "devDependencies": { "c8": "^7.1.0", From 4b03d83b53fd5e09641490fa55c105cb416fbf7e Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 11:24:44 -0700 Subject: [PATCH 106/154] chore: fix the wrong post processor image (#159) --- packages/google-cloud-osconfig/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/.github/.OwlBot.yaml b/packages/google-cloud-osconfig/.github/.OwlBot.yaml index d09c53c9a0c..e525106dca3 100644 --- a/packages/google-cloud-osconfig/.github/.OwlBot.yaml +++ b/packages/google-cloud-osconfig/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging From 674461ef15c986df1d02932c3ead4d4949729b14 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 22:34:18 +0200 Subject: [PATCH 107/154] chore(deps): update dependency @types/node to v16 (#158) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.0.0` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.17.32/16.11.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/compatibility-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/confidence-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 0913ce513c5..2f50d66789c 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.0", - "@types/node": "^14.0.0", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.1.2", "gts": "^3.0.0", From da3b4fac5c737bb7eb00c9284c2f684c9f699ecf Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 4 Nov 2021 11:50:25 -0400 Subject: [PATCH 108/154] chore(cloud-rad): delete api-extractor config (#162) --- .../google-cloud-osconfig/api-extractor.json | 369 ------------------ 1 file changed, 369 deletions(-) delete mode 100644 packages/google-cloud-osconfig/api-extractor.json diff --git a/packages/google-cloud-osconfig/api-extractor.json b/packages/google-cloud-osconfig/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/packages/google-cloud-osconfig/api-extractor.json +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/protos/protos.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we can specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - */ - "bundledPackages": [ ], - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true, - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/etc/" - */ - // "reportFolder": "/etc/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/" - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true, - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": true, - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning", - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - }, - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - }, - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } - -} From 4108c4f0d28a572deb67539e697dd9cad2e7d019 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:44:31 +0100 Subject: [PATCH 109/154] chore(deps): update dependency sinon to v12 (#161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 2f50d66789c..09534189ca2 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -42,7 +42,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.0.0", "typescript": "~3.8.3" }, From 1bb0f8426a1be8702f9fe3623641856de3016b37 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:58:20 +0000 Subject: [PATCH 110/154] docs(samples): add example tags to generated samples (#163) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 --- .../linkinator.config.json | 2 +- .../google/cloud/osconfig/v1/os_policy.proto | 548 + .../v1/os_policy_assignment_reports.proto | 296 + .../osconfig/v1/os_policy_assignments.proto | 386 + .../cloud/osconfig/v1/osconfig_service.proto | 18 +- .../osconfig/v1/osconfig_zonal_service.proto | 138 +- .../google-cloud-osconfig/protos/protos.d.ts | 5077 ++++++- .../google-cloud-osconfig/protos/protos.js | 12391 +++++++++++++++- .../google-cloud-osconfig/protos/protos.json | 1310 +- .../v1/os_config_service.cancel_patch_job.js | 4 +- ..._config_service.create_patch_deployment.js | 6 +- ..._config_service.delete_patch_deployment.js | 4 +- .../v1/os_config_service.execute_patch_job.js | 12 +- .../os_config_service.get_patch_deployment.js | 4 +- .../v1/os_config_service.get_patch_job.js | 4 +- ...s_config_service.list_patch_deployments.js | 4 +- ...service.list_patch_job_instance_details.js | 4 +- .../v1/os_config_service.list_patch_jobs.js | 4 +- ...al_service.create_o_s_policy_assignment.js | 70 + ...al_service.delete_o_s_policy_assignment.js | 53 + .../os_config_zonal_service.get_inventory.js | 6 +- ...zonal_service.get_o_s_policy_assignment.js | 54 + ...ervice.get_o_s_policy_assignment_report.js | 58 + ..._zonal_service.get_vulnerability_report.js | 4 +- ...s_config_zonal_service.list_inventories.js | 6 +- ...vice.list_o_s_policy_assignment_reports.js | 88 + ...ce.list_o_s_policy_assignment_revisions.js | 66 + ...nal_service.list_o_s_policy_assignments.js | 64 + ...onal_service.list_vulnerability_reports.js | 4 +- ...al_service.update_o_s_policy_assignment.js | 58 + ...al_service.create_o_s_policy_assignment.js | 6 +- ...al_service.delete_o_s_policy_assignment.js | 4 +- ...ce.get_instance_o_s_policies_compliance.js | 4 +- .../os_config_zonal_service.get_inventory.js | 6 +- ...zonal_service.get_o_s_policy_assignment.js | 4 +- ..._zonal_service.get_vulnerability_report.js | 4 +- ....list_instance_o_s_policies_compliances.js | 4 +- ...s_config_zonal_service.list_inventories.js | 6 +- ...ce.list_o_s_policy_assignment_revisions.js | 4 +- ...nal_service.list_o_s_policy_assignments.js | 4 +- ...onal_service.list_vulnerability_reports.js | 4 +- ...al_service.update_o_s_policy_assignment.js | 8 +- .../src/v1/gapic_metadata.json | 92 + .../src/v1/os_config_service_client.ts | 608 +- .../src/v1/os_config_service_proto_list.json | 3 + .../src/v1/os_config_zonal_service_client.ts | 1774 ++- ...os_config_zonal_service_client_config.json | 40 + .../os_config_zonal_service_proto_list.json | 3 + .../v1alpha/os_config_zonal_service_client.ts | 764 +- .../test/gapic_os_config_service_v1.ts | 172 + .../test/gapic_os_config_zonal_service_v1.ts | 2198 ++- 51 files changed, 25380 insertions(+), 1075 deletions(-) create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignments.proto create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js diff --git a/packages/google-cloud-osconfig/linkinator.config.json b/packages/google-cloud-osconfig/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-osconfig/linkinator.config.json +++ b/packages/google-cloud-osconfig/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto new file mode 100644 index 00000000000..a07e251f6b9 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto @@ -0,0 +1,548 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "OsPolicyProto"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// An OS policy defines the desired state configuration for a VM. +message OSPolicy { + // Filtering criteria to select VMs based on inventory details. + message InventoryFilter { + // Required. The OS short name + string os_short_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The OS version + // + // Prefix matches are supported if asterisk(*) is provided as the + // last character. For example, to match all versions with a major + // version of `7`, specify the following value for this field `7.*` + // + // An empty string matches all OS versions. + string os_version = 2; + } + + // An OS policy resource is used to define the desired state configuration + // and provides a specific functionality like installing/removing packages, + // executing a script etc. + // + // The system ensures that resources are always in their desired state by + // taking necessary actions if they have drifted from their desired state. + message Resource { + // A remote or local file. + message File { + // Specifies a file available via some URI. + message Remote { + // Required. URI from which to fetch the object. It should contain both + // the protocol and path following the format `{protocol}://{location}`. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // SHA256 checksum of the remote file. + string sha256_checksum = 2; + } + + // Specifies a file available as a Cloud Storage Object. + message Gcs { + // Required. Bucket of the Cloud Storage object. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Cloud Storage object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Generation number of the Cloud Storage object. + int64 generation = 3; + } + + // A specific type of file. + oneof type { + // A generic remote file. + Remote remote = 1; + + // A Cloud Storage object. + Gcs gcs = 2; + + // A local path within the VM to use. + string local_path = 3; + } + + // Defaults to false. When false, files are subject to validations + // based on the file type: + // + // Remote: A checksum must be specified. + // Cloud Storage: An object generation number must be specified. + bool allow_insecure = 4; + } + + // A resource that manages a system package. + message PackageResource { + // A deb package file. dpkg packages only support INSTALLED state. + message Deb { + // Required. A deb package. + File source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Whether dependencies should also be installed. + // - install when false: `dpkg -i package` + // - install when true: `apt-get update && apt-get -y install + // package.deb` + bool pull_deps = 2; + } + + // A package managed by APT. + // - install: `apt-get update && apt-get -y install [name]` + // - remove: `apt-get -y remove [name]` + message APT { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // An RPM package file. RPM packages only support INSTALLED state. + message RPM { + // Required. An rpm package. + File source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Whether dependencies should also be installed. + // - install when false: `rpm --upgrade --replacepkgs package.rpm` + // - install when true: `yum -y install package.rpm` or + // `zypper -y install package.rpm` + bool pull_deps = 2; + } + + // A package managed by YUM. + // - install: `yum -y install package` + // - remove: `yum -y remove package` + message YUM { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A package managed by Zypper. + // - install: `zypper -y install package` + // - remove: `zypper -y rm package` + message Zypper { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A package managed by GooGet. + // - install: `googet -noconfirm install package` + // - remove: `googet -noconfirm remove package` + message GooGet { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // An MSI package. MSI packages only support INSTALLED state. + message MSI { + // Required. The MSI package. + File source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Additional properties to use during installation. + // This should be in the format of Property=Setting. + // Appended to the defaults of `ACTION=INSTALL + // REBOOT=ReallySuppress`. + repeated string properties = 2; + } + + // The desired state that the OS Config agent maintains on the VM. + enum DesiredState { + // Unspecified is invalid. + DESIRED_STATE_UNSPECIFIED = 0; + + // Ensure that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is not installed and + // uninstalls it if detected. + REMOVED = 2; + } + + // Required. The desired state the agent should maintain for this package. + DesiredState desired_state = 1 [(google.api.field_behavior) = REQUIRED]; + + // A system package. + oneof system_package { + // A package managed by Apt. + APT apt = 2; + + // A deb package file. + Deb deb = 3; + + // A package managed by YUM. + YUM yum = 4; + + // A package managed by Zypper. + Zypper zypper = 5; + + // An rpm package file. + RPM rpm = 6; + + // A package managed by GooGet. + GooGet googet = 7; + + // An MSI package. + MSI msi = 8; + } + } + + // A resource that manages a package repository. + message RepositoryResource { + // Represents a single apt package repository. These will be added to + // a repo file that will be managed at + // `/etc/apt/sources.list.d/google_osconfig.list`. + message AptRepository { + // Type of archive. + enum ArchiveType { + // Unspecified is invalid. + ARCHIVE_TYPE_UNSPECIFIED = 0; + + // Deb indicates that the archive contains binary files. + DEB = 1; + + // Deb-src indicates that the archive contains source files. + DEB_SRC = 2; + } + + // Required. Type of archive files in this repository. + ArchiveType archive_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URI for this repository. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Distribution of this repository. + string distribution = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of components for this repository. Must contain at + // least one item. + repeated string components = 4 [(google.api.field_behavior) = REQUIRED]; + + // URI of the key file for this repository. The agent maintains a + // keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. + string gpg_key = 5; + } + + // Represents a single yum package repository. These are added to a + // repo file that is managed at + // `/etc/yum.repos.d/google_osconfig.repo`. + message YumRepository { + // Required. A one word, unique name for this repository. This is the + // `repo id` in the yum config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique + // identifier when checking for resource conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; + } + + // Represents a single zypper package repository. These are added to a + // repo file that is managed at + // `/etc/zypp/repos.d/google_osconfig.repo`. + message ZypperRepository { + // Required. A one word, unique name for this repository. This is the + // `repo id` in the zypper config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique + // identifier when checking for GuestPolicy conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; + } + + // Represents a Goo package repository. These are added to a repo file + // that is managed at + // `C:/ProgramData/GooGet/repos/google_osconfig.repo`. + message GooRepository { + // Required. The name of the repository. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The url of the repository. + string url = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A specific type of repository. + oneof repository { + // An Apt Repository. + AptRepository apt = 1; + + // A Yum Repository. + YumRepository yum = 2; + + // A Zypper Repository. + ZypperRepository zypper = 3; + + // A Goo Repository. + GooRepository goo = 4; + } + } + + // A resource that allows executing scripts on the VM. + // + // The `ExecResource` has 2 stages: `validate` and `enforce` and both stages + // accept a script as an argument to execute. + // + // When the `ExecResource` is applied by the agent, it first executes the + // script in the `validate` stage. The `validate` stage can signal that the + // `ExecResource` is already in the desired state by returning an exit code + // of `100`. If the `ExecResource` is not in the desired state, it should + // return an exit code of `101`. Any other exit code returned by this stage + // is considered an error. + // + // If the `ExecResource` is not in the desired state based on the exit code + // from the `validate` stage, the agent proceeds to execute the script from + // the `enforce` stage. If the `ExecResource` is already in the desired + // state, the `enforce` stage will not be run. + // Similar to `validate` stage, the `enforce` stage should return an exit + // code of `100` to indicate that the resource in now in its desired state. + // Any other exit code is considered an error. + // + // NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to + // have an explicit indicator of `in desired state`, `not in desired state` + // and errors. Because, for example, Powershell will always return an exit + // code of `0` unless an `exit` statement is provided in the script. So, for + // reasons of consistency and being explicit, exit codes `100` and `101` + // were chosen. + message ExecResource { + // A file or script to execute. + message Exec { + // The interpreter to use. + enum Interpreter { + // Defaults to NONE. + INTERPRETER_UNSPECIFIED = 0; + + // If an interpreter is not specified, the + // source is executed directly. This execution, without an + // interpreter, only succeeds for executables and scripts that have shebang lines. + NONE = 1; + + // Indicates that the script runs with `/bin/sh` on Linux and + // `cmd.exe` on Windows. + SHELL = 2; + + // Indicates that the script runs with PowerShell. + POWERSHELL = 3; + } + + // What to execute. + oneof source { + // A remote or local file. + File file = 1; + + // An inline script. + // The size of the script is limited to 1024 characters. + string script = 2; + } + + // Optional arguments to pass to the source during execution. + repeated string args = 3; + + // Required. The script interpreter to use. + Interpreter interpreter = 4 [(google.api.field_behavior) = REQUIRED]; + + // Only recorded for enforce Exec. + // Path to an output file (that is created by this Exec) whose + // content will be recorded in OSPolicyResourceCompliance after a + // successful run. Absence or failure to read this file will result in + // this ExecResource being non-compliant. Output file size is limited to + // 100K bytes. + string output_file_path = 5; + } + + // Required. What to run to validate this resource is in the desired + // state. An exit code of 100 indicates "in desired state", and exit code + // of 101 indicates "not in desired state". Any other exit code indicates + // a failure running validate. + Exec validate = 1 [(google.api.field_behavior) = REQUIRED]; + + // What to run to bring this resource into the desired state. + // An exit code of 100 indicates "success", any other exit code indicates + // a failure running enforce. + Exec enforce = 2; + } + + // A resource that manages the state of a file. + message FileResource { + // Desired state of the file. + enum DesiredState { + // Unspecified is invalid. + DESIRED_STATE_UNSPECIFIED = 0; + + // Ensure file at path is present. + PRESENT = 1; + + // Ensure file at path is absent. + ABSENT = 2; + + // Ensure the contents of the file at path matches. If the file does + // not exist it will be created. + CONTENTS_MATCH = 3; + } + + // The source for the contents of the file. + oneof source { + // A remote or local source. + File file = 1; + + // A a file with this content. + // The size of the content is limited to 1024 characters. + string content = 2; + } + + // Required. The absolute path of the file within the VM. + string path = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Desired state of the file. + DesiredState state = 4 [(google.api.field_behavior) = REQUIRED]; + + // Consists of three octal digits which represent, in + // order, the permissions of the owner, group, and other users for the + // file (similarly to the numeric mode used in the linux chmod + // utility). Each digit represents a three bit number with the 4 bit + // corresponding to the read permissions, the 2 bit corresponds to the + // write bit, and the one bit corresponds to the execute permission. + // Default behavior is 755. + // + // Below are some examples of permissions and their associated values: + // read, write, and execute: 7 + // read and execute: 5 + // read and write: 6 + // read only: 4 + string permissions = 5; + } + + // Required. The id of the resource with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the OS policy. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Resource type. + oneof resource_type { + // Package resource + PackageResource pkg = 2; + + // Package repository resource + RepositoryResource repository = 3; + + // Exec resource + ExecResource exec = 4; + + // File resource + FileResource file = 5; + } + } + + // Resource groups provide a mechanism to group OS policy resources. + // + // Resource groups enable OS policy authors to create a single OS policy + // to be applied to VMs running different operating Systems. + // + // When the OS policy is applied to a target VM, the appropriate resource + // group within the OS policy is selected based on the `OSFilter` specified + // within the resource group. + message ResourceGroup { + // List of inventory filters for the resource group. + // + // The resources in this resource group are applied to the target VM if it + // satisfies at least one of the following inventory filters. + // + // For example, to apply this resource group to VMs running either `RHEL` or + // `CentOS` operating systems, specify 2 items for the list with following + // values: + // inventory_filters[0].os_short_name='rhel' and + // inventory_filters[1].os_short_name='centos' + // + // If the list is empty, this resource group will be applied to the target + // VM unconditionally. + repeated InventoryFilter inventory_filters = 1; + + // Required. List of resources configured for this resource group. + // The resources are executed in the exact order specified here. + repeated Resource resources = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Policy mode + enum Mode { + // Invalid mode + MODE_UNSPECIFIED = 0; + + // This mode checks if the configuration resources in the policy are in + // their desired state. No actions are performed if they are not in the + // desired state. This mode is used for reporting purposes. + VALIDATION = 1; + + // This mode checks if the configuration resources in the policy are in + // their desired state, and if not, enforces the desired state. + ENFORCEMENT = 2; + } + + // Required. The id of the OS policy with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the assignment. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Policy description. + // Length of the description is limited to 1024 characters. + string description = 2; + + // Required. Policy mode + Mode mode = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of resource groups for the policy. + // For a particular VM, resource groups are evaluated in the order specified + // and the first resource group that is applicable is selected and the rest + // are ignored. + // + // If none of the resource groups are applicable for a VM, the VM is + // considered to be non-compliant w.r.t this policy. This behavior can be + // toggled by the flag `allow_no_resource_group_match` + repeated ResourceGroup resource_groups = 4 + [(google.api.field_behavior) = REQUIRED]; + + // This flag determines the OS policy compliance status when none of the + // resource groups within the policy are applicable for a VM. Set this value + // to `true` if the policy needs to be reported as compliant even if the + // policy has nothing to validate or enforce. + bool allow_no_resource_group_match = 5; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto new file mode 100644 index 00000000000..f610fc5a884 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto @@ -0,0 +1,296 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "OSPolicyAssignmentReportsProto"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; +option (google.api.resource_definition) = { + type: "osconfig.googleapis.com/InstanceOSPolicyAssignment" + pattern: "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}" +}; + +// Get a report of the OS policy assignment for a VM instance. +message GetOSPolicyAssignmentReportRequest { + // Required. API resource name for OS policy assignment report. + // + // Format: + // `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + // can be provided. + // For `{assignment_id}`, the OSPolicyAssignment id must be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignmentReport" + } + ]; +} + +// List the OS policy assignment reports for VM instances. +message ListOSPolicyAssignmentReportsRequest { + // Required. The parent resource name. + // + // Format: + // `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + // provided. If '-' is provided, the response will include + // OSPolicyAssignmentReports for all instances in the project/location. + // For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + // is provided, the response will include OSPolicyAssignmentReports for all + // OSPolicyAssignments in the project/location. + // Either {instance} or {assignment} must be `-`. + // + // For example: + // `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + // returns all reports for the instance + // `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + // returns all the reports for the given assignment across all instances. + // `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + // returns all the reports for all assignments across all instances. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/InstanceOSPolicyAssignment" + } + ]; + + // The maximum number of results to return. + int32 page_size = 2; + + // If provided, this field specifies the criteria that must be met by the + // `OSPolicyAssignmentReport` API resource that is included in the response. + string filter = 3; + + // A pagination token returned from a previous call to the + // `ListOSPolicyAssignmentReports` method that indicates where this listing + // should continue from. + string page_token = 4; +} + +// A response message for listing OS Policy assignment reports including the +// page of results and page token. +message ListOSPolicyAssignmentReportsResponse { + // List of OS policy assignment reports. + repeated OSPolicyAssignmentReport os_policy_assignment_reports = 1; + + // The pagination token to retrieve the next page of OS policy assignment + // report objects. + string next_page_token = 2; +} + +// A report of the OS policy assignment status for a given instance. +message OSPolicyAssignmentReport { + option (google.api.resource) = { + type: "osconfig.googleapis.com/OSPolicyAssignmentReport" + pattern: "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report" + }; + + // Compliance data for an OS policy + message OSPolicyCompliance { + // Compliance data for an OS policy resource. + message OSPolicyResourceCompliance { + // Step performed by the OS Config agent for configuring an + // `OSPolicy` resource to its desired state. + message OSPolicyResourceConfigStep { + // Supported configuration step types + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // Checks for resource conflicts such as schema errors. + VALIDATION = 1; + + // Checks the current status of the desired state for a resource. + DESIRED_STATE_CHECK = 2; + + // Enforces the desired state for a resource that is not in desired + // state. + DESIRED_STATE_ENFORCEMENT = 3; + + // Re-checks the status of the desired state. This check is done + // for a resource after the enforcement of all OS policies. + // + // This step is used to determine the final desired state status for + // the resource. It accounts for any resources that might have drifted + // from their desired state due to side effects from executing other + // resources. + DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + } + + // Configuration step type. + Type type = 1; + + // An error message recorded during the execution of this step. + // Only populated if errors were encountered during this step execution. + string error_message = 2; + } + + // ExecResource specific output. + message ExecResourceOutput { + // Output from enforcement phase output file (if run). + // Output size is limited to 100K bytes. + bytes enforcement_output = 2; + } + + // Possible compliance states for a resource. + enum ComplianceState { + // The resource is in an unknown compliance state. + // + // To get more details about why the policy is in this state, review + // the output of the `compliance_state_reason` field. + UNKNOWN = 0; + + // Resource is compliant. + COMPLIANT = 1; + + // Resource is non-compliant. + NON_COMPLIANT = 2; + } + + // The ID of the OS policy resource. + string os_policy_resource_id = 1; + + // Ordered list of configuration completed by the agent for the OS policy + // resource. + repeated OSPolicyResourceConfigStep config_steps = 2; + + // The compliance state of the resource. + ComplianceState compliance_state = 3; + + // A reason for the resource to be in the given compliance state. + // This field is always populated when `compliance_state` is `UNKNOWN`. + // + // The following values are supported when `compliance_state == UNKNOWN` + // + // * `execution-errors`: Errors were encountered by the agent while + // executing the resource and the compliance state couldn't be + // determined. + // * `execution-skipped-by-agent`: Resource execution was skipped by the + // agent because errors were encountered while executing prior resources + // in the OS policy. + // * `os-policy-execution-attempt-failed`: The execution of the OS policy + // containing this resource failed and the compliance state couldn't be + // determined. + string compliance_state_reason = 4; + + // Resource specific output. + oneof output { + // ExecResource specific output. + ExecResourceOutput exec_resource_output = 5; + } + } + + // Possible compliance states for an os policy. + enum ComplianceState { + // The policy is in an unknown compliance state. + // + // Refer to the field `compliance_state_reason` to learn the exact reason + // for the policy to be in this compliance state. + UNKNOWN = 0; + + // Policy is compliant. + // + // The policy is compliant if all the underlying resources are also + // compliant. + COMPLIANT = 1; + + // Policy is non-compliant. + // + // The policy is non-compliant if one or more underlying resources are + // non-compliant. + NON_COMPLIANT = 2; + } + + // The OS policy id + string os_policy_id = 1; + + // The compliance state of the OS policy. + ComplianceState compliance_state = 2; + + // The reason for the OS policy to be in an unknown compliance state. + // This field is always populated when `compliance_state` is `UNKNOWN`. + // + // If populated, the field can contain one of the following values: + // + // * `vm-not-running`: The VM was not running. + // * `os-policies-not-supported-by-agent`: The version of the OS Config + // agent running on the VM does not support running OS policies. + // * `no-agent-detected`: The OS Config agent is not detected for the VM. + // * `resource-execution-errors`: The OS Config agent encountered errors + // while executing one or more resources in the policy. See + // `os_policy_resource_compliances` for details. + // * `task-timeout`: The task sent to the agent to apply the policy timed + // out. + // * `unexpected-agent-state`: The OS Config agent did not report the final + // status of the task that attempted to apply the policy. Instead, the agent + // unexpectedly started working on a different task. This mostly happens + // when the agent or VM unexpectedly restarts while applying OS policies. + // * `internal-service-errors`: Internal service errors were encountered + // while attempting to apply the policy. + string compliance_state_reason = 3; + + // Compliance data for each resource within the policy that is applied to + // the VM. + repeated OSPolicyResourceCompliance os_policy_resource_compliances = 4; + } + + // The `OSPolicyAssignmentReport` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` + string name = 1; + + // The Compute Engine VM instance name. + string instance = 2; + + // Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` + // belongs to. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + string os_policy_assignment = 3 [(google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; + + // Compliance data for each `OSPolicy` that is applied to the VM. + repeated OSPolicyCompliance os_policy_compliances = 4; + + // Timestamp for when the report was last generated. + google.protobuf.Timestamp update_time = 5; + + // Unique identifier of the last attempted run to apply the OS policies + // associated with this assignment on the VM. + // + // This ID is logged by the OS Config agent while applying the OS + // policies associated with this assignment on the VM. + // NOTE: If the service is unable to successfully connect to the agent for + // this run, then this id will not be available in the agent logs. + string last_run_id = 6; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignments.proto new file mode 100644 index 00000000000..157b8fd3989 --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignments.proto @@ -0,0 +1,386 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1/os_policy.proto"; +import "google/cloud/osconfig/v1/osconfig_common.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "OsPolicyAssignmentsProto"; +option java_package = "com.google.cloud.osconfig.v1"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1"; +option ruby_package = "Google::Cloud::OsConfig::V1"; + +// OS policy assignment is an API resource that is used to +// apply a set of OS policies to a dynamically targeted group of Compute Engine +// VM instances. +// +// An OS policy is used to define the desired state configuration for a +// Compute Engine VM instance through a set of configuration resources that +// provide capabilities such as installing or removing software packages, or +// executing a script. +// +// For more information, see [OS policy and OS policy +// assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies). +message OSPolicyAssignment { + option (google.api.resource) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + pattern: "projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}" + }; + + // Message representing label set. + // * A label is a key value pair set for a VM. + // * A LabelSet is a set of labels. + // * Labels within a LabelSet are ANDed. In other words, a LabelSet is + // applicable for a VM only if it matches all the labels in the + // LabelSet. + // * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will + // only be applicable for those VMs with both labels + // present. + message LabelSet { + // Labels are identified by key/value pairs in this map. + // A VM should contain all the key/value pairs specified in this + // map to be selected. + map labels = 1; + } + + // Filters to select target VMs for an assignment. + // + // If more than one filter criteria is specified below, a VM will be selected + // if and only if it satisfies all of them. + message InstanceFilter { + // VM inventory details. + message Inventory { + // Required. The OS short name + string os_short_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The OS version + // + // Prefix matches are supported if asterisk(*) is provided as the + // last character. For example, to match all versions with a major + // version of `7`, specify the following value for this field `7.*` + // + // An empty string matches all OS versions. + string os_version = 2; + } + + // Target all VMs in the project. If true, no other criteria is + // permitted. + bool all = 1; + + // List of label sets used for VM inclusion. + // + // If the list has more than one `LabelSet`, the VM is included if any + // of the label sets are applicable for the VM. + repeated LabelSet inclusion_labels = 2; + + // List of label sets used for VM exclusion. + // + // If the list has more than one label set, the VM is excluded if any + // of the label sets are applicable for the VM. + repeated LabelSet exclusion_labels = 3; + + // List of inventories to select VMs. + // + // A VM is selected if its inventory data matches at least one of the + // following inventories. + repeated Inventory inventories = 4; + } + + // Message to configure the rollout at the zonal level for the OS policy + // assignment. + message Rollout { + // Required. The maximum number (or percentage) of VMs per zone to disrupt + // at any given moment. + FixedOrPercent disruption_budget = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. This determines the minimum duration of time to wait after the + // configuration changes are applied through the current rollout. A + // VM continues to count towards the `disruption_budget` at least + // until this duration of time has passed after configuration changes are + // applied. + google.protobuf.Duration min_wait_duration = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + // OS policy assignment rollout state + enum RolloutState { + // Invalid value + ROLLOUT_STATE_UNSPECIFIED = 0; + + // The rollout is in progress. + IN_PROGRESS = 1; + + // The rollout is being cancelled. + CANCELLING = 2; + + // The rollout is cancelled. + CANCELLED = 3; + + // The rollout has completed successfully. + SUCCEEDED = 4; + } + + // Resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` + // + // This field is ignored when you create an OS policy assignment. + string name = 1; + + // OS policy assignment description. + // Length of the description is limited to 1024 characters. + string description = 2; + + // Required. List of OS policies to be applied to the VMs. + repeated OSPolicy os_policies = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Filter to select VMs. + InstanceFilter instance_filter = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Rollout to deploy the OS policy assignment. + // A rollout is triggered in the following situations: + // 1) OSPolicyAssignment is created. + // 2) OSPolicyAssignment is updated and the update contains changes to one of + // the following fields: + // - instance_filter + // - os_policies + // 3) OSPolicyAssignment is deleted. + Rollout rollout = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The assignment revision ID + // A new revision is committed whenever a rollout is triggered for a OS policy + // assignment + string revision_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp that the revision was created. + google.protobuf.Timestamp revision_create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The etag for this OS policy assignment. + // If this is provided on update, it must match the server's etag. + string etag = 8; + + // Output only. OS policy assignment rollout state + RolloutState rollout_state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates that this revision has been successfully rolled out + // in this zone and new VMs will be assigned OS policies from this revision. + // + // For a given OS policy assignment, there is only one revision with a value + // of `true` for this field. + bool baseline = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates that this revision deletes the OS policy assignment. + bool deleted = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates that reconciliation is in progress for the revision. + // This value is `true` when the `rollout_state` is one of: + // * IN_PROGRESS + // * CANCELLING + bool reconciling = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server generated unique id for the OS policy assignment + // resource. + string uid = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// OS policy assignment operation metadata provided by OS policy assignment API +// methods that return long running operations. +message OSPolicyAssignmentOperationMetadata { + // The OS policy assignment API method. + enum APIMethod { + // Invalid value + API_METHOD_UNSPECIFIED = 0; + + // Create OS policy assignment API method + CREATE = 1; + + // Update OS policy assignment API method + UPDATE = 2; + + // Delete OS policy assignment API method + DELETE = 3; + } + + // State of the rollout + enum RolloutState { + // Invalid value + ROLLOUT_STATE_UNSPECIFIED = 0; + + // The rollout is in progress. + IN_PROGRESS = 1; + + // The rollout is being cancelled. + CANCELLING = 2; + + // The rollout is cancelled. + CANCELLED = 3; + + // The rollout has completed successfully. + SUCCEEDED = 4; + } + + // Reference to the `OSPolicyAssignment` API resource. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + string os_policy_assignment = 1 [(google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; + + // The OS policy assignment API method. + APIMethod api_method = 2; + + // State of the rollout + RolloutState rollout_state = 3; + + // Rollout start time + google.protobuf.Timestamp rollout_start_time = 4; + + // Rollout update time + google.protobuf.Timestamp rollout_update_time = 5; +} + +// A request message to create an OS policy assignment +message CreateOSPolicyAssignmentRequest { + // Required. The parent resource name in the form: + // projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The OS policy assignment to be created. + OSPolicyAssignment os_policy_assignment = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The logical name of the OS policy assignment in the project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the project. + string os_policy_assignment_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message to update an OS policy assignment +message UpdateOSPolicyAssignmentRequest { + // Required. The updated OS policy assignment. + OSPolicyAssignment os_policy_assignment = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field mask that controls which fields of the assignment should be + // updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message to get an OS policy assignment +message GetOSPolicyAssignmentRequest { + // Required. The resource name of OS policy assignment. + // + // Format: + // `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + } + ]; +} + +// A request message to list OS policy assignments for a parent resource +message ListOSPolicyAssignmentsRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of assignments to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListOSPolicyAssignments` that indicates where this listing should continue + // from. + string page_token = 3; +} + +// A response message for listing all assignments under given parent. +message ListOSPolicyAssignmentsResponse { + // The list of assignments + repeated OSPolicyAssignment os_policy_assignments = 1; + + // The pagination token to retrieve the next page of OS policy assignments. + string next_page_token = 2; +} + +// A request message to list revisions for a OS policy assignment +message ListOSPolicyAssignmentRevisionsRequest { + // Required. The name of the OS policy assignment to list revisions for. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + } + ]; + + // The maximum number of revisions to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListOSPolicyAssignmentRevisions` that indicates where this listing should + // continue from. + string page_token = 3; +} + +// A response message for listing all revisions for a OS policy assignment. +message ListOSPolicyAssignmentRevisionsResponse { + // The OS policy assignment revisions + repeated OSPolicyAssignment os_policy_assignments = 1; + + // The pagination token to retrieve the next page of OS policy assignment + // revisions. + string next_page_token = 2; +} + +// A request message for deleting a OS policy assignment. +message DeleteOSPolicyAssignmentRequest { + // Required. The name of the OS policy assignment to be deleted + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + } + ]; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto index 88857b26b56..ae256fe68f4 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto @@ -41,7 +41,8 @@ option (google.api.resource_definition) = { // manage package installations and patch jobs for virtual machine instances. service OsConfigService { option (google.api.default_host) = "osconfig.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Patch VM instances by creating and running a patch job. rpc ExecutePatchJob(ExecutePatchJobRequest) returns (PatchJob) { @@ -78,7 +79,8 @@ service OsConfigService { } // Get a list of instance details for a given patch job. - rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) returns (ListPatchJobInstanceDetailsResponse) { + rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) + returns (ListPatchJobInstanceDetailsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/patchJobs/*}/instanceDetails" }; @@ -86,12 +88,14 @@ service OsConfigService { } // Create an OS Config patch deployment. - rpc CreatePatchDeployment(CreatePatchDeploymentRequest) returns (PatchDeployment) { + rpc CreatePatchDeployment(CreatePatchDeploymentRequest) + returns (PatchDeployment) { option (google.api.http) = { post: "/v1/{parent=projects/*}/patchDeployments" body: "patch_deployment" }; - option (google.api.method_signature) = "parent,patch_deployment,patch_deployment_id"; + option (google.api.method_signature) = + "parent,patch_deployment,patch_deployment_id"; } // Get an OS Config patch deployment. @@ -103,7 +107,8 @@ service OsConfigService { } // Get a page of OS Config patch deployments. - rpc ListPatchDeployments(ListPatchDeploymentsRequest) returns (ListPatchDeploymentsResponse) { + rpc ListPatchDeployments(ListPatchDeploymentsRequest) + returns (ListPatchDeploymentsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*}/patchDeployments" }; @@ -111,7 +116,8 @@ service OsConfigService { } // Delete an OS Config patch deployment. - rpc DeletePatchDeployment(DeletePatchDeploymentRequest) returns (google.protobuf.Empty) { + rpc DeletePatchDeployment(DeletePatchDeploymentRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/patchDeployments/*}" }; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto index 22219f53973..196737c1941 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto @@ -18,9 +18,11 @@ package google.cloud.osconfig.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; -import "google/api/resource.proto"; import "google/cloud/osconfig/v1/inventory.proto"; +import "google/cloud/osconfig/v1/os_policy_assignment_reports.proto"; +import "google/cloud/osconfig/v1/os_policy_assignments.proto"; import "google/cloud/osconfig/v1/vulnerability.proto"; +import "google/longrunning/operations.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; @@ -36,7 +38,130 @@ option ruby_package = "Google::Cloud::OsConfig::V1"; // manage package installations and patch jobs for Compute Engine VM instances. service OsConfigZonalService { option (google.api.default_host) = "osconfig.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Create an OS policy assignment. + // + // This method also creates the first revision of the OS policy assignment. + // + // This method returns a long running operation (LRO) that contains the + // rollout details. The rollout can be cancelled by cancelling the LRO. + // + // For more information, see [Method: + // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). + rpc CreateOSPolicyAssignment(CreateOSPolicyAssignmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/osPolicyAssignments" + body: "os_policy_assignment" + }; + option (google.api.method_signature) = + "parent,os_policy_assignment,os_policy_assignment_id"; + option (google.longrunning.operation_info) = { + response_type: "OSPolicyAssignment" + metadata_type: "OSPolicyAssignmentOperationMetadata" + }; + } + + // Update an existing OS policy assignment. + // + // This method creates a new revision of the OS policy assignment. + // + // This method returns a long running operation (LRO) that contains the + // rollout details. The rollout can be cancelled by cancelling the LRO. + // + // For more information, see [Method: + // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). + rpc UpdateOSPolicyAssignment(UpdateOSPolicyAssignmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}" + body: "os_policy_assignment" + }; + option (google.api.method_signature) = "os_policy_assignment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "OSPolicyAssignment" + metadata_type: "OSPolicyAssignmentOperationMetadata" + }; + } + + // Retrieve an existing OS policy assignment. + // + // This method always returns the latest revision. In order to retrieve a + // previous revision of the assignment, also provide the revision ID in the + // `name` parameter. + rpc GetOSPolicyAssignment(GetOSPolicyAssignmentRequest) + returns (OSPolicyAssignment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List the OS policy assignments under the parent resource. + // + // For each OS policy assignment, the latest revision is returned. + rpc ListOSPolicyAssignments(ListOSPolicyAssignmentsRequest) + returns (ListOSPolicyAssignmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/osPolicyAssignments" + }; + option (google.api.method_signature) = "parent"; + } + + // List the OS policy assignment revisions for a given OS policy assignment. + rpc ListOSPolicyAssignmentRevisions(ListOSPolicyAssignmentRevisionsRequest) + returns (ListOSPolicyAssignmentRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions" + }; + option (google.api.method_signature) = "name"; + } + + // Delete the OS policy assignment. + // + // This method creates a new revision of the OS policy assignment. + // + // This method returns a long running operation (LRO) that contains the + // rollout details. The rollout can be cancelled by cancelling the LRO. + // + // If the LRO completes and is not cancelled, all revisions associated with + // the OS policy assignment are deleted. + // + // For more information, see [Method: + // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). + rpc DeleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OSPolicyAssignmentOperationMetadata" + }; + } + + // Get the OS policy asssignment report for the specified Compute Engine VM + // instance. + rpc GetOSPolicyAssignmentReport(GetOSPolicyAssignmentReportRequest) + returns (OSPolicyAssignmentReport) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}" + }; + option (google.api.method_signature) = "name"; + } + + // List OS policy asssignment reports for all Compute Engine VM instances in + // the specified zone. + rpc ListOSPolicyAssignmentReports(ListOSPolicyAssignmentReportsRequest) + returns (ListOSPolicyAssignmentReportsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports" + }; + option (google.api.method_signature) = "parent"; + } // Get inventory data for the specified VM instance. If the VM has no // associated inventory, the message `NOT_FOUND` is returned. @@ -48,7 +173,8 @@ service OsConfigZonalService { } // List inventory data for all VM instances in the specified zone. - rpc ListInventories(ListInventoriesRequest) returns (ListInventoriesResponse) { + rpc ListInventories(ListInventoriesRequest) + returns (ListInventoriesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/instances/*}/inventories" }; @@ -57,7 +183,8 @@ service OsConfigZonalService { // Gets the vulnerability report for the specified VM instance. Only VMs with // inventory data have vulnerability reports associated with them. - rpc GetVulnerabilityReport(GetVulnerabilityReportRequest) returns (VulnerabilityReport) { + rpc GetVulnerabilityReport(GetVulnerabilityReportRequest) + returns (VulnerabilityReport) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}" }; @@ -65,7 +192,8 @@ service OsConfigZonalService { } // List vulnerability reports for all VM instances in the specified zone. - rpc ListVulnerabilityReports(ListVulnerabilityReportsRequest) returns (ListVulnerabilityReportsResponse) { + rpc ListVulnerabilityReports(ListVulnerabilityReportsRequest) + returns (ListVulnerabilityReportsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports" }; diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 7d25dee9d98..c2586cf3919 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -1537,6 +1537,4787 @@ export namespace google { FULL = 2 } + /** Properties of a OSPolicy. */ + interface IOSPolicy { + + /** OSPolicy id */ + id?: (string|null); + + /** OSPolicy description */ + description?: (string|null); + + /** OSPolicy mode */ + mode?: (google.cloud.osconfig.v1.OSPolicy.Mode|keyof typeof google.cloud.osconfig.v1.OSPolicy.Mode|null); + + /** OSPolicy resourceGroups */ + resourceGroups?: (google.cloud.osconfig.v1.OSPolicy.IResourceGroup[]|null); + + /** OSPolicy allowNoResourceGroupMatch */ + allowNoResourceGroupMatch?: (boolean|null); + } + + /** Represents a OSPolicy. */ + class OSPolicy implements IOSPolicy { + + /** + * Constructs a new OSPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IOSPolicy); + + /** OSPolicy id. */ + public id: string; + + /** OSPolicy description. */ + public description: string; + + /** OSPolicy mode. */ + public mode: (google.cloud.osconfig.v1.OSPolicy.Mode|keyof typeof google.cloud.osconfig.v1.OSPolicy.Mode); + + /** OSPolicy resourceGroups. */ + public resourceGroups: google.cloud.osconfig.v1.OSPolicy.IResourceGroup[]; + + /** OSPolicy allowNoResourceGroupMatch. */ + public allowNoResourceGroupMatch: boolean; + + /** + * Creates a new OSPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicy instance + */ + public static create(properties?: google.cloud.osconfig.v1.IOSPolicy): google.cloud.osconfig.v1.OSPolicy; + + /** + * Encodes the specified OSPolicy message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.verify|verify} messages. + * @param message OSPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IOSPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicy message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.verify|verify} messages. + * @param message OSPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IOSPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy; + + /** + * Decodes a OSPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy; + + /** + * Verifies a OSPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy; + + /** + * Creates a plain object from a OSPolicy message. Also converts values to other types if specified. + * @param message OSPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicy { + + /** Properties of an InventoryFilter. */ + interface IInventoryFilter { + + /** InventoryFilter osShortName */ + osShortName?: (string|null); + + /** InventoryFilter osVersion */ + osVersion?: (string|null); + } + + /** Represents an InventoryFilter. */ + class InventoryFilter implements IInventoryFilter { + + /** + * Constructs a new InventoryFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.IInventoryFilter); + + /** InventoryFilter osShortName. */ + public osShortName: string; + + /** InventoryFilter osVersion. */ + public osVersion: string; + + /** + * Creates a new InventoryFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InventoryFilter instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.IInventoryFilter): google.cloud.osconfig.v1.OSPolicy.InventoryFilter; + + /** + * Encodes the specified InventoryFilter message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.InventoryFilter.verify|verify} messages. + * @param message InventoryFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.IInventoryFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InventoryFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.InventoryFilter.verify|verify} messages. + * @param message InventoryFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.IInventoryFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InventoryFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InventoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.InventoryFilter; + + /** + * Decodes an InventoryFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InventoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.InventoryFilter; + + /** + * Verifies an InventoryFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InventoryFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InventoryFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.InventoryFilter; + + /** + * Creates a plain object from an InventoryFilter message. Also converts values to other types if specified. + * @param message InventoryFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.InventoryFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InventoryFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Resource. */ + interface IResource { + + /** Resource id */ + id?: (string|null); + + /** Resource pkg */ + pkg?: (google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource|null); + + /** Resource repository */ + repository?: (google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource|null); + + /** Resource exec */ + exec?: (google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource|null); + + /** Resource file */ + file?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource|null); + } + + /** Represents a Resource. */ + class Resource implements IResource { + + /** + * Constructs a new Resource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.IResource); + + /** Resource id. */ + public id: string; + + /** Resource pkg. */ + public pkg?: (google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource|null); + + /** Resource repository. */ + public repository?: (google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource|null); + + /** Resource exec. */ + public exec?: (google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource|null); + + /** Resource file. */ + public file?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource|null); + + /** Resource resourceType. */ + public resourceType?: ("pkg"|"repository"|"exec"|"file"); + + /** + * Creates a new Resource instance using the specified properties. + * @param [properties] Properties to set + * @returns Resource instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.IResource): google.cloud.osconfig.v1.OSPolicy.Resource; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.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.osconfig.v1.OSPolicy.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.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.osconfig.v1.OSPolicy.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.osconfig.v1.OSPolicy.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.osconfig.v1.OSPolicy.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.osconfig.v1.OSPolicy.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.osconfig.v1.OSPolicy.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Resource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Resource { + + /** Properties of a File. */ + interface IFile { + + /** File remote */ + remote?: (google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote|null); + + /** File gcs */ + gcs?: (google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs|null); + + /** File localPath */ + localPath?: (string|null); + + /** File allowInsecure */ + allowInsecure?: (boolean|null); + } + + /** Represents a File. */ + class File implements IFile { + + /** + * Constructs a new File. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IFile); + + /** File remote. */ + public remote?: (google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote|null); + + /** File gcs. */ + public gcs?: (google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs|null); + + /** File localPath. */ + public localPath?: (string|null); + + /** File allowInsecure. */ + public allowInsecure: boolean; + + /** File type. */ + public type?: ("remote"|"gcs"|"localPath"); + + /** + * Creates a new File instance using the specified properties. + * @param [properties] Properties to set + * @returns File instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IFile): google.cloud.osconfig.v1.OSPolicy.Resource.File; + + /** + * Encodes the specified File message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a File message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.File; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.File; + + /** + * Verifies a File message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns File + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.File; + + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @param message File + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this File to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace File { + + /** Properties of a Remote. */ + interface IRemote { + + /** Remote uri */ + uri?: (string|null); + + /** Remote sha256Checksum */ + sha256Checksum?: (string|null); + } + + /** Represents a Remote. */ + class Remote implements IRemote { + + /** + * Constructs a new Remote. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote); + + /** Remote uri. */ + public uri: string; + + /** Remote sha256Checksum. */ + public sha256Checksum: string; + + /** + * Creates a new Remote instance using the specified properties. + * @param [properties] Properties to set + * @returns Remote instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote): google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote; + + /** + * Encodes the specified Remote message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @param message Remote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Remote message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @param message Remote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Remote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote; + + /** + * Decodes a Remote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote; + + /** + * Verifies a Remote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Remote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Remote + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote; + + /** + * Creates a plain object from a Remote message. Also converts values to other types if specified. + * @param message Remote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Remote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Gcs. */ + interface IGcs { + + /** Gcs bucket */ + bucket?: (string|null); + + /** Gcs object */ + object?: (string|null); + + /** Gcs generation */ + generation?: (number|Long|string|null); + } + + /** Represents a Gcs. */ + class Gcs implements IGcs { + + /** + * Constructs a new Gcs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs); + + /** Gcs bucket. */ + public bucket: string; + + /** Gcs object. */ + public object: string; + + /** Gcs generation. */ + public generation: (number|Long|string); + + /** + * Creates a new Gcs instance using the specified properties. + * @param [properties] Properties to set + * @returns Gcs instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs): google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs; + + /** + * Encodes the specified Gcs message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @param message Gcs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Gcs message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @param message Gcs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Gcs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs; + + /** + * Decodes a Gcs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs; + + /** + * Verifies a Gcs message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Gcs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Gcs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs; + + /** + * Creates a plain object from a Gcs message. Also converts values to other types if specified. + * @param message Gcs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Gcs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a PackageResource. */ + interface IPackageResource { + + /** PackageResource desiredState */ + desiredState?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState|keyof typeof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState|null); + + /** PackageResource apt */ + apt?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT|null); + + /** PackageResource deb */ + deb?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb|null); + + /** PackageResource yum */ + yum?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM|null); + + /** PackageResource zypper */ + zypper?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper|null); + + /** PackageResource rpm */ + rpm?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM|null); + + /** PackageResource googet */ + googet?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet|null); + + /** PackageResource msi */ + msi?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI|null); + } + + /** Represents a PackageResource. */ + class PackageResource implements IPackageResource { + + /** + * Constructs a new PackageResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource); + + /** PackageResource desiredState. */ + public desiredState: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState|keyof typeof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState); + + /** PackageResource apt. */ + public apt?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT|null); + + /** PackageResource deb. */ + public deb?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb|null); + + /** PackageResource yum. */ + public yum?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM|null); + + /** PackageResource zypper. */ + public zypper?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper|null); + + /** PackageResource rpm. */ + public rpm?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM|null); + + /** PackageResource googet. */ + public googet?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet|null); + + /** PackageResource msi. */ + public msi?: (google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI|null); + + /** PackageResource systemPackage. */ + public systemPackage?: ("apt"|"deb"|"yum"|"zypper"|"rpm"|"googet"|"msi"); + + /** + * Creates a new PackageResource instance using the specified properties. + * @param [properties] Properties to set + * @returns PackageResource instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource; + + /** + * Encodes the specified PackageResource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @param message PackageResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PackageResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @param message PackageResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PackageResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource; + + /** + * Decodes a PackageResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource; + + /** + * Verifies a PackageResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PackageResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PackageResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource; + + /** + * Creates a plain object from a PackageResource message. Also converts values to other types if specified. + * @param message PackageResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PackageResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PackageResource { + + /** Properties of a Deb. */ + interface IDeb { + + /** Deb source */ + source?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** Deb pullDeps */ + pullDeps?: (boolean|null); + } + + /** Represents a Deb. */ + class Deb implements IDeb { + + /** + * Constructs a new Deb. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb); + + /** Deb source. */ + public source?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** Deb pullDeps. */ + public pullDeps: boolean; + + /** + * Creates a new Deb instance using the specified properties. + * @param [properties] Properties to set + * @returns Deb instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb; + + /** + * Encodes the specified Deb message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @param message Deb message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Deb message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @param message Deb message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Deb message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb; + + /** + * Decodes a Deb message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb; + + /** + * Verifies a Deb message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Deb message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deb + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb; + + /** + * Creates a plain object from a Deb message. Also converts values to other types if specified. + * @param message Deb + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Deb to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a APT. */ + interface IAPT { + + /** APT name */ + name?: (string|null); + } + + /** Represents a APT. */ + class APT implements IAPT { + + /** + * Constructs a new APT. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT); + + /** APT name. */ + public name: string; + + /** + * Creates a new APT instance using the specified properties. + * @param [properties] Properties to set + * @returns APT instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT; + + /** + * Encodes the specified APT message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @param message APT message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified APT message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @param message APT message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a APT message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT; + + /** + * Decodes a APT message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT; + + /** + * Verifies a APT message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a APT message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns APT + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT; + + /** + * Creates a plain object from a APT message. Also converts values to other types if specified. + * @param message APT + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this APT to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RPM. */ + interface IRPM { + + /** RPM source */ + source?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** RPM pullDeps */ + pullDeps?: (boolean|null); + } + + /** Represents a RPM. */ + class RPM implements IRPM { + + /** + * Constructs a new RPM. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM); + + /** RPM source. */ + public source?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** RPM pullDeps. */ + public pullDeps: boolean; + + /** + * Creates a new RPM instance using the specified properties. + * @param [properties] Properties to set + * @returns RPM instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM; + + /** + * Encodes the specified RPM message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @param message RPM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RPM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @param message RPM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RPM message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM; + + /** + * Decodes a RPM message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM; + + /** + * Verifies a RPM message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RPM message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RPM + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM; + + /** + * Creates a plain object from a RPM message. Also converts values to other types if specified. + * @param message RPM + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RPM to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a YUM. */ + interface IYUM { + + /** YUM name */ + name?: (string|null); + } + + /** Represents a YUM. */ + class YUM implements IYUM { + + /** + * Constructs a new YUM. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM); + + /** YUM name. */ + public name: string; + + /** + * Creates a new YUM instance using the specified properties. + * @param [properties] Properties to set + * @returns YUM instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM; + + /** + * Encodes the specified YUM message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @param message YUM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YUM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @param message YUM message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YUM message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM; + + /** + * Decodes a YUM message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM; + + /** + * Verifies a YUM message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a YUM message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YUM + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM; + + /** + * Creates a plain object from a YUM message. Also converts values to other types if specified. + * @param message YUM + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YUM to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Zypper. */ + interface IZypper { + + /** Zypper name */ + name?: (string|null); + } + + /** Represents a Zypper. */ + class Zypper implements IZypper { + + /** + * Constructs a new Zypper. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper); + + /** Zypper name. */ + public name: string; + + /** + * Creates a new Zypper instance using the specified properties. + * @param [properties] Properties to set + * @returns Zypper instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Encodes the specified Zypper message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @param message Zypper message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Zypper message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @param message Zypper message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Zypper message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Decodes a Zypper message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Verifies a Zypper message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Zypper message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Zypper + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper; + + /** + * Creates a plain object from a Zypper message. Also converts values to other types if specified. + * @param message Zypper + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Zypper to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GooGet. */ + interface IGooGet { + + /** GooGet name */ + name?: (string|null); + } + + /** Represents a GooGet. */ + class GooGet implements IGooGet { + + /** + * Constructs a new GooGet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet); + + /** GooGet name. */ + public name: string; + + /** + * Creates a new GooGet instance using the specified properties. + * @param [properties] Properties to set + * @returns GooGet instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Encodes the specified GooGet message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @param message GooGet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GooGet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @param message GooGet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GooGet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Decodes a GooGet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Verifies a GooGet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GooGet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GooGet + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet; + + /** + * Creates a plain object from a GooGet message. Also converts values to other types if specified. + * @param message GooGet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GooGet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MSI. */ + interface IMSI { + + /** MSI source */ + source?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** MSI properties */ + properties?: (string[]|null); + } + + /** Represents a MSI. */ + class MSI implements IMSI { + + /** + * Constructs a new MSI. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI); + + /** MSI source. */ + public source?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** MSI properties. */ + public properties: string[]; + + /** + * Creates a new MSI instance using the specified properties. + * @param [properties] Properties to set + * @returns MSI instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI; + + /** + * Encodes the specified MSI message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @param message MSI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MSI message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @param message MSI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MSI message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI; + + /** + * Decodes a MSI message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI; + + /** + * Verifies a MSI message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MSI message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MSI + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI; + + /** + * Creates a plain object from a MSI message. Also converts values to other types if specified. + * @param message MSI + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MSI to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** DesiredState enum. */ + enum DesiredState { + DESIRED_STATE_UNSPECIFIED = 0, + INSTALLED = 1, + REMOVED = 2 + } + } + + /** Properties of a RepositoryResource. */ + interface IRepositoryResource { + + /** RepositoryResource apt */ + apt?: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository|null); + + /** RepositoryResource yum */ + yum?: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository|null); + + /** RepositoryResource zypper */ + zypper?: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository|null); + + /** RepositoryResource goo */ + goo?: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository|null); + } + + /** Represents a RepositoryResource. */ + class RepositoryResource implements IRepositoryResource { + + /** + * Constructs a new RepositoryResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource); + + /** RepositoryResource apt. */ + public apt?: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository|null); + + /** RepositoryResource yum. */ + public yum?: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository|null); + + /** RepositoryResource zypper. */ + public zypper?: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository|null); + + /** RepositoryResource goo. */ + public goo?: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository|null); + + /** RepositoryResource repository. */ + public repository?: ("apt"|"yum"|"zypper"|"goo"); + + /** + * Creates a new RepositoryResource instance using the specified properties. + * @param [properties] Properties to set + * @returns RepositoryResource instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource; + + /** + * Encodes the specified RepositoryResource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @param message RepositoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepositoryResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @param message RepositoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource; + + /** + * Verifies a RepositoryResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RepositoryResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepositoryResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource; + + /** + * Creates a plain object from a RepositoryResource message. Also converts values to other types if specified. + * @param message RepositoryResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepositoryResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RepositoryResource { + + /** Properties of an AptRepository. */ + interface IAptRepository { + + /** AptRepository archiveType */ + archiveType?: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|keyof typeof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|null); + + /** AptRepository uri */ + uri?: (string|null); + + /** AptRepository distribution */ + distribution?: (string|null); + + /** AptRepository components */ + components?: (string[]|null); + + /** AptRepository gpgKey */ + gpgKey?: (string|null); + } + + /** Represents an AptRepository. */ + class AptRepository implements IAptRepository { + + /** + * Constructs a new AptRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository); + + /** AptRepository archiveType. */ + public archiveType: (google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|keyof typeof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType); + + /** AptRepository uri. */ + public uri: string; + + /** AptRepository distribution. */ + public distribution: string; + + /** AptRepository components. */ + public components: string[]; + + /** AptRepository gpgKey. */ + public gpgKey: string; + + /** + * Creates a new AptRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns AptRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Encodes the specified AptRepository message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @param message AptRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @param message AptRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AptRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Decodes an AptRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Verifies an AptRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AptRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository; + + /** + * Creates a plain object from an AptRepository message. Also converts values to other types if specified. + * @param message AptRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AptRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AptRepository { + + /** ArchiveType enum. */ + enum ArchiveType { + ARCHIVE_TYPE_UNSPECIFIED = 0, + DEB = 1, + DEB_SRC = 2 + } + } + + /** Properties of a YumRepository. */ + interface IYumRepository { + + /** YumRepository id */ + id?: (string|null); + + /** YumRepository displayName */ + displayName?: (string|null); + + /** YumRepository baseUrl */ + baseUrl?: (string|null); + + /** YumRepository gpgKeys */ + gpgKeys?: (string[]|null); + } + + /** Represents a YumRepository. */ + class YumRepository implements IYumRepository { + + /** + * Constructs a new YumRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository); + + /** YumRepository id. */ + public id: string; + + /** YumRepository displayName. */ + public displayName: string; + + /** YumRepository baseUrl. */ + public baseUrl: string; + + /** YumRepository gpgKeys. */ + public gpgKeys: string[]; + + /** + * Creates a new YumRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns YumRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Encodes the specified YumRepository message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @param message YumRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @param message YumRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YumRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Decodes a YumRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Verifies a YumRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository; + + /** + * Creates a plain object from a YumRepository message. Also converts values to other types if specified. + * @param message YumRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YumRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ZypperRepository. */ + interface IZypperRepository { + + /** ZypperRepository id */ + id?: (string|null); + + /** ZypperRepository displayName */ + displayName?: (string|null); + + /** ZypperRepository baseUrl */ + baseUrl?: (string|null); + + /** ZypperRepository gpgKeys */ + gpgKeys?: (string[]|null); + } + + /** Represents a ZypperRepository. */ + class ZypperRepository implements IZypperRepository { + + /** + * Constructs a new ZypperRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository); + + /** ZypperRepository id. */ + public id: string; + + /** ZypperRepository displayName. */ + public displayName: string; + + /** ZypperRepository baseUrl. */ + public baseUrl: string; + + /** ZypperRepository gpgKeys. */ + public gpgKeys: string[]; + + /** + * Creates a new ZypperRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns ZypperRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository; + + /** + * Encodes the specified ZypperRepository message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @param message ZypperRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ZypperRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @param message ZypperRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ZypperRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository; + + /** + * Decodes a ZypperRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository; + + /** + * Verifies a ZypperRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ZypperRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ZypperRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository; + + /** + * Creates a plain object from a ZypperRepository message. Also converts values to other types if specified. + * @param message ZypperRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ZypperRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GooRepository. */ + interface IGooRepository { + + /** GooRepository name */ + name?: (string|null); + + /** GooRepository url */ + url?: (string|null); + } + + /** Represents a GooRepository. */ + class GooRepository implements IGooRepository { + + /** + * Constructs a new GooRepository. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository); + + /** GooRepository name. */ + public name: string; + + /** GooRepository url. */ + public url: string; + + /** + * Creates a new GooRepository instance using the specified properties. + * @param [properties] Properties to set + * @returns GooRepository instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Encodes the specified GooRepository message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @param message GooRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GooRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @param message GooRepository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GooRepository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Decodes a GooRepository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Verifies a GooRepository message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GooRepository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GooRepository + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository; + + /** + * Creates a plain object from a GooRepository message. Also converts values to other types if specified. + * @param message GooRepository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GooRepository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExecResource. */ + interface IExecResource { + + /** ExecResource validate */ + validate?: (google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec|null); + + /** ExecResource enforce */ + enforce?: (google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec|null); + } + + /** Represents an ExecResource. */ + class ExecResource implements IExecResource { + + /** + * Constructs a new ExecResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource); + + /** ExecResource validate. */ + public validate?: (google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec|null); + + /** ExecResource enforce. */ + public enforce?: (google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec|null); + + /** + * Creates a new ExecResource instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecResource instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource): google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource; + + /** + * Encodes the specified ExecResource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @param message ExecResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @param message ExecResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource; + + /** + * Decodes an ExecResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource; + + /** + * Verifies an ExecResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource; + + /** + * Creates a plain object from an ExecResource message. Also converts values to other types if specified. + * @param message ExecResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ExecResource { + + /** Properties of an Exec. */ + interface IExec { + + /** Exec file */ + file?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** Exec script */ + script?: (string|null); + + /** Exec args */ + args?: (string[]|null); + + /** Exec interpreter */ + interpreter?: (google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter|null); + + /** Exec outputFilePath */ + outputFilePath?: (string|null); + } + + /** Represents an Exec. */ + class Exec implements IExec { + + /** + * Constructs a new Exec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec); + + /** Exec file. */ + public file?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** Exec script. */ + public script?: (string|null); + + /** Exec args. */ + public args: string[]; + + /** Exec interpreter. */ + public interpreter: (google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter|keyof typeof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter); + + /** Exec outputFilePath. */ + public outputFilePath: string; + + /** Exec source. */ + public source?: ("file"|"script"); + + /** + * Creates a new Exec instance using the specified properties. + * @param [properties] Properties to set + * @returns Exec instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec): google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec; + + /** + * Encodes the specified Exec message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @param message Exec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exec message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @param message Exec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec; + + /** + * Decodes an Exec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec; + + /** + * Verifies an Exec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Exec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec; + + /** + * Creates a plain object from an Exec message. Also converts values to other types if specified. + * @param message Exec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Exec { + + /** Interpreter enum. */ + enum Interpreter { + INTERPRETER_UNSPECIFIED = 0, + NONE = 1, + SHELL = 2, + POWERSHELL = 3 + } + } + } + + /** Properties of a FileResource. */ + interface IFileResource { + + /** FileResource file */ + file?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** FileResource content */ + content?: (string|null); + + /** FileResource path */ + path?: (string|null); + + /** FileResource state */ + state?: (google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState|keyof typeof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState|null); + + /** FileResource permissions */ + permissions?: (string|null); + } + + /** Represents a FileResource. */ + class FileResource implements IFileResource { + + /** + * Constructs a new FileResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource); + + /** FileResource file. */ + public file?: (google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null); + + /** FileResource content. */ + public content?: (string|null); + + /** FileResource path. */ + public path: string; + + /** FileResource state. */ + public state: (google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState|keyof typeof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState); + + /** FileResource permissions. */ + public permissions: string; + + /** FileResource source. */ + public source?: ("file"|"content"); + + /** + * Creates a new FileResource instance using the specified properties. + * @param [properties] Properties to set + * @returns FileResource instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource): google.cloud.osconfig.v1.OSPolicy.Resource.FileResource; + + /** + * Encodes the specified FileResource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.verify|verify} messages. + * @param message FileResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.verify|verify} messages. + * @param message FileResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.Resource.FileResource; + + /** + * Decodes a FileResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.Resource.FileResource; + + /** + * Verifies a FileResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.Resource.FileResource; + + /** + * Creates a plain object from a FileResource message. Also converts values to other types if specified. + * @param message FileResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.Resource.FileResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileResource { + + /** DesiredState enum. */ + enum DesiredState { + DESIRED_STATE_UNSPECIFIED = 0, + PRESENT = 1, + ABSENT = 2, + CONTENTS_MATCH = 3 + } + } + } + + /** Properties of a ResourceGroup. */ + interface IResourceGroup { + + /** ResourceGroup inventoryFilters */ + inventoryFilters?: (google.cloud.osconfig.v1.OSPolicy.IInventoryFilter[]|null); + + /** ResourceGroup resources */ + resources?: (google.cloud.osconfig.v1.OSPolicy.IResource[]|null); + } + + /** Represents a ResourceGroup. */ + class ResourceGroup implements IResourceGroup { + + /** + * Constructs a new ResourceGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicy.IResourceGroup); + + /** ResourceGroup inventoryFilters. */ + public inventoryFilters: google.cloud.osconfig.v1.OSPolicy.IInventoryFilter[]; + + /** ResourceGroup resources. */ + public resources: google.cloud.osconfig.v1.OSPolicy.IResource[]; + + /** + * Creates a new ResourceGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceGroup instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicy.IResourceGroup): google.cloud.osconfig.v1.OSPolicy.ResourceGroup; + + /** + * Encodes the specified ResourceGroup message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicy.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicy.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicy.ResourceGroup; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicy.ResourceGroup; + + /** + * Verifies a ResourceGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceGroup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicy.ResourceGroup; + + /** + * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. + * @param message ResourceGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicy.ResourceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + VALIDATION = 1, + ENFORCEMENT = 2 + } + } + + /** Properties of a GetOSPolicyAssignmentReportRequest. */ + interface IGetOSPolicyAssignmentReportRequest { + + /** GetOSPolicyAssignmentReportRequest name */ + name?: (string|null); + } + + /** Represents a GetOSPolicyAssignmentReportRequest. */ + class GetOSPolicyAssignmentReportRequest implements IGetOSPolicyAssignmentReportRequest { + + /** + * Constructs a new GetOSPolicyAssignmentReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest); + + /** GetOSPolicyAssignmentReportRequest name. */ + public name: string; + + /** + * Creates a new GetOSPolicyAssignmentReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOSPolicyAssignmentReportRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest): google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest; + + /** + * Encodes the specified GetOSPolicyAssignmentReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOSPolicyAssignmentReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOSPolicyAssignmentReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOSPolicyAssignmentReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest; + + /** + * Decodes a GetOSPolicyAssignmentReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOSPolicyAssignmentReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest; + + /** + * Verifies a GetOSPolicyAssignmentReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOSPolicyAssignmentReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOSPolicyAssignmentReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest; + + /** + * Creates a plain object from a GetOSPolicyAssignmentReportRequest message. Also converts values to other types if specified. + * @param message GetOSPolicyAssignmentReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOSPolicyAssignmentReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentReportsRequest. */ + interface IListOSPolicyAssignmentReportsRequest { + + /** ListOSPolicyAssignmentReportsRequest parent */ + parent?: (string|null); + + /** ListOSPolicyAssignmentReportsRequest pageSize */ + pageSize?: (number|null); + + /** ListOSPolicyAssignmentReportsRequest filter */ + filter?: (string|null); + + /** ListOSPolicyAssignmentReportsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentReportsRequest. */ + class ListOSPolicyAssignmentReportsRequest implements IListOSPolicyAssignmentReportsRequest { + + /** + * Constructs a new ListOSPolicyAssignmentReportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest); + + /** ListOSPolicyAssignmentReportsRequest parent. */ + public parent: string; + + /** ListOSPolicyAssignmentReportsRequest pageSize. */ + public pageSize: number; + + /** ListOSPolicyAssignmentReportsRequest filter. */ + public filter: string; + + /** ListOSPolicyAssignmentReportsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentReportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentReportsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest): google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentReportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest; + + /** + * Decodes a ListOSPolicyAssignmentReportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest; + + /** + * Verifies a ListOSPolicyAssignmentReportsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentReportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentReportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest; + + /** + * Creates a plain object from a ListOSPolicyAssignmentReportsRequest message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentReportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentReportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentReportsResponse. */ + interface IListOSPolicyAssignmentReportsResponse { + + /** ListOSPolicyAssignmentReportsResponse osPolicyAssignmentReports */ + osPolicyAssignmentReports?: (google.cloud.osconfig.v1.IOSPolicyAssignmentReport[]|null); + + /** ListOSPolicyAssignmentReportsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentReportsResponse. */ + class ListOSPolicyAssignmentReportsResponse implements IListOSPolicyAssignmentReportsResponse { + + /** + * Constructs a new ListOSPolicyAssignmentReportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse); + + /** ListOSPolicyAssignmentReportsResponse osPolicyAssignmentReports. */ + public osPolicyAssignmentReports: google.cloud.osconfig.v1.IOSPolicyAssignmentReport[]; + + /** ListOSPolicyAssignmentReportsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentReportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentReportsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse): google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentReportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse; + + /** + * Decodes a ListOSPolicyAssignmentReportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse; + + /** + * Verifies a ListOSPolicyAssignmentReportsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentReportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentReportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse; + + /** + * Creates a plain object from a ListOSPolicyAssignmentReportsResponse message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentReportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentReportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a OSPolicyAssignmentReport. */ + interface IOSPolicyAssignmentReport { + + /** OSPolicyAssignmentReport name */ + name?: (string|null); + + /** OSPolicyAssignmentReport instance */ + instance?: (string|null); + + /** OSPolicyAssignmentReport osPolicyAssignment */ + osPolicyAssignment?: (string|null); + + /** OSPolicyAssignmentReport osPolicyCompliances */ + osPolicyCompliances?: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance[]|null); + + /** OSPolicyAssignmentReport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignmentReport lastRunId */ + lastRunId?: (string|null); + } + + /** Represents a OSPolicyAssignmentReport. */ + class OSPolicyAssignmentReport implements IOSPolicyAssignmentReport { + + /** + * Constructs a new OSPolicyAssignmentReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IOSPolicyAssignmentReport); + + /** OSPolicyAssignmentReport name. */ + public name: string; + + /** OSPolicyAssignmentReport instance. */ + public instance: string; + + /** OSPolicyAssignmentReport osPolicyAssignment. */ + public osPolicyAssignment: string; + + /** OSPolicyAssignmentReport osPolicyCompliances. */ + public osPolicyCompliances: google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance[]; + + /** OSPolicyAssignmentReport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignmentReport lastRunId. */ + public lastRunId: string; + + /** + * Creates a new OSPolicyAssignmentReport instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyAssignmentReport instance + */ + public static create(properties?: google.cloud.osconfig.v1.IOSPolicyAssignmentReport): google.cloud.osconfig.v1.OSPolicyAssignmentReport; + + /** + * Encodes the specified OSPolicyAssignmentReport message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.verify|verify} messages. + * @param message OSPolicyAssignmentReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IOSPolicyAssignmentReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyAssignmentReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.verify|verify} messages. + * @param message OSPolicyAssignmentReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IOSPolicyAssignmentReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyAssignmentReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyAssignmentReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignmentReport; + + /** + * Decodes a OSPolicyAssignmentReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyAssignmentReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignmentReport; + + /** + * Verifies a OSPolicyAssignmentReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyAssignmentReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyAssignmentReport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignmentReport; + + /** + * Creates a plain object from a OSPolicyAssignmentReport message. Also converts values to other types if specified. + * @param message OSPolicyAssignmentReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyAssignmentReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyAssignmentReport { + + /** Properties of a OSPolicyCompliance. */ + interface IOSPolicyCompliance { + + /** OSPolicyCompliance osPolicyId */ + osPolicyId?: (string|null); + + /** OSPolicyCompliance complianceState */ + complianceState?: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState|null); + + /** OSPolicyCompliance complianceStateReason */ + complianceStateReason?: (string|null); + + /** OSPolicyCompliance osPolicyResourceCompliances */ + osPolicyResourceCompliances?: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance[]|null); + } + + /** Represents a OSPolicyCompliance. */ + class OSPolicyCompliance implements IOSPolicyCompliance { + + /** + * Constructs a new OSPolicyCompliance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance); + + /** OSPolicyCompliance osPolicyId. */ + public osPolicyId: string; + + /** OSPolicyCompliance complianceState. */ + public complianceState: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState); + + /** OSPolicyCompliance complianceStateReason. */ + public complianceStateReason: string; + + /** OSPolicyCompliance osPolicyResourceCompliances. */ + public osPolicyResourceCompliances: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance[]; + + /** + * Creates a new OSPolicyCompliance instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyCompliance instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance; + + /** + * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.verify|verify} messages. + * @param message OSPolicyCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.verify|verify} messages. + * @param message OSPolicyCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance; + + /** + * Verifies a OSPolicyCompliance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyCompliance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance; + + /** + * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. + * @param message OSPolicyCompliance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyCompliance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyCompliance { + + /** Properties of a OSPolicyResourceCompliance. */ + interface IOSPolicyResourceCompliance { + + /** OSPolicyResourceCompliance osPolicyResourceId */ + osPolicyResourceId?: (string|null); + + /** OSPolicyResourceCompliance configSteps */ + configSteps?: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep[]|null); + + /** OSPolicyResourceCompliance complianceState */ + complianceState?: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState|null); + + /** OSPolicyResourceCompliance complianceStateReason */ + complianceStateReason?: (string|null); + + /** OSPolicyResourceCompliance execResourceOutput */ + execResourceOutput?: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput|null); + } + + /** Represents a OSPolicyResourceCompliance. */ + class OSPolicyResourceCompliance implements IOSPolicyResourceCompliance { + + /** + * Constructs a new OSPolicyResourceCompliance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance); + + /** OSPolicyResourceCompliance osPolicyResourceId. */ + public osPolicyResourceId: string; + + /** OSPolicyResourceCompliance configSteps. */ + public configSteps: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep[]; + + /** OSPolicyResourceCompliance complianceState. */ + public complianceState: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState); + + /** OSPolicyResourceCompliance complianceStateReason. */ + public complianceStateReason: string; + + /** OSPolicyResourceCompliance execResourceOutput. */ + public execResourceOutput?: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput|null); + + /** OSPolicyResourceCompliance output. */ + public output?: "execResourceOutput"; + + /** + * Creates a new OSPolicyResourceCompliance instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyResourceCompliance instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance; + + /** + * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify|verify} messages. + * @param message OSPolicyResourceCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify|verify} messages. + * @param message OSPolicyResourceCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance; + + /** + * Verifies a OSPolicyResourceCompliance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyResourceCompliance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance; + + /** + * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. + * @param message OSPolicyResourceCompliance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyResourceCompliance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyResourceCompliance { + + /** Properties of a OSPolicyResourceConfigStep. */ + interface IOSPolicyResourceConfigStep { + + /** OSPolicyResourceConfigStep type */ + type?: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type|null); + + /** OSPolicyResourceConfigStep errorMessage */ + errorMessage?: (string|null); + } + + /** Represents a OSPolicyResourceConfigStep. */ + class OSPolicyResourceConfigStep implements IOSPolicyResourceConfigStep { + + /** + * Constructs a new OSPolicyResourceConfigStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep); + + /** OSPolicyResourceConfigStep type. */ + public type: (google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type); + + /** OSPolicyResourceConfigStep errorMessage. */ + public errorMessage: string; + + /** + * Creates a new OSPolicyResourceConfigStep instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyResourceConfigStep instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep; + + /** + * Encodes the specified OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify|verify} messages. + * @param message OSPolicyResourceConfigStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify|verify} messages. + * @param message OSPolicyResourceConfigStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep; + + /** + * Verifies a OSPolicyResourceConfigStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyResourceConfigStep + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep; + + /** + * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. + * @param message OSPolicyResourceConfigStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyResourceConfigStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyResourceConfigStep { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + VALIDATION = 1, + DESIRED_STATE_CHECK = 2, + DESIRED_STATE_ENFORCEMENT = 3, + DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4 + } + } + + /** Properties of an ExecResourceOutput. */ + interface IExecResourceOutput { + + /** ExecResourceOutput enforcementOutput */ + enforcementOutput?: (Uint8Array|string|null); + } + + /** Represents an ExecResourceOutput. */ + class ExecResourceOutput implements IExecResourceOutput { + + /** + * Constructs a new ExecResourceOutput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput); + + /** ExecResourceOutput enforcementOutput. */ + public enforcementOutput: (Uint8Array|string); + + /** + * Creates a new ExecResourceOutput instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecResourceOutput instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @param message ExecResourceOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @param message ExecResourceOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Verifies an ExecResourceOutput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecResourceOutput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. + * @param message ExecResourceOutput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecResourceOutput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** ComplianceState enum. */ + enum ComplianceState { + UNKNOWN = 0, + COMPLIANT = 1, + NON_COMPLIANT = 2 + } + } + + /** ComplianceState enum. */ + enum ComplianceState { + UNKNOWN = 0, + COMPLIANT = 1, + NON_COMPLIANT = 2 + } + } + } + + /** Properties of a OSPolicyAssignment. */ + interface IOSPolicyAssignment { + + /** OSPolicyAssignment name */ + name?: (string|null); + + /** OSPolicyAssignment description */ + description?: (string|null); + + /** OSPolicyAssignment osPolicies */ + osPolicies?: (google.cloud.osconfig.v1.IOSPolicy[]|null); + + /** OSPolicyAssignment instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter|null); + + /** OSPolicyAssignment rollout */ + rollout?: (google.cloud.osconfig.v1.OSPolicyAssignment.IRollout|null); + + /** OSPolicyAssignment revisionId */ + revisionId?: (string|null); + + /** OSPolicyAssignment revisionCreateTime */ + revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignment etag */ + etag?: (string|null); + + /** OSPolicyAssignment rolloutState */ + rolloutState?: (google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState|null); + + /** OSPolicyAssignment baseline */ + baseline?: (boolean|null); + + /** OSPolicyAssignment deleted */ + deleted?: (boolean|null); + + /** OSPolicyAssignment reconciling */ + reconciling?: (boolean|null); + + /** OSPolicyAssignment uid */ + uid?: (string|null); + } + + /** Represents a OSPolicyAssignment. */ + class OSPolicyAssignment implements IOSPolicyAssignment { + + /** + * Constructs a new OSPolicyAssignment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IOSPolicyAssignment); + + /** OSPolicyAssignment name. */ + public name: string; + + /** OSPolicyAssignment description. */ + public description: string; + + /** OSPolicyAssignment osPolicies. */ + public osPolicies: google.cloud.osconfig.v1.IOSPolicy[]; + + /** OSPolicyAssignment instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter|null); + + /** OSPolicyAssignment rollout. */ + public rollout?: (google.cloud.osconfig.v1.OSPolicyAssignment.IRollout|null); + + /** OSPolicyAssignment revisionId. */ + public revisionId: string; + + /** OSPolicyAssignment revisionCreateTime. */ + public revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignment etag. */ + public etag: string; + + /** OSPolicyAssignment rolloutState. */ + public rolloutState: (google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState); + + /** OSPolicyAssignment baseline. */ + public baseline: boolean; + + /** OSPolicyAssignment deleted. */ + public deleted: boolean; + + /** OSPolicyAssignment reconciling. */ + public reconciling: boolean; + + /** OSPolicyAssignment uid. */ + public uid: string; + + /** + * Creates a new OSPolicyAssignment instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyAssignment instance + */ + public static create(properties?: google.cloud.osconfig.v1.IOSPolicyAssignment): google.cloud.osconfig.v1.OSPolicyAssignment; + + /** + * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.verify|verify} messages. + * @param message OSPolicyAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.verify|verify} messages. + * @param message OSPolicyAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignment; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignment; + + /** + * Verifies a OSPolicyAssignment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyAssignment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignment; + + /** + * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. + * @param message OSPolicyAssignment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyAssignment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyAssignment { + + /** Properties of a LabelSet. */ + interface ILabelSet { + + /** LabelSet labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a LabelSet. */ + class LabelSet implements ILabelSet { + + /** + * Constructs a new LabelSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet); + + /** LabelSet labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new LabelSet instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelSet instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet): google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet; + + /** + * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @param message LabelSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelSet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @param message LabelSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet; + + /** + * Decodes a LabelSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet; + + /** + * Verifies a LabelSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LabelSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelSet + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet; + + /** + * Creates a plain object from a LabelSet message. Also converts values to other types if specified. + * @param message LabelSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InstanceFilter. */ + interface IInstanceFilter { + + /** InstanceFilter all */ + all?: (boolean|null); + + /** InstanceFilter inclusionLabels */ + inclusionLabels?: (google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet[]|null); + + /** InstanceFilter exclusionLabels */ + exclusionLabels?: (google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet[]|null); + + /** InstanceFilter inventories */ + inventories?: (google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory[]|null); + } + + /** Represents an InstanceFilter. */ + class InstanceFilter implements IInstanceFilter { + + /** + * Constructs a new InstanceFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter); + + /** InstanceFilter all. */ + public all: boolean; + + /** InstanceFilter inclusionLabels. */ + public inclusionLabels: google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet[]; + + /** InstanceFilter exclusionLabels. */ + public exclusionLabels: google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet[]; + + /** InstanceFilter inventories. */ + public inventories: google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory[]; + + /** + * Creates a new InstanceFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceFilter instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter): google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter; + + /** + * Encodes the specified InstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @param message InstanceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @param message InstanceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter; + + /** + * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter; + + /** + * Verifies an InstanceFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter; + + /** + * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. + * @param message InstanceFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InstanceFilter { + + /** Properties of an Inventory. */ + interface IInventory { + + /** Inventory osShortName */ + osShortName?: (string|null); + + /** Inventory osVersion */ + osVersion?: (string|null); + } + + /** Represents an Inventory. */ + class Inventory implements IInventory { + + /** + * Constructs a new Inventory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory); + + /** Inventory osShortName. */ + public osShortName: string; + + /** Inventory osVersion. */ + public osVersion: string; + + /** + * Creates a new Inventory instance using the specified properties. + * @param [properties] Properties to set + * @returns Inventory instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory): google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory; + + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Inventory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory; + + /** + * Decodes an Inventory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory; + + /** + * Verifies an Inventory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Inventory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory; + + /** + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @param message Inventory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Inventory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Rollout. */ + interface IRollout { + + /** Rollout disruptionBudget */ + disruptionBudget?: (google.cloud.osconfig.v1.IFixedOrPercent|null); + + /** Rollout minWaitDuration */ + minWaitDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a Rollout. */ + class Rollout implements IRollout { + + /** + * Constructs a new Rollout. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.OSPolicyAssignment.IRollout); + + /** Rollout disruptionBudget. */ + public disruptionBudget?: (google.cloud.osconfig.v1.IFixedOrPercent|null); + + /** Rollout minWaitDuration. */ + public minWaitDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new Rollout instance using the specified properties. + * @param [properties] Properties to set + * @returns Rollout instance + */ + public static create(properties?: google.cloud.osconfig.v1.OSPolicyAssignment.IRollout): google.cloud.osconfig.v1.OSPolicyAssignment.Rollout; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.OSPolicyAssignment.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.OSPolicyAssignment.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignment.Rollout; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignment.Rollout; + + /** + * Verifies a Rollout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rollout + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignment.Rollout; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @param message Rollout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignment.Rollout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rollout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** RolloutState enum. */ + enum RolloutState { + ROLLOUT_STATE_UNSPECIFIED = 0, + IN_PROGRESS = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4 + } + } + + /** Properties of a OSPolicyAssignmentOperationMetadata. */ + interface IOSPolicyAssignmentOperationMetadata { + + /** OSPolicyAssignmentOperationMetadata osPolicyAssignment */ + osPolicyAssignment?: (string|null); + + /** OSPolicyAssignmentOperationMetadata apiMethod */ + apiMethod?: (google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod|null); + + /** OSPolicyAssignmentOperationMetadata rolloutState */ + rolloutState?: (google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState|null); + + /** OSPolicyAssignmentOperationMetadata rolloutStartTime */ + rolloutStartTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignmentOperationMetadata rolloutUpdateTime */ + rolloutUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a OSPolicyAssignmentOperationMetadata. */ + class OSPolicyAssignmentOperationMetadata implements IOSPolicyAssignmentOperationMetadata { + + /** + * Constructs a new OSPolicyAssignmentOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata); + + /** OSPolicyAssignmentOperationMetadata osPolicyAssignment. */ + public osPolicyAssignment: string; + + /** OSPolicyAssignmentOperationMetadata apiMethod. */ + public apiMethod: (google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod); + + /** OSPolicyAssignmentOperationMetadata rolloutState. */ + public rolloutState: (google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState|keyof typeof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState); + + /** OSPolicyAssignmentOperationMetadata rolloutStartTime. */ + public rolloutStartTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignmentOperationMetadata rolloutUpdateTime. */ + public rolloutUpdateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OSPolicyAssignmentOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyAssignmentOperationMetadata instance + */ + public static create(properties?: google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata): google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @param message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @param message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata; + + /** + * Verifies a OSPolicyAssignmentOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyAssignmentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyAssignmentOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata; + + /** + * Creates a plain object from a OSPolicyAssignmentOperationMetadata message. Also converts values to other types if specified. + * @param message OSPolicyAssignmentOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyAssignmentOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyAssignmentOperationMetadata { + + /** APIMethod enum. */ + enum APIMethod { + API_METHOD_UNSPECIFIED = 0, + CREATE = 1, + UPDATE = 2, + DELETE = 3 + } + + /** RolloutState enum. */ + enum RolloutState { + ROLLOUT_STATE_UNSPECIFIED = 0, + IN_PROGRESS = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4 + } + } + + /** Properties of a CreateOSPolicyAssignmentRequest. */ + interface ICreateOSPolicyAssignmentRequest { + + /** CreateOSPolicyAssignmentRequest parent */ + parent?: (string|null); + + /** CreateOSPolicyAssignmentRequest osPolicyAssignment */ + osPolicyAssignment?: (google.cloud.osconfig.v1.IOSPolicyAssignment|null); + + /** CreateOSPolicyAssignmentRequest osPolicyAssignmentId */ + osPolicyAssignmentId?: (string|null); + } + + /** Represents a CreateOSPolicyAssignmentRequest. */ + class CreateOSPolicyAssignmentRequest implements ICreateOSPolicyAssignmentRequest { + + /** + * Constructs a new CreateOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest); + + /** CreateOSPolicyAssignmentRequest parent. */ + public parent: string; + + /** CreateOSPolicyAssignmentRequest osPolicyAssignment. */ + public osPolicyAssignment?: (google.cloud.osconfig.v1.IOSPolicyAssignment|null); + + /** CreateOSPolicyAssignmentRequest osPolicyAssignmentId. */ + public osPolicyAssignmentId: string; + + /** + * Creates a new CreateOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest): google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest; + + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest; + + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest; + + /** + * Verifies a CreateOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest; + + /** + * Creates a plain object from a CreateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message CreateOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateOSPolicyAssignmentRequest. */ + interface IUpdateOSPolicyAssignmentRequest { + + /** UpdateOSPolicyAssignmentRequest osPolicyAssignment */ + osPolicyAssignment?: (google.cloud.osconfig.v1.IOSPolicyAssignment|null); + + /** UpdateOSPolicyAssignmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateOSPolicyAssignmentRequest. */ + class UpdateOSPolicyAssignmentRequest implements IUpdateOSPolicyAssignmentRequest { + + /** + * Constructs a new UpdateOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest); + + /** UpdateOSPolicyAssignmentRequest osPolicyAssignment. */ + public osPolicyAssignment?: (google.cloud.osconfig.v1.IOSPolicyAssignment|null); + + /** UpdateOSPolicyAssignmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest): google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest; + + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @param message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest; + + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest; + + /** + * Verifies an UpdateOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest; + + /** + * Creates a plain object from an UpdateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message UpdateOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOSPolicyAssignmentRequest. */ + interface IGetOSPolicyAssignmentRequest { + + /** GetOSPolicyAssignmentRequest name */ + name?: (string|null); + } + + /** Represents a GetOSPolicyAssignmentRequest. */ + class GetOSPolicyAssignmentRequest implements IGetOSPolicyAssignmentRequest { + + /** + * Constructs a new GetOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest); + + /** GetOSPolicyAssignmentRequest name. */ + public name: string; + + /** + * Creates a new GetOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest): google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest; + + /** + * Encodes the specified GetOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest; + + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest; + + /** + * Verifies a GetOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest; + + /** + * Creates a plain object from a GetOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message GetOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentsRequest. */ + interface IListOSPolicyAssignmentsRequest { + + /** ListOSPolicyAssignmentsRequest parent */ + parent?: (string|null); + + /** ListOSPolicyAssignmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListOSPolicyAssignmentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentsRequest. */ + class ListOSPolicyAssignmentsRequest implements IListOSPolicyAssignmentsRequest { + + /** + * Constructs a new ListOSPolicyAssignmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest); + + /** ListOSPolicyAssignmentsRequest parent. */ + public parent: string; + + /** ListOSPolicyAssignmentsRequest pageSize. */ + public pageSize: number; + + /** ListOSPolicyAssignmentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest): google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest; + + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest; + + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest; + + /** + * Verifies a ListOSPolicyAssignmentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest; + + /** + * Creates a plain object from a ListOSPolicyAssignmentsRequest message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentsResponse. */ + interface IListOSPolicyAssignmentsResponse { + + /** ListOSPolicyAssignmentsResponse osPolicyAssignments */ + osPolicyAssignments?: (google.cloud.osconfig.v1.IOSPolicyAssignment[]|null); + + /** ListOSPolicyAssignmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentsResponse. */ + class ListOSPolicyAssignmentsResponse implements IListOSPolicyAssignmentsResponse { + + /** + * Constructs a new ListOSPolicyAssignmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse); + + /** ListOSPolicyAssignmentsResponse osPolicyAssignments. */ + public osPolicyAssignments: google.cloud.osconfig.v1.IOSPolicyAssignment[]; + + /** ListOSPolicyAssignmentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse): google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse; + + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse; + + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse; + + /** + * Verifies a ListOSPolicyAssignmentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse; + + /** + * Creates a plain object from a ListOSPolicyAssignmentsResponse message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentRevisionsRequest. */ + interface IListOSPolicyAssignmentRevisionsRequest { + + /** ListOSPolicyAssignmentRevisionsRequest name */ + name?: (string|null); + + /** ListOSPolicyAssignmentRevisionsRequest pageSize */ + pageSize?: (number|null); + + /** ListOSPolicyAssignmentRevisionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentRevisionsRequest. */ + class ListOSPolicyAssignmentRevisionsRequest implements IListOSPolicyAssignmentRevisionsRequest { + + /** + * Constructs a new ListOSPolicyAssignmentRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest); + + /** ListOSPolicyAssignmentRevisionsRequest name. */ + public name: string; + + /** ListOSPolicyAssignmentRevisionsRequest pageSize. */ + public pageSize: number; + + /** ListOSPolicyAssignmentRevisionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentRevisionsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest): google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest; + + /** + * Verifies a ListOSPolicyAssignmentRevisionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest; + + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsRequest message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentRevisionsResponse. */ + interface IListOSPolicyAssignmentRevisionsResponse { + + /** ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments */ + osPolicyAssignments?: (google.cloud.osconfig.v1.IOSPolicyAssignment[]|null); + + /** ListOSPolicyAssignmentRevisionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentRevisionsResponse. */ + class ListOSPolicyAssignmentRevisionsResponse implements IListOSPolicyAssignmentRevisionsResponse { + + /** + * Constructs a new ListOSPolicyAssignmentRevisionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse); + + /** ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments. */ + public osPolicyAssignments: google.cloud.osconfig.v1.IOSPolicyAssignment[]; + + /** ListOSPolicyAssignmentRevisionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentRevisionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentRevisionsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse): google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse; + + /** + * Verifies a ListOSPolicyAssignmentRevisionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentRevisionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse; + + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsResponse message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentRevisionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentRevisionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOSPolicyAssignmentRequest. */ + interface IDeleteOSPolicyAssignmentRequest { + + /** DeleteOSPolicyAssignmentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOSPolicyAssignmentRequest. */ + class DeleteOSPolicyAssignmentRequest implements IDeleteOSPolicyAssignmentRequest { + + /** + * Constructs a new DeleteOSPolicyAssignmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest); + + /** DeleteOSPolicyAssignmentRequest name. */ + public name: string; + + /** + * Creates a new DeleteOSPolicyAssignmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOSPolicyAssignmentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest): google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest; + + /** + * Encodes the specified DeleteOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @param message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @param message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest; + + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest; + + /** + * Verifies a DeleteOSPolicyAssignmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOSPolicyAssignmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest; + + /** + * Creates a plain object from a DeleteOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @param message DeleteOSPolicyAssignmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOSPolicyAssignmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a FixedOrPercent. */ interface IFixedOrPercent { @@ -5651,6 +10432,118 @@ export namespace google { */ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): OsConfigZonalService; + /** + * Calls CreateOSPolicyAssignment. + * @param request CreateOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createOSPolicyAssignment(request: google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.CreateOSPolicyAssignmentCallback): void; + + /** + * Calls CreateOSPolicyAssignment. + * @param request CreateOSPolicyAssignmentRequest message or plain object + * @returns Promise + */ + public createOSPolicyAssignment(request: google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest): Promise; + + /** + * Calls UpdateOSPolicyAssignment. + * @param request UpdateOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateOSPolicyAssignment(request: google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.UpdateOSPolicyAssignmentCallback): void; + + /** + * Calls UpdateOSPolicyAssignment. + * @param request UpdateOSPolicyAssignmentRequest message or plain object + * @returns Promise + */ + public updateOSPolicyAssignment(request: google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest): Promise; + + /** + * Calls GetOSPolicyAssignment. + * @param request GetOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OSPolicyAssignment + */ + public getOSPolicyAssignment(request: google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentCallback): void; + + /** + * Calls GetOSPolicyAssignment. + * @param request GetOSPolicyAssignmentRequest message or plain object + * @returns Promise + */ + public getOSPolicyAssignment(request: google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest): Promise; + + /** + * Calls ListOSPolicyAssignments. + * @param request ListOSPolicyAssignmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentsResponse + */ + public listOSPolicyAssignments(request: google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentsCallback): void; + + /** + * Calls ListOSPolicyAssignments. + * @param request ListOSPolicyAssignmentsRequest message or plain object + * @returns Promise + */ + public listOSPolicyAssignments(request: google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest): Promise; + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @param request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentRevisionsResponse + */ + public listOSPolicyAssignmentRevisions(request: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentRevisionsCallback): void; + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @param request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @returns Promise + */ + public listOSPolicyAssignmentRevisions(request: google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest): Promise; + + /** + * Calls DeleteOSPolicyAssignment. + * @param request DeleteOSPolicyAssignmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteOSPolicyAssignment(request: google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.DeleteOSPolicyAssignmentCallback): void; + + /** + * Calls DeleteOSPolicyAssignment. + * @param request DeleteOSPolicyAssignmentRequest message or plain object + * @returns Promise + */ + public deleteOSPolicyAssignment(request: google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest): Promise; + + /** + * Calls GetOSPolicyAssignmentReport. + * @param request GetOSPolicyAssignmentReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OSPolicyAssignmentReport + */ + public getOSPolicyAssignmentReport(request: google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentReportCallback): void; + + /** + * Calls GetOSPolicyAssignmentReport. + * @param request GetOSPolicyAssignmentReportRequest message or plain object + * @returns Promise + */ + public getOSPolicyAssignmentReport(request: google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest): Promise; + + /** + * Calls ListOSPolicyAssignmentReports. + * @param request ListOSPolicyAssignmentReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentReportsResponse + */ + public listOSPolicyAssignmentReports(request: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, callback: google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentReportsCallback): void; + + /** + * Calls ListOSPolicyAssignmentReports. + * @param request ListOSPolicyAssignmentReportsRequest message or plain object + * @returns Promise + */ + public listOSPolicyAssignmentReports(request: google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest): Promise; + /** * Calls GetInventory. * @param request GetInventoryRequest message or plain object @@ -5710,6 +10603,62 @@ export namespace google { namespace OsConfigZonalService { + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#createOSPolicyAssignment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#updateOSPolicyAssignment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getOSPolicyAssignment}. + * @param error Error, if any + * @param [response] OSPolicyAssignment + */ + type GetOSPolicyAssignmentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.OSPolicyAssignment) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignments}. + * @param error Error, if any + * @param [response] ListOSPolicyAssignmentsResponse + */ + type ListOSPolicyAssignmentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * @param error Error, if any + * @param [response] ListOSPolicyAssignmentRevisionsResponse + */ + type ListOSPolicyAssignmentRevisionsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#deleteOSPolicyAssignment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getOSPolicyAssignmentReport}. + * @param error Error, if any + * @param [response] OSPolicyAssignmentReport + */ + type GetOSPolicyAssignmentReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.OSPolicyAssignmentReport) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignmentReports}. + * @param error Error, if any + * @param [response] ListOSPolicyAssignmentReportsResponse + */ + type ListOSPolicyAssignmentReportsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse) => void; + /** * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getInventory}. * @param error Error, if any @@ -18098,175 +23047,175 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of an Empty. */ - interface IEmpty { + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new Empty. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new Empty instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns FieldMask instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Empty + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies an Empty message. + * Verifies a FieldMask message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new FieldMask. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a FieldMask message. + * Verifies an Empty message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 66c7a37ac70..12f66556032 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -4055,6 +4055,11851 @@ return values; })(); + v1.OSPolicy = (function() { + + /** + * Properties of a OSPolicy. + * @memberof google.cloud.osconfig.v1 + * @interface IOSPolicy + * @property {string|null} [id] OSPolicy id + * @property {string|null} [description] OSPolicy description + * @property {google.cloud.osconfig.v1.OSPolicy.Mode|null} [mode] OSPolicy mode + * @property {Array.|null} [resourceGroups] OSPolicy resourceGroups + * @property {boolean|null} [allowNoResourceGroupMatch] OSPolicy allowNoResourceGroupMatch + */ + + /** + * Constructs a new OSPolicy. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a OSPolicy. + * @implements IOSPolicy + * @constructor + * @param {google.cloud.osconfig.v1.IOSPolicy=} [properties] Properties to set + */ + function OSPolicy(properties) { + this.resourceGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicy id. + * @member {string} id + * @memberof google.cloud.osconfig.v1.OSPolicy + * @instance + */ + OSPolicy.prototype.id = ""; + + /** + * OSPolicy description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.OSPolicy + * @instance + */ + OSPolicy.prototype.description = ""; + + /** + * OSPolicy mode. + * @member {google.cloud.osconfig.v1.OSPolicy.Mode} mode + * @memberof google.cloud.osconfig.v1.OSPolicy + * @instance + */ + OSPolicy.prototype.mode = 0; + + /** + * OSPolicy resourceGroups. + * @member {Array.} resourceGroups + * @memberof google.cloud.osconfig.v1.OSPolicy + * @instance + */ + OSPolicy.prototype.resourceGroups = $util.emptyArray; + + /** + * OSPolicy allowNoResourceGroupMatch. + * @member {boolean} allowNoResourceGroupMatch + * @memberof google.cloud.osconfig.v1.OSPolicy + * @instance + */ + OSPolicy.prototype.allowNoResourceGroupMatch = false; + + /** + * Creates a new OSPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy + * @static + * @param {google.cloud.osconfig.v1.IOSPolicy=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy} OSPolicy instance + */ + OSPolicy.create = function create(properties) { + return new OSPolicy(properties); + }; + + /** + * Encodes the specified OSPolicy message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy + * @static + * @param {google.cloud.osconfig.v1.IOSPolicy} message OSPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mode); + if (message.resourceGroups != null && message.resourceGroups.length) + for (var i = 0; i < message.resourceGroups.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup.encode(message.resourceGroups[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.allowNoResourceGroupMatch != null && Object.hasOwnProperty.call(message, "allowNoResourceGroupMatch")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowNoResourceGroupMatch); + return writer; + }; + + /** + * Encodes the specified OSPolicy message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy + * @static + * @param {google.cloud.osconfig.v1.IOSPolicy} message OSPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy} OSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.mode = reader.int32(); + break; + case 4: + if (!(message.resourceGroups && message.resourceGroups.length)) + message.resourceGroups = []; + message.resourceGroups.push($root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup.decode(reader, reader.uint32())); + break; + case 5: + message.allowNoResourceGroupMatch = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy} OSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicy message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.resourceGroups != null && message.hasOwnProperty("resourceGroups")) { + if (!Array.isArray(message.resourceGroups)) + return "resourceGroups: array expected"; + for (var i = 0; i < message.resourceGroups.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup.verify(message.resourceGroups[i]); + if (error) + return "resourceGroups." + error; + } + } + if (message.allowNoResourceGroupMatch != null && message.hasOwnProperty("allowNoResourceGroupMatch")) + if (typeof message.allowNoResourceGroupMatch !== "boolean") + return "allowNoResourceGroupMatch: boolean expected"; + return null; + }; + + /** + * Creates a OSPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy} OSPolicy + */ + OSPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy(); + if (object.id != null) + message.id = String(object.id); + if (object.description != null) + message.description = String(object.description); + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "VALIDATION": + case 1: + message.mode = 1; + break; + case "ENFORCEMENT": + case 2: + message.mode = 2; + break; + } + if (object.resourceGroups) { + if (!Array.isArray(object.resourceGroups)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.resourceGroups: array expected"); + message.resourceGroups = []; + for (var i = 0; i < object.resourceGroups.length; ++i) { + if (typeof object.resourceGroups[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.resourceGroups: object expected"); + message.resourceGroups[i] = $root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup.fromObject(object.resourceGroups[i]); + } + } + if (object.allowNoResourceGroupMatch != null) + message.allowNoResourceGroupMatch = Boolean(object.allowNoResourceGroupMatch); + return message; + }; + + /** + * Creates a plain object from a OSPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy + * @static + * @param {google.cloud.osconfig.v1.OSPolicy} message OSPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceGroups = []; + if (options.defaults) { + object.id = ""; + object.description = ""; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.allowNoResourceGroupMatch = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Mode[message.mode] : message.mode; + if (message.resourceGroups && message.resourceGroups.length) { + object.resourceGroups = []; + for (var j = 0; j < message.resourceGroups.length; ++j) + object.resourceGroups[j] = $root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup.toObject(message.resourceGroups[j], options); + } + if (message.allowNoResourceGroupMatch != null && message.hasOwnProperty("allowNoResourceGroupMatch")) + object.allowNoResourceGroupMatch = message.allowNoResourceGroupMatch; + return object; + }; + + /** + * Converts this OSPolicy to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy + * @instance + * @returns {Object.} JSON object + */ + OSPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicy.InventoryFilter = (function() { + + /** + * Properties of an InventoryFilter. + * @memberof google.cloud.osconfig.v1.OSPolicy + * @interface IInventoryFilter + * @property {string|null} [osShortName] InventoryFilter osShortName + * @property {string|null} [osVersion] InventoryFilter osVersion + */ + + /** + * Constructs a new InventoryFilter. + * @memberof google.cloud.osconfig.v1.OSPolicy + * @classdesc Represents an InventoryFilter. + * @implements IInventoryFilter + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.IInventoryFilter=} [properties] Properties to set + */ + function InventoryFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InventoryFilter osShortName. + * @member {string} osShortName + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @instance + */ + InventoryFilter.prototype.osShortName = ""; + + /** + * InventoryFilter osVersion. + * @member {string} osVersion + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @instance + */ + InventoryFilter.prototype.osVersion = ""; + + /** + * Creates a new InventoryFilter instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.IInventoryFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.InventoryFilter} InventoryFilter instance + */ + InventoryFilter.create = function create(properties) { + return new InventoryFilter(properties); + }; + + /** + * Encodes the specified InventoryFilter message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.InventoryFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.IInventoryFilter} message InventoryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InventoryFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osShortName != null && Object.hasOwnProperty.call(message, "osShortName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osShortName); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osVersion); + return writer; + }; + + /** + * Encodes the specified InventoryFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.InventoryFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.IInventoryFilter} message InventoryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InventoryFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InventoryFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.InventoryFilter} InventoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InventoryFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osShortName = reader.string(); + break; + case 2: + message.osVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InventoryFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.InventoryFilter} InventoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InventoryFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InventoryFilter message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InventoryFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + if (!$util.isString(message.osShortName)) + return "osShortName: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; + return null; + }; + + /** + * Creates an InventoryFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.InventoryFilter} InventoryFilter + */ + InventoryFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter(); + if (object.osShortName != null) + message.osShortName = String(object.osShortName); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); + return message; + }; + + /** + * Creates a plain object from an InventoryFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.InventoryFilter} message InventoryFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InventoryFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osShortName = ""; + object.osVersion = ""; + } + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + object.osShortName = message.osShortName; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; + return object; + }; + + /** + * Converts this InventoryFilter to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @instance + * @returns {Object.} JSON object + */ + InventoryFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InventoryFilter; + })(); + + OSPolicy.Resource = (function() { + + /** + * Properties of a Resource. + * @memberof google.cloud.osconfig.v1.OSPolicy + * @interface IResource + * @property {string|null} [id] Resource id + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource|null} [pkg] Resource pkg + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource|null} [repository] Resource repository + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource|null} [exec] Resource exec + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource|null} [file] Resource file + */ + + /** + * Constructs a new Resource. + * @memberof google.cloud.osconfig.v1.OSPolicy + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.IResource=} [properties] Properties to set + */ + function Resource(properties) { + if (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 id. + * @member {string} id + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @instance + */ + Resource.prototype.id = ""; + + /** + * Resource pkg. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource|null|undefined} pkg + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @instance + */ + Resource.prototype.pkg = null; + + /** + * Resource repository. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource|null|undefined} repository + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @instance + */ + Resource.prototype.repository = null; + + /** + * Resource exec. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource|null|undefined} exec + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @instance + */ + Resource.prototype.exec = null; + + /** + * Resource file. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource|null|undefined} file + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @instance + */ + Resource.prototype.file = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Resource resourceType. + * @member {"pkg"|"repository"|"exec"|"file"|undefined} resourceType + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @instance + */ + Object.defineProperty(Resource.prototype, "resourceType", { + get: $util.oneOfGetter($oneOfFields = ["pkg", "repository", "exec", "file"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Resource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.IResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.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.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.pkg != null && Object.hasOwnProperty.call(message, "pkg")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.encode(message.pkg, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.encode(message.repository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.exec != null && Object.hasOwnProperty.call(message, "exec")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.encode(message.exec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.encode(message.file, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.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.osconfig.v1.OSPolicy.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.pkg = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.decode(reader, reader.uint32()); + break; + case 3: + message.repository = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.decode(reader, reader.uint32()); + break; + case 4: + message.exec = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.decode(reader, reader.uint32()); + break; + case 5: + message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.decode(reader, reader.uint32()); + 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.osconfig.v1.OSPolicy.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.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.osconfig.v1.OSPolicy.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"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.pkg != null && message.hasOwnProperty("pkg")) { + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.verify(message.pkg); + if (error) + return "pkg." + error; + } + } + if (message.repository != null && message.hasOwnProperty("repository")) { + if (properties.resourceType === 1) + return "resourceType: multiple values"; + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.verify(message.repository); + if (error) + return "repository." + error; + } + } + if (message.exec != null && message.hasOwnProperty("exec")) { + if (properties.resourceType === 1) + return "resourceType: multiple values"; + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.verify(message.exec); + if (error) + return "exec." + error; + } + } + if (message.file != null && message.hasOwnProperty("file")) { + if (properties.resourceType === 1) + return "resourceType: multiple values"; + properties.resourceType = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.verify(message.file); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource(); + if (object.id != null) + message.id = String(object.id); + if (object.pkg != null) { + if (typeof object.pkg !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.pkg: object expected"); + message.pkg = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.fromObject(object.pkg); + } + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.repository: object expected"); + message.repository = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.fromObject(object.repository); + } + if (object.exec != null) { + if (typeof object.exec !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.exec: object expected"); + message.exec = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.fromObject(object.exec); + } + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.file: object expected"); + message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.fromObject(object.file); + } + return message; + }; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.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.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.pkg != null && message.hasOwnProperty("pkg")) { + object.pkg = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.toObject(message.pkg, options); + if (options.oneofs) + object.resourceType = "pkg"; + } + if (message.repository != null && message.hasOwnProperty("repository")) { + object.repository = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.toObject(message.repository, options); + if (options.oneofs) + object.resourceType = "repository"; + } + if (message.exec != null && message.hasOwnProperty("exec")) { + object.exec = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.toObject(message.exec, options); + if (options.oneofs) + object.resourceType = "exec"; + } + if (message.file != null && message.hasOwnProperty("file")) { + object.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.toObject(message.file, options); + if (options.oneofs) + object.resourceType = "file"; + } + return object; + }; + + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Resource.File = (function() { + + /** + * Properties of a File. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @interface IFile + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote|null} [remote] File remote + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs|null} [gcs] File gcs + * @property {string|null} [localPath] File localPath + * @property {boolean|null} [allowInsecure] File allowInsecure + */ + + /** + * Constructs a new File. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @classdesc Represents a File. + * @implements IFile + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IFile=} [properties] Properties to set + */ + function File(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * File remote. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote|null|undefined} remote + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @instance + */ + File.prototype.remote = null; + + /** + * File gcs. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs|null|undefined} gcs + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @instance + */ + File.prototype.gcs = null; + + /** + * File localPath. + * @member {string|null|undefined} localPath + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @instance + */ + File.prototype.localPath = null; + + /** + * File allowInsecure. + * @member {boolean} allowInsecure + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @instance + */ + File.prototype.allowInsecure = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * File type. + * @member {"remote"|"gcs"|"localPath"|undefined} type + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @instance + */ + Object.defineProperty(File.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["remote", "gcs", "localPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new File instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IFile=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File} File instance + */ + File.create = function create(properties) { + return new File(properties); + }; + + /** + * Encodes the specified File message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.remote != null && Object.hasOwnProperty.call(message, "remote")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.encode(message.remote, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gcs != null && Object.hasOwnProperty.call(message, "gcs")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.encode(message.gcs, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.localPath); + if (message.allowInsecure != null && Object.hasOwnProperty.call(message, "allowInsecure")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowInsecure); + return writer; + }; + + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a File message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.File(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.remote = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.decode(reader, reader.uint32()); + break; + case 2: + message.gcs = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.decode(reader, reader.uint32()); + break; + case 3: + message.localPath = reader.string(); + break; + case 4: + message.allowInsecure = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a File message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + File.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.remote != null && message.hasOwnProperty("remote")) { + properties.type = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.verify(message.remote); + if (error) + return "remote." + error; + } + } + if (message.gcs != null && message.hasOwnProperty("gcs")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.verify(message.gcs); + if (error) + return "gcs." + error; + } + } + if (message.localPath != null && message.hasOwnProperty("localPath")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + if (!$util.isString(message.localPath)) + return "localPath: string expected"; + } + if (message.allowInsecure != null && message.hasOwnProperty("allowInsecure")) + if (typeof message.allowInsecure !== "boolean") + return "allowInsecure: boolean expected"; + return null; + }; + + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File} File + */ + File.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.File) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.File(); + if (object.remote != null) { + if (typeof object.remote !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.File.remote: object expected"); + message.remote = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.fromObject(object.remote); + } + if (object.gcs != null) { + if (typeof object.gcs !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.File.gcs: object expected"); + message.gcs = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.fromObject(object.gcs); + } + if (object.localPath != null) + message.localPath = String(object.localPath); + if (object.allowInsecure != null) + message.allowInsecure = Boolean(object.allowInsecure); + return message; + }; + + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File} message File + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + File.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.allowInsecure = false; + if (message.remote != null && message.hasOwnProperty("remote")) { + object.remote = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.toObject(message.remote, options); + if (options.oneofs) + object.type = "remote"; + } + if (message.gcs != null && message.hasOwnProperty("gcs")) { + object.gcs = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.toObject(message.gcs, options); + if (options.oneofs) + object.type = "gcs"; + } + if (message.localPath != null && message.hasOwnProperty("localPath")) { + object.localPath = message.localPath; + if (options.oneofs) + object.type = "localPath"; + } + if (message.allowInsecure != null && message.hasOwnProperty("allowInsecure")) + object.allowInsecure = message.allowInsecure; + return object; + }; + + /** + * Converts this File to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @instance + * @returns {Object.} JSON object + */ + File.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + File.Remote = (function() { + + /** + * Properties of a Remote. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @interface IRemote + * @property {string|null} [uri] Remote uri + * @property {string|null} [sha256Checksum] Remote sha256Checksum + */ + + /** + * Constructs a new Remote. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @classdesc Represents a Remote. + * @implements IRemote + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote=} [properties] Properties to set + */ + function Remote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Remote uri. + * @member {string} uri + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @instance + */ + Remote.prototype.uri = ""; + + /** + * Remote sha256Checksum. + * @member {string} sha256Checksum + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @instance + */ + Remote.prototype.sha256Checksum = ""; + + /** + * Creates a new Remote instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote} Remote instance + */ + Remote.create = function create(properties) { + return new Remote(properties); + }; + + /** + * Encodes the specified Remote message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote} message Remote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Remote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.sha256Checksum != null && Object.hasOwnProperty.call(message, "sha256Checksum")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sha256Checksum); + return writer; + }; + + /** + * Encodes the specified Remote message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.IRemote} message Remote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Remote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Remote message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote} Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Remote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + message.sha256Checksum = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Remote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote} Remote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Remote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Remote message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Remote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.sha256Checksum != null && message.hasOwnProperty("sha256Checksum")) + if (!$util.isString(message.sha256Checksum)) + return "sha256Checksum: string expected"; + return null; + }; + + /** + * Creates a Remote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote} Remote + */ + Remote.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.sha256Checksum != null) + message.sha256Checksum = String(object.sha256Checksum); + return message; + }; + + /** + * Creates a plain object from a Remote message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote} message Remote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Remote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.sha256Checksum = ""; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.sha256Checksum != null && message.hasOwnProperty("sha256Checksum")) + object.sha256Checksum = message.sha256Checksum; + return object; + }; + + /** + * Converts this Remote to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @instance + * @returns {Object.} JSON object + */ + Remote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Remote; + })(); + + File.Gcs = (function() { + + /** + * Properties of a Gcs. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @interface IGcs + * @property {string|null} [bucket] Gcs bucket + * @property {string|null} [object] Gcs object + * @property {number|Long|null} [generation] Gcs generation + */ + + /** + * Constructs a new Gcs. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @classdesc Represents a Gcs. + * @implements IGcs + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs=} [properties] Properties to set + */ + function Gcs(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Gcs bucket. + * @member {string} bucket + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @instance + */ + Gcs.prototype.bucket = ""; + + /** + * Gcs object. + * @member {string} object + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @instance + */ + Gcs.prototype.object = ""; + + /** + * Gcs generation. + * @member {number|Long} generation + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @instance + */ + Gcs.prototype.generation = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Gcs instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs} Gcs instance + */ + Gcs.create = function create(properties) { + return new Gcs(properties); + }; + + /** + * Encodes the specified Gcs message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs} message Gcs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gcs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.object != null && Object.hasOwnProperty.call(message, "object")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); + if (message.generation != null && Object.hasOwnProperty.call(message, "generation")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generation); + return writer; + }; + + /** + * Encodes the specified Gcs message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.IGcs} message Gcs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gcs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Gcs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs} Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gcs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bucket = reader.string(); + break; + case 2: + message.object = reader.string(); + break; + case 3: + message.generation = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Gcs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs} Gcs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gcs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Gcs message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Gcs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.object != null && message.hasOwnProperty("object")) + if (!$util.isString(message.object)) + return "object: string expected"; + if (message.generation != null && message.hasOwnProperty("generation")) + if (!$util.isInteger(message.generation) && !(message.generation && $util.isInteger(message.generation.low) && $util.isInteger(message.generation.high))) + return "generation: integer|Long expected"; + return null; + }; + + /** + * Creates a Gcs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs} Gcs + */ + Gcs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.object != null) + message.object = String(object.object); + if (object.generation != null) + if ($util.Long) + (message.generation = $util.Long.fromValue(object.generation)).unsigned = false; + else if (typeof object.generation === "string") + message.generation = parseInt(object.generation, 10); + else if (typeof object.generation === "number") + message.generation = object.generation; + else if (typeof object.generation === "object") + message.generation = new $util.LongBits(object.generation.low >>> 0, object.generation.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Gcs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs} message Gcs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Gcs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.object = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.generation = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.generation = options.longs === String ? "0" : 0; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.object != null && message.hasOwnProperty("object")) + object.object = message.object; + if (message.generation != null && message.hasOwnProperty("generation")) + if (typeof message.generation === "number") + object.generation = options.longs === String ? String(message.generation) : message.generation; + else + object.generation = options.longs === String ? $util.Long.prototype.toString.call(message.generation) : options.longs === Number ? new $util.LongBits(message.generation.low >>> 0, message.generation.high >>> 0).toNumber() : message.generation; + return object; + }; + + /** + * Converts this Gcs to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @instance + * @returns {Object.} JSON object + */ + Gcs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Gcs; + })(); + + return File; + })(); + + Resource.PackageResource = (function() { + + /** + * Properties of a PackageResource. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @interface IPackageResource + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState|null} [desiredState] PackageResource desiredState + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT|null} [apt] PackageResource apt + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb|null} [deb] PackageResource deb + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM|null} [yum] PackageResource yum + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper|null} [zypper] PackageResource zypper + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM|null} [rpm] PackageResource rpm + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet|null} [googet] PackageResource googet + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI|null} [msi] PackageResource msi + */ + + /** + * Constructs a new PackageResource. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @classdesc Represents a PackageResource. + * @implements IPackageResource + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource=} [properties] Properties to set + */ + function PackageResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PackageResource desiredState. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState} desiredState + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.desiredState = 0; + + /** + * PackageResource apt. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT|null|undefined} apt + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.apt = null; + + /** + * PackageResource deb. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb|null|undefined} deb + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.deb = null; + + /** + * PackageResource yum. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM|null|undefined} yum + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.yum = null; + + /** + * PackageResource zypper. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper|null|undefined} zypper + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.zypper = null; + + /** + * PackageResource rpm. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM|null|undefined} rpm + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.rpm = null; + + /** + * PackageResource googet. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet|null|undefined} googet + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.googet = null; + + /** + * PackageResource msi. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI|null|undefined} msi + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + */ + PackageResource.prototype.msi = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PackageResource systemPackage. + * @member {"apt"|"deb"|"yum"|"zypper"|"rpm"|"googet"|"msi"|undefined} systemPackage + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + */ + Object.defineProperty(PackageResource.prototype, "systemPackage", { + get: $util.oneOfGetter($oneOfFields = ["apt", "deb", "yum", "zypper", "rpm", "googet", "msi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PackageResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource} PackageResource instance + */ + PackageResource.create = function create(properties) { + return new PackageResource(properties); + }; + + /** + * Encodes the specified PackageResource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource} message PackageResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.desiredState != null && Object.hasOwnProperty.call(message, "desiredState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.desiredState); + if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.encode(message.apt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.deb != null && Object.hasOwnProperty.call(message, "deb")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.encode(message.deb, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.encode(message.yum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.encode(message.zypper, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.rpm != null && Object.hasOwnProperty.call(message, "rpm")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.encode(message.rpm, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.googet != null && Object.hasOwnProperty.call(message, "googet")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.encode(message.googet, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.msi != null && Object.hasOwnProperty.call(message, "msi")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.encode(message.msi, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PackageResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IPackageResource} message PackageResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PackageResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource} PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.desiredState = reader.int32(); + break; + case 2: + message.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.decode(reader, reader.uint32()); + break; + case 3: + message.deb = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.decode(reader, reader.uint32()); + break; + case 4: + message.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.decode(reader, reader.uint32()); + break; + case 5: + message.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.decode(reader, reader.uint32()); + break; + case 6: + message.rpm = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.decode(reader, reader.uint32()); + break; + case 7: + message.googet = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.decode(reader, reader.uint32()); + break; + case 8: + message.msi = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PackageResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource} PackageResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PackageResource message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PackageResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.desiredState != null && message.hasOwnProperty("desiredState")) + switch (message.desiredState) { + default: + return "desiredState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.apt != null && message.hasOwnProperty("apt")) { + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.verify(message.apt); + if (error) + return "apt." + error; + } + } + if (message.deb != null && message.hasOwnProperty("deb")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.verify(message.deb); + if (error) + return "deb." + error; + } + } + if (message.yum != null && message.hasOwnProperty("yum")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.verify(message.yum); + if (error) + return "yum." + error; + } + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.verify(message.zypper); + if (error) + return "zypper." + error; + } + } + if (message.rpm != null && message.hasOwnProperty("rpm")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.verify(message.rpm); + if (error) + return "rpm." + error; + } + } + if (message.googet != null && message.hasOwnProperty("googet")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.verify(message.googet); + if (error) + return "googet." + error; + } + } + if (message.msi != null && message.hasOwnProperty("msi")) { + if (properties.systemPackage === 1) + return "systemPackage: multiple values"; + properties.systemPackage = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.verify(message.msi); + if (error) + return "msi." + error; + } + } + return null; + }; + + /** + * Creates a PackageResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource} PackageResource + */ + PackageResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource(); + switch (object.desiredState) { + case "DESIRED_STATE_UNSPECIFIED": + case 0: + message.desiredState = 0; + break; + case "INSTALLED": + case 1: + message.desiredState = 1; + break; + case "REMOVED": + case 2: + message.desiredState = 2; + break; + } + if (object.apt != null) { + if (typeof object.apt !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.apt: object expected"); + message.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.fromObject(object.apt); + } + if (object.deb != null) { + if (typeof object.deb !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.deb: object expected"); + message.deb = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.fromObject(object.deb); + } + if (object.yum != null) { + if (typeof object.yum !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.yum: object expected"); + message.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.fromObject(object.yum); + } + if (object.zypper != null) { + if (typeof object.zypper !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.zypper: object expected"); + message.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.fromObject(object.zypper); + } + if (object.rpm != null) { + if (typeof object.rpm !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.rpm: object expected"); + message.rpm = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.fromObject(object.rpm); + } + if (object.googet != null) { + if (typeof object.googet !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.googet: object expected"); + message.googet = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.fromObject(object.googet); + } + if (object.msi != null) { + if (typeof object.msi !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.msi: object expected"); + message.msi = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.fromObject(object.msi); + } + return message; + }; + + /** + * Creates a plain object from a PackageResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource} message PackageResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PackageResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desiredState = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; + if (message.desiredState != null && message.hasOwnProperty("desiredState")) + object.desiredState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] : message.desiredState; + if (message.apt != null && message.hasOwnProperty("apt")) { + object.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.toObject(message.apt, options); + if (options.oneofs) + object.systemPackage = "apt"; + } + if (message.deb != null && message.hasOwnProperty("deb")) { + object.deb = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.toObject(message.deb, options); + if (options.oneofs) + object.systemPackage = "deb"; + } + if (message.yum != null && message.hasOwnProperty("yum")) { + object.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.toObject(message.yum, options); + if (options.oneofs) + object.systemPackage = "yum"; + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + object.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.toObject(message.zypper, options); + if (options.oneofs) + object.systemPackage = "zypper"; + } + if (message.rpm != null && message.hasOwnProperty("rpm")) { + object.rpm = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.toObject(message.rpm, options); + if (options.oneofs) + object.systemPackage = "rpm"; + } + if (message.googet != null && message.hasOwnProperty("googet")) { + object.googet = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.toObject(message.googet, options); + if (options.oneofs) + object.systemPackage = "googet"; + } + if (message.msi != null && message.hasOwnProperty("msi")) { + object.msi = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.toObject(message.msi, options); + if (options.oneofs) + object.systemPackage = "msi"; + } + return object; + }; + + /** + * Converts this PackageResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @instance + * @returns {Object.} JSON object + */ + PackageResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PackageResource.Deb = (function() { + + /** + * Properties of a Deb. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @interface IDeb + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null} [source] Deb source + * @property {boolean|null} [pullDeps] Deb pullDeps + */ + + /** + * Constructs a new Deb. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @classdesc Represents a Deb. + * @implements IDeb + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb=} [properties] Properties to set + */ + function Deb(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deb source. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null|undefined} source + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @instance + */ + Deb.prototype.source = null; + + /** + * Deb pullDeps. + * @member {boolean} pullDeps + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @instance + */ + Deb.prototype.pullDeps = false; + + /** + * Creates a new Deb instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb} Deb instance + */ + Deb.create = function create(properties) { + return new Deb(properties); + }; + + /** + * Encodes the specified Deb message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb} message Deb message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deb.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pullDeps != null && Object.hasOwnProperty.call(message, "pullDeps")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.pullDeps); + return writer; + }; + + /** + * Encodes the specified Deb message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IDeb} message Deb message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deb.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deb message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb} Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deb.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.pullDeps = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deb message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb} Deb + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deb.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deb message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deb.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.verify(message.source); + if (error) + return "source." + error; + } + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + if (typeof message.pullDeps !== "boolean") + return "pullDeps: boolean expected"; + return null; + }; + + /** + * Creates a Deb message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb} Deb + */ + Deb.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.source: object expected"); + message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.fromObject(object.source); + } + if (object.pullDeps != null) + message.pullDeps = Boolean(object.pullDeps); + return message; + }; + + /** + * Creates a plain object from a Deb message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb} message Deb + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deb.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.pullDeps = false; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.toObject(message.source, options); + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + object.pullDeps = message.pullDeps; + return object; + }; + + /** + * Converts this Deb to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @instance + * @returns {Object.} JSON object + */ + Deb.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Deb; + })(); + + PackageResource.APT = (function() { + + /** + * Properties of a APT. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @interface IAPT + * @property {string|null} [name] APT name + */ + + /** + * Constructs a new APT. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @classdesc Represents a APT. + * @implements IAPT + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT=} [properties] Properties to set + */ + function APT(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * APT name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @instance + */ + APT.prototype.name = ""; + + /** + * Creates a new APT instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT} APT instance + */ + APT.create = function create(properties) { + return new APT(properties); + }; + + /** + * Encodes the specified APT message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT} message APT message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + APT.encode = function encode(message, writer) { + 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 APT message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IAPT} message APT message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + APT.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a APT message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT} APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + APT.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a APT message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT} APT + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + APT.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a APT message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + APT.verify = function verify(message) { + if (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 APT message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT} APT + */ + APT.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a APT message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT} message APT + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + APT.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 APT to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @instance + * @returns {Object.} JSON object + */ + APT.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return APT; + })(); + + PackageResource.RPM = (function() { + + /** + * Properties of a RPM. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @interface IRPM + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null} [source] RPM source + * @property {boolean|null} [pullDeps] RPM pullDeps + */ + + /** + * Constructs a new RPM. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @classdesc Represents a RPM. + * @implements IRPM + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM=} [properties] Properties to set + */ + function RPM(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RPM source. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null|undefined} source + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @instance + */ + RPM.prototype.source = null; + + /** + * RPM pullDeps. + * @member {boolean} pullDeps + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @instance + */ + RPM.prototype.pullDeps = false; + + /** + * Creates a new RPM instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM} RPM instance + */ + RPM.create = function create(properties) { + return new RPM(properties); + }; + + /** + * Encodes the specified RPM message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM} message RPM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RPM.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pullDeps != null && Object.hasOwnProperty.call(message, "pullDeps")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.pullDeps); + return writer; + }; + + /** + * Encodes the specified RPM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IRPM} message RPM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RPM.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RPM message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM} RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RPM.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.pullDeps = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RPM message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM} RPM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RPM.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RPM message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RPM.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.verify(message.source); + if (error) + return "source." + error; + } + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + if (typeof message.pullDeps !== "boolean") + return "pullDeps: boolean expected"; + return null; + }; + + /** + * Creates a RPM message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM} RPM + */ + RPM.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.source: object expected"); + message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.fromObject(object.source); + } + if (object.pullDeps != null) + message.pullDeps = Boolean(object.pullDeps); + return message; + }; + + /** + * Creates a plain object from a RPM message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM} message RPM + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RPM.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.pullDeps = false; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.toObject(message.source, options); + if (message.pullDeps != null && message.hasOwnProperty("pullDeps")) + object.pullDeps = message.pullDeps; + return object; + }; + + /** + * Converts this RPM to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @instance + * @returns {Object.} JSON object + */ + RPM.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RPM; + })(); + + PackageResource.YUM = (function() { + + /** + * Properties of a YUM. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @interface IYUM + * @property {string|null} [name] YUM name + */ + + /** + * Constructs a new YUM. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @classdesc Represents a YUM. + * @implements IYUM + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM=} [properties] Properties to set + */ + function YUM(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * YUM name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @instance + */ + YUM.prototype.name = ""; + + /** + * Creates a new YUM instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM} YUM instance + */ + YUM.create = function create(properties) { + return new YUM(properties); + }; + + /** + * Encodes the specified YUM message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM} message YUM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YUM.encode = function encode(message, writer) { + 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 YUM message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IYUM} message YUM message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YUM.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YUM message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM} YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YUM.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a YUM message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM} YUM + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YUM.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a YUM message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YUM.verify = function verify(message) { + if (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 YUM message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM} YUM + */ + YUM.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a YUM message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM} message YUM + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YUM.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 YUM to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @instance + * @returns {Object.} JSON object + */ + YUM.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return YUM; + })(); + + PackageResource.Zypper = (function() { + + /** + * Properties of a Zypper. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @interface IZypper + * @property {string|null} [name] Zypper name + */ + + /** + * Constructs a new Zypper. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @classdesc Represents a Zypper. + * @implements IZypper + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper=} [properties] Properties to set + */ + function Zypper(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Zypper name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @instance + */ + Zypper.prototype.name = ""; + + /** + * Creates a new Zypper instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper} Zypper instance + */ + Zypper.create = function create(properties) { + return new Zypper(properties); + }; + + /** + * Encodes the specified Zypper message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper} message Zypper message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zypper.encode = function encode(message, writer) { + 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 Zypper message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IZypper} message Zypper message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zypper.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Zypper message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper} Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zypper.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Zypper message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper} Zypper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zypper.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Zypper message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Zypper.verify = function verify(message) { + if (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 Zypper message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper} Zypper + */ + Zypper.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Zypper message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper} message Zypper + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Zypper.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 Zypper to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @instance + * @returns {Object.} JSON object + */ + Zypper.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Zypper; + })(); + + PackageResource.GooGet = (function() { + + /** + * Properties of a GooGet. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @interface IGooGet + * @property {string|null} [name] GooGet name + */ + + /** + * Constructs a new GooGet. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @classdesc Represents a GooGet. + * @implements IGooGet + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet=} [properties] Properties to set + */ + function GooGet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GooGet name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @instance + */ + GooGet.prototype.name = ""; + + /** + * Creates a new GooGet instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet} GooGet instance + */ + GooGet.create = function create(properties) { + return new GooGet(properties); + }; + + /** + * Encodes the specified GooGet message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet} message GooGet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooGet.encode = function encode(message, writer) { + 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 GooGet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IGooGet} message GooGet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooGet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GooGet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet} GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooGet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GooGet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet} GooGet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooGet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GooGet message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GooGet.verify = function verify(message) { + if (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 GooGet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet} GooGet + */ + GooGet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GooGet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet} message GooGet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GooGet.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 GooGet to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @instance + * @returns {Object.} JSON object + */ + GooGet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GooGet; + })(); + + PackageResource.MSI = (function() { + + /** + * Properties of a MSI. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @interface IMSI + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null} [source] MSI source + * @property {Array.|null} [properties] MSI properties + */ + + /** + * Constructs a new MSI. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @classdesc Represents a MSI. + * @implements IMSI + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI=} [properties] Properties to set + */ + function MSI(properties) { + this.properties = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MSI source. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null|undefined} source + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @instance + */ + MSI.prototype.source = null; + + /** + * MSI properties. + * @member {Array.} properties + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @instance + */ + MSI.prototype.properties = $util.emptyArray; + + /** + * Creates a new MSI instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI} MSI instance + */ + MSI.create = function create(properties) { + return new MSI(properties); + }; + + /** + * Encodes the specified MSI message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI} message MSI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MSI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.properties != null && message.properties.length) + for (var i = 0; i < message.properties.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.properties[i]); + return writer; + }; + + /** + * Encodes the specified MSI message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.IMSI} message MSI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MSI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MSI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI} MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MSI.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MSI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI} MSI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MSI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MSI message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MSI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.verify(message.source); + if (error) + return "source." + error; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!Array.isArray(message.properties)) + return "properties: array expected"; + for (var i = 0; i < message.properties.length; ++i) + if (!$util.isString(message.properties[i])) + return "properties: string[] expected"; + } + return null; + }; + + /** + * Creates a MSI message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI} MSI + */ + MSI.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.source: object expected"); + message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.fromObject(object.source); + } + if (object.properties) { + if (!Array.isArray(object.properties)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.properties: array expected"); + message.properties = []; + for (var i = 0; i < object.properties.length; ++i) + message.properties[i] = String(object.properties[i]); + } + return message; + }; + + /** + * Creates a plain object from a MSI message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI} message MSI + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MSI.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.properties = []; + if (options.defaults) + object.source = null; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.toObject(message.source, options); + if (message.properties && message.properties.length) { + object.properties = []; + for (var j = 0; j < message.properties.length; ++j) + object.properties[j] = message.properties[j]; + } + return object; + }; + + /** + * Converts this MSI to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @instance + * @returns {Object.} JSON object + */ + MSI.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MSI; + })(); + + /** + * DesiredState enum. + * @name google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState + * @enum {number} + * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value + * @property {number} INSTALLED=1 INSTALLED value + * @property {number} REMOVED=2 REMOVED value + */ + PackageResource.DesiredState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLED"] = 1; + values[valuesById[2] = "REMOVED"] = 2; + return values; + })(); + + return PackageResource; + })(); + + Resource.RepositoryResource = (function() { + + /** + * Properties of a RepositoryResource. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @interface IRepositoryResource + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository|null} [apt] RepositoryResource apt + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository|null} [yum] RepositoryResource yum + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository|null} [zypper] RepositoryResource zypper + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository|null} [goo] RepositoryResource goo + */ + + /** + * Constructs a new RepositoryResource. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @classdesc Represents a RepositoryResource. + * @implements IRepositoryResource + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource=} [properties] Properties to set + */ + function RepositoryResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RepositoryResource apt. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository|null|undefined} apt + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.apt = null; + + /** + * RepositoryResource yum. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository|null|undefined} yum + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.yum = null; + + /** + * RepositoryResource zypper. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository|null|undefined} zypper + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.zypper = null; + + /** + * RepositoryResource goo. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository|null|undefined} goo + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @instance + */ + RepositoryResource.prototype.goo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RepositoryResource repository. + * @member {"apt"|"yum"|"zypper"|"goo"|undefined} repository + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @instance + */ + Object.defineProperty(RepositoryResource.prototype, "repository", { + get: $util.oneOfGetter($oneOfFields = ["apt", "yum", "zypper", "goo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RepositoryResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource} RepositoryResource instance + */ + RepositoryResource.create = function create(properties) { + return new RepositoryResource(properties); + }; + + /** + * Encodes the specified RepositoryResource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource} message RepositoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepositoryResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apt != null && Object.hasOwnProperty.call(message, "apt")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.encode(message.apt, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.yum != null && Object.hasOwnProperty.call(message, "yum")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.encode(message.yum, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zypper != null && Object.hasOwnProperty.call(message, "zypper")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.encode(message.zypper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.goo != null && Object.hasOwnProperty.call(message, "goo")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.encode(message.goo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RepositoryResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IRepositoryResource} message RepositoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepositoryResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource} RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepositoryResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.decode(reader, reader.uint32()); + break; + case 2: + message.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.decode(reader, reader.uint32()); + break; + case 3: + message.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.decode(reader, reader.uint32()); + break; + case 4: + message.goo = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RepositoryResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource} RepositoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepositoryResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RepositoryResource message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RepositoryResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.apt != null && message.hasOwnProperty("apt")) { + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.verify(message.apt); + if (error) + return "apt." + error; + } + } + if (message.yum != null && message.hasOwnProperty("yum")) { + if (properties.repository === 1) + return "repository: multiple values"; + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.verify(message.yum); + if (error) + return "yum." + error; + } + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + if (properties.repository === 1) + return "repository: multiple values"; + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify(message.zypper); + if (error) + return "zypper." + error; + } + } + if (message.goo != null && message.hasOwnProperty("goo")) { + if (properties.repository === 1) + return "repository: multiple values"; + properties.repository = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.verify(message.goo); + if (error) + return "goo." + error; + } + } + return null; + }; + + /** + * Creates a RepositoryResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource} RepositoryResource + */ + RepositoryResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource(); + if (object.apt != null) { + if (typeof object.apt !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.apt: object expected"); + message.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.fromObject(object.apt); + } + if (object.yum != null) { + if (typeof object.yum !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.yum: object expected"); + message.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.fromObject(object.yum); + } + if (object.zypper != null) { + if (typeof object.zypper !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.zypper: object expected"); + message.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.fromObject(object.zypper); + } + if (object.goo != null) { + if (typeof object.goo !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.goo: object expected"); + message.goo = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.fromObject(object.goo); + } + return message; + }; + + /** + * Creates a plain object from a RepositoryResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource} message RepositoryResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RepositoryResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.apt != null && message.hasOwnProperty("apt")) { + object.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.toObject(message.apt, options); + if (options.oneofs) + object.repository = "apt"; + } + if (message.yum != null && message.hasOwnProperty("yum")) { + object.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.toObject(message.yum, options); + if (options.oneofs) + object.repository = "yum"; + } + if (message.zypper != null && message.hasOwnProperty("zypper")) { + object.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.toObject(message.zypper, options); + if (options.oneofs) + object.repository = "zypper"; + } + if (message.goo != null && message.hasOwnProperty("goo")) { + object.goo = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.toObject(message.goo, options); + if (options.oneofs) + object.repository = "goo"; + } + return object; + }; + + /** + * Converts this RepositoryResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @instance + * @returns {Object.} JSON object + */ + RepositoryResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + RepositoryResource.AptRepository = (function() { + + /** + * Properties of an AptRepository. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @interface IAptRepository + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType|null} [archiveType] AptRepository archiveType + * @property {string|null} [uri] AptRepository uri + * @property {string|null} [distribution] AptRepository distribution + * @property {Array.|null} [components] AptRepository components + * @property {string|null} [gpgKey] AptRepository gpgKey + */ + + /** + * Constructs a new AptRepository. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @classdesc Represents an AptRepository. + * @implements IAptRepository + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository=} [properties] Properties to set + */ + function AptRepository(properties) { + this.components = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AptRepository archiveType. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType} archiveType + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.archiveType = 0; + + /** + * AptRepository uri. + * @member {string} uri + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.uri = ""; + + /** + * AptRepository distribution. + * @member {string} distribution + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.distribution = ""; + + /** + * AptRepository components. + * @member {Array.} components + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.components = $util.emptyArray; + + /** + * AptRepository gpgKey. + * @member {string} gpgKey + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + */ + AptRepository.prototype.gpgKey = ""; + + /** + * Creates a new AptRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository instance + */ + AptRepository.create = function create(properties) { + return new AptRepository(properties); + }; + + /** + * Encodes the specified AptRepository message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository} message AptRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.archiveType != null && Object.hasOwnProperty.call(message, "archiveType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.archiveType); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.distribution != null && Object.hasOwnProperty.call(message, "distribution")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.distribution); + if (message.components != null && message.components.length) + for (var i = 0; i < message.components.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.components[i]); + if (message.gpgKey != null && Object.hasOwnProperty.call(message, "gpgKey")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.gpgKey); + return writer; + }; + + /** + * Encodes the specified AptRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IAptRepository} message AptRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AptRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AptRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.archiveType = reader.int32(); + break; + case 2: + message.uri = reader.string(); + break; + case 3: + message.distribution = reader.string(); + break; + case 4: + if (!(message.components && message.components.length)) + message.components = []; + message.components.push(reader.string()); + break; + case 5: + message.gpgKey = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AptRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AptRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AptRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AptRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.archiveType != null && message.hasOwnProperty("archiveType")) + switch (message.archiveType) { + default: + return "archiveType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.distribution != null && message.hasOwnProperty("distribution")) + if (!$util.isString(message.distribution)) + return "distribution: string expected"; + if (message.components != null && message.hasOwnProperty("components")) { + if (!Array.isArray(message.components)) + return "components: array expected"; + for (var i = 0; i < message.components.length; ++i) + if (!$util.isString(message.components[i])) + return "components: string[] expected"; + } + if (message.gpgKey != null && message.hasOwnProperty("gpgKey")) + if (!$util.isString(message.gpgKey)) + return "gpgKey: string expected"; + return null; + }; + + /** + * Creates an AptRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository} AptRepository + */ + AptRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository(); + switch (object.archiveType) { + case "ARCHIVE_TYPE_UNSPECIFIED": + case 0: + message.archiveType = 0; + break; + case "DEB": + case 1: + message.archiveType = 1; + break; + case "DEB_SRC": + case 2: + message.archiveType = 2; + break; + } + if (object.uri != null) + message.uri = String(object.uri); + if (object.distribution != null) + message.distribution = String(object.distribution); + if (object.components) { + if (!Array.isArray(object.components)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.components: array expected"); + message.components = []; + for (var i = 0; i < object.components.length; ++i) + message.components[i] = String(object.components[i]); + } + if (object.gpgKey != null) + message.gpgKey = String(object.gpgKey); + return message; + }; + + /** + * Creates a plain object from an AptRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository} message AptRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AptRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.components = []; + if (options.defaults) { + object.archiveType = options.enums === String ? "ARCHIVE_TYPE_UNSPECIFIED" : 0; + object.uri = ""; + object.distribution = ""; + object.gpgKey = ""; + } + if (message.archiveType != null && message.hasOwnProperty("archiveType")) + object.archiveType = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] : message.archiveType; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.distribution != null && message.hasOwnProperty("distribution")) + object.distribution = message.distribution; + if (message.components && message.components.length) { + object.components = []; + for (var j = 0; j < message.components.length; ++j) + object.components[j] = message.components[j]; + } + if (message.gpgKey != null && message.hasOwnProperty("gpgKey")) + object.gpgKey = message.gpgKey; + return object; + }; + + /** + * Converts this AptRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @instance + * @returns {Object.} JSON object + */ + AptRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ArchiveType enum. + * @name google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType + * @enum {number} + * @property {number} ARCHIVE_TYPE_UNSPECIFIED=0 ARCHIVE_TYPE_UNSPECIFIED value + * @property {number} DEB=1 DEB value + * @property {number} DEB_SRC=2 DEB_SRC value + */ + AptRepository.ArchiveType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ARCHIVE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEB"] = 1; + values[valuesById[2] = "DEB_SRC"] = 2; + return values; + })(); + + return AptRepository; + })(); + + RepositoryResource.YumRepository = (function() { + + /** + * Properties of a YumRepository. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @interface IYumRepository + * @property {string|null} [id] YumRepository id + * @property {string|null} [displayName] YumRepository displayName + * @property {string|null} [baseUrl] YumRepository baseUrl + * @property {Array.|null} [gpgKeys] YumRepository gpgKeys + */ + + /** + * Constructs a new YumRepository. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @classdesc Represents a YumRepository. + * @implements IYumRepository + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository=} [properties] Properties to set + */ + function YumRepository(properties) { + this.gpgKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * YumRepository id. + * @member {string} id + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + */ + YumRepository.prototype.id = ""; + + /** + * YumRepository displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + */ + YumRepository.prototype.displayName = ""; + + /** + * YumRepository baseUrl. + * @member {string} baseUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + */ + YumRepository.prototype.baseUrl = ""; + + /** + * YumRepository gpgKeys. + * @member {Array.} gpgKeys + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + */ + YumRepository.prototype.gpgKeys = $util.emptyArray; + + /** + * Creates a new YumRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository instance + */ + YumRepository.create = function create(properties) { + return new YumRepository(properties); + }; + + /** + * Encodes the specified YumRepository message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository} message YumRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.baseUrl != null && Object.hasOwnProperty.call(message, "baseUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.baseUrl); + if (message.gpgKeys != null && message.gpgKeys.length) + for (var i = 0; i < message.gpgKeys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gpgKeys[i]); + return writer; + }; + + /** + * Encodes the specified YumRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IYumRepository} message YumRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YumRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.baseUrl = reader.string(); + break; + case 4: + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a YumRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a YumRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YumRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + if (!$util.isString(message.baseUrl)) + return "baseUrl: string expected"; + if (message.gpgKeys != null && message.hasOwnProperty("gpgKeys")) { + if (!Array.isArray(message.gpgKeys)) + return "gpgKeys: array expected"; + for (var i = 0; i < message.gpgKeys.length; ++i) + if (!$util.isString(message.gpgKeys[i])) + return "gpgKeys: string[] expected"; + } + return null; + }; + + /** + * Creates a YumRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository} YumRepository + */ + YumRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.baseUrl != null) + message.baseUrl = String(object.baseUrl); + if (object.gpgKeys) { + if (!Array.isArray(object.gpgKeys)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.gpgKeys: array expected"); + message.gpgKeys = []; + for (var i = 0; i < object.gpgKeys.length; ++i) + message.gpgKeys[i] = String(object.gpgKeys[i]); + } + return message; + }; + + /** + * Creates a plain object from a YumRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository} message YumRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YumRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.gpgKeys = []; + if (options.defaults) { + object.id = ""; + object.displayName = ""; + object.baseUrl = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + object.baseUrl = message.baseUrl; + if (message.gpgKeys && message.gpgKeys.length) { + object.gpgKeys = []; + for (var j = 0; j < message.gpgKeys.length; ++j) + object.gpgKeys[j] = message.gpgKeys[j]; + } + return object; + }; + + /** + * Converts this YumRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @instance + * @returns {Object.} JSON object + */ + YumRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return YumRepository; + })(); + + RepositoryResource.ZypperRepository = (function() { + + /** + * Properties of a ZypperRepository. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @interface IZypperRepository + * @property {string|null} [id] ZypperRepository id + * @property {string|null} [displayName] ZypperRepository displayName + * @property {string|null} [baseUrl] ZypperRepository baseUrl + * @property {Array.|null} [gpgKeys] ZypperRepository gpgKeys + */ + + /** + * Constructs a new ZypperRepository. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @classdesc Represents a ZypperRepository. + * @implements IZypperRepository + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository=} [properties] Properties to set + */ + function ZypperRepository(properties) { + this.gpgKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ZypperRepository id. + * @member {string} id + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + */ + ZypperRepository.prototype.id = ""; + + /** + * ZypperRepository displayName. + * @member {string} displayName + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + */ + ZypperRepository.prototype.displayName = ""; + + /** + * ZypperRepository baseUrl. + * @member {string} baseUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + */ + ZypperRepository.prototype.baseUrl = ""; + + /** + * ZypperRepository gpgKeys. + * @member {Array.} gpgKeys + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + */ + ZypperRepository.prototype.gpgKeys = $util.emptyArray; + + /** + * Creates a new ZypperRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository instance + */ + ZypperRepository.create = function create(properties) { + return new ZypperRepository(properties); + }; + + /** + * Encodes the specified ZypperRepository message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository} message ZypperRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperRepository.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.baseUrl != null && Object.hasOwnProperty.call(message, "baseUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.baseUrl); + if (message.gpgKeys != null && message.gpgKeys.length) + for (var i = 0; i < message.gpgKeys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gpgKeys[i]); + return writer; + }; + + /** + * Encodes the specified ZypperRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IZypperRepository} message ZypperRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ZypperRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ZypperRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.baseUrl = reader.string(); + break; + case 4: + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ZypperRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ZypperRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ZypperRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ZypperRepository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + if (!$util.isString(message.baseUrl)) + return "baseUrl: string expected"; + if (message.gpgKeys != null && message.hasOwnProperty("gpgKeys")) { + if (!Array.isArray(message.gpgKeys)) + return "gpgKeys: array expected"; + for (var i = 0; i < message.gpgKeys.length; ++i) + if (!$util.isString(message.gpgKeys[i])) + return "gpgKeys: string[] expected"; + } + return null; + }; + + /** + * Creates a ZypperRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository} ZypperRepository + */ + ZypperRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.baseUrl != null) + message.baseUrl = String(object.baseUrl); + if (object.gpgKeys) { + if (!Array.isArray(object.gpgKeys)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.gpgKeys: array expected"); + message.gpgKeys = []; + for (var i = 0; i < object.gpgKeys.length; ++i) + message.gpgKeys[i] = String(object.gpgKeys[i]); + } + return message; + }; + + /** + * Creates a plain object from a ZypperRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository} message ZypperRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ZypperRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.gpgKeys = []; + if (options.defaults) { + object.id = ""; + object.displayName = ""; + object.baseUrl = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.baseUrl != null && message.hasOwnProperty("baseUrl")) + object.baseUrl = message.baseUrl; + if (message.gpgKeys && message.gpgKeys.length) { + object.gpgKeys = []; + for (var j = 0; j < message.gpgKeys.length; ++j) + object.gpgKeys[j] = message.gpgKeys[j]; + } + return object; + }; + + /** + * Converts this ZypperRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @instance + * @returns {Object.} JSON object + */ + ZypperRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ZypperRepository; + })(); + + RepositoryResource.GooRepository = (function() { + + /** + * Properties of a GooRepository. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @interface IGooRepository + * @property {string|null} [name] GooRepository name + * @property {string|null} [url] GooRepository url + */ + + /** + * Constructs a new GooRepository. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @classdesc Represents a GooRepository. + * @implements IGooRepository + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository=} [properties] Properties to set + */ + function GooRepository(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GooRepository name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @instance + */ + GooRepository.prototype.name = ""; + + /** + * GooRepository url. + * @member {string} url + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @instance + */ + GooRepository.prototype.url = ""; + + /** + * Creates a new GooRepository instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository instance + */ + GooRepository.create = function create(properties) { + return new GooRepository(properties); + }; + + /** + * Encodes the specified GooRepository message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository} message GooRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooRepository.encode = function encode(message, writer) { + 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.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + return writer; + }; + + /** + * Encodes the specified GooRepository message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.IGooRepository} message GooRepository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GooRepository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GooRepository message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooRepository.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.url = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GooRepository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GooRepository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GooRepository message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GooRepository.verify = function verify(message) { + if (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.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates a GooRepository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository} GooRepository + */ + GooRepository.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository(); + if (object.name != null) + message.name = String(object.name); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from a GooRepository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository} message GooRepository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GooRepository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.url = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; + + /** + * Converts this GooRepository to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @instance + * @returns {Object.} JSON object + */ + GooRepository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GooRepository; + })(); + + return RepositoryResource; + })(); + + Resource.ExecResource = (function() { + + /** + * Properties of an ExecResource. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @interface IExecResource + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec|null} [validate] ExecResource validate + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec|null} [enforce] ExecResource enforce + */ + + /** + * Constructs a new ExecResource. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @classdesc Represents an ExecResource. + * @implements IExecResource + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource=} [properties] Properties to set + */ + function ExecResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecResource validate. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec|null|undefined} validate + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @instance + */ + ExecResource.prototype.validate = null; + + /** + * ExecResource enforce. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec|null|undefined} enforce + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @instance + */ + ExecResource.prototype.enforce = null; + + /** + * Creates a new ExecResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource} ExecResource instance + */ + ExecResource.create = function create(properties) { + return new ExecResource(properties); + }; + + /** + * Encodes the specified ExecResource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource} message ExecResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validate != null && Object.hasOwnProperty.call(message, "validate")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.encode(message.validate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.enforce != null && Object.hasOwnProperty.call(message, "enforce")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.encode(message.enforce, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IExecResource} message ExecResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource} ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validate = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); + break; + case 2: + message.enforce = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource} ExecResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecResource message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validate != null && message.hasOwnProperty("validate")) { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.verify(message.validate); + if (error) + return "validate." + error; + } + if (message.enforce != null && message.hasOwnProperty("enforce")) { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.verify(message.enforce); + if (error) + return "enforce." + error; + } + return null; + }; + + /** + * Creates an ExecResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource} ExecResource + */ + ExecResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource(); + if (object.validate != null) { + if (typeof object.validate !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.validate: object expected"); + message.validate = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.fromObject(object.validate); + } + if (object.enforce != null) { + if (typeof object.enforce !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.enforce: object expected"); + message.enforce = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.fromObject(object.enforce); + } + return message; + }; + + /** + * Creates a plain object from an ExecResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource} message ExecResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.validate = null; + object.enforce = null; + } + if (message.validate != null && message.hasOwnProperty("validate")) + object.validate = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.toObject(message.validate, options); + if (message.enforce != null && message.hasOwnProperty("enforce")) + object.enforce = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.toObject(message.enforce, options); + return object; + }; + + /** + * Converts this ExecResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @instance + * @returns {Object.} JSON object + */ + ExecResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ExecResource.Exec = (function() { + + /** + * Properties of an Exec. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @interface IExec + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null} [file] Exec file + * @property {string|null} [script] Exec script + * @property {Array.|null} [args] Exec args + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter|null} [interpreter] Exec interpreter + * @property {string|null} [outputFilePath] Exec outputFilePath + */ + + /** + * Constructs a new Exec. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @classdesc Represents an Exec. + * @implements IExec + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec=} [properties] Properties to set + */ + function Exec(properties) { + this.args = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Exec file. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null|undefined} file + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.file = null; + + /** + * Exec script. + * @member {string|null|undefined} script + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.script = null; + + /** + * Exec args. + * @member {Array.} args + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.args = $util.emptyArray; + + /** + * Exec interpreter. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter} interpreter + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.interpreter = 0; + + /** + * Exec outputFilePath. + * @member {string} outputFilePath + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Exec.prototype.outputFilePath = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Exec source. + * @member {"file"|"script"|undefined} source + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @instance + */ + Object.defineProperty(Exec.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["file", "script"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Exec instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec} Exec instance + */ + Exec.create = function create(properties) { + return new Exec(properties); + }; + + /** + * Encodes the specified Exec message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec} message Exec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.encode(message.file, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.script != null && Object.hasOwnProperty.call(message, "script")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.script); + if (message.args != null && message.args.length) + for (var i = 0; i < message.args.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); + if (message.interpreter != null && Object.hasOwnProperty.call(message, "interpreter")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.interpreter); + if (message.outputFilePath != null && Object.hasOwnProperty.call(message, "outputFilePath")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.outputFilePath); + return writer; + }; + + /** + * Encodes the specified Exec message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.IExec} message Exec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec} Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.script = reader.string(); + break; + case 3: + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); + break; + case 4: + message.interpreter = reader.int32(); + break; + case 5: + message.outputFilePath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Exec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec} Exec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Exec message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.source = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.verify(message.file); + if (error) + return "file." + error; + } + } + if (message.script != null && message.hasOwnProperty("script")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.script)) + return "script: string expected"; + } + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + switch (message.interpreter) { + default: + return "interpreter: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) + if (!$util.isString(message.outputFilePath)) + return "outputFilePath: string expected"; + return null; + }; + + /** + * Creates an Exec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec} Exec + */ + Exec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec(); + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.file: object expected"); + message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.fromObject(object.file); + } + if (object.script != null) + message.script = String(object.script); + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); + } + switch (object.interpreter) { + case "INTERPRETER_UNSPECIFIED": + case 0: + message.interpreter = 0; + break; + case "NONE": + case 1: + message.interpreter = 1; + break; + case "SHELL": + case 2: + message.interpreter = 2; + break; + case "POWERSHELL": + case 3: + message.interpreter = 3; + break; + } + if (object.outputFilePath != null) + message.outputFilePath = String(object.outputFilePath); + return message; + }; + + /** + * Creates a plain object from an Exec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec} message Exec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.args = []; + if (options.defaults) { + object.interpreter = options.enums === String ? "INTERPRETER_UNSPECIFIED" : 0; + object.outputFilePath = ""; + } + if (message.file != null && message.hasOwnProperty("file")) { + object.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.toObject(message.file, options); + if (options.oneofs) + object.source = "file"; + } + if (message.script != null && message.hasOwnProperty("script")) { + object.script = message.script; + if (options.oneofs) + object.source = "script"; + } + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; + } + if (message.interpreter != null && message.hasOwnProperty("interpreter")) + object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] : message.interpreter; + if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) + object.outputFilePath = message.outputFilePath; + return object; + }; + + /** + * Converts this Exec to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @instance + * @returns {Object.} JSON object + */ + Exec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Interpreter enum. + * @name google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter + * @enum {number} + * @property {number} INTERPRETER_UNSPECIFIED=0 INTERPRETER_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} SHELL=2 SHELL value + * @property {number} POWERSHELL=3 POWERSHELL value + */ + Exec.Interpreter = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTERPRETER_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "SHELL"] = 2; + values[valuesById[3] = "POWERSHELL"] = 3; + return values; + })(); + + return Exec; + })(); + + return ExecResource; + })(); + + Resource.FileResource = (function() { + + /** + * Properties of a FileResource. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @interface IFileResource + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null} [file] FileResource file + * @property {string|null} [content] FileResource content + * @property {string|null} [path] FileResource path + * @property {google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState|null} [state] FileResource state + * @property {string|null} [permissions] FileResource permissions + */ + + /** + * Constructs a new FileResource. + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource + * @classdesc Represents a FileResource. + * @implements IFileResource + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource=} [properties] Properties to set + */ + function FileResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileResource file. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.IFile|null|undefined} file + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.file = null; + + /** + * FileResource content. + * @member {string|null|undefined} content + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.content = null; + + /** + * FileResource path. + * @member {string} path + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.path = ""; + + /** + * FileResource state. + * @member {google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState} state + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.state = 0; + + /** + * FileResource permissions. + * @member {string} permissions + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @instance + */ + FileResource.prototype.permissions = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FileResource source. + * @member {"file"|"content"|undefined} source + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @instance + */ + Object.defineProperty(FileResource.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["file", "content"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FileResource instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.FileResource} FileResource instance + */ + FileResource.create = function create(properties) { + return new FileResource(properties); + }; + + /** + * Encodes the specified FileResource message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource} message FileResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && Object.hasOwnProperty.call(message, "file")) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.encode(message.file, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.permissions); + return writer; + }; + + /** + * Encodes the specified FileResource message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.IFileResource} message FileResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.FileResource} FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + case 2: + message.content = reader.string(); + break; + case 3: + message.path = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.permissions = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.FileResource} FileResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileResource message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.file != null && message.hasOwnProperty("file")) { + properties.source = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.verify(message.file); + if (error) + return "file." + error; + } + } + if (message.content != null && message.hasOwnProperty("content")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.content)) + return "content: string expected"; + } + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: 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.permissions != null && message.hasOwnProperty("permissions")) + if (!$util.isString(message.permissions)) + return "permissions: string expected"; + return null; + }; + + /** + * Creates a FileResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.Resource.FileResource} FileResource + */ + FileResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource(); + if (object.file != null) { + if (typeof object.file !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.file: object expected"); + message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.fromObject(object.file); + } + if (object.content != null) + message.content = String(object.content); + if (object.path != null) + message.path = String(object.path); + switch (object.state) { + case "DESIRED_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PRESENT": + case 1: + message.state = 1; + break; + case "ABSENT": + case 2: + message.state = 2; + break; + case "CONTENTS_MATCH": + case 3: + message.state = 3; + break; + } + if (object.permissions != null) + message.permissions = String(object.permissions); + return message; + }; + + /** + * Creates a plain object from a FileResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.Resource.FileResource} message FileResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.state = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; + object.permissions = ""; + } + if (message.file != null && message.hasOwnProperty("file")) { + object.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.toObject(message.file, options); + if (options.oneofs) + object.source = "file"; + } + if (message.content != null && message.hasOwnProperty("content")) { + object.content = message.content; + if (options.oneofs) + object.source = "content"; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState[message.state] : message.state; + if (message.permissions != null && message.hasOwnProperty("permissions")) + object.permissions = message.permissions; + return object; + }; + + /** + * Converts this FileResource to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @instance + * @returns {Object.} JSON object + */ + FileResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * DesiredState enum. + * @name google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState + * @enum {number} + * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value + * @property {number} PRESENT=1 PRESENT value + * @property {number} ABSENT=2 ABSENT value + * @property {number} CONTENTS_MATCH=3 CONTENTS_MATCH value + */ + FileResource.DesiredState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRESENT"] = 1; + values[valuesById[2] = "ABSENT"] = 2; + values[valuesById[3] = "CONTENTS_MATCH"] = 3; + return values; + })(); + + return FileResource; + })(); + + return Resource; + })(); + + OSPolicy.ResourceGroup = (function() { + + /** + * Properties of a ResourceGroup. + * @memberof google.cloud.osconfig.v1.OSPolicy + * @interface IResourceGroup + * @property {Array.|null} [inventoryFilters] ResourceGroup inventoryFilters + * @property {Array.|null} [resources] ResourceGroup resources + */ + + /** + * Constructs a new ResourceGroup. + * @memberof google.cloud.osconfig.v1.OSPolicy + * @classdesc Represents a ResourceGroup. + * @implements IResourceGroup + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicy.IResourceGroup=} [properties] Properties to set + */ + function ResourceGroup(properties) { + this.inventoryFilters = []; + this.resources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceGroup inventoryFilters. + * @member {Array.} inventoryFilters + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @instance + */ + ResourceGroup.prototype.inventoryFilters = $util.emptyArray; + + /** + * ResourceGroup resources. + * @member {Array.} resources + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @instance + */ + ResourceGroup.prototype.resources = $util.emptyArray; + + /** + * Creates a new ResourceGroup instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.IResourceGroup=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicy.ResourceGroup} ResourceGroup instance + */ + ResourceGroup.create = function create(properties) { + return new ResourceGroup(properties); + }; + + /** + * Encodes the specified ResourceGroup message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.ResourceGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.IResourceGroup} message ResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inventoryFilters != null && message.inventoryFilters.length) + for (var i = 0; i < message.inventoryFilters.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter.encode(message.inventoryFilters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicy.Resource.encode(message.resources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicy.ResourceGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.IResourceGroup} message ResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicy.ResourceGroup} ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceGroup.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inventoryFilters && message.inventoryFilters.length)) + message.inventoryFilters = []; + message.inventoryFilters.push($root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.osconfig.v1.OSPolicy.Resource.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicy.ResourceGroup} ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceGroup message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inventoryFilters != null && message.hasOwnProperty("inventoryFilters")) { + if (!Array.isArray(message.inventoryFilters)) + return "inventoryFilters: array expected"; + for (var i = 0; i < message.inventoryFilters.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter.verify(message.inventoryFilters[i]); + if (error) + return "inventoryFilters." + error; + } + } + 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.osconfig.v1.OSPolicy.Resource.verify(message.resources[i]); + if (error) + return "resources." + error; + } + } + return null; + }; + + /** + * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicy.ResourceGroup} ResourceGroup + */ + ResourceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup(); + if (object.inventoryFilters) { + if (!Array.isArray(object.inventoryFilters)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.ResourceGroup.inventoryFilters: array expected"); + message.inventoryFilters = []; + for (var i = 0; i < object.inventoryFilters.length; ++i) { + if (typeof object.inventoryFilters[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.ResourceGroup.inventoryFilters: object expected"); + message.inventoryFilters[i] = $root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter.fromObject(object.inventoryFilters[i]); + } + } + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.ResourceGroup.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicy.ResourceGroup.resources: object expected"); + message.resources[i] = $root.google.cloud.osconfig.v1.OSPolicy.Resource.fromObject(object.resources[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @static + * @param {google.cloud.osconfig.v1.OSPolicy.ResourceGroup} message ResourceGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.inventoryFilters = []; + object.resources = []; + } + if (message.inventoryFilters && message.inventoryFilters.length) { + object.inventoryFilters = []; + for (var j = 0; j < message.inventoryFilters.length; ++j) + object.inventoryFilters[j] = $root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter.toObject(message.inventoryFilters[j], options); + } + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.osconfig.v1.OSPolicy.Resource.toObject(message.resources[j], options); + } + return object; + }; + + /** + * Converts this ResourceGroup to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @instance + * @returns {Object.} JSON object + */ + ResourceGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceGroup; + })(); + + /** + * Mode enum. + * @name google.cloud.osconfig.v1.OSPolicy.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} VALIDATION=1 VALIDATION value + * @property {number} ENFORCEMENT=2 ENFORCEMENT value + */ + OSPolicy.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VALIDATION"] = 1; + values[valuesById[2] = "ENFORCEMENT"] = 2; + return values; + })(); + + return OSPolicy; + })(); + + v1.GetOSPolicyAssignmentReportRequest = (function() { + + /** + * Properties of a GetOSPolicyAssignmentReportRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IGetOSPolicyAssignmentReportRequest + * @property {string|null} [name] GetOSPolicyAssignmentReportRequest name + */ + + /** + * Constructs a new GetOSPolicyAssignmentReportRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GetOSPolicyAssignmentReportRequest. + * @implements IGetOSPolicyAssignmentReportRequest + * @constructor + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest=} [properties] Properties to set + */ + function GetOSPolicyAssignmentReportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOSPolicyAssignmentReportRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @instance + */ + GetOSPolicyAssignmentReportRequest.prototype.name = ""; + + /** + * Creates a new GetOSPolicyAssignmentReportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @static + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest} GetOSPolicyAssignmentReportRequest instance + */ + GetOSPolicyAssignmentReportRequest.create = function create(properties) { + return new GetOSPolicyAssignmentReportRequest(properties); + }; + + /** + * Encodes the specified GetOSPolicyAssignmentReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @static + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest} message GetOSPolicyAssignmentReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOSPolicyAssignmentReportRequest.encode = function encode(message, writer) { + 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 GetOSPolicyAssignmentReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @static + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest} message GetOSPolicyAssignmentReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOSPolicyAssignmentReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOSPolicyAssignmentReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest} GetOSPolicyAssignmentReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOSPolicyAssignmentReportRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOSPolicyAssignmentReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest} GetOSPolicyAssignmentReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOSPolicyAssignmentReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOSPolicyAssignmentReportRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOSPolicyAssignmentReportRequest.verify = function verify(message) { + if (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 GetOSPolicyAssignmentReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest} GetOSPolicyAssignmentReportRequest + */ + GetOSPolicyAssignmentReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOSPolicyAssignmentReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @static + * @param {google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest} message GetOSPolicyAssignmentReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOSPolicyAssignmentReportRequest.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 GetOSPolicyAssignmentReportRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @instance + * @returns {Object.} JSON object + */ + GetOSPolicyAssignmentReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOSPolicyAssignmentReportRequest; + })(); + + v1.ListOSPolicyAssignmentReportsRequest = (function() { + + /** + * Properties of a ListOSPolicyAssignmentReportsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListOSPolicyAssignmentReportsRequest + * @property {string|null} [parent] ListOSPolicyAssignmentReportsRequest parent + * @property {number|null} [pageSize] ListOSPolicyAssignmentReportsRequest pageSize + * @property {string|null} [filter] ListOSPolicyAssignmentReportsRequest filter + * @property {string|null} [pageToken] ListOSPolicyAssignmentReportsRequest pageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentReportsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListOSPolicyAssignmentReportsRequest. + * @implements IListOSPolicyAssignmentReportsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest=} [properties] Properties to set + */ + function ListOSPolicyAssignmentReportsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentReportsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @instance + */ + ListOSPolicyAssignmentReportsRequest.prototype.parent = ""; + + /** + * ListOSPolicyAssignmentReportsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @instance + */ + ListOSPolicyAssignmentReportsRequest.prototype.pageSize = 0; + + /** + * ListOSPolicyAssignmentReportsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @instance + */ + ListOSPolicyAssignmentReportsRequest.prototype.filter = ""; + + /** + * ListOSPolicyAssignmentReportsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @instance + */ + ListOSPolicyAssignmentReportsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentReportsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest} ListOSPolicyAssignmentReportsRequest instance + */ + ListOSPolicyAssignmentReportsRequest.create = function create(properties) { + return new ListOSPolicyAssignmentReportsRequest(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest} message ListOSPolicyAssignmentReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentReportsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest} message ListOSPolicyAssignmentReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentReportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest} ListOSPolicyAssignmentReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentReportsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentReportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest} ListOSPolicyAssignmentReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentReportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentReportsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentReportsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentReportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest} ListOSPolicyAssignmentReportsRequest + */ + ListOSPolicyAssignmentReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentReportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @static + * @param {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest} message ListOSPolicyAssignmentReportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentReportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.filter = ""; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentReportsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentReportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentReportsRequest; + })(); + + v1.ListOSPolicyAssignmentReportsResponse = (function() { + + /** + * Properties of a ListOSPolicyAssignmentReportsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListOSPolicyAssignmentReportsResponse + * @property {Array.|null} [osPolicyAssignmentReports] ListOSPolicyAssignmentReportsResponse osPolicyAssignmentReports + * @property {string|null} [nextPageToken] ListOSPolicyAssignmentReportsResponse nextPageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentReportsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListOSPolicyAssignmentReportsResponse. + * @implements IListOSPolicyAssignmentReportsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse=} [properties] Properties to set + */ + function ListOSPolicyAssignmentReportsResponse(properties) { + this.osPolicyAssignmentReports = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentReportsResponse osPolicyAssignmentReports. + * @member {Array.} osPolicyAssignmentReports + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @instance + */ + ListOSPolicyAssignmentReportsResponse.prototype.osPolicyAssignmentReports = $util.emptyArray; + + /** + * ListOSPolicyAssignmentReportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @instance + */ + ListOSPolicyAssignmentReportsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentReportsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse} ListOSPolicyAssignmentReportsResponse instance + */ + ListOSPolicyAssignmentReportsResponse.create = function create(properties) { + return new ListOSPolicyAssignmentReportsResponse(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse} message ListOSPolicyAssignmentReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentReportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignmentReports != null && message.osPolicyAssignmentReports.length) + for (var i = 0; i < message.osPolicyAssignmentReports.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.encode(message.osPolicyAssignmentReports[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 ListOSPolicyAssignmentReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse} message ListOSPolicyAssignmentReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentReportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse} ListOSPolicyAssignmentReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentReportsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.osPolicyAssignmentReports && message.osPolicyAssignmentReports.length)) + message.osPolicyAssignmentReports = []; + message.osPolicyAssignmentReports.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentReportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse} ListOSPolicyAssignmentReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentReportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentReportsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentReportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignmentReports != null && message.hasOwnProperty("osPolicyAssignmentReports")) { + if (!Array.isArray(message.osPolicyAssignmentReports)) + return "osPolicyAssignmentReports: array expected"; + for (var i = 0; i < message.osPolicyAssignmentReports.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.verify(message.osPolicyAssignmentReports[i]); + if (error) + return "osPolicyAssignmentReports." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentReportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse} ListOSPolicyAssignmentReportsResponse + */ + ListOSPolicyAssignmentReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse(); + if (object.osPolicyAssignmentReports) { + if (!Array.isArray(object.osPolicyAssignmentReports)) + throw TypeError(".google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse.osPolicyAssignmentReports: array expected"); + message.osPolicyAssignmentReports = []; + for (var i = 0; i < object.osPolicyAssignmentReports.length; ++i) { + if (typeof object.osPolicyAssignmentReports[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse.osPolicyAssignmentReports: object expected"); + message.osPolicyAssignmentReports[i] = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.fromObject(object.osPolicyAssignmentReports[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentReportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @static + * @param {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse} message ListOSPolicyAssignmentReportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentReportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyAssignmentReports = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.osPolicyAssignmentReports && message.osPolicyAssignmentReports.length) { + object.osPolicyAssignmentReports = []; + for (var j = 0; j < message.osPolicyAssignmentReports.length; ++j) + object.osPolicyAssignmentReports[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.toObject(message.osPolicyAssignmentReports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentReportsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentReportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentReportsResponse; + })(); + + v1.OSPolicyAssignmentReport = (function() { + + /** + * Properties of a OSPolicyAssignmentReport. + * @memberof google.cloud.osconfig.v1 + * @interface IOSPolicyAssignmentReport + * @property {string|null} [name] OSPolicyAssignmentReport name + * @property {string|null} [instance] OSPolicyAssignmentReport instance + * @property {string|null} [osPolicyAssignment] OSPolicyAssignmentReport osPolicyAssignment + * @property {Array.|null} [osPolicyCompliances] OSPolicyAssignmentReport osPolicyCompliances + * @property {google.protobuf.ITimestamp|null} [updateTime] OSPolicyAssignmentReport updateTime + * @property {string|null} [lastRunId] OSPolicyAssignmentReport lastRunId + */ + + /** + * Constructs a new OSPolicyAssignmentReport. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a OSPolicyAssignmentReport. + * @implements IOSPolicyAssignmentReport + * @constructor + * @param {google.cloud.osconfig.v1.IOSPolicyAssignmentReport=} [properties] Properties to set + */ + function OSPolicyAssignmentReport(properties) { + this.osPolicyCompliances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyAssignmentReport name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.name = ""; + + /** + * OSPolicyAssignmentReport instance. + * @member {string} instance + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.instance = ""; + + /** + * OSPolicyAssignmentReport osPolicyAssignment. + * @member {string} osPolicyAssignment + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.osPolicyAssignment = ""; + + /** + * OSPolicyAssignmentReport osPolicyCompliances. + * @member {Array.} osPolicyCompliances + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.osPolicyCompliances = $util.emptyArray; + + /** + * OSPolicyAssignmentReport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.updateTime = null; + + /** + * OSPolicyAssignmentReport lastRunId. + * @member {string} lastRunId + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.lastRunId = ""; + + /** + * Creates a new OSPolicyAssignmentReport instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @static + * @param {google.cloud.osconfig.v1.IOSPolicyAssignmentReport=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport} OSPolicyAssignmentReport instance + */ + OSPolicyAssignmentReport.create = function create(properties) { + return new OSPolicyAssignmentReport(properties); + }; + + /** + * Encodes the specified OSPolicyAssignmentReport message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @static + * @param {google.cloud.osconfig.v1.IOSPolicyAssignmentReport} message OSPolicyAssignmentReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentReport.encode = function encode(message, writer) { + 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.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instance); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.osPolicyAssignment); + if (message.osPolicyCompliances != null && message.osPolicyCompliances.length) + for (var i = 0; i < message.osPolicyCompliances.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.encode(message.osPolicyCompliances[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.lastRunId != null && Object.hasOwnProperty.call(message, "lastRunId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.lastRunId); + return writer; + }; + + /** + * Encodes the specified OSPolicyAssignmentReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @static + * @param {google.cloud.osconfig.v1.IOSPolicyAssignmentReport} message OSPolicyAssignmentReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyAssignmentReport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport} OSPolicyAssignmentReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentReport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.instance = reader.string(); + break; + case 3: + message.osPolicyAssignment = reader.string(); + break; + case 4: + if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) + message.osPolicyCompliances = []; + message.osPolicyCompliances.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.decode(reader, reader.uint32())); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.lastRunId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyAssignmentReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport} OSPolicyAssignmentReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyAssignmentReport message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyAssignmentReport.verify = function verify(message) { + if (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.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + if (!$util.isString(message.osPolicyAssignment)) + return "osPolicyAssignment: string expected"; + if (message.osPolicyCompliances != null && message.hasOwnProperty("osPolicyCompliances")) { + if (!Array.isArray(message.osPolicyCompliances)) + return "osPolicyCompliances: array expected"; + for (var i = 0; i < message.osPolicyCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.verify(message.osPolicyCompliances[i]); + if (error) + return "osPolicyCompliances." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.lastRunId != null && message.hasOwnProperty("lastRunId")) + if (!$util.isString(message.lastRunId)) + return "lastRunId: string expected"; + return null; + }; + + /** + * Creates a OSPolicyAssignmentReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport} OSPolicyAssignmentReport + */ + OSPolicyAssignmentReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport(); + if (object.name != null) + message.name = String(object.name); + if (object.instance != null) + message.instance = String(object.instance); + if (object.osPolicyAssignment != null) + message.osPolicyAssignment = String(object.osPolicyAssignment); + if (object.osPolicyCompliances) { + if (!Array.isArray(object.osPolicyCompliances)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentReport.osPolicyCompliances: array expected"); + message.osPolicyCompliances = []; + for (var i = 0; i < object.osPolicyCompliances.length; ++i) { + if (typeof object.osPolicyCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentReport.osPolicyCompliances: object expected"); + message.osPolicyCompliances[i] = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.fromObject(object.osPolicyCompliances[i]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentReport.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastRunId != null) + message.lastRunId = String(object.lastRunId); + return message; + }; + + /** + * Creates a plain object from a OSPolicyAssignmentReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport} message OSPolicyAssignmentReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyAssignmentReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyCompliances = []; + if (options.defaults) { + object.name = ""; + object.instance = ""; + object.osPolicyAssignment = ""; + object.updateTime = null; + object.lastRunId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = message.osPolicyAssignment; + if (message.osPolicyCompliances && message.osPolicyCompliances.length) { + object.osPolicyCompliances = []; + for (var j = 0; j < message.osPolicyCompliances.length; ++j) + object.osPolicyCompliances[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.toObject(message.osPolicyCompliances[j], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastRunId != null && message.hasOwnProperty("lastRunId")) + object.lastRunId = message.lastRunId; + return object; + }; + + /** + * Converts this OSPolicyAssignmentReport to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @instance + * @returns {Object.} JSON object + */ + OSPolicyAssignmentReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicyAssignmentReport.OSPolicyCompliance = (function() { + + /** + * Properties of a OSPolicyCompliance. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @interface IOSPolicyCompliance + * @property {string|null} [osPolicyId] OSPolicyCompliance osPolicyId + * @property {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState|null} [complianceState] OSPolicyCompliance complianceState + * @property {string|null} [complianceStateReason] OSPolicyCompliance complianceStateReason + * @property {Array.|null} [osPolicyResourceCompliances] OSPolicyCompliance osPolicyResourceCompliances + */ + + /** + * Constructs a new OSPolicyCompliance. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @classdesc Represents a OSPolicyCompliance. + * @implements IOSPolicyCompliance + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance=} [properties] Properties to set + */ + function OSPolicyCompliance(properties) { + this.osPolicyResourceCompliances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyCompliance osPolicyId. + * @member {string} osPolicyId + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyId = ""; + + /** + * OSPolicyCompliance complianceState. + * @member {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState} complianceState + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.complianceState = 0; + + /** + * OSPolicyCompliance complianceStateReason. + * @member {string} complianceStateReason + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.complianceStateReason = ""; + + /** + * OSPolicyCompliance osPolicyResourceCompliances. + * @member {Array.} osPolicyResourceCompliances + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyResourceCompliances = $util.emptyArray; + + /** + * Creates a new OSPolicyCompliance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance} OSPolicyCompliance instance + */ + OSPolicyCompliance.create = function create(properties) { + return new OSPolicyCompliance(properties); + }; + + /** + * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyCompliance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyId != null && Object.hasOwnProperty.call(message, "osPolicyId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyId); + if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.complianceState); + if (message.complianceStateReason != null && Object.hasOwnProperty.call(message, "complianceStateReason")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.complianceStateReason); + if (message.osPolicyResourceCompliances != null && message.osPolicyResourceCompliances.length) + for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.encode(message.osPolicyResourceCompliances[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyCompliance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance} OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyCompliance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyId = reader.string(); + break; + case 2: + message.complianceState = reader.int32(); + break; + case 3: + message.complianceStateReason = reader.string(); + break; + case 4: + if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) + message.osPolicyResourceCompliances = []; + message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance} OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyCompliance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyCompliance message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyCompliance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) + if (!$util.isString(message.osPolicyId)) + return "osPolicyId: string expected"; + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + switch (message.complianceState) { + default: + return "complianceState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) + if (!$util.isString(message.complianceStateReason)) + return "complianceStateReason: string expected"; + if (message.osPolicyResourceCompliances != null && message.hasOwnProperty("osPolicyResourceCompliances")) { + if (!Array.isArray(message.osPolicyResourceCompliances)) + return "osPolicyResourceCompliances: array expected"; + for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify(message.osPolicyResourceCompliances[i]); + if (error) + return "osPolicyResourceCompliances." + error; + } + } + return null; + }; + + /** + * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance} OSPolicyCompliance + */ + OSPolicyCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance(); + if (object.osPolicyId != null) + message.osPolicyId = String(object.osPolicyId); + switch (object.complianceState) { + case "UNKNOWN": + case 0: + message.complianceState = 0; + break; + case "COMPLIANT": + case 1: + message.complianceState = 1; + break; + case "NON_COMPLIANT": + case 2: + message.complianceState = 2; + break; + } + if (object.complianceStateReason != null) + message.complianceStateReason = String(object.complianceStateReason); + if (object.osPolicyResourceCompliances) { + if (!Array.isArray(object.osPolicyResourceCompliances)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.osPolicyResourceCompliances: array expected"); + message.osPolicyResourceCompliances = []; + for (var i = 0; i < object.osPolicyResourceCompliances.length; ++i) { + if (typeof object.osPolicyResourceCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.osPolicyResourceCompliances: object expected"); + message.osPolicyResourceCompliances[i] = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.fromObject(object.osPolicyResourceCompliances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance} message OSPolicyCompliance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyCompliance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyResourceCompliances = []; + if (options.defaults) { + object.osPolicyId = ""; + object.complianceState = options.enums === String ? "UNKNOWN" : 0; + object.complianceStateReason = ""; + } + if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) + object.osPolicyId = message.osPolicyId; + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState[message.complianceState] : message.complianceState; + if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) + object.complianceStateReason = message.complianceStateReason; + if (message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length) { + object.osPolicyResourceCompliances = []; + for (var j = 0; j < message.osPolicyResourceCompliances.length; ++j) + object.osPolicyResourceCompliances[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.toObject(message.osPolicyResourceCompliances[j], options); + } + return object; + }; + + /** + * Converts this OSPolicyCompliance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + * @returns {Object.} JSON object + */ + OSPolicyCompliance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicyCompliance.OSPolicyResourceCompliance = (function() { + + /** + * Properties of a OSPolicyResourceCompliance. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @interface IOSPolicyResourceCompliance + * @property {string|null} [osPolicyResourceId] OSPolicyResourceCompliance osPolicyResourceId + * @property {Array.|null} [configSteps] OSPolicyResourceCompliance configSteps + * @property {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState|null} [complianceState] OSPolicyResourceCompliance complianceState + * @property {string|null} [complianceStateReason] OSPolicyResourceCompliance complianceStateReason + * @property {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput|null} [execResourceOutput] OSPolicyResourceCompliance execResourceOutput + */ + + /** + * Constructs a new OSPolicyResourceCompliance. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @classdesc Represents a OSPolicyResourceCompliance. + * @implements IOSPolicyResourceCompliance + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance=} [properties] Properties to set + */ + function OSPolicyResourceCompliance(properties) { + this.configSteps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyResourceCompliance osPolicyResourceId. + * @member {string} osPolicyResourceId + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.osPolicyResourceId = ""; + + /** + * OSPolicyResourceCompliance configSteps. + * @member {Array.} configSteps + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.configSteps = $util.emptyArray; + + /** + * OSPolicyResourceCompliance complianceState. + * @member {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState} complianceState + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.complianceState = 0; + + /** + * OSPolicyResourceCompliance complianceStateReason. + * @member {string} complianceStateReason + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.complianceStateReason = ""; + + /** + * OSPolicyResourceCompliance execResourceOutput. + * @member {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput|null|undefined} execResourceOutput + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.execResourceOutput = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OSPolicyResourceCompliance output. + * @member {"execResourceOutput"|undefined} output + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + Object.defineProperty(OSPolicyResourceCompliance.prototype, "output", { + get: $util.oneOfGetter($oneOfFields = ["execResourceOutput"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OSPolicyResourceCompliance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} OSPolicyResourceCompliance instance + */ + OSPolicyResourceCompliance.create = function create(properties) { + return new OSPolicyResourceCompliance(properties); + }; + + /** + * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceCompliance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyResourceId != null && Object.hasOwnProperty.call(message, "osPolicyResourceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyResourceId); + if (message.configSteps != null && message.configSteps.length) + for (var i = 0; i < message.configSteps.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.encode(message.configSteps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.complianceState); + if (message.complianceStateReason != null && Object.hasOwnProperty.call(message, "complianceStateReason")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.complianceStateReason); + if (message.execResourceOutput != null && Object.hasOwnProperty.call(message, "execResourceOutput")) + $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.encode(message.execResourceOutput, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceCompliance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceCompliance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyResourceId = reader.string(); + break; + case 2: + if (!(message.configSteps && message.configSteps.length)) + message.configSteps = []; + message.configSteps.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); + break; + case 3: + message.complianceState = reader.int32(); + break; + case 4: + message.complianceStateReason = reader.string(); + break; + case 5: + message.execResourceOutput = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceCompliance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyResourceCompliance message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyResourceCompliance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) + if (!$util.isString(message.osPolicyResourceId)) + return "osPolicyResourceId: string expected"; + if (message.configSteps != null && message.hasOwnProperty("configSteps")) { + if (!Array.isArray(message.configSteps)) + return "configSteps: array expected"; + for (var i = 0; i < message.configSteps.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify(message.configSteps[i]); + if (error) + return "configSteps." + error; + } + } + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + switch (message.complianceState) { + default: + return "complianceState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) + if (!$util.isString(message.complianceStateReason)) + return "complianceStateReason: string expected"; + if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { + properties.output = 1; + { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify(message.execResourceOutput); + if (error) + return "execResourceOutput." + error; + } + } + return null; + }; + + /** + * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} OSPolicyResourceCompliance + */ + OSPolicyResourceCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance(); + if (object.osPolicyResourceId != null) + message.osPolicyResourceId = String(object.osPolicyResourceId); + if (object.configSteps) { + if (!Array.isArray(object.configSteps)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.configSteps: array expected"); + message.configSteps = []; + for (var i = 0; i < object.configSteps.length; ++i) { + if (typeof object.configSteps[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.configSteps: object expected"); + message.configSteps[i] = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.fromObject(object.configSteps[i]); + } + } + switch (object.complianceState) { + case "UNKNOWN": + case 0: + message.complianceState = 0; + break; + case "COMPLIANT": + case 1: + message.complianceState = 1; + break; + case "NON_COMPLIANT": + case 2: + message.complianceState = 2; + break; + } + if (object.complianceStateReason != null) + message.complianceStateReason = String(object.complianceStateReason); + if (object.execResourceOutput != null) { + if (typeof object.execResourceOutput !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.execResourceOutput: object expected"); + message.execResourceOutput = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.fromObject(object.execResourceOutput); + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} message OSPolicyResourceCompliance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyResourceCompliance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.configSteps = []; + if (options.defaults) { + object.osPolicyResourceId = ""; + object.complianceState = options.enums === String ? "UNKNOWN" : 0; + object.complianceStateReason = ""; + } + if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) + object.osPolicyResourceId = message.osPolicyResourceId; + if (message.configSteps && message.configSteps.length) { + object.configSteps = []; + for (var j = 0; j < message.configSteps.length; ++j) + object.configSteps[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.toObject(message.configSteps[j], options); + } + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState[message.complianceState] : message.complianceState; + if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) + object.complianceStateReason = message.complianceStateReason; + if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { + object.execResourceOutput = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.toObject(message.execResourceOutput, options); + if (options.oneofs) + object.output = "execResourceOutput"; + } + return object; + }; + + /** + * Converts this OSPolicyResourceCompliance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + * @returns {Object.} JSON object + */ + OSPolicyResourceCompliance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicyResourceCompliance.OSPolicyResourceConfigStep = (function() { + + /** + * Properties of a OSPolicyResourceConfigStep. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @interface IOSPolicyResourceConfigStep + * @property {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type|null} [type] OSPolicyResourceConfigStep type + * @property {string|null} [errorMessage] OSPolicyResourceConfigStep errorMessage + */ + + /** + * Constructs a new OSPolicyResourceConfigStep. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @classdesc Represents a OSPolicyResourceConfigStep. + * @implements IOSPolicyResourceConfigStep + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep=} [properties] Properties to set + */ + function OSPolicyResourceConfigStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyResourceConfigStep type. + * @member {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type} type + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.type = 0; + + /** + * OSPolicyResourceConfigStep errorMessage. + * @member {string} errorMessage + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.errorMessage = ""; + + /** + * Creates a new OSPolicyResourceConfigStep instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep instance + */ + OSPolicyResourceConfigStep.create = function create(properties) { + return new OSPolicyResourceConfigStep(properties); + }; + + /** + * Encodes the specified OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceConfigStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); + return writer; + }; + + /** + * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceConfigStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceConfigStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.errorMessage = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceConfigStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyResourceConfigStep message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyResourceConfigStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + return null; + }; + + /** + * Creates a OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + */ + OSPolicyResourceConfigStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "VALIDATION": + case 1: + message.type = 1; + break; + case "DESIRED_STATE_CHECK": + case 2: + message.type = 2; + break; + case "DESIRED_STATE_ENFORCEMENT": + case 3: + message.type = 3; + break; + case "DESIRED_STATE_CHECK_POST_ENFORCEMENT": + case 4: + message.type = 4; + break; + } + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + return message; + }; + + /** + * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} message OSPolicyResourceConfigStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyResourceConfigStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.errorMessage = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type[message.type] : message.type; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + return object; + }; + + /** + * Converts this OSPolicyResourceConfigStep to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @instance + * @returns {Object.} JSON object + */ + OSPolicyResourceConfigStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} VALIDATION=1 VALIDATION value + * @property {number} DESIRED_STATE_CHECK=2 DESIRED_STATE_CHECK value + * @property {number} DESIRED_STATE_ENFORCEMENT=3 DESIRED_STATE_ENFORCEMENT value + * @property {number} DESIRED_STATE_CHECK_POST_ENFORCEMENT=4 DESIRED_STATE_CHECK_POST_ENFORCEMENT value + */ + OSPolicyResourceConfigStep.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VALIDATION"] = 1; + values[valuesById[2] = "DESIRED_STATE_CHECK"] = 2; + values[valuesById[3] = "DESIRED_STATE_ENFORCEMENT"] = 3; + values[valuesById[4] = "DESIRED_STATE_CHECK_POST_ENFORCEMENT"] = 4; + return values; + })(); + + return OSPolicyResourceConfigStep; + })(); + + OSPolicyResourceCompliance.ExecResourceOutput = (function() { + + /** + * Properties of an ExecResourceOutput. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @interface IExecResourceOutput + * @property {Uint8Array|null} [enforcementOutput] ExecResourceOutput enforcementOutput + */ + + /** + * Constructs a new ExecResourceOutput. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @classdesc Represents an ExecResourceOutput. + * @implements IExecResourceOutput + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set + */ + function ExecResourceOutput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecResourceOutput enforcementOutput. + * @member {Uint8Array} enforcementOutput + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @instance + */ + ExecResourceOutput.prototype.enforcementOutput = $util.newBuffer([]); + + /** + * Creates a new ExecResourceOutput instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput instance + */ + ExecResourceOutput.create = function create(properties) { + return new ExecResourceOutput(properties); + }; + + /** + * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResourceOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enforcementOutput != null && Object.hasOwnProperty.call(message, "enforcementOutput")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.enforcementOutput); + return writer; + }; + + /** + * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResourceOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResourceOutput.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.enforcementOutput = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResourceOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecResourceOutput message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecResourceOutput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) + if (!(message.enforcementOutput && typeof message.enforcementOutput.length === "number" || $util.isString(message.enforcementOutput))) + return "enforcementOutput: buffer expected"; + return null; + }; + + /** + * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + */ + ExecResourceOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput(); + if (object.enforcementOutput != null) + if (typeof object.enforcementOutput === "string") + $util.base64.decode(object.enforcementOutput, message.enforcementOutput = $util.newBuffer($util.base64.length(object.enforcementOutput)), 0); + else if (object.enforcementOutput.length) + message.enforcementOutput = object.enforcementOutput; + return message; + }; + + /** + * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} message ExecResourceOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecResourceOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.enforcementOutput = ""; + else { + object.enforcementOutput = []; + if (options.bytes !== Array) + object.enforcementOutput = $util.newBuffer(object.enforcementOutput); + } + if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) + object.enforcementOutput = options.bytes === String ? $util.base64.encode(message.enforcementOutput, 0, message.enforcementOutput.length) : options.bytes === Array ? Array.prototype.slice.call(message.enforcementOutput) : message.enforcementOutput; + return object; + }; + + /** + * Converts this ExecResourceOutput to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @instance + * @returns {Object.} JSON object + */ + ExecResourceOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExecResourceOutput; + })(); + + /** + * ComplianceState enum. + * @name google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} COMPLIANT=1 COMPLIANT value + * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value + */ + OSPolicyResourceCompliance.ComplianceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "COMPLIANT"] = 1; + values[valuesById[2] = "NON_COMPLIANT"] = 2; + return values; + })(); + + return OSPolicyResourceCompliance; + })(); + + /** + * ComplianceState enum. + * @name google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} COMPLIANT=1 COMPLIANT value + * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value + */ + OSPolicyCompliance.ComplianceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "COMPLIANT"] = 1; + values[valuesById[2] = "NON_COMPLIANT"] = 2; + return values; + })(); + + return OSPolicyCompliance; + })(); + + return OSPolicyAssignmentReport; + })(); + + v1.OSPolicyAssignment = (function() { + + /** + * Properties of a OSPolicyAssignment. + * @memberof google.cloud.osconfig.v1 + * @interface IOSPolicyAssignment + * @property {string|null} [name] OSPolicyAssignment name + * @property {string|null} [description] OSPolicyAssignment description + * @property {Array.|null} [osPolicies] OSPolicyAssignment osPolicies + * @property {google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter|null} [instanceFilter] OSPolicyAssignment instanceFilter + * @property {google.cloud.osconfig.v1.OSPolicyAssignment.IRollout|null} [rollout] OSPolicyAssignment rollout + * @property {string|null} [revisionId] OSPolicyAssignment revisionId + * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] OSPolicyAssignment revisionCreateTime + * @property {string|null} [etag] OSPolicyAssignment etag + * @property {google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState|null} [rolloutState] OSPolicyAssignment rolloutState + * @property {boolean|null} [baseline] OSPolicyAssignment baseline + * @property {boolean|null} [deleted] OSPolicyAssignment deleted + * @property {boolean|null} [reconciling] OSPolicyAssignment reconciling + * @property {string|null} [uid] OSPolicyAssignment uid + */ + + /** + * Constructs a new OSPolicyAssignment. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a OSPolicyAssignment. + * @implements IOSPolicyAssignment + * @constructor + * @param {google.cloud.osconfig.v1.IOSPolicyAssignment=} [properties] Properties to set + */ + function OSPolicyAssignment(properties) { + this.osPolicies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyAssignment name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.name = ""; + + /** + * OSPolicyAssignment description. + * @member {string} description + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.description = ""; + + /** + * OSPolicyAssignment osPolicies. + * @member {Array.} osPolicies + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.osPolicies = $util.emptyArray; + + /** + * OSPolicyAssignment instanceFilter. + * @member {google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.instanceFilter = null; + + /** + * OSPolicyAssignment rollout. + * @member {google.cloud.osconfig.v1.OSPolicyAssignment.IRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.rollout = null; + + /** + * OSPolicyAssignment revisionId. + * @member {string} revisionId + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.revisionId = ""; + + /** + * OSPolicyAssignment revisionCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.revisionCreateTime = null; + + /** + * OSPolicyAssignment etag. + * @member {string} etag + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.etag = ""; + + /** + * OSPolicyAssignment rolloutState. + * @member {google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState} rolloutState + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.rolloutState = 0; + + /** + * OSPolicyAssignment baseline. + * @member {boolean} baseline + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.baseline = false; + + /** + * OSPolicyAssignment deleted. + * @member {boolean} deleted + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.deleted = false; + + /** + * OSPolicyAssignment reconciling. + * @member {boolean} reconciling + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.reconciling = false; + + /** + * OSPolicyAssignment uid. + * @member {string} uid + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.uid = ""; + + /** + * Creates a new OSPolicyAssignment instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1.IOSPolicyAssignment=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment} OSPolicyAssignment instance + */ + OSPolicyAssignment.create = function create(properties) { + return new OSPolicyAssignment(properties); + }; + + /** + * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.osPolicies != null && message.osPolicies.length) + for (var i = 0; i < message.osPolicies.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicy.encode(message.osPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.encode(message.rollout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.revisionId); + if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rolloutState); + if (message.baseline != null && Object.hasOwnProperty.call(message, "baseline")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.baseline); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deleted); + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.reconciling); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.uid); + return writer; + }; + + /** + * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment} OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.osPolicies && message.osPolicies.length)) + message.osPolicies = []; + message.osPolicies.push($root.google.cloud.osconfig.v1.OSPolicy.decode(reader, reader.uint32())); + break; + case 4: + message.instanceFilter = $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); + break; + case 5: + message.rollout = $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); + break; + case 6: + message.revisionId = reader.string(); + break; + case 7: + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.etag = reader.string(); + break; + case 9: + message.rolloutState = reader.int32(); + break; + case 10: + message.baseline = reader.bool(); + break; + case 11: + message.deleted = reader.bool(); + break; + case 12: + message.reconciling = reader.bool(); + break; + case 13: + message.uid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment} OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyAssignment message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyAssignment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.osPolicies != null && message.hasOwnProperty("osPolicies")) { + if (!Array.isArray(message.osPolicies)) + return "osPolicies: array expected"; + for (var i = 0; i < message.osPolicies.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicy.verify(message.osPolicies[i]); + if (error) + return "osPolicies." + error; + } + } + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); + if (error) + return "revisionCreateTime." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + switch (message.rolloutState) { + default: + return "rolloutState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.baseline != null && message.hasOwnProperty("baseline")) + if (typeof message.baseline !== "boolean") + return "baseline: boolean expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (typeof message.reconciling !== "boolean") + return "reconciling: boolean expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + return null; + }; + + /** + * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment} OSPolicyAssignment + */ + OSPolicyAssignment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignment) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.osPolicies) { + if (!Array.isArray(object.osPolicies)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.osPolicies: array expected"); + message.osPolicies = []; + for (var i = 0; i < object.osPolicies.length; ++i) { + if (typeof object.osPolicies[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.osPolicies: object expected"); + message.osPolicies[i] = $root.google.cloud.osconfig.v1.OSPolicy.fromObject(object.osPolicies[i]); + } + } + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.fromObject(object.instanceFilter); + } + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.fromObject(object.rollout); + } + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.revisionCreateTime != null) { + if (typeof object.revisionCreateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.revisionCreateTime: object expected"); + message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + switch (object.rolloutState) { + case "ROLLOUT_STATE_UNSPECIFIED": + case 0: + message.rolloutState = 0; + break; + case "IN_PROGRESS": + case 1: + message.rolloutState = 1; + break; + case "CANCELLING": + case 2: + message.rolloutState = 2; + break; + case "CANCELLED": + case 3: + message.rolloutState = 3; + break; + case "SUCCEEDED": + case 4: + message.rolloutState = 4; + break; + } + if (object.baseline != null) + message.baseline = Boolean(object.baseline); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + if (object.reconciling != null) + message.reconciling = Boolean(object.reconciling); + if (object.uid != null) + message.uid = String(object.uid); + return message; + }; + + /** + * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment} message OSPolicyAssignment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyAssignment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicies = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.instanceFilter = null; + object.rollout = null; + object.revisionId = ""; + object.revisionCreateTime = null; + object.etag = ""; + object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; + object.baseline = false; + object.deleted = false; + object.reconciling = false; + object.uid = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.osPolicies && message.osPolicies.length) { + object.osPolicies = []; + for (var j = 0; j < message.osPolicies.length; ++j) + object.osPolicies[j] = $root.google.cloud.osconfig.v1.OSPolicy.toObject(message.osPolicies[j], options); + } + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.toObject(message.instanceFilter, options); + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.toObject(message.rollout, options); + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) + object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; + if (message.baseline != null && message.hasOwnProperty("baseline")) + object.baseline = message.baseline; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + object.reconciling = message.reconciling; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + return object; + }; + + /** + * Converts this OSPolicyAssignment to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @instance + * @returns {Object.} JSON object + */ + OSPolicyAssignment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicyAssignment.LabelSet = (function() { + + /** + * Properties of a LabelSet. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @interface ILabelSet + * @property {Object.|null} [labels] LabelSet labels + */ + + /** + * Constructs a new LabelSet. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @classdesc Represents a LabelSet. + * @implements ILabelSet + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet=} [properties] Properties to set + */ + function LabelSet(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelSet labels. + * @member {Object.} labels + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @instance + */ + LabelSet.prototype.labels = $util.emptyObject; + + /** + * Creates a new LabelSet instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet} LabelSet instance + */ + LabelSet.create = function create(properties) { + return new LabelSet(properties); + }; + + /** + * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified LabelSet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelSet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet} LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet} LabelSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelSet message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a LabelSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet} LabelSet + */ + LabelSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a LabelSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet} message LabelSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this LabelSet to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @instance + * @returns {Object.} JSON object + */ + LabelSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LabelSet; + })(); + + OSPolicyAssignment.InstanceFilter = (function() { + + /** + * Properties of an InstanceFilter. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @interface IInstanceFilter + * @property {boolean|null} [all] InstanceFilter all + * @property {Array.|null} [inclusionLabels] InstanceFilter inclusionLabels + * @property {Array.|null} [exclusionLabels] InstanceFilter exclusionLabels + * @property {Array.|null} [inventories] InstanceFilter inventories + */ + + /** + * Constructs a new InstanceFilter. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @classdesc Represents an InstanceFilter. + * @implements IInstanceFilter + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter=} [properties] Properties to set + */ + function InstanceFilter(properties) { + this.inclusionLabels = []; + this.exclusionLabels = []; + this.inventories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceFilter all. + * @member {boolean} all + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.all = false; + + /** + * InstanceFilter inclusionLabels. + * @member {Array.} inclusionLabels + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.inclusionLabels = $util.emptyArray; + + /** + * InstanceFilter exclusionLabels. + * @member {Array.} exclusionLabels + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.exclusionLabels = $util.emptyArray; + + /** + * InstanceFilter inventories. + * @member {Array.} inventories + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.inventories = $util.emptyArray; + + /** + * Creates a new InstanceFilter instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter} InstanceFilter instance + */ + InstanceFilter.create = function create(properties) { + return new InstanceFilter(properties); + }; + + /** + * Encodes the specified InstanceFilter message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter} message InstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.all != null && Object.hasOwnProperty.call(message, "all")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.all); + if (message.inclusionLabels != null && message.inclusionLabels.length) + for (var i = 0; i < message.inclusionLabels.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.encode(message.inclusionLabels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.exclusionLabels != null && message.exclusionLabels.length) + for (var i = 0; i < message.exclusionLabels.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.encode(message.exclusionLabels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.inventories != null && message.inventories.length) + for (var i = 0; i < message.inventories.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.encode(message.inventories[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InstanceFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.IInstanceFilter} message InstanceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter} InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.all = reader.bool(); + break; + case 2: + if (!(message.inclusionLabels && message.inclusionLabels.length)) + message.inclusionLabels = []; + message.inclusionLabels.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.exclusionLabels && message.exclusionLabels.length)) + message.exclusionLabels = []; + message.exclusionLabels.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.inventories && message.inventories.length)) + message.inventories = []; + message.inventories.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter} InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceFilter message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.all != null && message.hasOwnProperty("all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; + if (message.inclusionLabels != null && message.hasOwnProperty("inclusionLabels")) { + if (!Array.isArray(message.inclusionLabels)) + return "inclusionLabels: array expected"; + for (var i = 0; i < message.inclusionLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.verify(message.inclusionLabels[i]); + if (error) + return "inclusionLabels." + error; + } + } + if (message.exclusionLabels != null && message.hasOwnProperty("exclusionLabels")) { + if (!Array.isArray(message.exclusionLabels)) + return "exclusionLabels: array expected"; + for (var i = 0; i < message.exclusionLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.verify(message.exclusionLabels[i]); + if (error) + return "exclusionLabels." + error; + } + } + if (message.inventories != null && message.hasOwnProperty("inventories")) { + if (!Array.isArray(message.inventories)) + return "inventories: array expected"; + for (var i = 0; i < message.inventories.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.verify(message.inventories[i]); + if (error) + return "inventories." + error; + } + } + return null; + }; + + /** + * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter} InstanceFilter + */ + InstanceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter(); + if (object.all != null) + message.all = Boolean(object.all); + if (object.inclusionLabels) { + if (!Array.isArray(object.inclusionLabels)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.inclusionLabels: array expected"); + message.inclusionLabels = []; + for (var i = 0; i < object.inclusionLabels.length; ++i) { + if (typeof object.inclusionLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.inclusionLabels: object expected"); + message.inclusionLabels[i] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.fromObject(object.inclusionLabels[i]); + } + } + if (object.exclusionLabels) { + if (!Array.isArray(object.exclusionLabels)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.exclusionLabels: array expected"); + message.exclusionLabels = []; + for (var i = 0; i < object.exclusionLabels.length; ++i) { + if (typeof object.exclusionLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.exclusionLabels: object expected"); + message.exclusionLabels[i] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.fromObject(object.exclusionLabels[i]); + } + } + if (object.inventories) { + if (!Array.isArray(object.inventories)) + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.inventories: array expected"); + message.inventories = []; + for (var i = 0; i < object.inventories.length; ++i) { + if (typeof object.inventories[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.inventories: object expected"); + message.inventories[i] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.fromObject(object.inventories[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter} message InstanceFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.inclusionLabels = []; + object.exclusionLabels = []; + object.inventories = []; + } + if (options.defaults) + object.all = false; + if (message.all != null && message.hasOwnProperty("all")) + object.all = message.all; + if (message.inclusionLabels && message.inclusionLabels.length) { + object.inclusionLabels = []; + for (var j = 0; j < message.inclusionLabels.length; ++j) + object.inclusionLabels[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.toObject(message.inclusionLabels[j], options); + } + if (message.exclusionLabels && message.exclusionLabels.length) { + object.exclusionLabels = []; + for (var j = 0; j < message.exclusionLabels.length; ++j) + object.exclusionLabels[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.toObject(message.exclusionLabels[j], options); + } + if (message.inventories && message.inventories.length) { + object.inventories = []; + for (var j = 0; j < message.inventories.length; ++j) + object.inventories[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.toObject(message.inventories[j], options); + } + return object; + }; + + /** + * Converts this InstanceFilter to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @instance + * @returns {Object.} JSON object + */ + InstanceFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + InstanceFilter.Inventory = (function() { + + /** + * Properties of an Inventory. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @interface IInventory + * @property {string|null} [osShortName] Inventory osShortName + * @property {string|null} [osVersion] Inventory osVersion + */ + + /** + * Constructs a new Inventory. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @classdesc Represents an Inventory. + * @implements IInventory + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory=} [properties] Properties to set + */ + function Inventory(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Inventory osShortName. + * @member {string} osShortName + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @instance + */ + Inventory.prototype.osShortName = ""; + + /** + * Inventory osVersion. + * @member {string} osVersion + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @instance + */ + Inventory.prototype.osVersion = ""; + + /** + * Creates a new Inventory instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory} Inventory instance + */ + Inventory.create = function create(properties) { + return new Inventory(properties); + }; + + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osShortName != null && Object.hasOwnProperty.call(message, "osShortName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osShortName); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osVersion); + return writer; + }; + + /** + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Inventory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osShortName = reader.string(); + break; + case 2: + message.osVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Inventory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Inventory message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Inventory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + if (!$util.isString(message.osShortName)) + return "osShortName: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; + return null; + }; + + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory} Inventory + */ + Inventory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory(); + if (object.osShortName != null) + message.osShortName = String(object.osShortName); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); + return message; + }; + + /** + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory} message Inventory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Inventory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osShortName = ""; + object.osVersion = ""; + } + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + object.osShortName = message.osShortName; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; + return object; + }; + + /** + * Converts this Inventory to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @instance + * @returns {Object.} JSON object + */ + Inventory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Inventory; + })(); + + return InstanceFilter; + })(); + + OSPolicyAssignment.Rollout = (function() { + + /** + * Properties of a Rollout. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @interface IRollout + * @property {google.cloud.osconfig.v1.IFixedOrPercent|null} [disruptionBudget] Rollout disruptionBudget + * @property {google.protobuf.IDuration|null} [minWaitDuration] Rollout minWaitDuration + */ + + /** + * Constructs a new Rollout. + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @classdesc Represents a Rollout. + * @implements IRollout + * @constructor + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.IRollout=} [properties] Properties to set + */ + function Rollout(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rollout disruptionBudget. + * @member {google.cloud.osconfig.v1.IFixedOrPercent|null|undefined} disruptionBudget + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @instance + */ + Rollout.prototype.disruptionBudget = null; + + /** + * Rollout minWaitDuration. + * @member {google.protobuf.IDuration|null|undefined} minWaitDuration + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @instance + */ + Rollout.prototype.minWaitDuration = null; + + /** + * Creates a new Rollout instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.IRollout=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.Rollout} Rollout instance + */ + Rollout.create = function create(properties) { + return new Rollout(properties); + }; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disruptionBudget != null && Object.hasOwnProperty.call(message, "disruptionBudget")) + $root.google.cloud.osconfig.v1.FixedOrPercent.encode(message.disruptionBudget, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minWaitDuration != null && Object.hasOwnProperty.call(message, "minWaitDuration")) + $root.google.protobuf.Duration.encode(message.minWaitDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.decode(reader, reader.uint32()); + break; + case 2: + message.minWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rollout message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rollout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) { + var error = $root.google.cloud.osconfig.v1.FixedOrPercent.verify(message.disruptionBudget); + if (error) + return "disruptionBudget." + error; + } + if (message.minWaitDuration != null && message.hasOwnProperty("minWaitDuration")) { + var error = $root.google.protobuf.Duration.verify(message.minWaitDuration); + if (error) + return "minWaitDuration." + error; + } + return null; + }; + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignment.Rollout} Rollout + */ + Rollout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout(); + if (object.disruptionBudget != null) { + if (typeof object.disruptionBudget !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.disruptionBudget: object expected"); + message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.fromObject(object.disruptionBudget); + } + if (object.minWaitDuration != null) { + if (typeof object.minWaitDuration !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.minWaitDuration: object expected"); + message.minWaitDuration = $root.google.protobuf.Duration.fromObject(object.minWaitDuration); + } + return message; + }; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignment.Rollout} message Rollout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rollout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disruptionBudget = null; + object.minWaitDuration = null; + } + if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) + object.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.toObject(message.disruptionBudget, options); + if (message.minWaitDuration != null && message.hasOwnProperty("minWaitDuration")) + object.minWaitDuration = $root.google.protobuf.Duration.toObject(message.minWaitDuration, options); + return object; + }; + + /** + * Converts this Rollout to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @instance + * @returns {Object.} JSON object + */ + Rollout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Rollout; + })(); + + /** + * RolloutState enum. + * @name google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState + * @enum {number} + * @property {number} ROLLOUT_STATE_UNSPECIFIED=0 ROLLOUT_STATE_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + */ + OSPolicyAssignment.RolloutState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLLOUT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + return values; + })(); + + return OSPolicyAssignment; + })(); + + v1.OSPolicyAssignmentOperationMetadata = (function() { + + /** + * Properties of a OSPolicyAssignmentOperationMetadata. + * @memberof google.cloud.osconfig.v1 + * @interface IOSPolicyAssignmentOperationMetadata + * @property {string|null} [osPolicyAssignment] OSPolicyAssignmentOperationMetadata osPolicyAssignment + * @property {google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod|null} [apiMethod] OSPolicyAssignmentOperationMetadata apiMethod + * @property {google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState|null} [rolloutState] OSPolicyAssignmentOperationMetadata rolloutState + * @property {google.protobuf.ITimestamp|null} [rolloutStartTime] OSPolicyAssignmentOperationMetadata rolloutStartTime + * @property {google.protobuf.ITimestamp|null} [rolloutUpdateTime] OSPolicyAssignmentOperationMetadata rolloutUpdateTime + */ + + /** + * Constructs a new OSPolicyAssignmentOperationMetadata. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a OSPolicyAssignmentOperationMetadata. + * @implements IOSPolicyAssignmentOperationMetadata + * @constructor + * @param {google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata=} [properties] Properties to set + */ + function OSPolicyAssignmentOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyAssignmentOperationMetadata osPolicyAssignment. + * @member {string} osPolicyAssignment + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.osPolicyAssignment = ""; + + /** + * OSPolicyAssignmentOperationMetadata apiMethod. + * @member {google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod} apiMethod + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.apiMethod = 0; + + /** + * OSPolicyAssignmentOperationMetadata rolloutState. + * @member {google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState} rolloutState + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.rolloutState = 0; + + /** + * OSPolicyAssignmentOperationMetadata rolloutStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} rolloutStartTime + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.rolloutStartTime = null; + + /** + * OSPolicyAssignmentOperationMetadata rolloutUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} rolloutUpdateTime + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @instance + */ + OSPolicyAssignmentOperationMetadata.prototype.rolloutUpdateTime = null; + + /** + * Creates a new OSPolicyAssignmentOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata instance + */ + OSPolicyAssignmentOperationMetadata.create = function create(properties) { + return new OSPolicyAssignmentOperationMetadata(properties); + }; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyAssignment); + if (message.apiMethod != null && Object.hasOwnProperty.call(message, "apiMethod")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.apiMethod); + if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rolloutState); + if (message.rolloutStartTime != null && Object.hasOwnProperty.call(message, "rolloutStartTime")) + $root.google.protobuf.Timestamp.encode(message.rolloutStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rolloutUpdateTime != null && Object.hasOwnProperty.call(message, "rolloutUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.rolloutUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OSPolicyAssignmentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyAssignment = reader.string(); + break; + case 2: + message.apiMethod = reader.int32(); + break; + case 3: + message.rolloutState = reader.int32(); + break; + case 4: + message.rolloutStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.rolloutUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyAssignmentOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyAssignmentOperationMetadata message. + * @function verify + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyAssignmentOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + if (!$util.isString(message.osPolicyAssignment)) + return "osPolicyAssignment: string expected"; + if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) + switch (message.apiMethod) { + default: + return "apiMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + switch (message.rolloutState) { + default: + return "rolloutState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.rolloutStartTime); + if (error) + return "rolloutStartTime." + error; + } + if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.rolloutUpdateTime); + if (error) + return "rolloutUpdateTime." + error; + } + return null; + }; + + /** + * Creates a OSPolicyAssignmentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata} OSPolicyAssignmentOperationMetadata + */ + OSPolicyAssignmentOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata) + return object; + var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata(); + if (object.osPolicyAssignment != null) + message.osPolicyAssignment = String(object.osPolicyAssignment); + switch (object.apiMethod) { + case "API_METHOD_UNSPECIFIED": + case 0: + message.apiMethod = 0; + break; + case "CREATE": + case 1: + message.apiMethod = 1; + break; + case "UPDATE": + case 2: + message.apiMethod = 2; + break; + case "DELETE": + case 3: + message.apiMethod = 3; + break; + } + switch (object.rolloutState) { + case "ROLLOUT_STATE_UNSPECIFIED": + case 0: + message.rolloutState = 0; + break; + case "IN_PROGRESS": + case 1: + message.rolloutState = 1; + break; + case "CANCELLING": + case 2: + message.rolloutState = 2; + break; + case "CANCELLED": + case 3: + message.rolloutState = 3; + break; + case "SUCCEEDED": + case 4: + message.rolloutState = 4; + break; + } + if (object.rolloutStartTime != null) { + if (typeof object.rolloutStartTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.rolloutStartTime: object expected"); + message.rolloutStartTime = $root.google.protobuf.Timestamp.fromObject(object.rolloutStartTime); + } + if (object.rolloutUpdateTime != null) { + if (typeof object.rolloutUpdateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.rolloutUpdateTime: object expected"); + message.rolloutUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.rolloutUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyAssignmentOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @static + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata} message OSPolicyAssignmentOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyAssignmentOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osPolicyAssignment = ""; + object.apiMethod = options.enums === String ? "API_METHOD_UNSPECIFIED" : 0; + object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; + object.rolloutStartTime = null; + object.rolloutUpdateTime = null; + } + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = message.osPolicyAssignment; + if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) + object.apiMethod = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] : message.apiMethod; + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] : message.rolloutState; + if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) + object.rolloutStartTime = $root.google.protobuf.Timestamp.toObject(message.rolloutStartTime, options); + if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) + object.rolloutUpdateTime = $root.google.protobuf.Timestamp.toObject(message.rolloutUpdateTime, options); + return object; + }; + + /** + * Converts this OSPolicyAssignmentOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OSPolicyAssignmentOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * APIMethod enum. + * @name google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod + * @enum {number} + * @property {number} API_METHOD_UNSPECIFIED=0 API_METHOD_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} UPDATE=2 UPDATE value + * @property {number} DELETE=3 DELETE value + */ + OSPolicyAssignmentOperationMetadata.APIMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "API_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "UPDATE"] = 2; + values[valuesById[3] = "DELETE"] = 3; + return values; + })(); + + /** + * RolloutState enum. + * @name google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState + * @enum {number} + * @property {number} ROLLOUT_STATE_UNSPECIFIED=0 ROLLOUT_STATE_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + */ + OSPolicyAssignmentOperationMetadata.RolloutState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLLOUT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + return values; + })(); + + return OSPolicyAssignmentOperationMetadata; + })(); + + v1.CreateOSPolicyAssignmentRequest = (function() { + + /** + * Properties of a CreateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface ICreateOSPolicyAssignmentRequest + * @property {string|null} [parent] CreateOSPolicyAssignmentRequest parent + * @property {google.cloud.osconfig.v1.IOSPolicyAssignment|null} [osPolicyAssignment] CreateOSPolicyAssignmentRequest osPolicyAssignment + * @property {string|null} [osPolicyAssignmentId] CreateOSPolicyAssignmentRequest osPolicyAssignmentId + */ + + /** + * Constructs a new CreateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a CreateOSPolicyAssignmentRequest. + * @implements ICreateOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function CreateOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateOSPolicyAssignmentRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @instance + */ + CreateOSPolicyAssignmentRequest.prototype.parent = ""; + + /** + * CreateOSPolicyAssignmentRequest osPolicyAssignment. + * @member {google.cloud.osconfig.v1.IOSPolicyAssignment|null|undefined} osPolicyAssignment + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @instance + */ + CreateOSPolicyAssignmentRequest.prototype.osPolicyAssignment = null; + + /** + * CreateOSPolicyAssignmentRequest osPolicyAssignmentId. + * @member {string} osPolicyAssignmentId + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @instance + */ + CreateOSPolicyAssignmentRequest.prototype.osPolicyAssignmentId = ""; + + /** + * Creates a new CreateOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest instance + */ + CreateOSPolicyAssignmentRequest.create = function create(properties) { + return new CreateOSPolicyAssignmentRequest(properties); + }; + + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateOSPolicyAssignmentRequest.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.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + $root.google.cloud.osconfig.v1.OSPolicyAssignment.encode(message.osPolicyAssignment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.osPolicyAssignmentId != null && Object.hasOwnProperty.call(message, "osPolicyAssignmentId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.osPolicyAssignmentId); + return writer; + }; + + /** + * Encodes the specified CreateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + case 3: + message.osPolicyAssignmentId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateOSPolicyAssignmentRequest.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.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignment.verify(message.osPolicyAssignment); + if (error) + return "osPolicyAssignment." + error; + } + if (message.osPolicyAssignmentId != null && message.hasOwnProperty("osPolicyAssignmentId")) + if (!$util.isString(message.osPolicyAssignmentId)) + return "osPolicyAssignmentId: string expected"; + return null; + }; + + /** + * Creates a CreateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest} CreateOSPolicyAssignmentRequest + */ + CreateOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.osPolicyAssignment != null) { + if (typeof object.osPolicyAssignment !== "object") + throw TypeError(".google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest.osPolicyAssignment: object expected"); + message.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.fromObject(object.osPolicyAssignment); + } + if (object.osPolicyAssignmentId != null) + message.osPolicyAssignmentId = String(object.osPolicyAssignmentId); + return message; + }; + + /** + * Creates a plain object from a CreateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest} message CreateOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateOSPolicyAssignmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.osPolicyAssignment = null; + object.osPolicyAssignmentId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.toObject(message.osPolicyAssignment, options); + if (message.osPolicyAssignmentId != null && message.hasOwnProperty("osPolicyAssignmentId")) + object.osPolicyAssignmentId = message.osPolicyAssignmentId; + return object; + }; + + /** + * Converts this CreateOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateOSPolicyAssignmentRequest; + })(); + + v1.UpdateOSPolicyAssignmentRequest = (function() { + + /** + * Properties of an UpdateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IUpdateOSPolicyAssignmentRequest + * @property {google.cloud.osconfig.v1.IOSPolicyAssignment|null} [osPolicyAssignment] UpdateOSPolicyAssignmentRequest osPolicyAssignment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOSPolicyAssignmentRequest updateMask + */ + + /** + * Constructs a new UpdateOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an UpdateOSPolicyAssignmentRequest. + * @implements IUpdateOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function UpdateOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateOSPolicyAssignmentRequest osPolicyAssignment. + * @member {google.cloud.osconfig.v1.IOSPolicyAssignment|null|undefined} osPolicyAssignment + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @instance + */ + UpdateOSPolicyAssignmentRequest.prototype.osPolicyAssignment = null; + + /** + * UpdateOSPolicyAssignmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @instance + */ + UpdateOSPolicyAssignmentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest instance + */ + UpdateOSPolicyAssignmentRequest.create = function create(properties) { + return new UpdateOSPolicyAssignmentRequest(properties); + }; + + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateOSPolicyAssignmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + $root.google.cloud.osconfig.v1.OSPolicyAssignment.encode(message.osPolicyAssignment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateOSPolicyAssignmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignment.verify(message.osPolicyAssignment); + if (error) + return "osPolicyAssignment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest} UpdateOSPolicyAssignmentRequest + */ + UpdateOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest(); + if (object.osPolicyAssignment != null) { + if (typeof object.osPolicyAssignment !== "object") + throw TypeError(".google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest.osPolicyAssignment: object expected"); + message.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.fromObject(object.osPolicyAssignment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest} message UpdateOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateOSPolicyAssignmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osPolicyAssignment = null; + object.updateMask = null; + } + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.toObject(message.osPolicyAssignment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateOSPolicyAssignmentRequest; + })(); + + v1.GetOSPolicyAssignmentRequest = (function() { + + /** + * Properties of a GetOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IGetOSPolicyAssignmentRequest + * @property {string|null} [name] GetOSPolicyAssignmentRequest name + */ + + /** + * Constructs a new GetOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a GetOSPolicyAssignmentRequest. + * @implements IGetOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function GetOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOSPolicyAssignmentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @instance + */ + GetOSPolicyAssignmentRequest.prototype.name = ""; + + /** + * Creates a new GetOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest instance + */ + GetOSPolicyAssignmentRequest.create = function create(properties) { + return new GetOSPolicyAssignmentRequest(properties); + }; + + /** + * Encodes the specified GetOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOSPolicyAssignmentRequest.encode = function encode(message, writer) { + 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 GetOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOSPolicyAssignmentRequest.verify = function verify(message) { + if (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 GetOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest} GetOSPolicyAssignmentRequest + */ + GetOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest} message GetOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOSPolicyAssignmentRequest.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 GetOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOSPolicyAssignmentRequest; + })(); + + v1.ListOSPolicyAssignmentsRequest = (function() { + + /** + * Properties of a ListOSPolicyAssignmentsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListOSPolicyAssignmentsRequest + * @property {string|null} [parent] ListOSPolicyAssignmentsRequest parent + * @property {number|null} [pageSize] ListOSPolicyAssignmentsRequest pageSize + * @property {string|null} [pageToken] ListOSPolicyAssignmentsRequest pageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListOSPolicyAssignmentsRequest. + * @implements IListOSPolicyAssignmentsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest=} [properties] Properties to set + */ + function ListOSPolicyAssignmentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @instance + */ + ListOSPolicyAssignmentsRequest.prototype.parent = ""; + + /** + * ListOSPolicyAssignmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @instance + */ + ListOSPolicyAssignmentsRequest.prototype.pageSize = 0; + + /** + * ListOSPolicyAssignmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @instance + */ + ListOSPolicyAssignmentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest instance + */ + ListOSPolicyAssignmentsRequest.create = function create(properties) { + return new ListOSPolicyAssignmentsRequest(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListOSPolicyAssignmentsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest} ListOSPolicyAssignmentsRequest + */ + ListOSPolicyAssignmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @static + * @param {google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest} message ListOSPolicyAssignmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentsRequest; + })(); + + v1.ListOSPolicyAssignmentsResponse = (function() { + + /** + * Properties of a ListOSPolicyAssignmentsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListOSPolicyAssignmentsResponse + * @property {Array.|null} [osPolicyAssignments] ListOSPolicyAssignmentsResponse osPolicyAssignments + * @property {string|null} [nextPageToken] ListOSPolicyAssignmentsResponse nextPageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListOSPolicyAssignmentsResponse. + * @implements IListOSPolicyAssignmentsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse=} [properties] Properties to set + */ + function ListOSPolicyAssignmentsResponse(properties) { + this.osPolicyAssignments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentsResponse osPolicyAssignments. + * @member {Array.} osPolicyAssignments + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @instance + */ + ListOSPolicyAssignmentsResponse.prototype.osPolicyAssignments = $util.emptyArray; + + /** + * ListOSPolicyAssignmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @instance + */ + ListOSPolicyAssignmentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse instance + */ + ListOSPolicyAssignmentsResponse.create = function create(properties) { + return new ListOSPolicyAssignmentsResponse(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignments != null && message.osPolicyAssignments.length) + for (var i = 0; i < message.osPolicyAssignments.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicyAssignment.encode(message.osPolicyAssignments[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 ListOSPolicyAssignmentsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignments != null && message.hasOwnProperty("osPolicyAssignments")) { + if (!Array.isArray(message.osPolicyAssignments)) + return "osPolicyAssignments: array expected"; + for (var i = 0; i < message.osPolicyAssignments.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignment.verify(message.osPolicyAssignments[i]); + if (error) + return "osPolicyAssignments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse} ListOSPolicyAssignmentsResponse + */ + ListOSPolicyAssignmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse(); + if (object.osPolicyAssignments) { + if (!Array.isArray(object.osPolicyAssignments)) + throw TypeError(".google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse.osPolicyAssignments: array expected"); + message.osPolicyAssignments = []; + for (var i = 0; i < object.osPolicyAssignments.length; ++i) { + if (typeof object.osPolicyAssignments[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse.osPolicyAssignments: object expected"); + message.osPolicyAssignments[i] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.fromObject(object.osPolicyAssignments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @static + * @param {google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse} message ListOSPolicyAssignmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyAssignments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.osPolicyAssignments && message.osPolicyAssignments.length) { + object.osPolicyAssignments = []; + for (var j = 0; j < message.osPolicyAssignments.length; ++j) + object.osPolicyAssignments[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.toObject(message.osPolicyAssignments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentsResponse; + })(); + + v1.ListOSPolicyAssignmentRevisionsRequest = (function() { + + /** + * Properties of a ListOSPolicyAssignmentRevisionsRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IListOSPolicyAssignmentRevisionsRequest + * @property {string|null} [name] ListOSPolicyAssignmentRevisionsRequest name + * @property {number|null} [pageSize] ListOSPolicyAssignmentRevisionsRequest pageSize + * @property {string|null} [pageToken] ListOSPolicyAssignmentRevisionsRequest pageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentRevisionsRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListOSPolicyAssignmentRevisionsRequest. + * @implements IListOSPolicyAssignmentRevisionsRequest + * @constructor + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest=} [properties] Properties to set + */ + function ListOSPolicyAssignmentRevisionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentRevisionsRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @instance + */ + ListOSPolicyAssignmentRevisionsRequest.prototype.name = ""; + + /** + * ListOSPolicyAssignmentRevisionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @instance + */ + ListOSPolicyAssignmentRevisionsRequest.prototype.pageSize = 0; + + /** + * ListOSPolicyAssignmentRevisionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @instance + */ + ListOSPolicyAssignmentRevisionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentRevisionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest instance + */ + ListOSPolicyAssignmentRevisionsRequest.create = function create(properties) { + return new ListOSPolicyAssignmentRevisionsRequest(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentRevisionsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentRevisionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest} ListOSPolicyAssignmentRevisionsRequest + */ + ListOSPolicyAssignmentRevisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest} message ListOSPolicyAssignmentRevisionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentRevisionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentRevisionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentRevisionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentRevisionsRequest; + })(); + + v1.ListOSPolicyAssignmentRevisionsResponse = (function() { + + /** + * Properties of a ListOSPolicyAssignmentRevisionsResponse. + * @memberof google.cloud.osconfig.v1 + * @interface IListOSPolicyAssignmentRevisionsResponse + * @property {Array.|null} [osPolicyAssignments] ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments + * @property {string|null} [nextPageToken] ListOSPolicyAssignmentRevisionsResponse nextPageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentRevisionsResponse. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ListOSPolicyAssignmentRevisionsResponse. + * @implements IListOSPolicyAssignmentRevisionsResponse + * @constructor + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse=} [properties] Properties to set + */ + function ListOSPolicyAssignmentRevisionsResponse(properties) { + this.osPolicyAssignments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentRevisionsResponse osPolicyAssignments. + * @member {Array.} osPolicyAssignments + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @instance + */ + ListOSPolicyAssignmentRevisionsResponse.prototype.osPolicyAssignments = $util.emptyArray; + + /** + * ListOSPolicyAssignmentRevisionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @instance + */ + ListOSPolicyAssignmentRevisionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentRevisionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse instance + */ + ListOSPolicyAssignmentRevisionsResponse.create = function create(properties) { + return new ListOSPolicyAssignmentRevisionsResponse(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentRevisionsResponse message. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignments != null && message.osPolicyAssignments.length) + for (var i = 0; i < message.osPolicyAssignments.length; ++i) + $root.google.cloud.osconfig.v1.OSPolicyAssignment.encode(message.osPolicyAssignments[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 ListOSPolicyAssignmentRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentRevisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentRevisionsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentRevisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignments != null && message.hasOwnProperty("osPolicyAssignments")) { + if (!Array.isArray(message.osPolicyAssignments)) + return "osPolicyAssignments: array expected"; + for (var i = 0; i < message.osPolicyAssignments.length; ++i) { + var error = $root.google.cloud.osconfig.v1.OSPolicyAssignment.verify(message.osPolicyAssignments[i]); + if (error) + return "osPolicyAssignments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse} ListOSPolicyAssignmentRevisionsResponse + */ + ListOSPolicyAssignmentRevisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse(); + if (object.osPolicyAssignments) { + if (!Array.isArray(object.osPolicyAssignments)) + throw TypeError(".google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse.osPolicyAssignments: array expected"); + message.osPolicyAssignments = []; + for (var i = 0; i < object.osPolicyAssignments.length; ++i) { + if (typeof object.osPolicyAssignments[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse.osPolicyAssignments: object expected"); + message.osPolicyAssignments[i] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.fromObject(object.osPolicyAssignments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentRevisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse} message ListOSPolicyAssignmentRevisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentRevisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyAssignments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.osPolicyAssignments && message.osPolicyAssignments.length) { + object.osPolicyAssignments = []; + for (var j = 0; j < message.osPolicyAssignments.length; ++j) + object.osPolicyAssignments[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignment.toObject(message.osPolicyAssignments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentRevisionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentRevisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentRevisionsResponse; + })(); + + v1.DeleteOSPolicyAssignmentRequest = (function() { + + /** + * Properties of a DeleteOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IDeleteOSPolicyAssignmentRequest + * @property {string|null} [name] DeleteOSPolicyAssignmentRequest name + */ + + /** + * Constructs a new DeleteOSPolicyAssignmentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a DeleteOSPolicyAssignmentRequest. + * @implements IDeleteOSPolicyAssignmentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest=} [properties] Properties to set + */ + function DeleteOSPolicyAssignmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOSPolicyAssignmentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @instance + */ + DeleteOSPolicyAssignmentRequest.prototype.name = ""; + + /** + * Creates a new DeleteOSPolicyAssignmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest instance + */ + DeleteOSPolicyAssignmentRequest.create = function create(properties) { + return new DeleteOSPolicyAssignmentRequest(properties); + }; + + /** + * Encodes the specified DeleteOSPolicyAssignmentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOSPolicyAssignmentRequest.encode = function encode(message, writer) { + 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 DeleteOSPolicyAssignmentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOSPolicyAssignmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOSPolicyAssignmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOSPolicyAssignmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOSPolicyAssignmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOSPolicyAssignmentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOSPolicyAssignmentRequest.verify = function verify(message) { + if (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 DeleteOSPolicyAssignmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest} DeleteOSPolicyAssignmentRequest + */ + DeleteOSPolicyAssignmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOSPolicyAssignmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @static + * @param {google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest} message DeleteOSPolicyAssignmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOSPolicyAssignmentRequest.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 DeleteOSPolicyAssignmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOSPolicyAssignmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOSPolicyAssignmentRequest; + })(); + v1.FixedOrPercent = (function() { /** @@ -14707,6 +26552,270 @@ return new this(rpcImpl, requestDelimited, responseDelimited); }; + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#createOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef CreateOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateOSPolicyAssignment. + * @function createOSPolicyAssignment + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest} request CreateOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.CreateOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.createOSPolicyAssignment = function createOSPolicyAssignment(request, callback) { + return this.rpcCall(createOSPolicyAssignment, $root.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateOSPolicyAssignment" }); + + /** + * Calls CreateOSPolicyAssignment. + * @function createOSPolicyAssignment + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest} request CreateOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#updateOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef UpdateOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateOSPolicyAssignment. + * @function updateOSPolicyAssignment + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest} request UpdateOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.UpdateOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.updateOSPolicyAssignment = function updateOSPolicyAssignment(request, callback) { + return this.rpcCall(updateOSPolicyAssignment, $root.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateOSPolicyAssignment" }); + + /** + * Calls UpdateOSPolicyAssignment. + * @function updateOSPolicyAssignment + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest} request UpdateOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef GetOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.OSPolicyAssignment} [response] OSPolicyAssignment + */ + + /** + * Calls GetOSPolicyAssignment. + * @function getOSPolicyAssignment + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest} request GetOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and OSPolicyAssignment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getOSPolicyAssignment = function getOSPolicyAssignment(request, callback) { + return this.rpcCall(getOSPolicyAssignment, $root.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest, $root.google.cloud.osconfig.v1.OSPolicyAssignment, request, callback); + }, "name", { value: "GetOSPolicyAssignment" }); + + /** + * Calls GetOSPolicyAssignment. + * @function getOSPolicyAssignment + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest} request GetOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignments}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef ListOSPolicyAssignmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse} [response] ListOSPolicyAssignmentsResponse + */ + + /** + * Calls ListOSPolicyAssignments. + * @function listOSPolicyAssignments + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest} request ListOSPolicyAssignmentsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignments = function listOSPolicyAssignments(request, callback) { + return this.rpcCall(listOSPolicyAssignments, $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest, $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse, request, callback); + }, "name", { value: "ListOSPolicyAssignments" }); + + /** + * Calls ListOSPolicyAssignments. + * @function listOSPolicyAssignments + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest} request ListOSPolicyAssignmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef ListOSPolicyAssignmentRevisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse} [response] ListOSPolicyAssignmentRevisionsResponse + */ + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @function listOSPolicyAssignmentRevisions + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest} request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentRevisionsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentRevisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignmentRevisions = function listOSPolicyAssignmentRevisions(request, callback) { + return this.rpcCall(listOSPolicyAssignmentRevisions, $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest, $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse, request, callback); + }, "name", { value: "ListOSPolicyAssignmentRevisions" }); + + /** + * Calls ListOSPolicyAssignmentRevisions. + * @function listOSPolicyAssignmentRevisions + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest} request ListOSPolicyAssignmentRevisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#deleteOSPolicyAssignment}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef DeleteOSPolicyAssignmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteOSPolicyAssignment. + * @function deleteOSPolicyAssignment + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest} request DeleteOSPolicyAssignmentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.DeleteOSPolicyAssignmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.deleteOSPolicyAssignment = function deleteOSPolicyAssignment(request, callback) { + return this.rpcCall(deleteOSPolicyAssignment, $root.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteOSPolicyAssignment" }); + + /** + * Calls DeleteOSPolicyAssignment. + * @function deleteOSPolicyAssignment + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest} request DeleteOSPolicyAssignmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getOSPolicyAssignmentReport}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef GetOSPolicyAssignmentReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.OSPolicyAssignmentReport} [response] OSPolicyAssignmentReport + */ + + /** + * Calls GetOSPolicyAssignmentReport. + * @function getOSPolicyAssignmentReport + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest} request GetOSPolicyAssignmentReportRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentReportCallback} callback Node-style callback called with the error, if any, and OSPolicyAssignmentReport + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getOSPolicyAssignmentReport = function getOSPolicyAssignmentReport(request, callback) { + return this.rpcCall(getOSPolicyAssignmentReport, $root.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest, $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport, request, callback); + }, "name", { value: "GetOSPolicyAssignmentReport" }); + + /** + * Calls GetOSPolicyAssignmentReport. + * @function getOSPolicyAssignmentReport + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest} request GetOSPolicyAssignmentReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignmentReports}. + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @typedef ListOSPolicyAssignmentReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse} [response] ListOSPolicyAssignmentReportsResponse + */ + + /** + * Calls ListOSPolicyAssignmentReports. + * @function listOSPolicyAssignmentReports + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest} request ListOSPolicyAssignmentReportsRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentReportsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentReportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignmentReports = function listOSPolicyAssignmentReports(request, callback) { + return this.rpcCall(listOSPolicyAssignmentReports, $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest, $root.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse, request, callback); + }, "name", { value: "ListOSPolicyAssignmentReports" }); + + /** + * Calls ListOSPolicyAssignmentReports. + * @function listOSPolicyAssignmentReports + * @memberof google.cloud.osconfig.v1.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest} request ListOSPolicyAssignmentReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getInventory}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService @@ -46899,23 +59008,25 @@ return Duration; })(); - protobuf.Empty = (function() { + protobuf.FieldMask = (function() { /** - * Properties of an Empty. + * Properties of a FieldMask. * @memberof google.protobuf - * @interface IEmpty + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new Empty. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function Empty(properties) { + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46923,63 +59034,79 @@ } /** - * Creates a new Empty instance using the specified properties. + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - Empty.create = function create(properties) { - return new Empty(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, writer) { + FieldMask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); return writer; }; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -46989,95 +59116,118 @@ }; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Empty.verify = function verify(message) { + FieldMask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } return null; }; /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.FieldMask} FieldMask */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) return object; - return new $root.google.protobuf.Empty(); + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; }; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; }; /** - * Converts this Empty to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Empty; + return FieldMask; })(); - protobuf.FieldMask = (function() { + protobuf.Empty = (function() { /** - * Properties of a FieldMask. + * Properties of an Empty. * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * @interface IEmpty */ /** - * Constructs a new FieldMask. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47085,79 +59235,63 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length) { + Empty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -47167,99 +59301,74 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldMask.verify = function verify(message) { + Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } return null; }; /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Empty} Empty */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this FieldMask to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FieldMask; + return Empty; })(); protobuf.Any = (function() { diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 9e065a9a463..59f0f0405fe 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -399,6 +399,1138 @@ "FULL": 2 } }, + "OSPolicy": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2 + }, + "mode": { + "type": "Mode", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resourceGroups": { + "rule": "repeated", + "type": "ResourceGroup", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "allowNoResourceGroupMatch": { + "type": "bool", + "id": 5 + } + }, + "nested": { + "InventoryFilter": { + "fields": { + "osShortName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "osVersion": { + "type": "string", + "id": 2 + } + } + }, + "Resource": { + "oneofs": { + "resourceType": { + "oneof": [ + "pkg", + "repository", + "exec", + "file" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pkg": { + "type": "PackageResource", + "id": 2 + }, + "repository": { + "type": "RepositoryResource", + "id": 3 + }, + "exec": { + "type": "ExecResource", + "id": 4 + }, + "file": { + "type": "FileResource", + "id": 5 + } + }, + "nested": { + "File": { + "oneofs": { + "type": { + "oneof": [ + "remote", + "gcs", + "localPath" + ] + } + }, + "fields": { + "remote": { + "type": "Remote", + "id": 1 + }, + "gcs": { + "type": "Gcs", + "id": 2 + }, + "localPath": { + "type": "string", + "id": 3 + }, + "allowInsecure": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "Remote": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sha256Checksum": { + "type": "string", + "id": 2 + } + } + }, + "Gcs": { + "fields": { + "bucket": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "object": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "generation": { + "type": "int64", + "id": 3 + } + } + } + } + }, + "PackageResource": { + "oneofs": { + "systemPackage": { + "oneof": [ + "apt", + "deb", + "yum", + "zypper", + "rpm", + "googet", + "msi" + ] + } + }, + "fields": { + "desiredState": { + "type": "DesiredState", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "apt": { + "type": "APT", + "id": 2 + }, + "deb": { + "type": "Deb", + "id": 3 + }, + "yum": { + "type": "YUM", + "id": 4 + }, + "zypper": { + "type": "Zypper", + "id": 5 + }, + "rpm": { + "type": "RPM", + "id": 6 + }, + "googet": { + "type": "GooGet", + "id": 7 + }, + "msi": { + "type": "MSI", + "id": 8 + } + }, + "nested": { + "Deb": { + "fields": { + "source": { + "type": "File", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pullDeps": { + "type": "bool", + "id": 2 + } + } + }, + "APT": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RPM": { + "fields": { + "source": { + "type": "File", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pullDeps": { + "type": "bool", + "id": 2 + } + } + }, + "YUM": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Zypper": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GooGet": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MSI": { + "fields": { + "source": { + "type": "File", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "properties": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "DesiredState": { + "values": { + "DESIRED_STATE_UNSPECIFIED": 0, + "INSTALLED": 1, + "REMOVED": 2 + } + } + } + }, + "RepositoryResource": { + "oneofs": { + "repository": { + "oneof": [ + "apt", + "yum", + "zypper", + "goo" + ] + } + }, + "fields": { + "apt": { + "type": "AptRepository", + "id": 1 + }, + "yum": { + "type": "YumRepository", + "id": 2 + }, + "zypper": { + "type": "ZypperRepository", + "id": 3 + }, + "goo": { + "type": "GooRepository", + "id": 4 + } + }, + "nested": { + "AptRepository": { + "fields": { + "archiveType": { + "type": "ArchiveType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "uri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "distribution": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "components": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gpgKey": { + "type": "string", + "id": 5 + } + }, + "nested": { + "ArchiveType": { + "values": { + "ARCHIVE_TYPE_UNSPECIFIED": 0, + "DEB": 1, + "DEB_SRC": 2 + } + } + } + }, + "YumRepository": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "baseUrl": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gpgKeys": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "ZypperRepository": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "baseUrl": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gpgKeys": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "GooRepository": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "url": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "ExecResource": { + "fields": { + "validate": { + "type": "Exec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "enforce": { + "type": "Exec", + "id": 2 + } + }, + "nested": { + "Exec": { + "oneofs": { + "source": { + "oneof": [ + "file", + "script" + ] + } + }, + "fields": { + "file": { + "type": "File", + "id": 1 + }, + "script": { + "type": "string", + "id": 2 + }, + "args": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "interpreter": { + "type": "Interpreter", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "outputFilePath": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Interpreter": { + "values": { + "INTERPRETER_UNSPECIFIED": 0, + "NONE": 1, + "SHELL": 2, + "POWERSHELL": 3 + } + } + } + } + } + }, + "FileResource": { + "oneofs": { + "source": { + "oneof": [ + "file", + "content" + ] + } + }, + "fields": { + "file": { + "type": "File", + "id": 1 + }, + "content": { + "type": "string", + "id": 2 + }, + "path": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "DesiredState", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "permissions": { + "type": "string", + "id": 5 + } + }, + "nested": { + "DesiredState": { + "values": { + "DESIRED_STATE_UNSPECIFIED": 0, + "PRESENT": 1, + "ABSENT": 2, + "CONTENTS_MATCH": 3 + } + } + } + } + } + }, + "ResourceGroup": { + "fields": { + "inventoryFilters": { + "rule": "repeated", + "type": "InventoryFilter", + "id": 1 + }, + "resources": { + "rule": "repeated", + "type": "Resource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "VALIDATION": 1, + "ENFORCEMENT": 2 + } + } + } + }, + "GetOSPolicyAssignmentReportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignmentReport" + } + } + } + }, + "ListOSPolicyAssignmentReportsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/InstanceOSPolicyAssignment" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "filter": { + "type": "string", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListOSPolicyAssignmentReportsResponse": { + "fields": { + "osPolicyAssignmentReports": { + "rule": "repeated", + "type": "OSPolicyAssignmentReport", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "OSPolicyAssignmentReport": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/OSPolicyAssignmentReport", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "instance": { + "type": "string", + "id": 2 + }, + "osPolicyAssignment": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + }, + "osPolicyCompliances": { + "rule": "repeated", + "type": "OSPolicyCompliance", + "id": 4 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "lastRunId": { + "type": "string", + "id": 6 + } + }, + "nested": { + "OSPolicyCompliance": { + "fields": { + "osPolicyId": { + "type": "string", + "id": 1 + }, + "complianceState": { + "type": "ComplianceState", + "id": 2 + }, + "complianceStateReason": { + "type": "string", + "id": 3 + }, + "osPolicyResourceCompliances": { + "rule": "repeated", + "type": "OSPolicyResourceCompliance", + "id": 4 + } + }, + "nested": { + "OSPolicyResourceCompliance": { + "oneofs": { + "output": { + "oneof": [ + "execResourceOutput" + ] + } + }, + "fields": { + "osPolicyResourceId": { + "type": "string", + "id": 1 + }, + "configSteps": { + "rule": "repeated", + "type": "OSPolicyResourceConfigStep", + "id": 2 + }, + "complianceState": { + "type": "ComplianceState", + "id": 3 + }, + "complianceStateReason": { + "type": "string", + "id": 4 + }, + "execResourceOutput": { + "type": "ExecResourceOutput", + "id": 5 + } + }, + "nested": { + "OSPolicyResourceConfigStep": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "errorMessage": { + "type": "string", + "id": 2 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "VALIDATION": 1, + "DESIRED_STATE_CHECK": 2, + "DESIRED_STATE_ENFORCEMENT": 3, + "DESIRED_STATE_CHECK_POST_ENFORCEMENT": 4 + } + } + } + }, + "ExecResourceOutput": { + "fields": { + "enforcementOutput": { + "type": "bytes", + "id": 2 + } + } + }, + "ComplianceState": { + "values": { + "UNKNOWN": 0, + "COMPLIANT": 1, + "NON_COMPLIANT": 2 + } + } + } + }, + "ComplianceState": { + "values": { + "UNKNOWN": 0, + "COMPLIANT": 1, + "NON_COMPLIANT": 2 + } + } + } + } + } + }, + "OSPolicyAssignment": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/OSPolicyAssignment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "osPolicies": { + "rule": "repeated", + "type": "OSPolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instanceFilter": { + "type": "InstanceFilter", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rollout": { + "type": "Rollout", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "revisionId": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revisionCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 8 + }, + "rolloutState": { + "type": "RolloutState", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "baseline": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleted": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reconciling": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LabelSet": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "InstanceFilter": { + "fields": { + "all": { + "type": "bool", + "id": 1 + }, + "inclusionLabels": { + "rule": "repeated", + "type": "LabelSet", + "id": 2 + }, + "exclusionLabels": { + "rule": "repeated", + "type": "LabelSet", + "id": 3 + }, + "inventories": { + "rule": "repeated", + "type": "Inventory", + "id": 4 + } + }, + "nested": { + "Inventory": { + "fields": { + "osShortName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "osVersion": { + "type": "string", + "id": 2 + } + } + } + } + }, + "Rollout": { + "fields": { + "disruptionBudget": { + "type": "FixedOrPercent", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "minWaitDuration": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RolloutState": { + "values": { + "ROLLOUT_STATE_UNSPECIFIED": 0, + "IN_PROGRESS": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4 + } + } + } + }, + "OSPolicyAssignmentOperationMetadata": { + "fields": { + "osPolicyAssignment": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + }, + "apiMethod": { + "type": "APIMethod", + "id": 2 + }, + "rolloutState": { + "type": "RolloutState", + "id": 3 + }, + "rolloutStartTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "rolloutUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + }, + "nested": { + "APIMethod": { + "values": { + "API_METHOD_UNSPECIFIED": 0, + "CREATE": 1, + "UPDATE": 2, + "DELETE": 3 + } + }, + "RolloutState": { + "values": { + "ROLLOUT_STATE_UNSPECIFIED": 0, + "IN_PROGRESS": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4 + } + } + } + }, + "CreateOSPolicyAssignmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "osPolicyAssignment": { + "type": "OSPolicyAssignment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "osPolicyAssignmentId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateOSPolicyAssignmentRequest": { + "fields": { + "osPolicyAssignment": { + "type": "OSPolicyAssignment", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetOSPolicyAssignmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + } + } + }, + "ListOSPolicyAssignmentsRequest": { + "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 + } + } + }, + "ListOSPolicyAssignmentsResponse": { + "fields": { + "osPolicyAssignments": { + "rule": "repeated", + "type": "OSPolicyAssignment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListOSPolicyAssignmentRevisionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOSPolicyAssignmentRevisionsResponse": { + "fields": { + "osPolicyAssignments": { + "rule": "repeated", + "type": "OSPolicyAssignment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteOSPolicyAssignmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + } + } + }, "FixedOrPercent": { "oneofs": { "mode": { @@ -1566,6 +2698,178 @@ "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" }, "methods": { + "CreateOSPolicyAssignment": { + "requestType": "CreateOSPolicyAssignmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/osPolicyAssignments", + "(google.api.http).body": "os_policy_assignment", + "(google.api.method_signature)": "parent,os_policy_assignment,os_policy_assignment_id", + "(google.longrunning.operation_info).response_type": "OSPolicyAssignment", + "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/osPolicyAssignments", + "body": "os_policy_assignment" + } + }, + { + "(google.api.method_signature)": "parent,os_policy_assignment,os_policy_assignment_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "OSPolicyAssignment", + "metadata_type": "OSPolicyAssignmentOperationMetadata" + } + } + ] + }, + "UpdateOSPolicyAssignment": { + "requestType": "UpdateOSPolicyAssignmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}", + "(google.api.http).body": "os_policy_assignment", + "(google.api.method_signature)": "os_policy_assignment,update_mask", + "(google.longrunning.operation_info).response_type": "OSPolicyAssignment", + "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}", + "body": "os_policy_assignment" + } + }, + { + "(google.api.method_signature)": "os_policy_assignment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "OSPolicyAssignment", + "metadata_type": "OSPolicyAssignmentOperationMetadata" + } + } + ] + }, + "GetOSPolicyAssignment": { + "requestType": "GetOSPolicyAssignmentRequest", + "responseType": "OSPolicyAssignment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListOSPolicyAssignments": { + "requestType": "ListOSPolicyAssignmentsRequest", + "responseType": "ListOSPolicyAssignmentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/osPolicyAssignments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/osPolicyAssignments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListOSPolicyAssignmentRevisions": { + "requestType": "ListOSPolicyAssignmentRevisionsRequest", + "responseType": "ListOSPolicyAssignmentRevisionsResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOSPolicyAssignment": { + "requestType": "DeleteOSPolicyAssignmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OSPolicyAssignmentOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OSPolicyAssignmentOperationMetadata" + } + } + ] + }, + "GetOSPolicyAssignmentReport": { + "requestType": "GetOSPolicyAssignmentReportRequest", + "responseType": "OSPolicyAssignmentReport", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListOSPolicyAssignmentReports": { + "requestType": "ListOSPolicyAssignmentReportsRequest", + "responseType": "ListOSPolicyAssignmentReportsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, "GetInventory": { "requestType": "GetInventoryRequest", "responseType": "Inventory", @@ -5091,9 +6395,6 @@ } } }, - "Empty": { - "fields": {} - }, "FieldMask": { "fields": { "paths": { @@ -5103,6 +6404,9 @@ } } }, + "Empty": { + "fields": {} + }, "Any": { "fields": { "type_url": { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js index 9d8c7811db0..18be980840a 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js @@ -30,7 +30,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigServiceClient(); - async function cancelPatchJob() { + async function callCancelPatchJob() { // Construct request const request = { name, @@ -41,7 +41,7 @@ function main(name) { console.log(response); } - cancelPatchJob(); + callCancelPatchJob(); // [END osconfig_v1_generated_OsConfigService_CancelPatchJob_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js index 557c7f7316b..25f9ce64f66 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js @@ -37,7 +37,7 @@ function main(parent, patchDeploymentId, patchDeployment) { /** * Required. The patch deployment to create. */ - // const patchDeployment = '' + // const patchDeployment = {} // Imports the Osconfig library const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; @@ -45,7 +45,7 @@ function main(parent, patchDeploymentId, patchDeployment) { // Instantiates a client const osconfigClient = new OsConfigServiceClient(); - async function createPatchDeployment() { + async function callCreatePatchDeployment() { // Construct request const request = { parent, @@ -58,7 +58,7 @@ function main(parent, patchDeploymentId, patchDeployment) { console.log(response); } - createPatchDeployment(); + callCreatePatchDeployment(); // [END osconfig_v1_generated_OsConfigService_CreatePatchDeployment_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js index 0d0b71ee146..a68f94d9eb9 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigServiceClient(); - async function deletePatchDeployment() { + async function callDeletePatchDeployment() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - deletePatchDeployment(); + callDeletePatchDeployment(); // [END osconfig_v1_generated_OsConfigService_DeletePatchDeployment_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js index 2449e8aeaba..e548c77522b 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js @@ -32,17 +32,17 @@ function main(parent, instanceFilter) { * Required. Instances to patch, either explicitly or filtered by some * criteria such as zone or labels. */ - // const instanceFilter = '' + // const instanceFilter = {} /** * Patch configuration being applied. If omitted, instances are * patched using the default configurations. */ - // const patchConfig = '' + // const patchConfig = {} /** * Duration of the patch job. After the duration ends, the patch job * times out. */ - // const duration = '' + // const duration = {} /** * If this patch is a dry-run only, instances are contacted but * will do nothing. @@ -55,7 +55,7 @@ function main(parent, instanceFilter) { /** * Rollout strategy of the patch job. */ - // const rollout = '' + // const rollout = {} // Imports the Osconfig library const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; @@ -63,7 +63,7 @@ function main(parent, instanceFilter) { // Instantiates a client const osconfigClient = new OsConfigServiceClient(); - async function executePatchJob() { + async function callExecutePatchJob() { // Construct request const request = { parent, @@ -75,7 +75,7 @@ function main(parent, instanceFilter) { console.log(response); } - executePatchJob(); + callExecutePatchJob(); // [END osconfig_v1_generated_OsConfigService_ExecutePatchJob_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js index bb1b4422be6..1abe3f82bba 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigServiceClient(); - async function getPatchDeployment() { + async function callGetPatchDeployment() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getPatchDeployment(); + callGetPatchDeployment(); // [END osconfig_v1_generated_OsConfigService_GetPatchDeployment_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js index cb3d0222cbb..c685a565005 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js @@ -30,7 +30,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigServiceClient(); - async function getPatchJob() { + async function callGetPatchJob() { // Construct request const request = { name, @@ -41,7 +41,7 @@ function main(name) { console.log(response); } - getPatchJob(); + callGetPatchJob(); // [END osconfig_v1_generated_OsConfigService_GetPatchJob_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js index 5eb0b0f4420..760aa080e97 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js @@ -41,7 +41,7 @@ function main(parent) { // Instantiates a client const osconfigClient = new OsConfigServiceClient(); - async function listPatchDeployments() { + async function callListPatchDeployments() { // Construct request const request = { parent, @@ -54,7 +54,7 @@ function main(parent) { } } - listPatchDeployments(); + callListPatchDeployments(); // [END osconfig_v1_generated_OsConfigService_ListPatchDeployments_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js index a714072a02d..3a319350024 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js @@ -46,7 +46,7 @@ function main(parent) { // Instantiates a client const osconfigClient = new OsConfigServiceClient(); - async function listPatchJobInstanceDetails() { + async function callListPatchJobInstanceDetails() { // Construct request const request = { parent, @@ -61,7 +61,7 @@ function main(parent) { } } - listPatchJobInstanceDetails(); + callListPatchJobInstanceDetails(); // [END osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js index 6f893a63333..9abd136834c 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js @@ -45,7 +45,7 @@ function main(parent) { // Instantiates a client const osconfigClient = new OsConfigServiceClient(); - async function listPatchJobs() { + async function callListPatchJobs() { // Construct request const request = { parent, @@ -58,7 +58,7 @@ function main(parent) { } } - listPatchJobs(); + callListPatchJobs(); // [END osconfig_v1_generated_OsConfigService_ListPatchJobs_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js new file mode 100644 index 00000000000..f5446def177 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js @@ -0,0 +1,70 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, osPolicyAssignment, osPolicyAssignmentId) { + // [START osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name in the form: + * projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Required. The OS policy assignment to be created. + */ + // const osPolicyAssignment = {} + /** + * Required. The logical name of the OS policy assignment in the project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + */ + // const osPolicyAssignmentId = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callCreateOSPolicyAssignment() { + // Construct request + const request = { + parent, + osPolicyAssignment, + osPolicyAssignmentId, + }; + + // Run request + const [operation] = await osconfigClient.createOSPolicyAssignment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateOSPolicyAssignment(); + // [END osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js new file mode 100644 index 00000000000..b2d83f12033 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the OS policy assignment to be deleted + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callDeleteOSPolicyAssignment() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await osconfigClient.deleteOSPolicyAssignment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteOSPolicyAssignment(); + // [END osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js index 9b7b12a1c52..12808b14fe3 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js @@ -32,7 +32,7 @@ function main(name) { * Inventory view indicating what information should be included in the * inventory resource. If unspecified, the default view is BASIC. */ - // const view = '' + // const view = {} // Imports the Osconfig library const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; @@ -40,7 +40,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function getInventory() { + async function callGetInventory() { // Construct request const request = { name, @@ -51,7 +51,7 @@ function main(name) { console.log(response); } - getInventory(); + callGetInventory(); // [END osconfig_v1_generated_OsConfigZonalService_GetInventory_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js new file mode 100644 index 00000000000..71ad4a09c29 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of OS policy assignment. + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callGetOSPolicyAssignment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getOSPolicyAssignment(request); + console.log(response); + } + + callGetOSPolicyAssignment(); + // [END osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js new file mode 100644 index 00000000000..915a498c276 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. API resource name for OS policy assignment report. + * Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callGetOSPolicyAssignmentReport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getOSPolicyAssignmentReport(request); + console.log(response); + } + + callGetOSPolicyAssignmentReport(); + // [END osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js index 3484f283c0c..7fbae91ff24 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js @@ -35,7 +35,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function getVulnerabilityReport() { + async function callGetVulnerabilityReport() { // Construct request const request = { name, @@ -46,7 +46,7 @@ function main(name) { console.log(response); } - getVulnerabilityReport(); + callGetVulnerabilityReport(); // [END osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js index cc8db8fad94..4f40a0190fa 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js @@ -29,7 +29,7 @@ function main(parent) { * Inventory view indicating what information should be included in the * inventory resource. If unspecified, the default view is BASIC. */ - // const view = '' + // const view = {} /** * The maximum number of results to return. */ @@ -52,7 +52,7 @@ function main(parent) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function listInventories() { + async function callListInventories() { // Construct request const request = { parent, @@ -65,7 +65,7 @@ function main(parent) { } } - listInventories(); + callListInventories(); // [END osconfig_v1_generated_OsConfigZonalService_ListInventories_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js new file mode 100644 index 00000000000..355c673cfe2 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js @@ -0,0 +1,88 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + */ + // const parent = 'abc123' + /** + * The maximum number of results to return. + */ + // const pageSize = 1234 + /** + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + */ + // const filter = 'abc123' + /** + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + */ + // const pageToken = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callListOSPolicyAssignmentReports() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listOSPolicyAssignmentReportsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + callListOSPolicyAssignmentReports(); + // [END osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js new file mode 100644 index 00000000000..e2841929893 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js @@ -0,0 +1,66 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the OS policy assignment to list revisions for. + */ + // const name = 'abc123' + /** + * The maximum number of revisions to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + */ + // const pageToken = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callListOSPolicyAssignmentRevisions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await osconfigClient.listOSPolicyAssignmentRevisionsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + callListOSPolicyAssignmentRevisions(); + // [END osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js new file mode 100644 index 00000000000..cc3bdd06e5e --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignments_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + */ + // const parent = 'abc123' + /** + * The maximum number of assignments to return. + */ + // const pageSize = 1234 + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + */ + // const pageToken = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callListOSPolicyAssignments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listOSPolicyAssignmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListOSPolicyAssignments(); + // [END osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js index dbb069499e9..26ab9de1c53 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js @@ -47,7 +47,7 @@ function main(parent) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function listVulnerabilityReports() { + async function callListVulnerabilityReports() { // Construct request const request = { parent, @@ -62,7 +62,7 @@ function main(parent) { } } - listVulnerabilityReports(); + callListVulnerabilityReports(); // [END osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js new file mode 100644 index 00000000000..22493c908c1 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(osPolicyAssignment) { + // [START osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The updated OS policy assignment. + */ + // const osPolicyAssignment = {} + /** + * Optional. Field mask that controls which fields of the assignment should be + * updated. + */ + // const updateMask = {} + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callUpdateOSPolicyAssignment() { + // Construct request + const request = { + osPolicyAssignment, + }; + + // Run request + const [operation] = await osconfigClient.updateOSPolicyAssignment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateOSPolicyAssignment(); + // [END osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js index bc798db177b..a0263974064 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js @@ -27,7 +27,7 @@ function main(parent, osPolicyAssignment, osPolicyAssignmentId) { /** * Required. The OS policy assignment to be created. */ - // const osPolicyAssignment = '' + // const osPolicyAssignment = {} /** * Required. The logical name of the OS policy assignment in the project * with the following restrictions: @@ -46,7 +46,7 @@ function main(parent, osPolicyAssignment, osPolicyAssignmentId) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function createOSPolicyAssignment() { + async function callCreateOSPolicyAssignment() { // Construct request const request = { parent, @@ -60,7 +60,7 @@ function main(parent, osPolicyAssignment, osPolicyAssignmentId) { console.log(response); } - createOSPolicyAssignment(); + callCreateOSPolicyAssignment(); // [END osconfig_v1alpha_generated_OsConfigZonalService_CreateOSPolicyAssignment_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js index 07ba72fe87e..7384f7e3ac6 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function deleteOSPolicyAssignment() { + async function callDeleteOSPolicyAssignment() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteOSPolicyAssignment(); + callDeleteOSPolicyAssignment(); // [END osconfig_v1alpha_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js index d54be2abd86..7c71f618b60 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js @@ -37,7 +37,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function getInstanceOSPoliciesCompliance() { + async function callGetInstanceOSPoliciesCompliance() { // Construct request const request = { name, @@ -50,7 +50,7 @@ function main(name) { console.log(response); } - getInstanceOSPoliciesCompliance(); + callGetInstanceOSPoliciesCompliance(); // [END osconfig_v1alpha_generated_OsConfigZonalService_GetInstanceOSPoliciesCompliance_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js index 68f47e1464e..cf19e5db86e 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js @@ -32,7 +32,7 @@ function main(name) { * Inventory view indicating what information should be included in the * inventory resource. If unspecified, the default view is BASIC. */ - // const view = '' + // const view = {} // Imports the Osconfig library const {OsConfigZonalServiceClient} = @@ -41,7 +41,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function getInventory() { + async function callGetInventory() { // Construct request const request = { name, @@ -52,7 +52,7 @@ function main(name) { console.log(response); } - getInventory(); + callGetInventory(); // [END osconfig_v1alpha_generated_OsConfigZonalService_GetInventory_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js index 68d3c18016f..cc2e792b069 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js @@ -33,7 +33,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function getOSPolicyAssignment() { + async function callGetOSPolicyAssignment() { // Construct request const request = { name, @@ -44,7 +44,7 @@ function main(name) { console.log(response); } - getOSPolicyAssignment(); + callGetOSPolicyAssignment(); // [END osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignment_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js index 895ce54270e..85df2290449 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js @@ -36,7 +36,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function getVulnerabilityReport() { + async function callGetVulnerabilityReport() { // Construct request const request = { name, @@ -47,7 +47,7 @@ function main(name) { console.log(response); } - getVulnerabilityReport(); + callGetVulnerabilityReport(); // [END osconfig_v1alpha_generated_OsConfigZonalService_GetVulnerabilityReport_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js index f25d1b383bd..6b9b8aeaac1 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js @@ -49,7 +49,7 @@ function main(parent) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function listInstanceOSPoliciesCompliances() { + async function callListInstanceOSPoliciesCompliances() { // Construct request const request = { parent, @@ -63,7 +63,7 @@ function main(parent) { } } - listInstanceOSPoliciesCompliances(); + callListInstanceOSPoliciesCompliances(); // [END osconfig_v1alpha_generated_OsConfigZonalService_ListInstanceOSPoliciesCompliances_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js index c8b0ce0421c..754dc4fb72e 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js @@ -31,7 +31,7 @@ function main(parent) { * Inventory view indicating what information should be included in the * inventory resource. If unspecified, the default view is BASIC. */ - // const view = '' + // const view = {} /** * The maximum number of results to return. */ @@ -55,7 +55,7 @@ function main(parent) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function listInventories() { + async function callListInventories() { // Construct request const request = { parent, @@ -68,7 +68,7 @@ function main(parent) { } } - listInventories(); + callListInventories(); // [END osconfig_v1alpha_generated_OsConfigZonalService_ListInventories_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js index f60d1a2f4ec..0b0c1a5d8bc 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js @@ -41,7 +41,7 @@ function main(name) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function listOSPolicyAssignmentRevisions() { + async function callListOSPolicyAssignmentRevisions() { // Construct request const request = { name, @@ -56,7 +56,7 @@ function main(name) { } } - listOSPolicyAssignmentRevisions(); + callListOSPolicyAssignmentRevisions(); // [END osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js index fefdbb64156..e1a14413bd2 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js @@ -41,7 +41,7 @@ function main(parent) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function listOSPolicyAssignments() { + async function callListOSPolicyAssignments() { // Construct request const request = { parent, @@ -54,7 +54,7 @@ function main(parent) { } } - listOSPolicyAssignments(); + callListOSPolicyAssignments(); // [END osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignments_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js index a09df075ea7..97f96820e69 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js @@ -50,7 +50,7 @@ function main(parent) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function listVulnerabilityReports() { + async function callListVulnerabilityReports() { // Construct request const request = { parent, @@ -65,7 +65,7 @@ function main(parent) { } } - listVulnerabilityReports(); + callListVulnerabilityReports(); // [END osconfig_v1alpha_generated_OsConfigZonalService_ListVulnerabilityReports_async] } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js index 09223663bc5..1c318ad7bc1 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js @@ -22,11 +22,11 @@ function main(osPolicyAssignment) { /** * Required. The updated OS policy assignment. */ - // const osPolicyAssignment = '' + // const osPolicyAssignment = {} /** * Optional. Field mask that controls which fields of the assignment should be updated. */ - // const updateMask = '' + // const updateMask = {} // Imports the Osconfig library const {OsConfigZonalServiceClient} = @@ -35,7 +35,7 @@ function main(osPolicyAssignment) { // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); - async function updateOSPolicyAssignment() { + async function callUpdateOSPolicyAssignment() { // Construct request const request = { osPolicyAssignment, @@ -47,7 +47,7 @@ function main(osPolicyAssignment) { console.log(response); } - updateOSPolicyAssignment(); + callUpdateOSPolicyAssignment(); // [END osconfig_v1alpha_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async] } diff --git a/packages/google-cloud-osconfig/src/v1/gapic_metadata.json b/packages/google-cloud-osconfig/src/v1/gapic_metadata.json index c5775aa09a5..e177b5199ff 100644 --- a/packages/google-cloud-osconfig/src/v1/gapic_metadata.json +++ b/packages/google-cloud-osconfig/src/v1/gapic_metadata.json @@ -126,6 +126,16 @@ "grpc": { "libraryClient": "OsConfigZonalServiceClient", "rpcs": { + "GetOSPolicyAssignment": { + "methods": [ + "getOSPolicyAssignment" + ] + }, + "GetOSPolicyAssignmentReport": { + "methods": [ + "getOSPolicyAssignmentReport" + ] + }, "GetInventory": { "methods": [ "getInventory" @@ -136,6 +146,42 @@ "getVulnerabilityReport" ] }, + "CreateOSPolicyAssignment": { + "methods": [ + "createOSPolicyAssignment" + ] + }, + "UpdateOSPolicyAssignment": { + "methods": [ + "updateOSPolicyAssignment" + ] + }, + "DeleteOSPolicyAssignment": { + "methods": [ + "deleteOSPolicyAssignment" + ] + }, + "ListOSPolicyAssignments": { + "methods": [ + "listOSPolicyAssignments", + "listOSPolicyAssignmentsStream", + "listOSPolicyAssignmentsAsync" + ] + }, + "ListOSPolicyAssignmentRevisions": { + "methods": [ + "listOSPolicyAssignmentRevisions", + "listOSPolicyAssignmentRevisionsStream", + "listOSPolicyAssignmentRevisionsAsync" + ] + }, + "ListOSPolicyAssignmentReports": { + "methods": [ + "listOSPolicyAssignmentReports", + "listOSPolicyAssignmentReportsStream", + "listOSPolicyAssignmentReportsAsync" + ] + }, "ListInventories": { "methods": [ "listInventories", @@ -155,6 +201,16 @@ "grpc-fallback": { "libraryClient": "OsConfigZonalServiceClient", "rpcs": { + "GetOSPolicyAssignment": { + "methods": [ + "getOSPolicyAssignment" + ] + }, + "GetOSPolicyAssignmentReport": { + "methods": [ + "getOSPolicyAssignmentReport" + ] + }, "GetInventory": { "methods": [ "getInventory" @@ -165,6 +221,42 @@ "getVulnerabilityReport" ] }, + "CreateOSPolicyAssignment": { + "methods": [ + "createOSPolicyAssignment" + ] + }, + "UpdateOSPolicyAssignment": { + "methods": [ + "updateOSPolicyAssignment" + ] + }, + "DeleteOSPolicyAssignment": { + "methods": [ + "deleteOSPolicyAssignment" + ] + }, + "ListOSPolicyAssignments": { + "methods": [ + "listOSPolicyAssignments", + "listOSPolicyAssignmentsStream", + "listOSPolicyAssignmentsAsync" + ] + }, + "ListOSPolicyAssignmentRevisions": { + "methods": [ + "listOSPolicyAssignmentRevisions", + "listOSPolicyAssignmentRevisionsStream", + "listOSPolicyAssignmentRevisionsAsync" + ] + }, + "ListOSPolicyAssignmentReports": { + "methods": [ + "listOSPolicyAssignmentReports", + "listOSPolicyAssignmentReportsStream", + "listOSPolicyAssignmentReportsAsync" + ] + }, "ListInventories": { "methods": [ "listInventories", diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index ba4e5fbbad5..87986f5c922 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -170,6 +170,12 @@ export class OsConfigServiceClient { inventoryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}/inventory' ), + oSPolicyAssignmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}' + ), + oSPolicyAssignmentReportPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report' + ), patchDeploymentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/patchDeployments/{patch_deployment}' ), @@ -343,37 +349,6 @@ export class OsConfigServiceClient { // ------------------- // -- Service calls -- // ------------------- - executePatchJob( - request?: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.osconfig.v1.IPatchJob, - protos.google.cloud.osconfig.v1.IExecutePatchJobRequest | undefined, - {} | undefined - ] - >; - executePatchJob( - request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.osconfig.v1.IPatchJob, - | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest - | null - | undefined, - {} | null | undefined - > - ): void; - executePatchJob( - request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, - callback: Callback< - protos.google.cloud.osconfig.v1.IPatchJob, - | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest - | null - | undefined, - {} | null | undefined - > - ): void; /** * Patch VM instances by creating and running a patch job. * @@ -407,9 +382,40 @@ export class OsConfigServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.executePatchJob(request); + * @example include:samples/generated/v1/os_config_service.execute_patch_job.js + * region_tag:osconfig_v1_generated_OsConfigService_ExecutePatchJob_async */ + executePatchJob( + request?: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob, + protos.google.cloud.osconfig.v1.IExecutePatchJobRequest | undefined, + {} | undefined + ] + >; + executePatchJob( + request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + executePatchJob( + request: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchJob, + | protos.google.cloud.osconfig.v1.IExecutePatchJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; executePatchJob( request?: protos.google.cloud.osconfig.v1.IExecutePatchJobRequest, optionsOrCallback?: @@ -453,6 +459,24 @@ export class OsConfigServiceClient { this.initialize(); return this.innerApiCalls.executePatchJob(request, options, callback); } + /** + * Get the patch job. This can be used to track the progress of an + * ongoing patch job or review the details of completed jobs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the patch in the form `projects/* /patchJobs/*` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_service.get_patch_job.js + * region_tag:osconfig_v1_generated_OsConfigService_GetPatchJob_async + */ getPatchJob( request?: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, options?: CallOptions @@ -480,24 +504,6 @@ export class OsConfigServiceClient { {} | null | undefined > ): void; - /** - * Get the patch job. This can be used to track the progress of an - * ongoing patch job or review the details of completed jobs. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the patch in the form `projects/* /patchJobs/*` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getPatchJob(request); - */ getPatchJob( request?: protos.google.cloud.osconfig.v1.IGetPatchJobRequest, optionsOrCallback?: @@ -539,6 +545,24 @@ export class OsConfigServiceClient { this.initialize(); return this.innerApiCalls.getPatchJob(request, options, callback); } + /** + * Cancel a patch job. The patch job must be active. Canceled patch jobs + * cannot be restarted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the patch in the form `projects/* /patchJobs/*` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_service.cancel_patch_job.js + * region_tag:osconfig_v1_generated_OsConfigService_CancelPatchJob_async + */ cancelPatchJob( request?: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, options?: CallOptions @@ -566,24 +590,6 @@ export class OsConfigServiceClient { {} | null | undefined > ): void; - /** - * Cancel a patch job. The patch job must be active. Canceled patch jobs - * cannot be restarted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the patch in the form `projects/* /patchJobs/*` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [PatchJob]{@link google.cloud.osconfig.v1.PatchJob}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.cancelPatchJob(request); - */ cancelPatchJob( request?: protos.google.cloud.osconfig.v1.ICancelPatchJobRequest, optionsOrCallback?: @@ -625,6 +631,34 @@ export class OsConfigServiceClient { this.initialize(); return this.innerApiCalls.cancelPatchJob(request, options, callback); } + /** + * Create an OS Config patch deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project to apply this patch deployment to in the form + * `projects/*`. + * @param {string} request.patchDeploymentId + * Required. A name for the patch deployment in the project. When creating a + * name the following rules apply: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * @param {google.cloud.osconfig.v1.PatchDeployment} request.patchDeployment + * Required. The patch deployment to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_service.create_patch_deployment.js + * region_tag:osconfig_v1_generated_OsConfigService_CreatePatchDeployment_async + */ createPatchDeployment( request?: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, options?: CallOptions @@ -656,34 +690,6 @@ export class OsConfigServiceClient { {} | null | undefined > ): void; - /** - * Create an OS Config patch deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project to apply this patch deployment to in the form - * `projects/*`. - * @param {string} request.patchDeploymentId - * Required. A name for the patch deployment in the project. When creating a - * name the following rules apply: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * @param {google.cloud.osconfig.v1.PatchDeployment} request.patchDeployment - * Required. The patch deployment to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createPatchDeployment(request); - */ createPatchDeployment( request?: protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest, optionsOrCallback?: @@ -727,6 +733,24 @@ export class OsConfigServiceClient { this.initialize(); return this.innerApiCalls.createPatchDeployment(request, options, callback); } + /** + * Get an OS Config patch deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_service.get_patch_deployment.js + * region_tag:osconfig_v1_generated_OsConfigService_GetPatchDeployment_async + */ getPatchDeployment( request?: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, options?: CallOptions @@ -758,24 +782,6 @@ export class OsConfigServiceClient { {} | null | undefined > ): void; - /** - * Get an OS Config patch deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the patch deployment in the form - * `projects/* /patchDeployments/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getPatchDeployment(request); - */ getPatchDeployment( request?: protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest, optionsOrCallback?: @@ -819,6 +825,24 @@ export class OsConfigServiceClient { this.initialize(); return this.innerApiCalls.getPatchDeployment(request, options, callback); } + /** + * Delete an OS Config patch deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_service.delete_patch_deployment.js + * region_tag:osconfig_v1_generated_OsConfigService_DeletePatchDeployment_async + */ deletePatchDeployment( request?: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, options?: CallOptions @@ -850,24 +874,6 @@ export class OsConfigServiceClient { {} | null | undefined > ): void; - /** - * Delete an OS Config patch deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the patch deployment in the form - * `projects/* /patchDeployments/*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deletePatchDeployment(request); - */ deletePatchDeployment( request?: protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest, optionsOrCallback?: @@ -912,33 +918,6 @@ export class OsConfigServiceClient { return this.innerApiCalls.deletePatchDeployment(request, options, callback); } - listPatchJobs( - request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.osconfig.v1.IPatchJob[], - protos.google.cloud.osconfig.v1.IListPatchJobsRequest | null, - protos.google.cloud.osconfig.v1.IListPatchJobsResponse - ] - >; - listPatchJobs( - request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1.IListPatchJobsRequest, - protos.google.cloud.osconfig.v1.IListPatchJobsResponse | null | undefined, - protos.google.cloud.osconfig.v1.IPatchJob - > - ): void; - listPatchJobs( - request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1.IListPatchJobsRequest, - protos.google.cloud.osconfig.v1.IListPatchJobsResponse | null | undefined, - protos.google.cloud.osconfig.v1.IPatchJob - > - ): void; /** * Get a list of patch jobs. * @@ -968,6 +947,33 @@ export class OsConfigServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listPatchJobs( + request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchJob[], + protos.google.cloud.osconfig.v1.IListPatchJobsRequest | null, + protos.google.cloud.osconfig.v1.IListPatchJobsResponse + ] + >; + listPatchJobs( + request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + protos.google.cloud.osconfig.v1.IListPatchJobsResponse | null | undefined, + protos.google.cloud.osconfig.v1.IPatchJob + > + ): void; + listPatchJobs( + request: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListPatchJobsRequest, + protos.google.cloud.osconfig.v1.IListPatchJobsResponse | null | undefined, + protos.google.cloud.osconfig.v1.IPatchJob + > + ): void; listPatchJobs( request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, optionsOrCallback?: @@ -1086,11 +1092,8 @@ export class OsConfigServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listPatchJobsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/os_config_service.list_patch_jobs.js + * region_tag:osconfig_v1_generated_OsConfigService_ListPatchJobs_async */ listPatchJobsAsync( request?: protos.google.cloud.osconfig.v1.IListPatchJobsRequest, @@ -1104,7 +1107,6 @@ export class OsConfigServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listPatchJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1114,6 +1116,36 @@ export class OsConfigServiceClient { callSettings ) as AsyncIterable; } + /** + * Get a list of instance details for a given patch job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent for the instances are in the form of + * `projects/* /patchJobs/*`. + * @param {number} request.pageSize + * The maximum number of instance details records to return. Default is 100. + * @param {string} request.pageToken + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * @param {string} request.filter + * A filter expression that filters results listed in the response. This + * field supports filtering results by instance zone, name, state, or + * `failure_reason`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchJobInstanceDetails]{@link google.cloud.osconfig.v1.PatchJobInstanceDetails}. + * 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 `listPatchJobInstanceDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listPatchJobInstanceDetails( request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, options?: CallOptions @@ -1145,36 +1177,6 @@ export class OsConfigServiceClient { protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails > ): void; - /** - * Get a list of instance details for a given patch job. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent for the instances are in the form of - * `projects/* /patchJobs/*`. - * @param {number} request.pageSize - * The maximum number of instance details records to return. Default is 100. - * @param {string} request.pageToken - * A pagination token returned from a previous call - * that indicates where this listing should continue from. - * @param {string} request.filter - * A filter expression that filters results listed in the response. This - * field supports filtering results by instance zone, name, state, or - * `failure_reason`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchJobInstanceDetails]{@link google.cloud.osconfig.v1.PatchJobInstanceDetails}. - * 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 `listPatchJobInstanceDetailsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listPatchJobInstanceDetails( request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, optionsOrCallback?: @@ -1301,11 +1303,8 @@ export class OsConfigServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listPatchJobInstanceDetailsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/os_config_service.list_patch_job_instance_details.js + * region_tag:osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_async */ listPatchJobInstanceDetailsAsync( request?: protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, @@ -1319,7 +1318,6 @@ export class OsConfigServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1329,6 +1327,33 @@ export class OsConfigServiceClient { callSettings ) as AsyncIterable; } + /** + * Get a page of OS Config patch deployments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent in the form `projects/*`. + * @param {number} [request.pageSize] + * Optional. The maximum number of patch deployments to return. Default is + * 100. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to + * ListPatchDeployments that indicates where this listing should continue + * from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. + * 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 `listPatchDeploymentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listPatchDeployments( request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, options?: CallOptions @@ -1360,33 +1385,6 @@ export class OsConfigServiceClient { protos.google.cloud.osconfig.v1.IPatchDeployment > ): void; - /** - * Get a page of OS Config patch deployments. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent in the form `projects/*`. - * @param {number} [request.pageSize] - * Optional. The maximum number of patch deployments to return. Default is - * 100. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to - * ListPatchDeployments that indicates where this listing should continue - * from. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. - * 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 `listPatchDeploymentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listPatchDeployments( request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, optionsOrCallback?: @@ -1503,11 +1501,8 @@ export class OsConfigServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listPatchDeploymentsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/os_config_service.list_patch_deployments.js + * region_tag:osconfig_v1_generated_OsConfigService_ListPatchDeployments_async */ listPatchDeploymentsAsync( request?: protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, @@ -1521,7 +1516,6 @@ export class OsConfigServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listPatchDeployments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1587,6 +1581,150 @@ export class OsConfigServiceClient { .instance; } + /** + * Return a fully-qualified oSPolicyAssignment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} os_policy_assignment + * @returns {string} Resource name string. + */ + oSPolicyAssignmentPath( + project: string, + location: string, + osPolicyAssignment: string + ) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.render({ + project: project, + location: location, + os_policy_assignment: osPolicyAssignment, + }); + } + + /** + * Parse the project from OSPolicyAssignment resource. + * + * @param {string} oSPolicyAssignmentName + * A fully-qualified path representing OSPolicyAssignment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromOSPolicyAssignmentName(oSPolicyAssignmentName: string) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.match( + oSPolicyAssignmentName + ).project; + } + + /** + * Parse the location from OSPolicyAssignment resource. + * + * @param {string} oSPolicyAssignmentName + * A fully-qualified path representing OSPolicyAssignment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOSPolicyAssignmentName(oSPolicyAssignmentName: string) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.match( + oSPolicyAssignmentName + ).location; + } + + /** + * Parse the os_policy_assignment from OSPolicyAssignment resource. + * + * @param {string} oSPolicyAssignmentName + * A fully-qualified path representing OSPolicyAssignment resource. + * @returns {string} A string representing the os_policy_assignment. + */ + matchOsPolicyAssignmentFromOSPolicyAssignmentName( + oSPolicyAssignmentName: string + ) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.match( + oSPolicyAssignmentName + ).os_policy_assignment; + } + + /** + * Return a fully-qualified oSPolicyAssignmentReport resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} assignment + * @returns {string} Resource name string. + */ + oSPolicyAssignmentReportPath( + project: string, + location: string, + instance: string, + assignment: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.render({ + project: project, + location: location, + instance: instance, + assignment: assignment, + }); + } + + /** + * Parse the project from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the project. + */ + matchProjectFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).project; + } + + /** + * Parse the location from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).location; + } + + /** + * Parse the instance from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).instance; + } + + /** + * Parse the assignment from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the assignment. + */ + matchAssignmentFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).assignment; + } + /** * Return a fully-qualified patchDeployment resource name string. * diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json b/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json index 1300be8f625..e074f70ca02 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_proto_list.json @@ -1,5 +1,8 @@ [ "../../protos/google/cloud/osconfig/v1/inventory.proto", + "../../protos/google/cloud/osconfig/v1/os_policy.proto", + "../../protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto", + "../../protos/google/cloud/osconfig/v1/os_policy_assignments.proto", "../../protos/google/cloud/osconfig/v1/osconfig_common.proto", "../../protos/google/cloud/osconfig/v1/osconfig_service.proto", "../../protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto", diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts index 24c218fcc1e..fcdc5bb9b50 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + LROperation, PaginationCallback, GaxCall, } from 'google-gax'; @@ -37,7 +38,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './os_config_zonal_service_client_config.json'; - +import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -66,6 +67,7 @@ export class OsConfigZonalServiceClient { warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; osConfigZonalServiceStub?: Promise<{[name: string]: Function}>; /** @@ -170,6 +172,12 @@ export class OsConfigZonalServiceClient { inventoryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}/inventory' ), + oSPolicyAssignmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}' + ), + oSPolicyAssignmentReportPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report' + ), patchDeploymentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/patchDeployments/{patch_deployment}' ), @@ -185,6 +193,21 @@ export class OsConfigZonalServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this.descriptors.page = { + listOSPolicyAssignments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'osPolicyAssignments' + ), + listOSPolicyAssignmentRevisions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'osPolicyAssignments' + ), + listOSPolicyAssignmentReports: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'osPolicyAssignmentReports' + ), listInventories: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -197,6 +220,67 @@ export class OsConfigZonalServiceClient { ), }; + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createOSPolicyAssignmentResponse = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1.OSPolicyAssignment' + ) as gax.protobuf.Type; + const createOSPolicyAssignmentMetadata = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata' + ) as gax.protobuf.Type; + const updateOSPolicyAssignmentResponse = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1.OSPolicyAssignment' + ) as gax.protobuf.Type; + const updateOSPolicyAssignmentMetadata = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata' + ) as gax.protobuf.Type; + const deleteOSPolicyAssignmentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteOSPolicyAssignmentMetadata = protoFilesRoot.lookup( + '.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createOSPolicyAssignment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createOSPolicyAssignmentResponse.decode.bind( + createOSPolicyAssignmentResponse + ), + createOSPolicyAssignmentMetadata.decode.bind( + createOSPolicyAssignmentMetadata + ) + ), + updateOSPolicyAssignment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateOSPolicyAssignmentResponse.decode.bind( + updateOSPolicyAssignmentResponse + ), + updateOSPolicyAssignmentMetadata.decode.bind( + updateOSPolicyAssignmentMetadata + ) + ), + deleteOSPolicyAssignment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteOSPolicyAssignmentResponse.decode.bind( + deleteOSPolicyAssignmentResponse + ), + deleteOSPolicyAssignmentMetadata.decode.bind( + deleteOSPolicyAssignmentMetadata + ) + ), + }; + // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( 'google.cloud.osconfig.v1.OsConfigZonalService', @@ -247,6 +331,14 @@ export class OsConfigZonalServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const osConfigZonalServiceStubMethods = [ + 'createOSPolicyAssignment', + 'updateOSPolicyAssignment', + 'getOSPolicyAssignment', + 'listOSPolicyAssignments', + 'listOSPolicyAssignmentRevisions', + 'deleteOSPolicyAssignment', + 'getOSPolicyAssignmentReport', + 'listOSPolicyAssignmentReports', 'getInventory', 'listInventories', 'getVulnerabilityReport', @@ -267,7 +359,10 @@ export class OsConfigZonalServiceClient { } ); - const descriptor = this.descriptors.page[methodName] || undefined; + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], @@ -333,33 +428,214 @@ export class OsConfigZonalServiceClient { // ------------------- // -- Service calls -- // ------------------- - getInventory( - request?: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + /** + * Retrieve an existing OS policy assignment. + * + * This method always returns the latest revision. In order to retrieve a + * previous revision of the assignment, also provide the revision ID in the + * `name` parameter. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of OS policy assignment. + * + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [OSPolicyAssignment]{@link google.cloud.osconfig.v1.OSPolicyAssignment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignment_async + */ + getOSPolicyAssignment( + request?: protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.osconfig.v1.IInventory, - protos.google.cloud.osconfig.v1.IGetInventoryRequest | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest | undefined, {} | undefined ] >; - getInventory( - request: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + getOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest, options: CallOptions, callback: Callback< - protos.google.cloud.osconfig.v1.IInventory, - protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest + | null + | undefined, {} | null | undefined > ): void; - getInventory( - request: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + getOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest, callback: Callback< - protos.google.cloud.osconfig.v1.IInventory, - protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getOSPolicyAssignment( + request?: protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getOSPolicyAssignment(request, options, callback); + } + /** + * Get the OS policy asssignment report for the specified Compute Engine VM + * instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for OS policy assignment report. + * + * Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [OSPolicyAssignmentReport]{@link google.cloud.osconfig.v1.OSPolicyAssignmentReport}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async + */ + getOSPolicyAssignmentReport( + request?: protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport, + ( + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest + | undefined + ), + {} | undefined + ] + >; + getOSPolicyAssignmentReport( + request: protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport, + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getOSPolicyAssignmentReport( + request: protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport, + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest + | null + | undefined, {} | null | undefined > ): void; + getOSPolicyAssignmentReport( + request?: protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport, + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport, + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport, + ( + | protos.google.cloud.osconfig.v1.IGetOSPolicyAssignmentReportRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getOSPolicyAssignmentReport( + request, + options, + callback + ); + } /** * Get inventory data for the specified VM instance. If the VM has no * associated inventory, the message `NOT_FOUND` is returned. @@ -385,9 +661,36 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.getInventory(request); + * @example include:samples/generated/v1/os_config_zonal_service.get_inventory.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_GetInventory_async */ + getInventory( + request?: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IInventory, + protos.google.cloud.osconfig.v1.IGetInventoryRequest | undefined, + {} | undefined + ] + >; + getInventory( + request: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IInventory, + protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, + {} | null | undefined + > + ): void; + getInventory( + request: protos.google.cloud.osconfig.v1.IGetInventoryRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IInventory, + protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, + {} | null | undefined + > + ): void; getInventory( request?: protos.google.cloud.osconfig.v1.IGetInventoryRequest, optionsOrCallback?: @@ -429,6 +732,31 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.innerApiCalls.getInventory(request, options, callback); } + /** + * Gets the vulnerability report for the specified VM instance. Only VMs with + * inventory data have vulnerability reports associated with them. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for vulnerability resource. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [VulnerabilityReport]{@link google.cloud.osconfig.v1.VulnerabilityReport}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_async + */ getVulnerabilityReport( request?: protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, options?: CallOptions @@ -463,31 +791,6 @@ export class OsConfigZonalServiceClient { {} | null | undefined > ): void; - /** - * Gets the vulnerability report for the specified VM instance. Only VMs with - * inventory data have vulnerability reports associated with them. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. API resource name for vulnerability resource. - * - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` - * - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [VulnerabilityReport]{@link google.cloud.osconfig.v1.VulnerabilityReport}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getVulnerabilityReport(request); - */ getVulnerabilityReport( request?: protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, optionsOrCallback?: @@ -539,37 +842,1142 @@ export class OsConfigZonalServiceClient { ); } - listInventories( - request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + /** + * Create an OS policy assignment. + * + * This method also creates the first revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name in the form: + * projects/{project}/locations/{location} + * @param {google.cloud.osconfig.v1.OSPolicyAssignment} request.osPolicyAssignment + * Required. The OS policy assignment to be created. + * @param {string} request.osPolicyAssignmentId + * Required. The logical name of the OS policy assignment in the project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_async + */ + createOSPolicyAssignment( + request?: protos.google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.osconfig.v1.IInventory[], - protos.google.cloud.osconfig.v1.IListInventoriesRequest | null, - protos.google.cloud.osconfig.v1.IListInventoriesResponse + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createOSPolicyAssignment( + request?: protos.google.cloud.osconfig.v1.ICreateOSPolicyAssignmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createOSPolicyAssignment( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createOSPolicyAssignment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_async + */ + async checkCreateOSPolicyAssignmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.osconfig.v1.OSPolicyAssignment, + protos.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createOSPolicyAssignment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.osconfig.v1.OSPolicyAssignment, + protos.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + >; + } + /** + * Update an existing OS policy assignment. + * + * This method creates a new revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.osconfig.v1.OSPolicyAssignment} request.osPolicyAssignment + * Required. The updated OS policy assignment. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask that controls which fields of the assignment should be + * updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async + */ + updateOSPolicyAssignment( + request?: protos.google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateOSPolicyAssignment( + request?: protos.google.cloud.osconfig.v1.IUpdateOSPolicyAssignmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'os_policy_assignment.name': request.osPolicyAssignment!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateOSPolicyAssignment( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateOSPolicyAssignment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async + */ + async checkUpdateOSPolicyAssignmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.osconfig.v1.OSPolicyAssignment, + protos.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateOSPolicyAssignment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.osconfig.v1.OSPolicyAssignment, + protos.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + >; + } + /** + * Delete the OS policy assignment. + * + * This method creates a new revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * If the LRO completes and is not cancelled, all revisions associated with + * the OS policy assignment are deleted. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to be deleted + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async + */ + deleteOSPolicyAssignment( + request?: protos.google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteOSPolicyAssignment( + request?: protos.google.cloud.osconfig.v1.IDeleteOSPolicyAssignmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteOSPolicyAssignment( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteOSPolicyAssignment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async + */ + async checkDeleteOSPolicyAssignmentProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteOSPolicyAssignment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + >; + } + /** + * List the OS policy assignments under the parent resource. + * + * For each OS policy assignment, the latest revision is returned. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * @param {number} request.pageSize + * The maximum number of assignments to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1.OSPolicyAssignment}. + * 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 `listOSPolicyAssignmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignments( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IOSPolicyAssignment[], + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest | null, + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse + ] + >; + listOSPolicyAssignments( + request: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignment + > + ): void; + listOSPolicyAssignments( + request: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignment + > + ): void; + listOSPolicyAssignments( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignment + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignment + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IOSPolicyAssignment[], + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest | null, + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listOSPolicyAssignments( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * @param {number} request.pageSize + * The maximum number of assignments to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * @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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1.OSPolicyAssignment} 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 `listOSPolicyAssignmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentsStream( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listOSPolicyAssignments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignments.createStream( + this.innerApiCalls.listOSPolicyAssignments as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listOSPolicyAssignments`, 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 resource name. + * @param {number} request.pageSize + * The maximum number of assignments to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [OSPolicyAssignment]{@link google.cloud.osconfig.v1.OSPolicyAssignment}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignments_async + */ + listOSPolicyAssignmentsAsync( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listOSPolicyAssignments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignments.asyncIterate( + this.innerApiCalls['listOSPolicyAssignments'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * List the OS policy assignment revisions for a given OS policy assignment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1.OSPolicyAssignment}. + * 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 `listOSPolicyAssignmentRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentRevisions( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IOSPolicyAssignment[], + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest | null, + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse ] >; - listInventories( - request: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + listOSPolicyAssignmentRevisions( + request: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.osconfig.v1.IListInventoriesRequest, - | protos.google.cloud.osconfig.v1.IListInventoriesResponse + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse | null | undefined, - protos.google.cloud.osconfig.v1.IInventory + protos.google.cloud.osconfig.v1.IOSPolicyAssignment > ): void; - listInventories( - request: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + listOSPolicyAssignmentRevisions( + request: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, callback: PaginationCallback< - protos.google.cloud.osconfig.v1.IListInventoriesRequest, - | protos.google.cloud.osconfig.v1.IListInventoriesResponse + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse | null | undefined, - protos.google.cloud.osconfig.v1.IInventory + protos.google.cloud.osconfig.v1.IOSPolicyAssignment + > + ): void; + listOSPolicyAssignmentRevisions( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignment + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignment + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IOSPolicyAssignment[], + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest | null, + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.listOSPolicyAssignmentRevisions( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * @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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1.OSPolicyAssignment} 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 `listOSPolicyAssignmentRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentRevisionsStream( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = + this._defaults['listOSPolicyAssignmentRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignmentRevisions.createStream( + this.innerApiCalls.listOSPolicyAssignmentRevisions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listOSPolicyAssignmentRevisions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [OSPolicyAssignment]{@link google.cloud.osconfig.v1.OSPolicyAssignment}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async + */ + listOSPolicyAssignmentRevisionsAsync( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + const defaultCallSettings = + this._defaults['listOSPolicyAssignmentRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate( + this.innerApiCalls['listOSPolicyAssignmentRevisions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * List OS policy asssignment reports for all Compute Engine VM instances in + * the specified zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * @param {string} request.pageToken + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [OSPolicyAssignmentReport]{@link google.cloud.osconfig.v1.OSPolicyAssignmentReport}. + * 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 `listOSPolicyAssignmentReportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentReports( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport[], + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest | null, + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse + ] + >; + listOSPolicyAssignmentReports( + request: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport + > + ): void; + listOSPolicyAssignmentReports( + request: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport > ): void; + listOSPolicyAssignmentReports( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + | protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport[], + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest | null, + protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listOSPolicyAssignmentReports( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * @param {string} request.pageToken + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * @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 [OSPolicyAssignmentReport]{@link google.cloud.osconfig.v1.OSPolicyAssignmentReport} 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 `listOSPolicyAssignmentReportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentReportsStream( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listOSPolicyAssignmentReports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignmentReports.createStream( + this.innerApiCalls.listOSPolicyAssignmentReports as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listOSPolicyAssignmentReports`, 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 resource name. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * @param {string} request.pageToken + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [OSPolicyAssignmentReport]{@link google.cloud.osconfig.v1.OSPolicyAssignmentReport}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async + */ + listOSPolicyAssignmentReportsAsync( + request?: protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listOSPolicyAssignmentReports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignmentReports.asyncIterate( + this.innerApiCalls['listOSPolicyAssignmentReports'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } /** * List inventory data for all VM instances in the specified zone. * @@ -606,6 +2014,37 @@ export class OsConfigZonalServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listInventories( + request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IInventory[], + protos.google.cloud.osconfig.v1.IListInventoriesRequest | null, + protos.google.cloud.osconfig.v1.IListInventoriesResponse + ] + >; + listInventories( + request: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IInventory + > + ): void; + listInventories( + request: protos.google.cloud.osconfig.v1.IListInventoriesRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IInventory + > + ): void; listInventories( request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, optionsOrCallback?: @@ -740,11 +2179,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listInventoriesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/os_config_zonal_service.list_inventories.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_ListInventories_async */ listInventoriesAsync( request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, @@ -758,7 +2194,6 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -768,37 +2203,6 @@ export class OsConfigZonalServiceClient { callSettings ) as AsyncIterable; } - listVulnerabilityReports( - request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.osconfig.v1.IVulnerabilityReport[], - protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest | null, - protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse - ] - >; - listVulnerabilityReports( - request: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, - | protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse - | null - | undefined, - protos.google.cloud.osconfig.v1.IVulnerabilityReport - > - ): void; - listVulnerabilityReports( - request: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, - | protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse - | null - | undefined, - protos.google.cloud.osconfig.v1.IVulnerabilityReport - > - ): void; /** * List vulnerability reports for all VM instances in the specified zone. * @@ -832,6 +2236,37 @@ export class OsConfigZonalServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listVulnerabilityReports( + request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IVulnerabilityReport[], + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest | null, + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse + ] + >; + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IVulnerabilityReport + > + ): void; + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1.IVulnerabilityReport + > + ): void; listVulnerabilityReports( request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, optionsOrCallback?: @@ -964,11 +2399,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listVulnerabilityReportsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js + * region_tag:osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_async */ listVulnerabilityReportsAsync( request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, @@ -982,7 +2414,6 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1048,6 +2479,150 @@ export class OsConfigZonalServiceClient { .instance; } + /** + * Return a fully-qualified oSPolicyAssignment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} os_policy_assignment + * @returns {string} Resource name string. + */ + oSPolicyAssignmentPath( + project: string, + location: string, + osPolicyAssignment: string + ) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.render({ + project: project, + location: location, + os_policy_assignment: osPolicyAssignment, + }); + } + + /** + * Parse the project from OSPolicyAssignment resource. + * + * @param {string} oSPolicyAssignmentName + * A fully-qualified path representing OSPolicyAssignment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromOSPolicyAssignmentName(oSPolicyAssignmentName: string) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.match( + oSPolicyAssignmentName + ).project; + } + + /** + * Parse the location from OSPolicyAssignment resource. + * + * @param {string} oSPolicyAssignmentName + * A fully-qualified path representing OSPolicyAssignment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOSPolicyAssignmentName(oSPolicyAssignmentName: string) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.match( + oSPolicyAssignmentName + ).location; + } + + /** + * Parse the os_policy_assignment from OSPolicyAssignment resource. + * + * @param {string} oSPolicyAssignmentName + * A fully-qualified path representing OSPolicyAssignment resource. + * @returns {string} A string representing the os_policy_assignment. + */ + matchOsPolicyAssignmentFromOSPolicyAssignmentName( + oSPolicyAssignmentName: string + ) { + return this.pathTemplates.oSPolicyAssignmentPathTemplate.match( + oSPolicyAssignmentName + ).os_policy_assignment; + } + + /** + * Return a fully-qualified oSPolicyAssignmentReport resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} assignment + * @returns {string} Resource name string. + */ + oSPolicyAssignmentReportPath( + project: string, + location: string, + instance: string, + assignment: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.render({ + project: project, + location: location, + instance: instance, + assignment: assignment, + }); + } + + /** + * Parse the project from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the project. + */ + matchProjectFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).project; + } + + /** + * Parse the location from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).location; + } + + /** + * Parse the instance from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).instance; + } + + /** + * Parse the assignment from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the assignment. + */ + matchAssignmentFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).assignment; + } + /** * Return a fully-qualified patchDeployment resource name string. * @@ -1192,6 +2767,7 @@ export class OsConfigZonalServiceClient { return this.osConfigZonalServiceStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client_config.json b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client_config.json index aefecc67234..bb97e593101 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client_config.json +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client_config.json @@ -32,6 +32,46 @@ } }, "methods": { + "CreateOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListOSPolicyAssignments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListOSPolicyAssignmentRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetOSPolicyAssignmentReport": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListOSPolicyAssignmentReports": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, "GetInventory": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_proto_list.json b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_proto_list.json index 1300be8f625..e074f70ca02 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_proto_list.json +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_proto_list.json @@ -1,5 +1,8 @@ [ "../../protos/google/cloud/osconfig/v1/inventory.proto", + "../../protos/google/cloud/osconfig/v1/os_policy.proto", + "../../protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto", + "../../protos/google/cloud/osconfig/v1/os_policy_assignments.proto", "../../protos/google/cloud/osconfig/v1/osconfig_common.proto", "../../protos/google/cloud/osconfig/v1/osconfig_service.proto", "../../protos/google/cloud/osconfig/v1/osconfig_zonal_service.proto", diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index 1fa372f058c..4caa23ba18d 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -424,6 +424,30 @@ export class OsConfigZonalServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Retrieve an existing OS policy assignment. + * + * This method always returns the latest revision. In order to retrieve a + * previous revision of the assignment, also provide the revision ID in the + * `name` parameter. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of OS policy assignment. + * + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignment_async + */ getOSPolicyAssignment( request?: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, options?: CallOptions @@ -458,30 +482,6 @@ export class OsConfigZonalServiceClient { {} | null | undefined > ): void; - /** - * Retrieve an existing OS policy assignment. - * - * This method always returns the latest revision. In order to retrieve a - * previous revision of the assignment, also provide the revision ID in the - * `name` parameter. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of OS policy assignment. - * - * Format: - * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getOSPolicyAssignment(request); - */ getOSPolicyAssignment( request?: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentRequest, optionsOrCallback?: @@ -528,6 +528,32 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.innerApiCalls.getOSPolicyAssignment(request, options, callback); } + /** + * Get OS policies compliance data for the specified Compute Engine VM + * instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for instance OS policies compliance resource. + * + * Format: + * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` + * + * For `{project}`, either Compute Engine project-number or project-id can be + * provided. + * For `{instance}`, either Compute Engine VM instance-id or instance-name can + * be provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [InstanceOSPoliciesCompliance]{@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_GetInstanceOSPoliciesCompliance_async + */ getInstanceOSPoliciesCompliance( request?: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, options?: CallOptions @@ -562,32 +588,6 @@ export class OsConfigZonalServiceClient { {} | null | undefined > ): void; - /** - * Get OS policies compliance data for the specified Compute Engine VM - * instance. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. API resource name for instance OS policies compliance resource. - * - * Format: - * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` - * - * For `{project}`, either Compute Engine project-number or project-id can be - * provided. - * For `{instance}`, either Compute Engine VM instance-id or instance-name can - * be provided. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [InstanceOSPoliciesCompliance]{@link google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getInstanceOSPoliciesCompliance(request); - */ getInstanceOSPoliciesCompliance( request?: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, optionsOrCallback?: @@ -638,6 +638,34 @@ export class OsConfigZonalServiceClient { callback ); } + /** + * Get inventory data for the specified VM instance. If the VM has no + * associated inventory, the message `NOT_FOUND` is returned. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for inventory resource. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * @param {google.cloud.osconfig.v1alpha.InventoryView} request.view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Inventory]{@link google.cloud.osconfig.v1alpha.Inventory}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/os_config_zonal_service.get_inventory.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_GetInventory_async + */ getInventory( request?: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, options?: CallOptions @@ -669,34 +697,6 @@ export class OsConfigZonalServiceClient { {} | null | undefined > ): void; - /** - * Get inventory data for the specified VM instance. If the VM has no - * associated inventory, the message `NOT_FOUND` is returned. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. API resource name for inventory resource. - * - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/inventory` - * - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * @param {google.cloud.osconfig.v1alpha.InventoryView} request.view - * Inventory view indicating what information should be included in the - * inventory resource. If unspecified, the default view is BASIC. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Inventory]{@link google.cloud.osconfig.v1alpha.Inventory}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getInventory(request); - */ getInventory( request?: protos.google.cloud.osconfig.v1alpha.IGetInventoryRequest, optionsOrCallback?: @@ -740,6 +740,31 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.innerApiCalls.getInventory(request, options, callback); } + /** + * Gets the vulnerability report for the specified VM instance. Only VMs with + * inventory data have vulnerability reports associated with them. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for vulnerability resource. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [VulnerabilityReport]{@link google.cloud.osconfig.v1alpha.VulnerabilityReport}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_GetVulnerabilityReport_async + */ getVulnerabilityReport( request?: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, options?: CallOptions @@ -774,31 +799,6 @@ export class OsConfigZonalServiceClient { {} | null | undefined > ): void; - /** - * Gets the vulnerability report for the specified VM instance. Only VMs with - * inventory data have vulnerability reports associated with them. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. API resource name for vulnerability resource. - * - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` - * - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [VulnerabilityReport]{@link google.cloud.osconfig.v1alpha.VulnerabilityReport}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getVulnerabilityReport(request); - */ getVulnerabilityReport( request?: protos.google.cloud.osconfig.v1alpha.IGetVulnerabilityReportRequest, optionsOrCallback?: @@ -850,42 +850,6 @@ export class OsConfigZonalServiceClient { ); } - createOSPolicyAssignment( - request?: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, - protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, - protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createOSPolicyAssignment( - request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, - callback: Callback< - LROperation< - protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, - protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Create an OS policy assignment. * @@ -922,10 +886,45 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.createOSPolicyAssignment(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_CreateOSPolicyAssignment_async */ + createOSPolicyAssignment( + request?: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createOSPolicyAssignment( + request: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; createOSPolicyAssignment( request?: protos.google.cloud.osconfig.v1alpha.ICreateOSPolicyAssignmentRequest, optionsOrCallback?: @@ -987,11 +986,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateOSPolicyAssignmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_CreateOSPolicyAssignment_async */ async checkCreateOSPolicyAssignmentProgress( name: string @@ -1015,6 +1011,35 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata >; } + /** + * Update an existing OS policy assignment. + * + * This method creates a new revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} request.osPolicyAssignment + * Required. The updated OS policy assignment. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask that controls which fields of the assignment should be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async + */ updateOSPolicyAssignment( request?: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, options?: CallOptions @@ -1051,36 +1076,6 @@ export class OsConfigZonalServiceClient { {} | null | undefined > ): void; - /** - * Update an existing OS policy assignment. - * - * This method creates a new revision of the OS policy assignment. - * - * This method returns a long running operation (LRO) that contains the - * rollout details. The rollout can be cancelled by cancelling the LRO. - * - * For more information, see [Method: - * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} request.osPolicyAssignment - * Required. The updated OS policy assignment. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Field mask that controls which fields of the assignment should be updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.updateOSPolicyAssignment(request); - * const [response] = await operation.promise(); - */ updateOSPolicyAssignment( request?: protos.google.cloud.osconfig.v1alpha.IUpdateOSPolicyAssignmentRequest, optionsOrCallback?: @@ -1142,11 +1137,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateOSPolicyAssignmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async */ async checkUpdateOSPolicyAssignmentProgress( name: string @@ -1170,6 +1162,36 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata >; } + /** + * Delete the OS policy assignment. + * + * This method creates a new revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * If the LRO completes and is not cancelled, all revisions associated with + * the OS policy assignment are deleted. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to be deleted + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async + */ deleteOSPolicyAssignment( request?: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, options?: CallOptions @@ -1206,37 +1228,6 @@ export class OsConfigZonalServiceClient { {} | null | undefined > ): void; - /** - * Delete the OS policy assignment. - * - * This method creates a new revision of the OS policy assignment. - * - * This method returns a long running operation (LRO) that contains the - * rollout details. The rollout can be cancelled by cancelling the LRO. - * - * If the LRO completes and is not cancelled, all revisions associated with - * the OS policy assignment are deleted. - * - * For more information, see [Method: - * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the OS policy assignment to be deleted - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteOSPolicyAssignment(request); - * const [response] = await operation.promise(); - */ deleteOSPolicyAssignment( request?: protos.google.cloud.osconfig.v1alpha.IDeleteOSPolicyAssignmentRequest, optionsOrCallback?: @@ -1298,11 +1289,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteOSPolicyAssignmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async */ async checkDeleteOSPolicyAssignmentProgress( name: string @@ -1326,37 +1314,6 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata >; } - listOSPolicyAssignments( - request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[], - protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest | null, - protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse - ] - >; - listOSPolicyAssignments( - request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, - | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse - | null - | undefined, - protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment - > - ): void; - listOSPolicyAssignments( - request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, - | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse - | null - | undefined, - protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment - > - ): void; /** * List the OS policy assignments under the parent resource. * @@ -1385,6 +1342,37 @@ export class OsConfigZonalServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listOSPolicyAssignments( + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment[], + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse + ] + >; + listOSPolicyAssignments( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + > + ): void; + listOSPolicyAssignments( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment + > + ): void; listOSPolicyAssignments( request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, optionsOrCallback?: @@ -1503,11 +1491,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listOSPolicyAssignmentsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignments_async */ listOSPolicyAssignmentsAsync( request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, @@ -1521,7 +1506,6 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listOSPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1531,6 +1515,32 @@ export class OsConfigZonalServiceClient { callSettings ) as AsyncIterable; } + /** + * List the OS policy assignment revisions for a given OS policy assignment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the OS policy assignment to list revisions for. + * @param {number} request.pageSize + * The maximum number of revisions to return. + * @param {string} request.pageToken + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment}. + * 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 `listOSPolicyAssignmentRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listOSPolicyAssignmentRevisions( request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, options?: CallOptions @@ -1562,32 +1572,6 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignment > ): void; - /** - * List the OS policy assignment revisions for a given OS policy assignment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the OS policy assignment to list revisions for. - * @param {number} request.pageSize - * The maximum number of revisions to return. - * @param {string} request.pageToken - * A pagination token returned from a previous call to - * `ListOSPolicyAssignmentRevisions` that indicates where this listing should - * continue from. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [OSPolicyAssignment]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignment}. - * 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 `listOSPolicyAssignmentRevisionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listOSPolicyAssignmentRevisions( request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, optionsOrCallback?: @@ -1707,11 +1691,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listOSPolicyAssignmentRevisionsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async */ listOSPolicyAssignmentRevisionsAsync( request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, @@ -1725,7 +1706,6 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ name: request.name || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listOSPolicyAssignmentRevisions']; const callSettings = defaultCallSettings.merge(options); @@ -1736,37 +1716,6 @@ export class OsConfigZonalServiceClient { callSettings ) as AsyncIterable; } - listInstanceOSPoliciesCompliances( - request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[], - protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest | null, - protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse - ] - >; - listInstanceOSPoliciesCompliances( - request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, - | protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse - | null - | undefined, - protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance - > - ): void; - listInstanceOSPoliciesCompliances( - request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, - | protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse - | null - | undefined, - protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance - > - ): void; /** * List OS policies compliance data for all Compute Engine VM instances in the * specified zone. @@ -1802,6 +1751,37 @@ export class OsConfigZonalServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listInstanceOSPoliciesCompliances( + request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance[], + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest | null, + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse + ] + >; + listInstanceOSPoliciesCompliances( + request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance + > + ): void; + listInstanceOSPoliciesCompliances( + request: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInstanceOSPoliciesCompliance + > + ): void; listInstanceOSPoliciesCompliances( request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, optionsOrCallback?: @@ -1937,11 +1917,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listInstanceOSPoliciesCompliancesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_ListInstanceOSPoliciesCompliances_async */ listInstanceOSPoliciesCompliancesAsync( request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, @@ -1955,7 +1932,6 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listInstanceOSPoliciesCompliances']; const callSettings = defaultCallSettings.merge(options); @@ -1966,37 +1942,6 @@ export class OsConfigZonalServiceClient { callSettings ) as AsyncIterable; } - listInventories( - request?: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.osconfig.v1alpha.IInventory[], - protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest | null, - protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse - ] - >; - listInventories( - request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, - | protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse - | null - | undefined, - protos.google.cloud.osconfig.v1alpha.IInventory - > - ): void; - listInventories( - request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, - | protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse - | null - | undefined, - protos.google.cloud.osconfig.v1alpha.IInventory - > - ): void; /** * List inventory data for all VM instances in the specified zone. * @@ -2035,6 +1980,37 @@ export class OsConfigZonalServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listInventories( + request?: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IInventory[], + protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest | null, + protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse + ] + >; + listInventories( + request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInventory + > + ): void; + listInventories( + request: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, + | protos.google.cloud.osconfig.v1alpha.IListInventoriesResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IInventory + > + ): void; listInventories( request?: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, optionsOrCallback?: @@ -2173,11 +2149,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listInventoriesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1alpha/os_config_zonal_service.list_inventories.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_ListInventories_async */ listInventoriesAsync( request?: protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, @@ -2191,7 +2164,6 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -2201,37 +2173,6 @@ export class OsConfigZonalServiceClient { callSettings ) as AsyncIterable; } - listVulnerabilityReports( - request?: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport[], - protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest | null, - protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse - ] - >; - listVulnerabilityReports( - request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, - | protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse - | null - | undefined, - protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport - > - ): void; - listVulnerabilityReports( - request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, - callback: PaginationCallback< - protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, - | protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse - | null - | undefined, - protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport - > - ): void; /** * List vulnerability reports for all VM instances in the specified zone. * @@ -2267,6 +2208,37 @@ export class OsConfigZonalServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listVulnerabilityReports( + request?: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport[], + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse + ] + >; + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport + > + ): void; + listVulnerabilityReports( + request: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IVulnerabilityReport + > + ): void; listVulnerabilityReports( request?: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, optionsOrCallback?: @@ -2403,11 +2375,8 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listVulnerabilityReportsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_ListVulnerabilityReports_async */ listVulnerabilityReportsAsync( request?: protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, @@ -2421,7 +2390,6 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index 0dfdc087c4a..657932e53ee 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -1854,6 +1854,178 @@ describe('v1.OsConfigServiceClient', () => { }); }); + describe('oSPolicyAssignment', () => { + const fakePath = '/rendered/path/oSPolicyAssignment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + os_policy_assignment: 'osPolicyAssignmentValue', + }; + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.oSPolicyAssignmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.oSPolicyAssignmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('oSPolicyAssignmentPath', () => { + const result = client.oSPolicyAssignmentPath( + 'projectValue', + 'locationValue', + 'osPolicyAssignmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromOSPolicyAssignmentName', () => { + const result = client.matchProjectFromOSPolicyAssignmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOSPolicyAssignmentName', () => { + const result = client.matchLocationFromOSPolicyAssignmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchOsPolicyAssignmentFromOSPolicyAssignmentName', () => { + const result = + client.matchOsPolicyAssignmentFromOSPolicyAssignmentName(fakePath); + assert.strictEqual(result, 'osPolicyAssignmentValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('oSPolicyAssignmentReport', () => { + const fakePath = '/rendered/path/oSPolicyAssignmentReport'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + assignment: 'assignmentValue', + }; + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.oSPolicyAssignmentReportPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.oSPolicyAssignmentReportPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('oSPolicyAssignmentReportPath', () => { + const result = client.oSPolicyAssignmentReportPath( + 'projectValue', + 'locationValue', + 'instanceValue', + 'assignmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromOSPolicyAssignmentReportName', () => { + const result = + client.matchProjectFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOSPolicyAssignmentReportName', () => { + const result = + client.matchLocationFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromOSPolicyAssignmentReportName', () => { + const result = + client.matchInstanceFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssignmentFromOSPolicyAssignmentReportName', () => { + const result = + client.matchAssignmentFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'assignmentValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('patchDeployment', () => { const fakePath = '/rendered/path/patchDeployment'; const expectedParameters = { diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts index 91ff785ff62..4f6435dd07e 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -25,7 +25,7 @@ import * as osconfigzonalserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf} from 'google-gax'; +import {protobuf, LROperation, operationsProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -51,6 +51,38 @@ function stubSimpleCallWithCallback( : 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 @@ -206,6 +238,242 @@ describe('v1.OsConfigZonalServiceClient', () => { assert.strictEqual(result, fakeProjectId); }); + describe('getOSPolicyAssignment', () => { + it('invokes getOSPolicyAssignment without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ); + client.innerApiCalls.getOSPolicyAssignment = + stubSimpleCall(expectedResponse); + const [response] = await client.getOSPolicyAssignment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getOSPolicyAssignment without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ); + client.innerApiCalls.getOSPolicyAssignment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getOSPolicyAssignment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IOSPolicyAssignment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getOSPolicyAssignment with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getOSPolicyAssignment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getOSPolicyAssignment(request), + expectedError + ); + assert( + (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getOSPolicyAssignmentReport', () => { + it('invokes getOSPolicyAssignmentReport without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ); + client.innerApiCalls.getOSPolicyAssignmentReport = + stubSimpleCall(expectedResponse); + const [response] = await client.getOSPolicyAssignmentReport(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getOSPolicyAssignmentReport without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ); + client.innerApiCalls.getOSPolicyAssignmentReport = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getOSPolicyAssignmentReport( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getOSPolicyAssignmentReport with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getOSPolicyAssignmentReport = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getOSPolicyAssignmentReport(request), + expectedError + ); + assert( + (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getInventory', () => { it('invokes getInventory without error', async () => { const client = @@ -348,13 +616,1643 @@ describe('v1.OsConfigZonalServiceClient', () => { const [response] = await client.getVulnerabilityReport(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getVulnerabilityReport as SinonStub) + (client.innerApiCalls.getVulnerabilityReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getVulnerabilityReport without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.VulnerabilityReport() + ); + client.innerApiCalls.getVulnerabilityReport = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVulnerabilityReport( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IVulnerabilityReport | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getVulnerabilityReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getVulnerabilityReport with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getVulnerabilityReport = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getVulnerabilityReport(request), + expectedError + ); + assert( + (client.innerApiCalls.getVulnerabilityReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createOSPolicyAssignment', () => { + it('invokes createOSPolicyAssignment without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createOSPolicyAssignment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createOSPolicyAssignment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createOSPolicyAssignment without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createOSPolicyAssignment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createOSPolicyAssignment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createOSPolicyAssignment with call error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createOSPolicyAssignment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createOSPolicyAssignment(request), + expectedError + ); + assert( + (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createOSPolicyAssignment with LRO error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createOSPolicyAssignment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createOSPolicyAssignment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateOSPolicyAssignmentProgress without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkCreateOSPolicyAssignmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateOSPolicyAssignmentProgress with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateOSPolicyAssignmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateOSPolicyAssignment', () => { + it('invokes updateOSPolicyAssignment without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() + ); + request.osPolicyAssignment = {}; + request.osPolicyAssignment.name = ''; + const expectedHeaderRequestParams = 'os_policy_assignment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateOSPolicyAssignment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateOSPolicyAssignment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateOSPolicyAssignment without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() + ); + request.osPolicyAssignment = {}; + request.osPolicyAssignment.name = ''; + const expectedHeaderRequestParams = 'os_policy_assignment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateOSPolicyAssignment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateOSPolicyAssignment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.osconfig.v1.IOSPolicyAssignment, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateOSPolicyAssignment with call error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() + ); + request.osPolicyAssignment = {}; + request.osPolicyAssignment.name = ''; + const expectedHeaderRequestParams = 'os_policy_assignment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateOSPolicyAssignment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateOSPolicyAssignment(request), + expectedError + ); + assert( + (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateOSPolicyAssignment with LRO error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() + ); + request.osPolicyAssignment = {}; + request.osPolicyAssignment.name = ''; + const expectedHeaderRequestParams = 'os_policy_assignment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateOSPolicyAssignment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateOSPolicyAssignment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateOSPolicyAssignmentProgress without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkUpdateOSPolicyAssignmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateOSPolicyAssignmentProgress with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateOSPolicyAssignmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteOSPolicyAssignment', () => { + it('invokes deleteOSPolicyAssignment without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteOSPolicyAssignment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteOSPolicyAssignment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteOSPolicyAssignment without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteOSPolicyAssignment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteOSPolicyAssignment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.osconfig.v1.IOSPolicyAssignmentOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteOSPolicyAssignment with call error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteOSPolicyAssignment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteOSPolicyAssignment(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteOSPolicyAssignment with LRO error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteOSPolicyAssignment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteOSPolicyAssignment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteOSPolicyAssignmentProgress without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkDeleteOSPolicyAssignmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteOSPolicyAssignmentProgress with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteOSPolicyAssignmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listOSPolicyAssignments', () => { + it('invokes listOSPolicyAssignments without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + ]; + client.innerApiCalls.listOSPolicyAssignments = + stubSimpleCall(expectedResponse); + const [response] = await client.listOSPolicyAssignments(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignments without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + ]; + client.innerApiCalls.listOSPolicyAssignments = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listOSPolicyAssignments( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1.IOSPolicyAssignment[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listOSPolicyAssignments with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listOSPolicyAssignments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listOSPolicyAssignments(request), + expectedError + ); + assert( + (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentsStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + ]; + client.descriptors.page.listOSPolicyAssignments.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listOSPolicyAssignmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.OSPolicyAssignment[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.OSPolicyAssignment) => { + 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.listOSPolicyAssignments + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listOSPolicyAssignments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listOSPolicyAssignmentsStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignments.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listOSPolicyAssignmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.OSPolicyAssignment[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.OSPolicyAssignment) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listOSPolicyAssignments + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listOSPolicyAssignments, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignments without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + ]; + client.descriptors.page.listOSPolicyAssignments.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1.IOSPolicyAssignment[] = + []; + const iterable = client.listOSPolicyAssignmentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignments with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignments.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listOSPolicyAssignmentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1.IOSPolicyAssignment[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignments + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listOSPolicyAssignmentRevisions', () => { + it('invokes listOSPolicyAssignmentRevisions without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + ]; + client.innerApiCalls.listOSPolicyAssignmentRevisions = + stubSimpleCall(expectedResponse); + const [response] = await client.listOSPolicyAssignmentRevisions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentRevisions without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + ]; + client.innerApiCalls.listOSPolicyAssignmentRevisions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listOSPolicyAssignmentRevisions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1.IOSPolicyAssignment[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listOSPolicyAssignmentRevisions with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listOSPolicyAssignmentRevisions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listOSPolicyAssignmentRevisions(request), + expectedError + ); + assert( + (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentRevisionsStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + ]; + client.descriptors.page.listOSPolicyAssignmentRevisions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listOSPolicyAssignmentRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.OSPolicyAssignment[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.OSPolicyAssignment) => { + 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.listOSPolicyAssignmentRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listOSPolicyAssignmentRevisions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listOSPolicyAssignmentRevisionsStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignmentRevisions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listOSPolicyAssignmentRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.OSPolicyAssignment[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.osconfig.v1.OSPolicyAssignment) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listOSPolicyAssignmentRevisions, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignmentRevisions without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignment() + ), + ]; + client.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1.IOSPolicyAssignment[] = + []; + const iterable = client.listOSPolicyAssignmentRevisionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignmentRevisions with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listOSPolicyAssignmentRevisionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1.IOSPolicyAssignment[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentRevisions + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listOSPolicyAssignmentReports', () => { + it('invokes listOSPolicyAssignmentReports without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + ]; + client.innerApiCalls.listOSPolicyAssignmentReports = + stubSimpleCall(expectedResponse); + const [response] = await client.listOSPolicyAssignmentReports(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentReports without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + ]; + client.innerApiCalls.listOSPolicyAssignmentReports = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listOSPolicyAssignmentReports( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listOSPolicyAssignmentReports with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listOSPolicyAssignmentReports = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listOSPolicyAssignmentReports(request), + expectedError + ); + assert( + (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentReportsStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + ]; + client.descriptors.page.listOSPolicyAssignmentReports.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listOSPolicyAssignmentReportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport + ) => { + 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.listOSPolicyAssignmentReports + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listOSPolicyAssignmentReports, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listOSPolicyAssignmentReportsStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignmentReports.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listOSPolicyAssignmentReportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .createStream as SinonStub + ) .getCall(0) - .calledWith(request, expectedOptions, undefined) + .calledWith( + client.innerApiCalls.listOSPolicyAssignmentReports, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams ); }); - it('invokes getVulnerabilityReport without error using callback', async () => { + it('uses async iteration with listOSPolicyAssignmentReports without error', async () => { const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -362,47 +2260,47 @@ describe('v1.OsConfigZonalServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.osconfig.v1.VulnerabilityReport() + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() + ), + ]; + client.descriptors.page.listOSPolicyAssignmentReports.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport[] = + []; + const iterable = client.listOSPolicyAssignmentReportsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .asyncIterate as SinonStub + ).getCall(0).args[1], + request ); - client.innerApiCalls.getVulnerabilityReport = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getVulnerabilityReport( - request, - ( - err?: Error | null, - result?: protos.google.cloud.osconfig.v1.IVulnerabilityReport | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getVulnerabilityReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams ); }); - it('invokes getVulnerabilityReport with error', async () => { + it('uses async iteration with listOSPolicyAssignmentReports with error', async () => { const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -410,30 +2308,34 @@ describe('v1.OsConfigZonalServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() + new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.innerApiCalls.getVulnerabilityReport = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.getVulnerabilityReport(request), - expectedError + client.descriptors.page.listOSPolicyAssignmentReports.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listOSPolicyAssignmentReportsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1.IOSPolicyAssignmentReport[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .asyncIterate as SinonStub + ).getCall(0).args[1], + request ); - assert( - (client.innerApiCalls.getVulnerabilityReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams ); }); }); @@ -1126,6 +3028,180 @@ describe('v1.OsConfigZonalServiceClient', () => { }); }); + describe('oSPolicyAssignment', () => { + const fakePath = '/rendered/path/oSPolicyAssignment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + os_policy_assignment: 'osPolicyAssignmentValue', + }; + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.oSPolicyAssignmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.oSPolicyAssignmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('oSPolicyAssignmentPath', () => { + const result = client.oSPolicyAssignmentPath( + 'projectValue', + 'locationValue', + 'osPolicyAssignmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromOSPolicyAssignmentName', () => { + const result = client.matchProjectFromOSPolicyAssignmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOSPolicyAssignmentName', () => { + const result = client.matchLocationFromOSPolicyAssignmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchOsPolicyAssignmentFromOSPolicyAssignmentName', () => { + const result = + client.matchOsPolicyAssignmentFromOSPolicyAssignmentName(fakePath); + assert.strictEqual(result, 'osPolicyAssignmentValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('oSPolicyAssignmentReport', () => { + const fakePath = '/rendered/path/oSPolicyAssignmentReport'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + assignment: 'assignmentValue', + }; + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.oSPolicyAssignmentReportPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.oSPolicyAssignmentReportPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('oSPolicyAssignmentReportPath', () => { + const result = client.oSPolicyAssignmentReportPath( + 'projectValue', + 'locationValue', + 'instanceValue', + 'assignmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromOSPolicyAssignmentReportName', () => { + const result = + client.matchProjectFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOSPolicyAssignmentReportName', () => { + const result = + client.matchLocationFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromOSPolicyAssignmentReportName', () => { + const result = + client.matchInstanceFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssignmentFromOSPolicyAssignmentReportName', () => { + const result = + client.matchAssignmentFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'assignmentValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('patchDeployment', () => { const fakePath = '/rendered/path/patchDeployment'; const expectedParameters = { From 619556ce8f93953f78806b9695f13d3045e818c3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 16:23:29 -0800 Subject: [PATCH 111/154] feat: Update OSConfig API (#164) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Update OSConfig API PiperOrigin-RevId: 409204961 Source-Link: https://github.com/googleapis/googleapis/commit/a85beae06501cc06091191781ec06d778f525365 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b334c5d7b45f4af1133af971789048299b66dc39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjMzNGM1ZDdiNDVmNGFmMTEzM2FmOTcxNzg5MDQ4Mjk5YjY2ZGMzOSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../cloud/osconfig/v1/vulnerability.proto | 33 +- .../google-cloud-osconfig/protos/protos.d.ts | 114 +++++++ .../google-cloud-osconfig/protos/protos.js | 297 ++++++++++++++++++ .../google-cloud-osconfig/protos/protos.json | 35 ++- 4 files changed, 475 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/vulnerability.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/vulnerability.proto index af86fbe098f..b8ca5175ce0 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/vulnerability.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/vulnerability.proto @@ -75,6 +75,32 @@ message VulnerabilityReport { repeated Reference references = 6; } + // OS inventory item that is affected by a vulnerability or fixed as a + // result of a vulnerability. + message Item { + // Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + // This field displays the inventory items affected by this vulnerability. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. For some + // operating systems, this field might be empty. + string installed_inventory_item_id = 1; + + // Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. If there is no + // available fix, the field is empty. The `inventory_item` value specifies + // the latest `SoftwarePackage` available to the VM that fixes the + // vulnerability. + string available_inventory_item_id = 2; + + // The recommended [CPE URI](https://cpe.mitre.org/specification/) update + // that contains a fix for this vulnerability. + string fixed_cpe_uri = 3; + + // The upstream OS patch, packages or KB that fixes the vulnerability. + string upstream_fix = 4; + } + // Contains metadata as per the upstream feed of the operating system and // NVD. Details details = 1; @@ -84,7 +110,7 @@ message VulnerabilityReport { // If the vulnerability report was not updated after the VM inventory // update, these values might not display in VM inventory. For some distros, // this field may be empty. - repeated string installed_inventory_item_ids = 2; + repeated string installed_inventory_item_ids = 2 [deprecated = true]; // Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. // If the vulnerability report was not updated after the VM inventory @@ -92,13 +118,16 @@ message VulnerabilityReport { // available fix, the field is empty. The `inventory_item` value specifies // the latest `SoftwarePackage` available to the VM that fixes the // vulnerability. - repeated string available_inventory_item_ids = 3; + repeated string available_inventory_item_ids = 3 [deprecated = true]; // The timestamp for when the vulnerability was first detected. google.protobuf.Timestamp create_time = 4; // The timestamp for when the vulnerability was last modified. google.protobuf.Timestamp update_time = 5; + + // List of items affected by the vulnerability. + repeated Item items = 6; } // Output only. The `vulnerabilityReport` API resource name. diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index c2586cf3919..ee17fa6b3c8 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -10809,6 +10809,9 @@ export namespace google { /** Vulnerability updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + + /** Vulnerability items */ + items?: (google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem[]|null); } /** Represents a Vulnerability. */ @@ -10835,6 +10838,9 @@ export namespace google { /** Vulnerability updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** Vulnerability items. */ + public items: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem[]; + /** * Creates a new Vulnerability instance using the specified properties. * @param [properties] Properties to set @@ -11126,6 +11132,114 @@ export namespace google { public toJSON(): { [k: string]: any }; } } + + /** Properties of an Item. */ + interface IItem { + + /** Item installedInventoryItemId */ + installedInventoryItemId?: (string|null); + + /** Item availableInventoryItemId */ + availableInventoryItemId?: (string|null); + + /** Item fixedCpeUri */ + fixedCpeUri?: (string|null); + + /** Item upstreamFix */ + upstreamFix?: (string|null); + } + + /** Represents an Item. */ + class Item implements IItem { + + /** + * Constructs a new Item. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem); + + /** Item installedInventoryItemId. */ + public installedInventoryItemId: string; + + /** Item availableInventoryItemId. */ + public availableInventoryItemId: string; + + /** Item fixedCpeUri. */ + public fixedCpeUri: string; + + /** Item upstreamFix. */ + public upstreamFix: string; + + /** + * Creates a new Item instance using the specified properties. + * @param [properties] Properties to set + * @returns Item instance + */ + public static create(properties?: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Item message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item; + + /** + * Verifies an Item message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Item + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @param message Item + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Item to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } } diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 12f66556032..ca2a86c11b4 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -27218,6 +27218,7 @@ * @property {Array.|null} [availableInventoryItemIds] Vulnerability availableInventoryItemIds * @property {google.protobuf.ITimestamp|null} [createTime] Vulnerability createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Vulnerability updateTime + * @property {Array.|null} [items] Vulnerability items */ /** @@ -27231,6 +27232,7 @@ function Vulnerability(properties) { this.installedInventoryItemIds = []; this.availableInventoryItemIds = []; + this.items = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27277,6 +27279,14 @@ */ Vulnerability.prototype.updateTime = null; + /** + * Vulnerability items. + * @member {Array.} items + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.items = $util.emptyArray; + /** * Creates a new Vulnerability instance using the specified properties. * @function create @@ -27313,6 +27323,9 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.encode(message.items[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -27366,6 +27379,11 @@ case 5: message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; + case 6: + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -27430,6 +27448,15 @@ if (error) return "updateTime." + error; } + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.verify(message.items[i]); + if (error) + return "items." + error; + } + } return null; }; @@ -27474,6 +27501,16 @@ throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.items: object expected"); + message.items[i] = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.fromObject(object.items[i]); + } + } return message; }; @@ -27493,6 +27530,7 @@ if (options.arrays || options.defaults) { object.installedInventoryItemIds = []; object.availableInventoryItemIds = []; + object.items = []; } if (options.defaults) { object.details = null; @@ -27515,6 +27553,11 @@ 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.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.toObject(message.items[j], options); + } return object; }; @@ -28064,6 +28107,260 @@ return Details; })(); + Vulnerability.Item = (function() { + + /** + * Properties of an Item. + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @interface IItem + * @property {string|null} [installedInventoryItemId] Item installedInventoryItemId + * @property {string|null} [availableInventoryItemId] Item availableInventoryItemId + * @property {string|null} [fixedCpeUri] Item fixedCpeUri + * @property {string|null} [upstreamFix] Item upstreamFix + */ + + /** + * Constructs a new Item. + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @classdesc Represents an Item. + * @implements IItem + * @constructor + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem=} [properties] Properties to set + */ + function Item(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Item installedInventoryItemId. + * @member {string} installedInventoryItemId + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @instance + */ + Item.prototype.installedInventoryItemId = ""; + + /** + * Item availableInventoryItemId. + * @member {string} availableInventoryItemId + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @instance + */ + Item.prototype.availableInventoryItemId = ""; + + /** + * Item fixedCpeUri. + * @member {string} fixedCpeUri + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @instance + */ + Item.prototype.fixedCpeUri = ""; + + /** + * Item upstreamFix. + * @member {string} upstreamFix + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @instance + */ + Item.prototype.upstreamFix = ""; + + /** + * Creates a new Item instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item} Item instance + */ + Item.create = function create(properties) { + return new Item(properties); + }; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.installedInventoryItemId != null && Object.hasOwnProperty.call(message, "installedInventoryItemId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.installedInventoryItemId); + if (message.availableInventoryItemId != null && Object.hasOwnProperty.call(message, "availableInventoryItemId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.availableInventoryItemId); + if (message.fixedCpeUri != null && Object.hasOwnProperty.call(message, "fixedCpeUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fixedCpeUri); + if (message.upstreamFix != null && Object.hasOwnProperty.call(message, "upstreamFix")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.upstreamFix); + return writer; + }; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Item message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.installedInventoryItemId = reader.string(); + break; + case 2: + message.availableInventoryItemId = reader.string(); + break; + case 3: + message.fixedCpeUri = reader.string(); + break; + case 4: + message.upstreamFix = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Item message. + * @function verify + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Item.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.installedInventoryItemId != null && message.hasOwnProperty("installedInventoryItemId")) + if (!$util.isString(message.installedInventoryItemId)) + return "installedInventoryItemId: string expected"; + if (message.availableInventoryItemId != null && message.hasOwnProperty("availableInventoryItemId")) + if (!$util.isString(message.availableInventoryItemId)) + return "availableInventoryItemId: string expected"; + if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) + if (!$util.isString(message.fixedCpeUri)) + return "fixedCpeUri: string expected"; + if (message.upstreamFix != null && message.hasOwnProperty("upstreamFix")) + if (!$util.isString(message.upstreamFix)) + return "upstreamFix: string expected"; + return null; + }; + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item} Item + */ + Item.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item) + return object; + var message = new $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item(); + if (object.installedInventoryItemId != null) + message.installedInventoryItemId = String(object.installedInventoryItemId); + if (object.availableInventoryItemId != null) + message.availableInventoryItemId = String(object.availableInventoryItemId); + if (object.fixedCpeUri != null) + message.fixedCpeUri = String(object.fixedCpeUri); + if (object.upstreamFix != null) + message.upstreamFix = String(object.upstreamFix); + return message; + }; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @static + * @param {google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item} message Item + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Item.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.installedInventoryItemId = ""; + object.availableInventoryItemId = ""; + object.fixedCpeUri = ""; + object.upstreamFix = ""; + } + if (message.installedInventoryItemId != null && message.hasOwnProperty("installedInventoryItemId")) + object.installedInventoryItemId = message.installedInventoryItemId; + if (message.availableInventoryItemId != null && message.hasOwnProperty("availableInventoryItemId")) + object.availableInventoryItemId = message.availableInventoryItemId; + if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) + object.fixedCpeUri = message.fixedCpeUri; + if (message.upstreamFix != null && message.hasOwnProperty("upstreamFix")) + object.upstreamFix = message.upstreamFix; + return object; + }; + + /** + * Converts this Item to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @instance + * @returns {Object.} JSON object + */ + Item.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Item; + })(); + return Vulnerability; })(); diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 59f0f0405fe..df46c640aa7 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -2983,12 +2983,18 @@ "installedInventoryItemIds": { "rule": "repeated", "type": "string", - "id": 2 + "id": 2, + "options": { + "deprecated": true + } }, "availableInventoryItemIds": { "rule": "repeated", "type": "string", - "id": 3 + "id": 3, + "options": { + "deprecated": true + } }, "createTime": { "type": "google.protobuf.Timestamp", @@ -2997,6 +3003,11 @@ "updateTime": { "type": "google.protobuf.Timestamp", "id": 5 + }, + "items": { + "rule": "repeated", + "type": "Item", + "id": 6 } }, "nested": { @@ -3042,6 +3053,26 @@ } } } + }, + "Item": { + "fields": { + "installedInventoryItemId": { + "type": "string", + "id": 1 + }, + "availableInventoryItemId": { + "type": "string", + "id": 2 + }, + "fixedCpeUri": { + "type": "string", + "id": 3 + }, + "upstreamFix": { + "type": "string", + "id": 4 + } + } } } } From 66dbbaf9cf36113c8c97a3f8580133946dae494e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 12 Nov 2021 00:28:13 +0000 Subject: [PATCH 112/154] chore: release 1.11.0 (#165) :robot: I have created a release \*beep\* \*boop\* --- ## [1.11.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.10.0...v1.11.0) (2021-11-12) ### Features * Update OSConfig API ([#164](https://www.github.com/googleapis/nodejs-os-config/issues/164)) ([19e820a](https://www.github.com/googleapis/nodejs-os-config/commit/19e820a362341b10225562bf76dc0f34e3e3fcae)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 7722d37c5ca..eeacc154025 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.11.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.10.0...v1.11.0) (2021-11-12) + + +### Features + +* Update OSConfig API ([#164](https://www.github.com/googleapis/nodejs-os-config/issues/164)) ([19e820a](https://www.github.com/googleapis/nodejs-os-config/commit/19e820a362341b10225562bf76dc0f34e3e3fcae)) + ## [1.10.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.9.1...v1.10.0) (2021-10-20) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 09534189ca2..cf06fd2747c 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.10.0", + "version": "1.11.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 272fc4ebf37..c0275de26e9 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.10.0" + "@google-cloud/os-config": "^1.11.0" }, "devDependencies": { "c8": "^7.1.0", From 0fecb5c4eca48fa9a45b722f237bdef7e3a3f481 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:14:25 +0000 Subject: [PATCH 113/154] build: add generated samples to .eslintignore (#166) --- packages/google-cloud-osconfig/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-osconfig/.eslintignore b/packages/google-cloud-osconfig/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-osconfig/.eslintignore +++ b/packages/google-cloud-osconfig/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From 0963f659d455aba9ff2e32cfe43cbcced2117ed3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 21:36:39 +0000 Subject: [PATCH 114/154] docs(node): support "stable"/"preview" release level (#1312) (#169) --- packages/google-cloud-osconfig/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index 6b723d568d3..dd416e8fb4e 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -127,6 +127,8 @@ are addressed with the highest priority. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 6e8a2e57323e5bfea301e6fc4da10c41c1388329 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 15:11:22 -0500 Subject: [PATCH 115/154] chore: add api_shortname and library_type to repo metadata (#168) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-osconfig/.repo-metadata.json | 6 ++++-- packages/google-cloud-osconfig/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-osconfig/.repo-metadata.json b/packages/google-cloud-osconfig/.repo-metadata.json index d90b35a1f4b..73385278141 100644 --- a/packages/google-cloud-osconfig/.repo-metadata.json +++ b/packages/google-cloud-osconfig/.repo-metadata.json @@ -6,9 +6,11 @@ "default_version": "v1", "api_description": "provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", "name_pretty": "OS Config API", - "release_level": "ga", + "release_level": "stable", "distribution_name": "@google-cloud/os-config", "name": "osconfig", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/os-config/latest", - "api_id": "osconfig.googleapis.com" + "api_id": "osconfig.googleapis.com", + "api_shortname": "osconfig", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index dd416e8fb4e..8baedc95349 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -4,7 +4,7 @@ # [OS Config API: Node.js Client](https://github.com/googleapis/nodejs-os-config) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) + [![npm version](https://img.shields.io/npm/v/@google-cloud/os-config.svg)](https://www.npmjs.org/package/@google-cloud/os-config) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-os-config/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-os-config) @@ -117,10 +117,10 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -128,7 +128,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From d2742a961152c2a5f705d104cac0a2a867301d46 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 23:08:18 +0000 Subject: [PATCH 116/154] docs(badges): tweak badge to use new preview/stable language (#1314) (#171) --- packages/google-cloud-osconfig/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index 8baedc95349..665279d6030 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -4,9 +4,8 @@ # [OS Config API: Node.js Client](https://github.com/googleapis/nodejs-os-config) - +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/os-config.svg)](https://www.npmjs.org/package/@google-cloud/os-config) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-os-config/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-os-config) From 5283a76a03e3e2004d5702679487048fece0e374 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 13 Jan 2022 18:54:14 +0000 Subject: [PATCH 117/154] test(nodejs): remove 15 add 16 (#1322) (#174) --- packages/google-cloud-osconfig/protos/protos.d.ts | 2 +- packages/google-cloud-osconfig/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index ee17fa6b3c8..25c659fd71d 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index ca2a86c11b4..e0b1905b2eb 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 09dc7ce27fce0f8f798a5453ec126ed2e66af12b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 00:08:33 -0800 Subject: [PATCH 118/154] build: update copyright year to 2022 (#176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): upgrade gapic-generator-java to 2.4.1 PiperOrigin-RevId: 422607515 Source-Link: https://github.com/googleapis/googleapis/commit/ba2ffd6fe6642e28b4fed2ffae217b4c5f084034 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73ba4add239a619da567ffbd4e5730fdd6de04d3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNiYTRhZGQyMzlhNjE5ZGE1NjdmZmJkNGU1NzMwZmRkNmRlMDRkMyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-osconfig/.jsdoc.js | 4 ++-- .../generated/v1/os_config_service.cancel_patch_job.js | 1 + .../v1/os_config_service.create_patch_deployment.js | 1 + .../v1/os_config_service.delete_patch_deployment.js | 1 + .../v1/os_config_service.execute_patch_job.js | 1 + .../v1/os_config_service.get_patch_deployment.js | 1 + .../generated/v1/os_config_service.get_patch_job.js | 1 + .../v1/os_config_service.list_patch_deployments.js | 3 ++- ...s_config_service.list_patch_job_instance_details.js | 7 +++---- .../generated/v1/os_config_service.list_patch_jobs.js | 3 ++- ...onfig_zonal_service.create_o_s_policy_assignment.js | 1 + ...onfig_zonal_service.delete_o_s_policy_assignment.js | 1 + .../v1/os_config_zonal_service.get_inventory.js | 1 + ...s_config_zonal_service.get_o_s_policy_assignment.js | 1 + ...g_zonal_service.get_o_s_policy_assignment_report.js | 1 + ...os_config_zonal_service.get_vulnerability_report.js | 1 + .../v1/os_config_zonal_service.list_inventories.js | 3 ++- ...zonal_service.list_o_s_policy_assignment_reports.js | 7 +++---- ...nal_service.list_o_s_policy_assignment_revisions.js | 7 +++---- ...config_zonal_service.list_o_s_policy_assignments.js | 3 ++- ..._config_zonal_service.list_vulnerability_reports.js | 7 +++---- ...onfig_zonal_service.update_o_s_policy_assignment.js | 1 + ...onfig_zonal_service.create_o_s_policy_assignment.js | 4 ++-- ...onfig_zonal_service.delete_o_s_policy_assignment.js | 4 ++-- ...nal_service.get_instance_o_s_policies_compliance.js | 8 +++----- .../v1alpha/os_config_zonal_service.get_inventory.js | 4 ++-- ...s_config_zonal_service.get_o_s_policy_assignment.js | 4 ++-- ...os_config_zonal_service.get_vulnerability_report.js | 4 ++-- ...l_service.list_instance_o_s_policies_compliances.js | 9 ++++----- .../os_config_zonal_service.list_inventories.js | 6 +++--- ...nal_service.list_o_s_policy_assignment_revisions.js | 10 ++++------ ...config_zonal_service.list_o_s_policy_assignments.js | 6 +++--- ..._config_zonal_service.list_vulnerability_reports.js | 10 ++++------ ...onfig_zonal_service.update_o_s_policy_assignment.js | 4 ++-- packages/google-cloud-osconfig/src/v1/index.ts | 2 +- .../src/v1/os_config_service_client.ts | 2 +- .../src/v1/os_config_zonal_service_client.ts | 2 +- packages/google-cloud-osconfig/src/v1alpha/index.ts | 2 +- .../src/v1alpha/os_config_zonal_service_client.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-osconfig/system-test/install.ts | 2 +- .../test/gapic_os_config_service_v1.ts | 2 +- .../test/gapic_os_config_zonal_service_v1.ts | 2 +- .../test/gapic_os_config_zonal_service_v1alpha.ts | 2 +- 45 files changed, 79 insertions(+), 73 deletions(-) diff --git a/packages/google-cloud-osconfig/.jsdoc.js b/packages/google-cloud-osconfig/.jsdoc.js index 5a541779018..a78d650c774 100644 --- a/packages/google-cloud-osconfig/.jsdoc.js +++ b/packages/google-cloud-osconfig/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/os-config', diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js index 18be980840a..a6ab059de65 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js index 25f9ce64f66..b4b881f45ae 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, patchDeploymentId, patchDeployment) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js index a68f94d9eb9..9535b53050d 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js index e548c77522b..65e24c02e36 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, instanceFilter) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js index 1abe3f82bba..0c84503f82a 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js index c685a565005..5fc0884a2bc 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js index 760aa080e97..32bb4229140 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -50,7 +51,7 @@ function main(parent) { // Run request const iterable = await osconfigClient.listPatchDeploymentsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js index 3a319350024..60af09f5f42 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -53,11 +54,9 @@ function main(parent) { }; // Run request - const iterable = await osconfigClient.listPatchJobInstanceDetailsAsync( - request - ); + const iterable = await osconfigClient.listPatchJobInstanceDetailsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js index 9abd136834c..6839de77580 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -54,7 +55,7 @@ function main(parent) { // Run request const iterable = await osconfigClient.listPatchJobsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js index f5446def177..03c4bee7eac 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, osPolicyAssignment, osPolicyAssignmentId) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js index b2d83f12033..09db2107bf4 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js index 12808b14fe3..750368118c8 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js index 71ad4a09c29..d0a79241e00 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js index 915a498c276..987d2465fc3 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js index 7fbae91ff24..6bf6b54b464 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js index 4f40a0190fa..f34678840ad 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -61,7 +62,7 @@ function main(parent) { // Run request const iterable = await osconfigClient.listInventoriesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js index 355c673cfe2..59d254e6ba8 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -69,11 +70,9 @@ function main(parent) { }; // Run request - const iterable = await osconfigClient.listOSPolicyAssignmentReportsAsync( - request - ); + const iterable = await osconfigClient.listOSPolicyAssignmentReportsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js index e2841929893..0055cf2dd57 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -47,11 +48,9 @@ function main(name) { }; // Run request - const iterable = await osconfigClient.listOSPolicyAssignmentRevisionsAsync( - request - ); + const iterable = await osconfigClient.listOSPolicyAssignmentRevisionsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js index cc3bdd06e5e..228fe2c0a9e 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -49,7 +50,7 @@ function main(parent) { // Run request const iterable = await osconfigClient.listOSPolicyAssignmentsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js index 26ab9de1c53..90e38c689cb 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -54,11 +55,9 @@ function main(parent) { }; // Run request - const iterable = await osconfigClient.listVulnerabilityReportsAsync( - request - ); + const iterable = await osconfigClient.listVulnerabilityReportsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js index 22493c908c1..fe48947ee0a 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(osPolicyAssignment) { diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js index a0263974064..61590fdfc82 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, osPolicyAssignment, osPolicyAssignmentId) { @@ -40,8 +41,7 @@ function main(parent, osPolicyAssignment, osPolicyAssignmentId) { // const osPolicyAssignmentId = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js index 7384f7e3ac6..3e850caf0a4 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -25,8 +26,7 @@ function main(name) { // const name = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js index 7c71f618b60..773a4b4a865 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -31,8 +32,7 @@ function main(name) { // const name = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); @@ -44,9 +44,7 @@ function main(name) { }; // Run request - const response = await osconfigClient.getInstanceOSPoliciesCompliance( - request - ); + const response = await osconfigClient.getInstanceOSPoliciesCompliance(request); console.log(response); } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js index cf19e5db86e..64152dbb115 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -35,8 +36,7 @@ function main(name) { // const view = {} // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js index cc2e792b069..1369bdd6141 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -27,8 +28,7 @@ function main(name) { // const name = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js index 85df2290449..eb605a87098 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -30,8 +31,7 @@ function main(name) { // const name = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js index 6b9b8aeaac1..01a0e4ed8a9 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -43,8 +44,7 @@ function main(parent) { // const filter = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); @@ -56,10 +56,9 @@ function main(parent) { }; // Run request - const iterable = - await osconfigClient.listInstanceOSPoliciesCompliancesAsync(request); + const iterable = await osconfigClient.listInstanceOSPoliciesCompliancesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js index 754dc4fb72e..45a59764ab4 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -49,8 +50,7 @@ function main(parent) { // const filter = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); @@ -64,7 +64,7 @@ function main(parent) { // Run request const iterable = await osconfigClient.listInventoriesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js index 0b0c1a5d8bc..e7c8d66367f 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -35,8 +36,7 @@ function main(name) { // const pageToken = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); @@ -48,11 +48,9 @@ function main(name) { }; // Run request - const iterable = await osconfigClient.listOSPolicyAssignmentRevisionsAsync( - request - ); + const iterable = await osconfigClient.listOSPolicyAssignmentRevisionsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js index e1a14413bd2..6018fecd363 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -35,8 +36,7 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); @@ -50,7 +50,7 @@ function main(parent) { // Run request const iterable = await osconfigClient.listOSPolicyAssignmentsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js index 97f96820e69..be8b817e806 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -44,8 +45,7 @@ function main(parent) { // const filter = 'abc123' // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); @@ -57,11 +57,9 @@ function main(parent) { }; // Run request - const iterable = await osconfigClient.listVulnerabilityReportsAsync( - request - ); + const iterable = await osconfigClient.listVulnerabilityReportsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js index 1c318ad7bc1..4c4e4f579e7 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(osPolicyAssignment) { @@ -29,8 +30,7 @@ function main(osPolicyAssignment) { // const updateMask = {} // Imports the Osconfig library - const {OsConfigZonalServiceClient} = - require('@google-cloud/os-config').v1alpha; + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; // Instantiates a client const osconfigClient = new OsConfigZonalServiceClient(); diff --git a/packages/google-cloud-osconfig/src/v1/index.ts b/packages/google-cloud-osconfig/src/v1/index.ts index 57834269e82..df424b9f6a8 100644 --- a/packages/google-cloud-osconfig/src/v1/index.ts +++ b/packages/google-cloud-osconfig/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 87986f5c922..5dfbb41659d 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts index fcdc5bb9b50..65d2ca37c98 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/src/v1alpha/index.ts b/packages/google-cloud-osconfig/src/v1alpha/index.ts index 41dad750e6a..d1d2e1561eb 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/index.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index 4caa23ba18d..e27e1c44628 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js index 2f22eb87e37..00bc3ccd4d0 100644 --- a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts index 6460d4869ea..3d08a8e01f4 100644 --- a/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-osconfig/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/system-test/install.ts b/packages/google-cloud-osconfig/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-cloud-osconfig/system-test/install.ts +++ b/packages/google-cloud-osconfig/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index 657932e53ee..6805a18ca7a 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts index 4f6435dd07e..1e3608fc5f3 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts index b1a4ac21bf3..a347a8f1af4 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 0b1a9cf0efd0800a990970dab6cfe3ddfe98b8df Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 26 Jan 2022 19:53:08 +0000 Subject: [PATCH 119/154] chore: update v2.12.0 gapic-generator-typescript (#178) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- packages/google-cloud-osconfig/linkinator.config.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/linkinator.config.json b/packages/google-cloud-osconfig/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-cloud-osconfig/linkinator.config.json +++ b/packages/google-cloud-osconfig/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } From 1afc194a6d609cc1ee74d32b2e36a8af1723e76c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 31 Jan 2022 23:36:36 +0100 Subject: [PATCH 120/154] chore(deps): update dependency sinon to v13 (#180) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index cf06fd2747c..7cba6c6a0c0 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -42,7 +42,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.0.0", "typescript": "~3.8.3" }, From f57749fafc24c3edd668e3d7687ada3d36eac5f9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 7 Feb 2022 11:25:10 -0800 Subject: [PATCH 121/154] docs(nodejs): version support policy edits (#1346) (#182) Source-Link: https://github.com/googleapis/synthtool/commit/d815daff1af9e35a8eaf7bf71c0743baad423512 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:a9d166a74752226923d159cb723df53429e226c9c076dad3ca52ffd073ff3bb4 Co-authored-by: Owl Bot --- packages/google-cloud-osconfig/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index 665279d6030..c7100c5acb1 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -95,21 +95,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/os-config@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From 95989d1f3cd903017de96fcc2a3eff5eeec98ba3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 08:58:41 -0800 Subject: [PATCH 122/154] feat: Update osconfig v1 protos (#183) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Update osconfig v1 protos PiperOrigin-RevId: 427050266 Source-Link: https://github.com/googleapis/googleapis/commit/010716c268b238cc539d301ac115e01362c14dc6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95161e21a033345c5fe13542bb8a82d4b1d08690 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTUxNjFlMjFhMDMzMzQ1YzVmZTEzNTQyYmI4YTgyZDRiMWQwODY5MCJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google/cloud/osconfig/v1/inventory.proto | 12 +- .../google/cloud/osconfig/v1/os_policy.proto | 56 +- .../v1/os_policy_assignment_reports.proto | 56 +- .../cloud/osconfig/v1/osconfig_common.proto | 2 +- .../cloud/osconfig/v1/osconfig_service.proto | 34 +- .../cloud/osconfig/v1/patch_deployments.proto | 73 +- .../google/cloud/osconfig/v1/patch_jobs.proto | 59 +- .../google-cloud-osconfig/protos/protos.d.ts | 453 +++++++- .../google-cloud-osconfig/protos/protos.js | 1013 +++++++++++++++-- .../google-cloud-osconfig/protos/protos.json | 243 +++- ...s_config_service.pause_patch_deployment.js | 54 + ..._config_service.resume_patch_deployment.js | 54 + ..._config_service.update_patch_deployment.js | 58 + .../src/v1/gapic_metadata.json | 30 + .../src/v1/os_config_service_client.ts | 283 +++++ .../v1/os_config_service_client_config.json | 15 + .../test/gapic_os_config_service_v1.ts | 345 ++++++ 17 files changed, 2531 insertions(+), 309 deletions(-) create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto index 8f89d8b89b9..92c2b81c832 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/inventory.proto @@ -264,12 +264,9 @@ message Inventory { google.protobuf.Timestamp install_time = 5; } - // Contains information about a Windows application as retrieved from the - // Windows Registry. For more information about these fields, see - // - // [Windows Installer Properties for the Uninstall - // Registry](https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key){: - // class="external" } + // Contains information about a Windows application that is retrieved from the + // Windows Registry. For more information about these fields, see: + // https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key message WindowsApplication { // The name of the application or product. string display_name = 1; @@ -305,7 +302,8 @@ message Inventory { map items = 2; // Output only. Timestamp of the last reported inventory for the VM. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request message for getting inventory data for the specified VM. diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto index a07e251f6b9..7b113f91b3a 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto @@ -28,6 +28,21 @@ option ruby_package = "Google::Cloud::OsConfig::V1"; // An OS policy defines the desired state configuration for a VM. message OSPolicy { + // Policy mode + enum Mode { + // Invalid mode + MODE_UNSPECIFIED = 0; + + // This mode checks if the configuration resources in the policy are in + // their desired state. No actions are performed if they are not in the + // desired state. This mode is used for reporting purposes. + VALIDATION = 1; + + // This mode checks if the configuration resources in the policy are in + // their desired state, and if not, enforces the desired state. + ENFORCEMENT = 2; + } + // Filtering criteria to select VMs based on inventory details. message InventoryFilter { // Required. The OS short name @@ -96,6 +111,19 @@ message OSPolicy { // A resource that manages a system package. message PackageResource { + // The desired state that the OS Config agent maintains on the VM. + enum DesiredState { + // Unspecified is invalid. + DESIRED_STATE_UNSPECIFIED = 0; + + // Ensure that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is not installed and + // uninstalls it if detected. + REMOVED = 2; + } + // A deb package file. dpkg packages only support INSTALLED state. message Deb { // Required. A deb package. @@ -164,19 +192,6 @@ message OSPolicy { repeated string properties = 2; } - // The desired state that the OS Config agent maintains on the VM. - enum DesiredState { - // Unspecified is invalid. - DESIRED_STATE_UNSPECIFIED = 0; - - // Ensure that the package is installed. - INSTALLED = 1; - - // The agent ensures that the package is not installed and - // uninstalls it if detected. - REMOVED = 2; - } - // Required. The desired state the agent should maintain for this package. DesiredState desired_state = 1 [(google.api.field_behavior) = REQUIRED]; @@ -498,21 +513,6 @@ message OSPolicy { repeated Resource resources = 2 [(google.api.field_behavior) = REQUIRED]; } - // Policy mode - enum Mode { - // Invalid mode - MODE_UNSPECIFIED = 0; - - // This mode checks if the configuration resources in the policy are in - // their desired state. No actions are performed if they are not in the - // desired state. This mode is used for reporting purposes. - VALIDATION = 1; - - // This mode checks if the configuration resources in the policy are in - // their desired state, and if not, enforces the desired state. - ENFORCEMENT = 2; - } - // Required. The id of the OS policy with the following restrictions: // // * Must contain only lowercase letters, numbers, and hyphens. diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto index f610fc5a884..aa4b2b11b4e 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy_assignment_reports.proto @@ -114,6 +114,27 @@ message OSPolicyAssignmentReport { // Compliance data for an OS policy message OSPolicyCompliance { + // Possible compliance states for an os policy. + enum ComplianceState { + // The policy is in an unknown compliance state. + // + // Refer to the field `compliance_state_reason` to learn the exact reason + // for the policy to be in this compliance state. + UNKNOWN = 0; + + // Policy is compliant. + // + // The policy is compliant if all the underlying resources are also + // compliant. + COMPLIANT = 1; + + // Policy is non-compliant. + // + // The policy is non-compliant if one or more underlying resources are + // non-compliant. + NON_COMPLIANT = 2; + } + // Compliance data for an OS policy resource. message OSPolicyResourceCompliance { // Step performed by the OS Config agent for configuring an @@ -152,13 +173,6 @@ message OSPolicyAssignmentReport { string error_message = 2; } - // ExecResource specific output. - message ExecResourceOutput { - // Output from enforcement phase output file (if run). - // Output size is limited to 100K bytes. - bytes enforcement_output = 2; - } - // Possible compliance states for a resource. enum ComplianceState { // The resource is in an unknown compliance state. @@ -174,6 +188,13 @@ message OSPolicyAssignmentReport { NON_COMPLIANT = 2; } + // ExecResource specific output. + message ExecResourceOutput { + // Output from enforcement phase output file (if run). + // Output size is limited to 100K bytes. + bytes enforcement_output = 2; + } + // The ID of the OS policy resource. string os_policy_resource_id = 1; @@ -207,27 +228,6 @@ message OSPolicyAssignmentReport { } } - // Possible compliance states for an os policy. - enum ComplianceState { - // The policy is in an unknown compliance state. - // - // Refer to the field `compliance_state_reason` to learn the exact reason - // for the policy to be in this compliance state. - UNKNOWN = 0; - - // Policy is compliant. - // - // The policy is compliant if all the underlying resources are also - // compliant. - COMPLIANT = 1; - - // Policy is non-compliant. - // - // The policy is non-compliant if one or more underlying resources are - // non-compliant. - NON_COMPLIANT = 2; - } - // The OS policy id string os_policy_id = 1; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_common.proto index 43059e9a62e..2b72d6ae945 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_common.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_common.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto index ae256fe68f4..515905c87d5 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/osconfig_service.proto @@ -16,12 +16,12 @@ syntax = "proto3"; package google.cloud.osconfig.v1; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1/patch_deployments.proto"; import "google/cloud/osconfig/v1/patch_jobs.proto"; import "google/protobuf/empty.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; @@ -123,4 +123,36 @@ service OsConfigService { }; option (google.api.method_signature) = "name"; } + + // Update an OS Config patch deployment. + rpc UpdatePatchDeployment(UpdatePatchDeploymentRequest) + returns (PatchDeployment) { + option (google.api.http) = { + patch: "/v1/{patch_deployment.name=projects/*/patchDeployments/*}" + body: "patch_deployment" + }; + option (google.api.method_signature) = "patch_deployment,update_mask"; + } + + // Change state of patch deployment to "PAUSED". + // Patch deployment in paused state doesn't generate patch jobs. + rpc PausePatchDeployment(PausePatchDeploymentRequest) + returns (PatchDeployment) { + option (google.api.http) = { + post: "/v1/{name=projects/*/patchDeployments/*}:pause" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Change state of patch deployment back to "ACTIVE". + // Patch deployment in active state continues to generate patch jobs. + rpc ResumePatchDeployment(ResumePatchDeploymentRequest) + returns (PatchDeployment) { + option (google.api.http) = { + post: "/v1/{name=projects/*/patchDeployments/*}:resume" + body: "*" + }; + option (google.api.method_signature) = "name"; + } } diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto index 8cf85288297..d5708544f8b 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_deployments.proto @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1/patch_jobs.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/type/datetime.proto"; import "google/type/dayofweek.proto"; @@ -43,6 +44,19 @@ message PatchDeployment { pattern: "projects/{project}/patchDeployments/{patch_deployment}" }; + // Represents state of patch peployment. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // Active value means that patch deployment generates Patch Jobs. + ACTIVE = 1; + + // Paused value means that patch deployment does not generate + // Patch jobs. Requires user action to move in and out from this state. + PAUSED = 2; + } + // Unique name for the patch deployment resource in a project. The patch // deployment name is in the form: // `projects/{project_id}/patchDeployments/{patch_deployment_id}`. @@ -94,6 +108,9 @@ message PatchDeployment { // Optional. Rollout strategy of the patch job. PatchRollout rollout = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the patch deployment. + State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Sets the time for a one time patch deployment. Timestamp is in @@ -111,16 +128,16 @@ message RecurringSchedule { // Invalid. A frequency must be specified. FREQUENCY_UNSPECIFIED = 0; - // Indicates that the frequency should be expressed in terms of - // weeks. + // Indicates that the frequency of recurrence should be expressed in terms + // of weeks. WEEKLY = 1; - // Indicates that the frequency should be expressed in terms of - // months. + // Indicates that the frequency of recurrence should be expressed in terms + // of months. MONTHLY = 2; - // Indicates that the frequency should be expressed in terms of - // days. + // Indicates that the frequency of recurrence should be expressed in terms + // of days. DAILY = 3; } @@ -197,6 +214,15 @@ message WeekDayOfMonth { // Required. A day of the week. google.type.DayOfWeek day_of_week = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Represents the number of days before or after the given week day + // of month that the patch deployment is scheduled for. For example if + // `week_ordinal` and `day_of_week` values point to the second day of the + // month and this `day_offset` value is set to `3`, the patch deployment takes + // place three days after the second Tuesday of the month. If this value is + // negative, for example -5, the patches are deployed five days before before + // the second Tuesday of the month. Allowed values are in range [-30, 30]. + int32 day_offset = 3 [(google.api.field_behavior) = OPTIONAL]; } // A request message for creating a patch deployment. @@ -276,3 +302,38 @@ message DeletePatchDeploymentRequest { } ]; } + +// A request message for updating a patch deployment. +message UpdatePatchDeploymentRequest { + // Required. The patch deployment to Update. + PatchDeployment patch_deployment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field mask that controls which fields of the patch deployment + // should be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message for pausing a patch deployment. +message PausePatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} + +// A request message for resuming a patch deployment. +message ResumePatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto index 1fffb532a11..4edfc8df555 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/patch_jobs.proto @@ -183,6 +183,34 @@ message PatchJob { pattern: "projects/{project}/patchJobs/{patch_job}" }; + // Enumeration of the various states a patch job passes through as it + // executes. + enum State { + // State must be specified. + STATE_UNSPECIFIED = 0; + + // The patch job was successfully initiated. + STARTED = 1; + + // The patch job is looking up instances to run the patch on. + INSTANCE_LOOKUP = 2; + + // Instances are being patched. + PATCHING = 3; + + // Patch job completed successfully. + SUCCEEDED = 4; + + // Patch job completed but there were errors. + COMPLETED_WITH_ERRORS = 5; + + // The patch job was canceled. + CANCELED = 6; + + // The patch job timed out. + TIMED_OUT = 7; + } + // A summary of the current patch state across all instances that this patch // job affects. Contains counts of instances in different states. These states // map to `InstancePatchState`. List patch job instance details to see the @@ -236,34 +264,6 @@ message PatchJob { int64 no_agent_detected_instance_count = 15; } - // Enumeration of the various states a patch job passes through as it - // executes. - enum State { - // State must be specified. - STATE_UNSPECIFIED = 0; - - // The patch job was successfully initiated. - STARTED = 1; - - // The patch job is looking up instances to run the patch on. - INSTANCE_LOOKUP = 2; - - // Instances are being patched. - PATCHING = 3; - - // Patch job completed successfully. - SUCCEEDED = 4; - - // Patch job completed but there were errors. - COMPLETED_WITH_ERRORS = 5; - - // The patch job was canceled. - CANCELED = 6; - - // The patch job timed out. - TIMED_OUT = 7; - } - // Unique identifier for this patch job in the form // `projects/*/patchJobs/*` string name = 1; @@ -369,6 +369,9 @@ message PatchConfig { // The `ExecStep` to run after the patch update. ExecStep post_step = 9; + + // Allows the patch job to run on Managed instance groups (MIGs). + bool mig_instances_allowed = 10; } // Namespace for instance state enums. diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 25c659fd71d..3e619432d37 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -1653,6 +1653,13 @@ export namespace google { namespace OSPolicy { + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + VALIDATION = 1, + ENFORCEMENT = 2 + } + /** Properties of an InventoryFilter. */ interface IInventoryFilter { @@ -2317,6 +2324,13 @@ export namespace google { namespace PackageResource { + /** DesiredState enum. */ + enum DesiredState { + DESIRED_STATE_UNSPECIFIED = 0, + INSTALLED = 1, + REMOVED = 2 + } + /** Properties of a Deb. */ interface IDeb { @@ -2964,13 +2978,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** DesiredState enum. */ - enum DesiredState { - DESIRED_STATE_UNSPECIFIED = 0, - INSTALLED = 1, - REMOVED = 2 - } } /** Properties of a RepositoryResource. */ @@ -3974,13 +3981,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - VALIDATION = 1, - ENFORCEMENT = 2 - } } /** Properties of a GetOSPolicyAssignmentReportRequest. */ @@ -4509,6 +4509,13 @@ export namespace google { namespace OSPolicyCompliance { + /** ComplianceState enum. */ + enum ComplianceState { + UNKNOWN = 0, + COMPLIANT = 1, + NON_COMPLIANT = 2 + } + /** Properties of a OSPolicyResourceCompliance. */ interface IOSPolicyResourceCompliance { @@ -4736,6 +4743,13 @@ export namespace google { } } + /** ComplianceState enum. */ + enum ComplianceState { + UNKNOWN = 0, + COMPLIANT = 1, + NON_COMPLIANT = 2 + } + /** Properties of an ExecResourceOutput. */ interface IExecResourceOutput { @@ -4825,20 +4839,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** ComplianceState enum. */ - enum ComplianceState { - UNKNOWN = 0, - COMPLIANT = 1, - NON_COMPLIANT = 2 - } - } - - /** ComplianceState enum. */ - enum ComplianceState { - UNKNOWN = 0, - COMPLIANT = 1, - NON_COMPLIANT = 2 } } } @@ -6562,6 +6562,48 @@ export namespace google { * @returns Promise */ public deletePatchDeployment(request: google.cloud.osconfig.v1.IDeletePatchDeploymentRequest): Promise; + + /** + * Calls UpdatePatchDeployment. + * @param request UpdatePatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchDeployment + */ + public updatePatchDeployment(request: google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.UpdatePatchDeploymentCallback): void; + + /** + * Calls UpdatePatchDeployment. + * @param request UpdatePatchDeploymentRequest message or plain object + * @returns Promise + */ + public updatePatchDeployment(request: google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest): Promise; + + /** + * Calls PausePatchDeployment. + * @param request PausePatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchDeployment + */ + public pausePatchDeployment(request: google.cloud.osconfig.v1.IPausePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.PausePatchDeploymentCallback): void; + + /** + * Calls PausePatchDeployment. + * @param request PausePatchDeploymentRequest message or plain object + * @returns Promise + */ + public pausePatchDeployment(request: google.cloud.osconfig.v1.IPausePatchDeploymentRequest): Promise; + + /** + * Calls ResumePatchDeployment. + * @param request ResumePatchDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PatchDeployment + */ + public resumePatchDeployment(request: google.cloud.osconfig.v1.IResumePatchDeploymentRequest, callback: google.cloud.osconfig.v1.OsConfigService.ResumePatchDeploymentCallback): void; + + /** + * Calls ResumePatchDeployment. + * @param request ResumePatchDeploymentRequest message or plain object + * @returns Promise + */ + public resumePatchDeployment(request: google.cloud.osconfig.v1.IResumePatchDeploymentRequest): Promise; } namespace OsConfigService { @@ -6628,6 +6670,27 @@ export namespace google { * @param [response] Empty */ type DeletePatchDeploymentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#updatePatchDeployment}. + * @param error Error, if any + * @param [response] PatchDeployment + */ + type UpdatePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#pausePatchDeployment}. + * @param error Error, if any + * @param [response] PatchDeployment + */ + type PausePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#resumePatchDeployment}. + * @param error Error, if any + * @param [response] PatchDeployment + */ + type ResumePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; } /** Properties of a PatchDeployment. */ @@ -6665,6 +6728,9 @@ export namespace google { /** PatchDeployment rollout */ rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + + /** PatchDeployment state */ + state?: (google.cloud.osconfig.v1.PatchDeployment.State|keyof typeof google.cloud.osconfig.v1.PatchDeployment.State|null); } /** Represents a PatchDeployment. */ @@ -6709,6 +6775,9 @@ export namespace google { /** PatchDeployment rollout. */ public rollout?: (google.cloud.osconfig.v1.IPatchRollout|null); + /** PatchDeployment state. */ + public state: (google.cloud.osconfig.v1.PatchDeployment.State|keyof typeof google.cloud.osconfig.v1.PatchDeployment.State); + /** PatchDeployment schedule. */ public schedule?: ("oneTimeSchedule"|"recurringSchedule"); @@ -6783,6 +6852,16 @@ export namespace google { public toJSON(): { [k: string]: any }; } + namespace PatchDeployment { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + PAUSED = 2 + } + } + /** Properties of an OneTimeSchedule. */ interface IOneTimeSchedule { @@ -7222,6 +7301,9 @@ export namespace google { /** WeekDayOfMonth dayOfWeek */ dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + + /** WeekDayOfMonth dayOffset */ + dayOffset?: (number|null); } /** Represents a WeekDayOfMonth. */ @@ -7239,6 +7321,9 @@ export namespace google { /** WeekDayOfMonth dayOfWeek. */ public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + /** WeekDayOfMonth dayOffset. */ + public dayOffset: number; + /** * Creates a new WeekDayOfMonth instance using the specified properties. * @param [properties] Properties to set @@ -7790,6 +7875,282 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of an UpdatePatchDeploymentRequest. */ + interface IUpdatePatchDeploymentRequest { + + /** UpdatePatchDeploymentRequest patchDeployment */ + patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + + /** UpdatePatchDeploymentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePatchDeploymentRequest. */ + class UpdatePatchDeploymentRequest implements IUpdatePatchDeploymentRequest { + + /** + * Constructs a new UpdatePatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest); + + /** UpdatePatchDeploymentRequest patchDeployment. */ + public patchDeployment?: (google.cloud.osconfig.v1.IPatchDeployment|null); + + /** UpdatePatchDeploymentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest): google.cloud.osconfig.v1.UpdatePatchDeploymentRequest; + + /** + * Encodes the specified UpdatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.UpdatePatchDeploymentRequest.verify|verify} messages. + * @param message UpdatePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.UpdatePatchDeploymentRequest.verify|verify} messages. + * @param message UpdatePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.UpdatePatchDeploymentRequest; + + /** + * Decodes an UpdatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.UpdatePatchDeploymentRequest; + + /** + * Verifies an UpdatePatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.UpdatePatchDeploymentRequest; + + /** + * Creates a plain object from an UpdatePatchDeploymentRequest message. Also converts values to other types if specified. + * @param message UpdatePatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.UpdatePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PausePatchDeploymentRequest. */ + interface IPausePatchDeploymentRequest { + + /** PausePatchDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a PausePatchDeploymentRequest. */ + class PausePatchDeploymentRequest implements IPausePatchDeploymentRequest { + + /** + * Constructs a new PausePatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IPausePatchDeploymentRequest); + + /** PausePatchDeploymentRequest name. */ + public name: string; + + /** + * Creates a new PausePatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PausePatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IPausePatchDeploymentRequest): google.cloud.osconfig.v1.PausePatchDeploymentRequest; + + /** + * Encodes the specified PausePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.PausePatchDeploymentRequest.verify|verify} messages. + * @param message PausePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IPausePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PausePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PausePatchDeploymentRequest.verify|verify} messages. + * @param message PausePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IPausePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PausePatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PausePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.PausePatchDeploymentRequest; + + /** + * Decodes a PausePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PausePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.PausePatchDeploymentRequest; + + /** + * Verifies a PausePatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PausePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PausePatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.PausePatchDeploymentRequest; + + /** + * Creates a plain object from a PausePatchDeploymentRequest message. Also converts values to other types if specified. + * @param message PausePatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.PausePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PausePatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResumePatchDeploymentRequest. */ + interface IResumePatchDeploymentRequest { + + /** ResumePatchDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a ResumePatchDeploymentRequest. */ + class ResumePatchDeploymentRequest implements IResumePatchDeploymentRequest { + + /** + * Constructs a new ResumePatchDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1.IResumePatchDeploymentRequest); + + /** ResumePatchDeploymentRequest name. */ + public name: string; + + /** + * Creates a new ResumePatchDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResumePatchDeploymentRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1.IResumePatchDeploymentRequest): google.cloud.osconfig.v1.ResumePatchDeploymentRequest; + + /** + * Encodes the specified ResumePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ResumePatchDeploymentRequest.verify|verify} messages. + * @param message ResumePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1.IResumePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResumePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ResumePatchDeploymentRequest.verify|verify} messages. + * @param message ResumePatchDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1.IResumePatchDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResumePatchDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResumePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1.ResumePatchDeploymentRequest; + + /** + * Decodes a ResumePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResumePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1.ResumePatchDeploymentRequest; + + /** + * Verifies a ResumePatchDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResumePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResumePatchDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1.ResumePatchDeploymentRequest; + + /** + * Creates a plain object from a ResumePatchDeploymentRequest message. Also converts values to other types if specified. + * @param message ResumePatchDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1.ResumePatchDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResumePatchDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an ExecutePatchJobRequest. */ interface IExecutePatchJobRequest { @@ -8710,6 +9071,18 @@ export namespace google { namespace PatchJob { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTED = 1, + INSTANCE_LOOKUP = 2, + PATCHING = 3, + SUCCEEDED = 4, + COMPLETED_WITH_ERRORS = 5, + CANCELED = 6, + TIMED_OUT = 7 + } + /** Properties of an InstanceDetailsSummary. */ interface IInstanceDetailsSummary { @@ -8883,18 +9256,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - STARTED = 1, - INSTANCE_LOOKUP = 2, - PATCHING = 3, - SUCCEEDED = 4, - COMPLETED_WITH_ERRORS = 5, - CANCELED = 6, - TIMED_OUT = 7 - } } /** Properties of a PatchConfig. */ @@ -8923,6 +9284,9 @@ export namespace google { /** PatchConfig postStep */ postStep?: (google.cloud.osconfig.v1.IExecStep|null); + + /** PatchConfig migInstancesAllowed */ + migInstancesAllowed?: (boolean|null); } /** Represents a PatchConfig. */ @@ -8958,6 +9322,9 @@ export namespace google { /** PatchConfig postStep. */ public postStep?: (google.cloud.osconfig.v1.IExecStep|null); + /** PatchConfig migInstancesAllowed. */ + public migInstancesAllowed: boolean; + /** * Creates a new PatchConfig instance using the specified properties. * @param [properties] Properties to set @@ -22227,12 +22594,12 @@ export namespace google { /** 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.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + /** MethodOptions .google.longrunning.operationInfo */ ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); } diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index e0b1905b2eb..10230c84a94 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -4368,6 +4368,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Mode enum. + * @name google.cloud.osconfig.v1.OSPolicy.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} VALIDATION=1 VALIDATION value + * @property {number} ENFORCEMENT=2 ENFORCEMENT value + */ + OSPolicy.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VALIDATION"] = 1; + values[valuesById[2] = "ENFORCEMENT"] = 2; + return values; + })(); + OSPolicy.InventoryFilter = (function() { /** @@ -6116,6 +6132,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * DesiredState enum. + * @name google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState + * @enum {number} + * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value + * @property {number} INSTALLED=1 INSTALLED value + * @property {number} REMOVED=2 REMOVED value + */ + PackageResource.DesiredState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLED"] = 1; + values[valuesById[2] = "REMOVED"] = 2; + return values; + })(); + PackageResource.Deb = (function() { /** @@ -7525,22 +7557,6 @@ return MSI; })(); - /** - * DesiredState enum. - * @name google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState - * @enum {number} - * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value - * @property {number} INSTALLED=1 INSTALLED value - * @property {number} REMOVED=2 REMOVED value - */ - PackageResource.DesiredState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTALLED"] = 1; - values[valuesById[2] = "REMOVED"] = 2; - return values; - })(); - return PackageResource; })(); @@ -10124,22 +10140,6 @@ return ResourceGroup; })(); - /** - * Mode enum. - * @name google.cloud.osconfig.v1.OSPolicy.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} VALIDATION=1 VALIDATION value - * @property {number} ENFORCEMENT=2 ENFORCEMENT value - */ - OSPolicy.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VALIDATION"] = 1; - values[valuesById[2] = "ENFORCEMENT"] = 2; - return values; - })(); - return OSPolicy; })(); @@ -11428,6 +11428,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * ComplianceState enum. + * @name google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} COMPLIANT=1 COMPLIANT value + * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value + */ + OSPolicyCompliance.ComplianceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "COMPLIANT"] = 1; + values[valuesById[2] = "NON_COMPLIANT"] = 2; + return values; + })(); + OSPolicyCompliance.OSPolicyResourceCompliance = (function() { /** @@ -12024,6 +12040,22 @@ return OSPolicyResourceConfigStep; })(); + /** + * ComplianceState enum. + * @name google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} COMPLIANT=1 COMPLIANT value + * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value + */ + OSPolicyResourceCompliance.ComplianceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "COMPLIANT"] = 1; + values[valuesById[2] = "NON_COMPLIANT"] = 2; + return values; + })(); + OSPolicyResourceCompliance.ExecResourceOutput = (function() { /** @@ -12220,41 +12252,9 @@ return ExecResourceOutput; })(); - /** - * ComplianceState enum. - * @name google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} COMPLIANT=1 COMPLIANT value - * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value - */ - OSPolicyResourceCompliance.ComplianceState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "COMPLIANT"] = 1; - values[valuesById[2] = "NON_COMPLIANT"] = 2; - return values; - })(); - return OSPolicyResourceCompliance; })(); - /** - * ComplianceState enum. - * @name google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} COMPLIANT=1 COMPLIANT value - * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value - */ - OSPolicyCompliance.ComplianceState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "COMPLIANT"] = 1; - values[valuesById[2] = "NON_COMPLIANT"] = 2; - return values; - })(); - return OSPolicyCompliance; })(); @@ -16462,6 +16462,105 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#updatePatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef UpdatePatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + */ + + /** + * Calls UpdatePatchDeployment. + * @function updatePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest} request UpdatePatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.UpdatePatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.updatePatchDeployment = function updatePatchDeployment(request, callback) { + return this.rpcCall(updatePatchDeployment, $root.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); + }, "name", { value: "UpdatePatchDeployment" }); + + /** + * Calls UpdatePatchDeployment. + * @function updatePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest} request UpdatePatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#pausePatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef PausePatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + */ + + /** + * Calls PausePatchDeployment. + * @function pausePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IPausePatchDeploymentRequest} request PausePatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.PausePatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.pausePatchDeployment = function pausePatchDeployment(request, callback) { + return this.rpcCall(pausePatchDeployment, $root.google.cloud.osconfig.v1.PausePatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); + }, "name", { value: "PausePatchDeployment" }); + + /** + * Calls PausePatchDeployment. + * @function pausePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IPausePatchDeploymentRequest} request PausePatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#resumePatchDeployment}. + * @memberof google.cloud.osconfig.v1.OsConfigService + * @typedef ResumePatchDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1.PatchDeployment} [response] PatchDeployment + */ + + /** + * Calls ResumePatchDeployment. + * @function resumePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IResumePatchDeploymentRequest} request ResumePatchDeploymentRequest message or plain object + * @param {google.cloud.osconfig.v1.OsConfigService.ResumePatchDeploymentCallback} callback Node-style callback called with the error, if any, and PatchDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigService.prototype.resumePatchDeployment = function resumePatchDeployment(request, callback) { + return this.rpcCall(resumePatchDeployment, $root.google.cloud.osconfig.v1.ResumePatchDeploymentRequest, $root.google.cloud.osconfig.v1.PatchDeployment, request, callback); + }, "name", { value: "ResumePatchDeployment" }); + + /** + * Calls ResumePatchDeployment. + * @function resumePatchDeployment + * @memberof google.cloud.osconfig.v1.OsConfigService + * @instance + * @param {google.cloud.osconfig.v1.IResumePatchDeploymentRequest} request ResumePatchDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return OsConfigService; })(); @@ -16482,6 +16581,7 @@ * @property {google.protobuf.ITimestamp|null} [updateTime] PatchDeployment updateTime * @property {google.protobuf.ITimestamp|null} [lastExecuteTime] PatchDeployment lastExecuteTime * @property {google.cloud.osconfig.v1.IPatchRollout|null} [rollout] PatchDeployment rollout + * @property {google.cloud.osconfig.v1.PatchDeployment.State|null} [state] PatchDeployment state */ /** @@ -16587,6 +16687,14 @@ */ PatchDeployment.prototype.rollout = null; + /** + * PatchDeployment state. + * @member {google.cloud.osconfig.v1.PatchDeployment.State} state + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @instance + */ + PatchDeployment.prototype.state = 0; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -16647,6 +16755,8 @@ $root.google.protobuf.Timestamp.encode(message.lastExecuteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) $root.google.cloud.osconfig.v1.PatchRollout.encode(message.rollout, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.state); return writer; }; @@ -16714,6 +16824,9 @@ case 11: message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); break; + case 12: + message.state = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -16809,6 +16922,15 @@ if (error) return "rollout." + error; } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -16873,6 +16995,20 @@ throw TypeError(".google.cloud.osconfig.v1.PatchDeployment.rollout: object expected"); message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "PAUSED": + case 2: + message.state = 2; + break; + } return message; }; @@ -16899,6 +17035,7 @@ object.updateTime = null; object.lastExecuteTime = null; object.rollout = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -16928,6 +17065,8 @@ object.lastExecuteTime = $root.google.protobuf.Timestamp.toObject(message.lastExecuteTime, options); if (message.rollout != null && message.hasOwnProperty("rollout")) object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchDeployment.State[message.state] : message.state; return object; }; @@ -16942,6 +17081,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * State enum. + * @name google.cloud.osconfig.v1.PatchDeployment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} PAUSED=2 PAUSED value + */ + PatchDeployment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "PAUSED"] = 2; + return values; + })(); + return PatchDeployment; })(); @@ -18086,6 +18241,7 @@ * @interface IWeekDayOfMonth * @property {number|null} [weekOrdinal] WeekDayOfMonth weekOrdinal * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek + * @property {number|null} [dayOffset] WeekDayOfMonth dayOffset */ /** @@ -18119,6 +18275,14 @@ */ WeekDayOfMonth.prototype.dayOfWeek = 0; + /** + * WeekDayOfMonth dayOffset. + * @member {number} dayOffset + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.dayOffset = 0; + /** * Creates a new WeekDayOfMonth instance using the specified properties. * @function create @@ -18147,6 +18311,8 @@ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOrdinal); if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + if (message.dayOffset != null && Object.hasOwnProperty.call(message, "dayOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dayOffset); return writer; }; @@ -18187,6 +18353,9 @@ case 2: message.dayOfWeek = reader.int32(); break; + case 3: + message.dayOffset = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -18239,6 +18408,9 @@ case 7: break; } + if (message.dayOffset != null && message.hasOwnProperty("dayOffset")) + if (!$util.isInteger(message.dayOffset)) + return "dayOffset: integer expected"; return null; }; @@ -18290,6 +18462,8 @@ message.dayOfWeek = 7; break; } + if (object.dayOffset != null) + message.dayOffset = object.dayOffset | 0; return message; }; @@ -18309,11 +18483,14 @@ if (options.defaults) { object.weekOrdinal = 0; object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + object.dayOffset = 0; } if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) object.weekOrdinal = message.weekOrdinal; if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + if (message.dayOffset != null && message.hasOwnProperty("dayOffset")) + object.dayOffset = message.dayOffset; return object; }; @@ -19405,6 +19582,600 @@ return DeletePatchDeploymentRequest; })(); + v1.UpdatePatchDeploymentRequest = (function() { + + /** + * Properties of an UpdatePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IUpdatePatchDeploymentRequest + * @property {google.cloud.osconfig.v1.IPatchDeployment|null} [patchDeployment] UpdatePatchDeploymentRequest patchDeployment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePatchDeploymentRequest updateMask + */ + + /** + * Constructs a new UpdatePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents an UpdatePatchDeploymentRequest. + * @implements IUpdatePatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest=} [properties] Properties to set + */ + function UpdatePatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdatePatchDeploymentRequest patchDeployment. + * @member {google.cloud.osconfig.v1.IPatchDeployment|null|undefined} patchDeployment + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @instance + */ + UpdatePatchDeploymentRequest.prototype.patchDeployment = null; + + /** + * UpdatePatchDeploymentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @instance + */ + UpdatePatchDeploymentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdatePatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.UpdatePatchDeploymentRequest} UpdatePatchDeploymentRequest instance + */ + UpdatePatchDeploymentRequest.create = function create(properties) { + return new UpdatePatchDeploymentRequest(properties); + }; + + /** + * Encodes the specified UpdatePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.UpdatePatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest} message UpdatePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePatchDeploymentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchDeployment != null && Object.hasOwnProperty.call(message, "patchDeployment")) + $root.google.cloud.osconfig.v1.PatchDeployment.encode(message.patchDeployment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdatePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.UpdatePatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest} message UpdatePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.UpdatePatchDeploymentRequest} UpdatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdatePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.UpdatePatchDeploymentRequest} UpdatePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePatchDeploymentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) { + var error = $root.google.cloud.osconfig.v1.PatchDeployment.verify(message.patchDeployment); + if (error) + return "patchDeployment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdatePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.UpdatePatchDeploymentRequest} UpdatePatchDeploymentRequest + */ + UpdatePatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest(); + if (object.patchDeployment != null) { + if (typeof object.patchDeployment !== "object") + throw TypeError(".google.cloud.osconfig.v1.UpdatePatchDeploymentRequest.patchDeployment: object expected"); + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.fromObject(object.patchDeployment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.osconfig.v1.UpdatePatchDeploymentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.UpdatePatchDeploymentRequest} message UpdatePatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePatchDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.patchDeployment = null; + object.updateMask = null; + } + if (message.patchDeployment != null && message.hasOwnProperty("patchDeployment")) + object.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.toObject(message.patchDeployment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdatePatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdatePatchDeploymentRequest; + })(); + + v1.PausePatchDeploymentRequest = (function() { + + /** + * Properties of a PausePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IPausePatchDeploymentRequest + * @property {string|null} [name] PausePatchDeploymentRequest name + */ + + /** + * Constructs a new PausePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a PausePatchDeploymentRequest. + * @implements IPausePatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IPausePatchDeploymentRequest=} [properties] Properties to set + */ + function PausePatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PausePatchDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @instance + */ + PausePatchDeploymentRequest.prototype.name = ""; + + /** + * Creates a new PausePatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IPausePatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.PausePatchDeploymentRequest} PausePatchDeploymentRequest instance + */ + PausePatchDeploymentRequest.create = function create(properties) { + return new PausePatchDeploymentRequest(properties); + }; + + /** + * Encodes the specified PausePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.PausePatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IPausePatchDeploymentRequest} message PausePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PausePatchDeploymentRequest.encode = function encode(message, writer) { + 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 PausePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.PausePatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IPausePatchDeploymentRequest} message PausePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PausePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PausePatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.PausePatchDeploymentRequest} PausePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PausePatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.PausePatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PausePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.PausePatchDeploymentRequest} PausePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PausePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PausePatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PausePatchDeploymentRequest.verify = function verify(message) { + if (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 PausePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.PausePatchDeploymentRequest} PausePatchDeploymentRequest + */ + PausePatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.PausePatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.PausePatchDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a PausePatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.PausePatchDeploymentRequest} message PausePatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PausePatchDeploymentRequest.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 PausePatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + PausePatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PausePatchDeploymentRequest; + })(); + + v1.ResumePatchDeploymentRequest = (function() { + + /** + * Properties of a ResumePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @interface IResumePatchDeploymentRequest + * @property {string|null} [name] ResumePatchDeploymentRequest name + */ + + /** + * Constructs a new ResumePatchDeploymentRequest. + * @memberof google.cloud.osconfig.v1 + * @classdesc Represents a ResumePatchDeploymentRequest. + * @implements IResumePatchDeploymentRequest + * @constructor + * @param {google.cloud.osconfig.v1.IResumePatchDeploymentRequest=} [properties] Properties to set + */ + function ResumePatchDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResumePatchDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @instance + */ + ResumePatchDeploymentRequest.prototype.name = ""; + + /** + * Creates a new ResumePatchDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IResumePatchDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1.ResumePatchDeploymentRequest} ResumePatchDeploymentRequest instance + */ + ResumePatchDeploymentRequest.create = function create(properties) { + return new ResumePatchDeploymentRequest(properties); + }; + + /** + * Encodes the specified ResumePatchDeploymentRequest message. Does not implicitly {@link google.cloud.osconfig.v1.ResumePatchDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IResumePatchDeploymentRequest} message ResumePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumePatchDeploymentRequest.encode = function encode(message, writer) { + 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 ResumePatchDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1.ResumePatchDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.IResumePatchDeploymentRequest} message ResumePatchDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumePatchDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResumePatchDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1.ResumePatchDeploymentRequest} ResumePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumePatchDeploymentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1.ResumePatchDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResumePatchDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1.ResumePatchDeploymentRequest} ResumePatchDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumePatchDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResumePatchDeploymentRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResumePatchDeploymentRequest.verify = function verify(message) { + if (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 ResumePatchDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1.ResumePatchDeploymentRequest} ResumePatchDeploymentRequest + */ + ResumePatchDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1.ResumePatchDeploymentRequest) + return object; + var message = new $root.google.cloud.osconfig.v1.ResumePatchDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a ResumePatchDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @static + * @param {google.cloud.osconfig.v1.ResumePatchDeploymentRequest} message ResumePatchDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResumePatchDeploymentRequest.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 ResumePatchDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + ResumePatchDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResumePatchDeploymentRequest; + })(); + v1.ExecutePatchJobRequest = (function() { /** @@ -21868,6 +22639,32 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * State enum. + * @name google.cloud.osconfig.v1.PatchJob.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTED=1 STARTED value + * @property {number} INSTANCE_LOOKUP=2 INSTANCE_LOOKUP value + * @property {number} PATCHING=3 PATCHING value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} COMPLETED_WITH_ERRORS=5 COMPLETED_WITH_ERRORS value + * @property {number} CANCELED=6 CANCELED value + * @property {number} TIMED_OUT=7 TIMED_OUT value + */ + PatchJob.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STARTED"] = 1; + values[valuesById[2] = "INSTANCE_LOOKUP"] = 2; + values[valuesById[3] = "PATCHING"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "COMPLETED_WITH_ERRORS"] = 5; + values[valuesById[6] = "CANCELED"] = 6; + values[valuesById[7] = "TIMED_OUT"] = 7; + return values; + })(); + PatchJob.InstanceDetailsSummary = (function() { /** @@ -22574,32 +23371,6 @@ return InstanceDetailsSummary; })(); - /** - * State enum. - * @name google.cloud.osconfig.v1.PatchJob.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} STARTED=1 STARTED value - * @property {number} INSTANCE_LOOKUP=2 INSTANCE_LOOKUP value - * @property {number} PATCHING=3 PATCHING value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} COMPLETED_WITH_ERRORS=5 COMPLETED_WITH_ERRORS value - * @property {number} CANCELED=6 CANCELED value - * @property {number} TIMED_OUT=7 TIMED_OUT value - */ - PatchJob.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STARTED"] = 1; - values[valuesById[2] = "INSTANCE_LOOKUP"] = 2; - values[valuesById[3] = "PATCHING"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "COMPLETED_WITH_ERRORS"] = 5; - values[valuesById[6] = "CANCELED"] = 6; - values[valuesById[7] = "TIMED_OUT"] = 7; - return values; - })(); - return PatchJob; })(); @@ -22617,6 +23388,7 @@ * @property {google.cloud.osconfig.v1.IWindowsUpdateSettings|null} [windowsUpdate] PatchConfig windowsUpdate * @property {google.cloud.osconfig.v1.IExecStep|null} [preStep] PatchConfig preStep * @property {google.cloud.osconfig.v1.IExecStep|null} [postStep] PatchConfig postStep + * @property {boolean|null} [migInstancesAllowed] PatchConfig migInstancesAllowed */ /** @@ -22698,6 +23470,14 @@ */ PatchConfig.prototype.postStep = null; + /** + * PatchConfig migInstancesAllowed. + * @member {boolean} migInstancesAllowed + * @memberof google.cloud.osconfig.v1.PatchConfig + * @instance + */ + PatchConfig.prototype.migInstancesAllowed = false; + /** * Creates a new PatchConfig instance using the specified properties. * @function create @@ -22738,6 +23518,8 @@ $root.google.cloud.osconfig.v1.ExecStep.encode(message.preStep, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.postStep != null && Object.hasOwnProperty.call(message, "postStep")) $root.google.cloud.osconfig.v1.ExecStep.encode(message.postStep, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.migInstancesAllowed != null && Object.hasOwnProperty.call(message, "migInstancesAllowed")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.migInstancesAllowed); return writer; }; @@ -22796,6 +23578,9 @@ case 9: message.postStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); break; + case 10: + message.migInstancesAllowed = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -22876,6 +23661,9 @@ if (error) return "postStep." + error; } + if (message.migInstancesAllowed != null && message.hasOwnProperty("migInstancesAllowed")) + if (typeof message.migInstancesAllowed !== "boolean") + return "migInstancesAllowed: boolean expected"; return null; }; @@ -22944,6 +23732,8 @@ throw TypeError(".google.cloud.osconfig.v1.PatchConfig.postStep: object expected"); message.postStep = $root.google.cloud.osconfig.v1.ExecStep.fromObject(object.postStep); } + if (object.migInstancesAllowed != null) + message.migInstancesAllowed = Boolean(object.migInstancesAllowed); return message; }; @@ -22969,6 +23759,7 @@ object.windowsUpdate = null; object.preStep = null; object.postStep = null; + object.migInstancesAllowed = false; } if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) object.rebootConfig = options.enums === String ? $root.google.cloud.osconfig.v1.PatchConfig.RebootConfig[message.rebootConfig] : message.rebootConfig; @@ -22986,6 +23777,8 @@ object.preStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.preStep, options); if (message.postStep != null && message.hasOwnProperty("postStep")) object.postStep = $root.google.cloud.osconfig.v1.ExecStep.toObject(message.postStep, options); + if (message.migInstancesAllowed != null && message.hasOwnProperty("migInstancesAllowed")) + object.migInstancesAllowed = message.migInstancesAllowed; return object; }; @@ -56859,8 +57652,8 @@ * @property {boolean|null} [deprecated] MethodOptions deprecated * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ @@ -56906,20 +57699,20 @@ MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature * @memberof google.protobuf.MethodOptions * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http * @memberof google.protobuf.MethodOptions * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + MethodOptions.prototype[".google.api.http"] = null; /** * MethodOptions .google.longrunning.operationInfo. @@ -57012,14 +57805,14 @@ 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 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; case 1049: message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); break; @@ -57079,11 +57872,6 @@ 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"; @@ -57091,6 +57879,11 @@ if (!$util.isString(message[".google.api.methodSignature"][i])) return ".google.api.methodSignature: string[] expected"; } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); if (error) @@ -57137,11 +57930,6 @@ 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"); @@ -57149,6 +57937,11 @@ for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } + if (object[".google.api.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.longrunning.operationInfo"] != null) { if (typeof object[".google.longrunning.operationInfo"] !== "object") throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index df46c640aa7..15e32a1edf0 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -433,6 +433,13 @@ } }, "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "VALIDATION": 1, + "ENFORCEMENT": 2 + } + }, "InventoryFilter": { "fields": { "osShortName": { @@ -605,6 +612,13 @@ } }, "nested": { + "DesiredState": { + "values": { + "DESIRED_STATE_UNSPECIFIED": 0, + "INSTALLED": 1, + "REMOVED": 2 + } + }, "Deb": { "fields": { "source": { @@ -694,13 +708,6 @@ "id": 2 } } - }, - "DesiredState": { - "values": { - "DESIRED_STATE_UNSPECIFIED": 0, - "INSTALLED": 1, - "REMOVED": 2 - } } } }, @@ -983,13 +990,6 @@ } } } - }, - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "VALIDATION": 1, - "ENFORCEMENT": 2 - } } } }, @@ -1099,6 +1099,13 @@ } }, "nested": { + "ComplianceState": { + "values": { + "UNKNOWN": 0, + "COMPLIANT": 1, + "NON_COMPLIANT": 2 + } + }, "OSPolicyResourceCompliance": { "oneofs": { "output": { @@ -1154,6 +1161,13 @@ } } }, + "ComplianceState": { + "values": { + "UNKNOWN": 0, + "COMPLIANT": 1, + "NON_COMPLIANT": 2 + } + }, "ExecResourceOutput": { "fields": { "enforcementOutput": { @@ -1161,22 +1175,8 @@ "id": 2 } } - }, - "ComplianceState": { - "values": { - "UNKNOWN": 0, - "COMPLIANT": 1, - "NON_COMPLIANT": 2 - } } } - }, - "ComplianceState": { - "values": { - "UNKNOWN": 0, - "COMPLIANT": 1, - "NON_COMPLIANT": 2 - } } } } @@ -1716,6 +1716,66 @@ "(google.api.method_signature)": "name" } ] + }, + "UpdatePatchDeployment": { + "requestType": "UpdatePatchDeploymentRequest", + "responseType": "PatchDeployment", + "options": { + "(google.api.http).patch": "/v1/{patch_deployment.name=projects/*/patchDeployments/*}", + "(google.api.http).body": "patch_deployment", + "(google.api.method_signature)": "patch_deployment,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{patch_deployment.name=projects/*/patchDeployments/*}", + "body": "patch_deployment" + } + }, + { + "(google.api.method_signature)": "patch_deployment,update_mask" + } + ] + }, + "PausePatchDeployment": { + "requestType": "PausePatchDeploymentRequest", + "responseType": "PatchDeployment", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/patchDeployments/*}:pause", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/patchDeployments/*}:pause", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ResumePatchDeployment": { + "requestType": "ResumePatchDeploymentRequest", + "responseType": "PatchDeployment", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/patchDeployments/*}:resume", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/patchDeployments/*}:resume", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -1806,6 +1866,22 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "state": { + "type": "State", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "PAUSED": 2 + } } } }, @@ -1957,6 +2033,13 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "dayOffset": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -2049,6 +2132,48 @@ } } }, + "UpdatePatchDeploymentRequest": { + "fields": { + "patchDeployment": { + "type": "PatchDeployment", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PausePatchDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" + } + } + } + }, + "ResumePatchDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/PatchDeployment" + } + } + } + }, "ExecutePatchJobRequest": { "fields": { "parent": { @@ -2277,6 +2402,18 @@ } }, "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STARTED": 1, + "INSTANCE_LOOKUP": 2, + "PATCHING": 3, + "SUCCEEDED": 4, + "COMPLETED_WITH_ERRORS": 5, + "CANCELED": 6, + "TIMED_OUT": 7 + } + }, "InstanceDetailsSummary": { "fields": { "pendingInstanceCount": { @@ -2340,18 +2477,6 @@ "id": 15 } } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "STARTED": 1, - "INSTANCE_LOOKUP": 2, - "PATCHING": 3, - "SUCCEEDED": 4, - "COMPLETED_WITH_ERRORS": 5, - "CANCELED": 6, - "TIMED_OUT": 7 - } } } }, @@ -2388,6 +2513,10 @@ "postStep": { "type": "ExecStep", "id": 9 + }, + "migInstancesAllowed": { + "type": "bool", + "id": 10 } }, "nested": { @@ -5289,7 +5418,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ClientProto", + "java_outer_classname": "HttpProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -5390,6 +5519,22 @@ } } }, + "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" + }, "http": { "type": "HttpRule", "id": 72295728, @@ -5476,22 +5621,6 @@ "id": 2 } } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" } } }, diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js new file mode 100644 index 00000000000..7a785882aa1 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigService_PausePatchDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function callPausePatchDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.pausePatchDeployment(request); + console.log(response); + } + + callPausePatchDeployment(); + // [END osconfig_v1_generated_OsConfigService_PausePatchDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js new file mode 100644 index 00000000000..907bb6d7e61 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START osconfig_v1_generated_OsConfigService_ResumePatchDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function callResumePatchDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.resumePatchDeployment(request); + console.log(response); + } + + callResumePatchDeployment(); + // [END osconfig_v1_generated_OsConfigService_ResumePatchDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js new file mode 100644 index 00000000000..aefb2d2e1eb --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(patchDeployment) { + // [START osconfig_v1_generated_OsConfigService_UpdatePatchDeployment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The patch deployment to Update. + */ + // const patchDeployment = {} + /** + * Optional. Field mask that controls which fields of the patch deployment + * should be updated. + */ + // const updateMask = {} + + // Imports the Osconfig library + const {OsConfigServiceClient} = require('@google-cloud/os-config').v1; + + // Instantiates a client + const osconfigClient = new OsConfigServiceClient(); + + async function callUpdatePatchDeployment() { + // Construct request + const request = { + patchDeployment, + }; + + // Run request + const response = await osconfigClient.updatePatchDeployment(request); + console.log(response); + } + + callUpdatePatchDeployment(); + // [END osconfig_v1_generated_OsConfigService_UpdatePatchDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/src/v1/gapic_metadata.json b/packages/google-cloud-osconfig/src/v1/gapic_metadata.json index e177b5199ff..f65f75e1fb0 100644 --- a/packages/google-cloud-osconfig/src/v1/gapic_metadata.json +++ b/packages/google-cloud-osconfig/src/v1/gapic_metadata.json @@ -40,6 +40,21 @@ "deletePatchDeployment" ] }, + "UpdatePatchDeployment": { + "methods": [ + "updatePatchDeployment" + ] + }, + "PausePatchDeployment": { + "methods": [ + "pausePatchDeployment" + ] + }, + "ResumePatchDeployment": { + "methods": [ + "resumePatchDeployment" + ] + }, "ListPatchJobs": { "methods": [ "listPatchJobs", @@ -96,6 +111,21 @@ "deletePatchDeployment" ] }, + "UpdatePatchDeployment": { + "methods": [ + "updatePatchDeployment" + ] + }, + "PausePatchDeployment": { + "methods": [ + "pausePatchDeployment" + ] + }, + "ResumePatchDeployment": { + "methods": [ + "resumePatchDeployment" + ] + }, "ListPatchJobs": { "methods": [ "listPatchJobs", diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 5dfbb41659d..1f2360669a7 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -267,6 +267,9 @@ export class OsConfigServiceClient { 'getPatchDeployment', 'listPatchDeployments', 'deletePatchDeployment', + 'updatePatchDeployment', + 'pausePatchDeployment', + 'resumePatchDeployment', ]; for (const methodName of osConfigServiceStubMethods) { const callPromise = this.osConfigServiceStub.then( @@ -917,6 +920,286 @@ export class OsConfigServiceClient { this.initialize(); return this.innerApiCalls.deletePatchDeployment(request, options, callback); } + /** + * Update an OS Config patch deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.osconfig.v1.PatchDeployment} request.patchDeployment + * Required. The patch deployment to Update. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask that controls which fields of the patch deployment + * should be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_service.update_patch_deployment.js + * region_tag:osconfig_v1_generated_OsConfigService_UpdatePatchDeployment_async + */ + updatePatchDeployment( + request?: protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest | undefined, + {} | undefined + ] + >; + updatePatchDeployment( + request: protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updatePatchDeployment( + request: protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updatePatchDeployment( + request?: protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'patch_deployment.name': request.patchDeployment!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updatePatchDeployment(request, options, callback); + } + /** + * Change state of patch deployment to "PAUSED". + * Patch deployment in paused state doesn't generate patch jobs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_service.pause_patch_deployment.js + * region_tag:osconfig_v1_generated_OsConfigService_PausePatchDeployment_async + */ + pausePatchDeployment( + request?: protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest | undefined, + {} | undefined + ] + >; + pausePatchDeployment( + request: protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pausePatchDeployment( + request: protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pausePatchDeployment( + request?: protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.pausePatchDeployment(request, options, callback); + } + /** + * Change state of patch deployment back to "ACTIVE". + * Patch deployment in active state continues to generate patch jobs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the patch deployment in the form + * `projects/* /patchDeployments/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PatchDeployment]{@link google.cloud.osconfig.v1.PatchDeployment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/os_config_service.resume_patch_deployment.js + * region_tag:osconfig_v1_generated_OsConfigService_ResumePatchDeployment_async + */ + resumePatchDeployment( + request?: protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest | undefined, + {} | undefined + ] + >; + resumePatchDeployment( + request: protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resumePatchDeployment( + request: protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest, + callback: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resumePatchDeployment( + request?: protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1.IPatchDeployment, + | protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1.IPatchDeployment, + protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.resumePatchDeployment(request, options, callback); + } /** * Get a list of patch jobs. diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client_config.json b/packages/google-cloud-osconfig/src/v1/os_config_service_client_config.json index 69ef45789ef..49ac0b9b644 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client_config.json +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client_config.json @@ -76,6 +76,21 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdatePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "PausePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ResumePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" } } } diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index 6805a18ca7a..e37375d9f91 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -870,6 +870,351 @@ describe('v1.OsConfigServiceClient', () => { }); }); + describe('updatePatchDeployment', () => { + it('invokes updatePatchDeployment without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() + ); + request.patchDeployment = {}; + request.patchDeployment.name = ''; + const expectedHeaderRequestParams = 'patch_deployment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.updatePatchDeployment = + stubSimpleCall(expectedResponse); + const [response] = await client.updatePatchDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updatePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updatePatchDeployment without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() + ); + request.patchDeployment = {}; + request.patchDeployment.name = ''; + const expectedHeaderRequestParams = 'patch_deployment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.updatePatchDeployment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updatePatchDeployment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updatePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updatePatchDeployment with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() + ); + request.patchDeployment = {}; + request.patchDeployment.name = ''; + const expectedHeaderRequestParams = 'patch_deployment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updatePatchDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updatePatchDeployment(request), + expectedError + ); + assert( + (client.innerApiCalls.updatePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('pausePatchDeployment', () => { + it('invokes pausePatchDeployment without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.pausePatchDeployment = + stubSimpleCall(expectedResponse); + const [response] = await client.pausePatchDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pausePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pausePatchDeployment without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.pausePatchDeployment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pausePatchDeployment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pausePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes pausePatchDeployment with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.pausePatchDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pausePatchDeployment(request), expectedError); + assert( + (client.innerApiCalls.pausePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('resumePatchDeployment', () => { + it('invokes resumePatchDeployment without error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.resumePatchDeployment = + stubSimpleCall(expectedResponse); + const [response] = await client.resumePatchDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.resumePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes resumePatchDeployment without error using callback', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PatchDeployment() + ); + client.innerApiCalls.resumePatchDeployment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.resumePatchDeployment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1.IPatchDeployment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.resumePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes resumePatchDeployment with error', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.resumePatchDeployment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.resumePatchDeployment(request), + expectedError + ); + assert( + (client.innerApiCalls.resumePatchDeployment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listPatchJobs', () => { it('invokes listPatchJobs without error', async () => { const client = new osconfigserviceModule.v1.OsConfigServiceClient({ From c249c915d894909c5f5e2aef5f0c7bf05f9d4b60 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 11:27:35 -0800 Subject: [PATCH 123/154] chore(main): release 1.12.0 (#184) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index eeacc154025..e8f46ff9aff 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.12.0](https://github.com/googleapis/nodejs-os-config/compare/v1.11.0...v1.12.0) (2022-02-08) + + +### Features + +* Update osconfig v1 protos ([#183](https://github.com/googleapis/nodejs-os-config/issues/183)) ([8ce2c5a](https://github.com/googleapis/nodejs-os-config/commit/8ce2c5ab9cfe2d4d0e12a574135b737279b86b22)) + ## [1.11.0](https://www.github.com/googleapis/nodejs-os-config/compare/v1.10.0...v1.11.0) (2021-11-12) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 7cba6c6a0c0..f904857019d 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.11.0", + "version": "1.12.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index c0275de26e9..285a439348f 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.11.0" + "@google-cloud/os-config": "^1.12.0" }, "devDependencies": { "c8": "^7.1.0", From 62af3e7e9784cde8019cba410f05f2581a95bb8f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 11:35:37 -0800 Subject: [PATCH 124/154] fix: update third_party protos to the most actual version: (#186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: update third_party protos to the most actual version: - Add item that is affected by vulnerability - Add GetOsPolicyAssignmentReport and analogous List rpc method - Add Inventory to InstanceFilter - Add existing os_policy_assignment_reports.proto fixing the build - Mark methods as deprecated PiperOrigin-RevId: 427981818 Source-Link: https://github.com/googleapis/googleapis/commit/0b2c90694f3423240d601ce1d5c520e0d00db68b Source-Link: https://github.com/googleapis/googleapis-gen/commit/171bb5b8f45542786302d8c5c8da35db0c9767f8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTcxYmI1YjhmNDU1NDI3ODYzMDJkOGM1YzhkYTM1ZGIwYzk3NjdmOCJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: Fix description of an interpreter field, validate if the field is not unspecified PiperOrigin-RevId: 427987153 Source-Link: https://github.com/googleapis/googleapis/commit/a1b62c1cec180b1501f2bbdc096f36feaa602761 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bda75679063f2194c06af55a01c94104eafc2998 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmRhNzU2NzkwNjNmMjE5NGMwNmFmNTVhMDFjOTQxMDRlYWZjMjk5OCJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google/cloud/osconfig/v1/os_policy.proto | 2 +- .../osconfig/v1alpha/config_common.proto | 14 + .../instance_os_policies_compliance.proto | 10 + .../cloud/osconfig/v1alpha/inventory.proto | 27 +- .../cloud/osconfig/v1alpha/os_policy.proto | 113 +- .../os_policy_assignment_reports.proto | 297 ++ .../v1alpha/os_policy_assignments.proto | 42 +- .../osconfig/v1alpha/osconfig_common.proto | 2 + .../v1alpha/osconfig_zonal_service.proto | 21 + .../osconfig/v1alpha/vulnerability.proto | 51 +- .../google-cloud-osconfig/protos/protos.d.ts | 1481 +++++- .../google-cloud-osconfig/protos/protos.js | 4297 ++++++++++++++--- .../google-cloud-osconfig/protos/protos.json | 383 +- ...ervice.get_o_s_policy_assignment_report.js | 59 + ...s_config_zonal_service.list_inventories.js | 6 +- ...vice.list_o_s_policy_assignment_reports.js | 87 + ...onal_service.list_vulnerability_reports.js | 4 +- .../src/v1alpha/gapic_metadata.json | 24 + .../v1alpha/os_config_zonal_service_client.ts | 526 +- ...os_config_zonal_service_client_config.json | 10 + .../os_config_zonal_service_proto_list.json | 1 + .../gapic_os_config_zonal_service_v1alpha.ts | 578 +++ 22 files changed, 7159 insertions(+), 876 deletions(-) create mode 100644 packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto index 7b113f91b3a..de0db191797 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1/os_policy.proto @@ -354,7 +354,7 @@ message OSPolicy { message Exec { // The interpreter to use. enum Interpreter { - // Defaults to NONE. + // Invalid value, the request will return validation error. INTERPRETER_UNSPECIFIED = 0; // If an interpreter is not specified, the diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto index fa60feafd4e..4d85bd12c58 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; + option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; option java_multiple_files = true; @@ -27,8 +29,12 @@ option ruby_package = "Google::Cloud::OsConfig::V1alpha"; // Step performed by the OS Config agent for configuring an `OSPolicyResource` // to its desired state. message OSPolicyResourceConfigStep { + option deprecated = true; + // Supported configuration step types enum Type { + option deprecated = true; + // Default value. This value is unused. TYPE_UNSPECIFIED = 0; @@ -53,6 +59,8 @@ message OSPolicyResourceConfigStep { // Supported outcomes for a configuration step. enum Outcome { + option deprecated = true; + // Default value. This value is unused. OUTCOME_UNSPECIFIED = 0; @@ -76,8 +84,12 @@ message OSPolicyResourceConfigStep { // Compliance data for an OS policy resource. message OSPolicyResourceCompliance { + option deprecated = true; + // ExecResource specific output. message ExecResourceOutput { + option deprecated = true; + // Output from Enforcement phase output file (if run). // Output size is limited to 100K bytes. bytes enforcement_output = 2; @@ -102,6 +114,8 @@ message OSPolicyResourceCompliance { // Supported OSPolicy compliance states. enum OSPolicyComplianceState { + option deprecated = true; + // Default value. This value is unused. OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto index 65c3f682f95..e29f1f5ccef 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1alpha/config_common.proto"; @@ -42,6 +43,7 @@ option ruby_package = "Google::Cloud::OsConfig::V1alpha"; // For more information, see [View // compliance](https://cloud.google.com/compute/docs/os-configuration-management/view-compliance). message InstanceOSPoliciesCompliance { + option deprecated = true; option (google.api.resource) = { type: "osconfig.googleapis.com/InstanceOSPoliciesCompliance" pattern: "projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}" @@ -49,6 +51,8 @@ message InstanceOSPoliciesCompliance { // Compliance data for an OS policy message OSPolicyCompliance { + option deprecated = true; + // The OS policy id string os_policy_id = 1; @@ -115,6 +119,8 @@ message InstanceOSPoliciesCompliance { // A request message for getting OS policies compliance data for the given // Compute Engine VM instance. message GetInstanceOSPoliciesComplianceRequest { + option deprecated = true; + // Required. API resource name for instance OS policies compliance resource. // // Format: @@ -135,6 +141,8 @@ message GetInstanceOSPoliciesComplianceRequest { // A request message for listing OS policies compliance data for all Compute // Engine VMs in the given location. message ListInstanceOSPoliciesCompliancesRequest { + option deprecated = true; + // Required. The parent resource name. // // Format: `projects/{project}/locations/{location}` @@ -164,6 +172,8 @@ message ListInstanceOSPoliciesCompliancesRequest { // A response message for listing OS policies compliance data for all Compute // Engine VMs in the given location. message ListInstanceOSPoliciesCompliancesResponse { + option deprecated = true; + // List of instance OS policies compliance objects. repeated InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto index f9ad221e701..6aed6a0ca88 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; @@ -264,12 +265,9 @@ message Inventory { google.protobuf.Timestamp install_time = 5; } - // Contains information about a Windows application as retrieved from the - // Windows Registry. For more information about these fields, see - // - // [Windows Installer Properties for the Uninstall - // Registry](https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key){: - // class="external" } + // Contains information about a Windows application that is retrieved from the + // Windows Registry. For more information about these fields, see: + // https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key message WindowsApplication { // The name of the application or product. string display_name = 1; @@ -298,15 +296,14 @@ message Inventory { // Output only. Base level operating system information for the VM. OsInfo os_info = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Inventory items related to the VM keyed by an opaque unique - // identifier for each inventory item. The identifier is unique to each - // distinct and addressable inventory item and will change, when there is a - // new package version. + // Output only. Inventory items related to the VM keyed by an opaque unique identifier for + // each inventory item. The identifier is unique to each distinct and + // addressable inventory item and will change, when there is a new package + // version. map items = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp of the last reported inventory for the VM. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request message for getting inventory data for the specified VM. @@ -336,11 +333,9 @@ message GetInventoryRequest { message ListInventoriesRequest { // Required. The parent resource name. // - // Format: `projects/{project}/locations/{location}/instances/{instance}` + // Format: `projects/{project}/locations/{location}/instances/-` // - // For `{project}`, either `project-number` or `project-id` can be - // provided. For `{instance}`, only hyphen or dash character is supported to - // list inventories across VMs. + // For `{project}`, either `project-number` or `project-id` can be provided. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto index 5b004145cbe..7d51c76b3c8 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto @@ -16,20 +16,35 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; option java_multiple_files = true; -option java_outer_classname = "OSPolicyProto"; +option java_outer_classname = "OsPolicyProto"; option java_package = "com.google.cloud.osconfig.v1alpha"; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; // An OS policy defines the desired state configuration for a VM. message OSPolicy { - // The `OSFilter` is used to specify the OS filtering criteria for the - // resource group. + // Policy mode + enum Mode { + // Invalid mode + MODE_UNSPECIFIED = 0; + + // This mode checks if the configuration resources in the policy are in + // their desired state. No actions are performed if they are not in the + // desired state. This mode is used for reporting purposes. + VALIDATION = 1; + + // This mode checks if the configuration resources in the policy are in + // their desired state, and if not, enforces the desired state. + ENFORCEMENT = 2; + } + + // Filtering criteria to select VMs based on OS details. message OSFilter { // This should match OS short name emitted by the OS inventory agent. // An empty value matches any OS. @@ -43,6 +58,21 @@ message OSPolicy { string os_version = 2; } + // Filtering criteria to select VMs based on inventory details. + message InventoryFilter { + // Required. The OS short name + string os_short_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The OS version + // + // Prefix matches are supported if asterisk(*) is provided as the + // last character. For example, to match all versions with a major + // version of `7`, specify the following value for this field `7.*` + // + // An empty string matches all OS versions. + string os_version = 2; + } + // An OS policy resource is used to define the desired state configuration // and provides a specific functionality like installing/removing packages, // executing a script etc. @@ -96,6 +126,19 @@ message OSPolicy { // A resource that manages a system package. message PackageResource { + // The desired state that the OS Config agent maintains on the VM. + enum DesiredState { + // Unspecified is invalid. + DESIRED_STATE_UNSPECIFIED = 0; + + // Ensure that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is not installed and + // uninstalls it if detected. + REMOVED = 2; + } + // A deb package file. dpkg packages only support INSTALLED state. message Deb { // Required. A deb package. @@ -164,19 +207,6 @@ message OSPolicy { repeated string properties = 2; } - // The desired state that the OS Config agent maintains on the VM. - enum DesiredState { - // Unspecified is invalid. - DESIRED_STATE_UNSPECIFIED = 0; - - // Ensure that the package is installed. - INSTALLED = 1; - - // The agent ensures that the package is not installed and - // uninstalls it if detected. - REMOVED = 2; - } - // Required. The desired state the agent should maintain for this package. DesiredState desired_state = 1 [(google.api.field_behavior) = REQUIRED]; @@ -339,21 +369,21 @@ message OSPolicy { message Exec { // The interpreter to use. enum Interpreter { - // Defaults to NONE. + // Invalid value, the request will return validation error. INTERPRETER_UNSPECIFIED = 0; - // If no interpreter is specified the - // source will be executed directly, which will likely only - // succeed for executables and scripts with shebang lines. - // [Wikipedia - // shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)). + // If an interpreter is not specified, the + // source is executed directly. This execution, without an + // interpreter, only succeeds for executables and scripts that have shebang lines. NONE = 1; - // Indicates that the script will be run with /bin/sh on Linux and - // cmd.exe on windows. + // Indicates that the script runs with `/bin/sh` on Linux and + // `cmd.exe` on Windows. SHELL = 2; - // Indicates that the script will be run with powershell. + // Indicates that the script runs with PowerShell. POWERSHELL = 3; } @@ -478,29 +508,30 @@ message OSPolicy { // group within the OS policy is selected based on the `OSFilter` specified // within the resource group. message ResourceGroup { + // Deprecated. Use the `inventory_filters` field instead. // Used to specify the OS filter for a resource group - OSFilter os_filter = 1; + OSFilter os_filter = 1 [deprecated = true]; + + // List of inventory filters for the resource group. + // + // The resources in this resource group are applied to the target VM if it + // satisfies at least one of the following inventory filters. + // + // For example, to apply this resource group to VMs running either `RHEL` or + // `CentOS` operating systems, specify 2 items for the list with following + // values: + // inventory_filters[0].os_short_name='rhel' and + // inventory_filters[1].os_short_name='centos' + // + // If the list is empty, this resource group will be applied to the target + // VM unconditionally. + repeated InventoryFilter inventory_filters = 3; // Required. List of resources configured for this resource group. // The resources are executed in the exact order specified here. repeated Resource resources = 2 [(google.api.field_behavior) = REQUIRED]; } - // Policy mode - enum Mode { - // Invalid mode - MODE_UNSPECIFIED = 0; - - // This mode checks if the configuration resources in the policy are in - // their desired state. No actions are performed if they are not in the - // desired state. This mode is used for reporting purposes. - VALIDATION = 1; - - // This mode checks if the configuration resources in the policy are in - // their desired state, and if not, enforces the desired state. - ENFORCEMENT = 2; - } - // Required. The id of the OS policy with the following restrictions: // // * Must contain only lowercase letters, numbers, and hyphens. diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto new file mode 100644 index 00000000000..0fabd0439af --- /dev/null +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto @@ -0,0 +1,297 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "OSPolicyAssignmentReportsProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/InstanceOSPolicyAssignment" + pattern: "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}" +}; + +// Get a report of the OS policy assignment for a VM instance. +message GetOSPolicyAssignmentReportRequest { + // Required. API resource name for OS policy assignment report. + // + // Format: + // `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + // can be provided. + // For `{assignment_id}`, the OSPolicyAssignment id must be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignmentReport" + } + ]; +} + +// List the OS policy assignment reports for VM instances. +message ListOSPolicyAssignmentReportsRequest { + // Required. The parent resource name. + // + // Format: + // `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + // provided. If '-' is provided, the response will include + // OSPolicyAssignmentReports for all instances in the project/location. + // For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + // is provided, the response will include OSPolicyAssignmentReports for all + // OSPolicyAssignments in the project/location. + // Either {instance} or {assignment} must be `-`. + // + // For example: + // `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + // returns all reports for the instance + // `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + // returns all the reports for the given assignment across all instances. + // `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + // returns all the reports for all assignments across all instances. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/InstanceOSPolicyAssignment" + } + ]; + + // The maximum number of results to return. + int32 page_size = 2; + + // If provided, this field specifies the criteria that must be met by the + // `OSPolicyAssignmentReport` API resource that is included in the response. + string filter = 3; + + // A pagination token returned from a previous call to the + // `ListOSPolicyAssignmentReports` method that indicates where this listing + // should continue from. + string page_token = 4; +} + +// A response message for listing OS Policy assignment reports including the +// page of results and page token. +message ListOSPolicyAssignmentReportsResponse { + // List of OS policy assignment reports. + repeated OSPolicyAssignmentReport os_policy_assignment_reports = 1; + + // The pagination token to retrieve the next page of OS policy assignment + // report objects. + string next_page_token = 2; +} + +// A report of the OS policy assignment status for a given instance. +message OSPolicyAssignmentReport { + option (google.api.resource) = { + type: "osconfig.googleapis.com/OSPolicyAssignmentReport" + pattern: "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report" + }; + + // Compliance data for an OS policy + message OSPolicyCompliance { + // Possible compliance states for an os policy. + enum ComplianceState { + // The policy is in an unknown compliance state. + // + // Refer to the field `compliance_state_reason` to learn the exact reason + // for the policy to be in this compliance state. + UNKNOWN = 0; + + // Policy is compliant. + // + // The policy is compliant if all the underlying resources are also + // compliant. + COMPLIANT = 1; + + // Policy is non-compliant. + // + // The policy is non-compliant if one or more underlying resources are + // non-compliant. + NON_COMPLIANT = 2; + } + + // Compliance data for an OS policy resource. + message OSPolicyResourceCompliance { + // Step performed by the OS Config agent for configuring an + // `OSPolicy` resource to its desired state. + message OSPolicyResourceConfigStep { + // Supported configuration step types + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // Checks for resource conflicts such as schema errors. + VALIDATION = 1; + + // Checks the current status of the desired state for a resource. + DESIRED_STATE_CHECK = 2; + + // Enforces the desired state for a resource that is not in desired + // state. + DESIRED_STATE_ENFORCEMENT = 3; + + // Re-checks the status of the desired state. This check is done + // for a resource after the enforcement of all OS policies. + // + // This step is used to determine the final desired state status for + // the resource. It accounts for any resources that might have drifted + // from their desired state due to side effects from executing other + // resources. + DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + } + + // Configuration step type. + Type type = 1; + + // An error message recorded during the execution of this step. + // Only populated if errors were encountered during this step execution. + string error_message = 2; + } + + // Possible compliance states for a resource. + enum ComplianceState { + // The resource is in an unknown compliance state. + // + // To get more details about why the policy is in this state, review + // the output of the `compliance_state_reason` field. + UNKNOWN = 0; + + // Resource is compliant. + COMPLIANT = 1; + + // Resource is non-compliant. + NON_COMPLIANT = 2; + } + + // ExecResource specific output. + message ExecResourceOutput { + // Output from enforcement phase output file (if run). + // Output size is limited to 100K bytes. + bytes enforcement_output = 2; + } + + // The ID of the OS policy resource. + string os_policy_resource_id = 1; + + // Ordered list of configuration completed by the agent for the OS policy + // resource. + repeated OSPolicyResourceConfigStep config_steps = 2; + + // The compliance state of the resource. + ComplianceState compliance_state = 3; + + // A reason for the resource to be in the given compliance state. + // This field is always populated when `compliance_state` is `UNKNOWN`. + // + // The following values are supported when `compliance_state == UNKNOWN` + // + // * `execution-errors`: Errors were encountered by the agent while + // executing the resource and the compliance state couldn't be + // determined. + // * `execution-skipped-by-agent`: Resource execution was skipped by the + // agent because errors were encountered while executing prior resources + // in the OS policy. + // * `os-policy-execution-attempt-failed`: The execution of the OS policy + // containing this resource failed and the compliance state couldn't be + // determined. + string compliance_state_reason = 4; + + // Resource specific output. + oneof output { + // ExecResource specific output. + ExecResourceOutput exec_resource_output = 5; + } + } + + // The OS policy id + string os_policy_id = 1; + + // The compliance state of the OS policy. + ComplianceState compliance_state = 2; + + // The reason for the OS policy to be in an unknown compliance state. + // This field is always populated when `compliance_state` is `UNKNOWN`. + // + // If populated, the field can contain one of the following values: + // + // * `vm-not-running`: The VM was not running. + // * `os-policies-not-supported-by-agent`: The version of the OS Config + // agent running on the VM does not support running OS policies. + // * `no-agent-detected`: The OS Config agent is not detected for the VM. + // * `resource-execution-errors`: The OS Config agent encountered errors + // while executing one or more resources in the policy. See + // `os_policy_resource_compliances` for details. + // * `task-timeout`: The task sent to the agent to apply the policy timed + // out. + // * `unexpected-agent-state`: The OS Config agent did not report the final + // status of the task that attempted to apply the policy. Instead, the agent + // unexpectedly started working on a different task. This mostly happens + // when the agent or VM unexpectedly restarts while applying OS policies. + // * `internal-service-errors`: Internal service errors were encountered + // while attempting to apply the policy. + string compliance_state_reason = 3; + + // Compliance data for each resource within the policy that is applied to + // the VM. + repeated OSPolicyResourceCompliance os_policy_resource_compliances = 4; + } + + // The `OSPolicyAssignmentReport` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` + string name = 1; + + // The Compute Engine VM instance name. + string instance = 2; + + // Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` + // belongs to. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + string os_policy_assignment = 3 [(google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; + + // Compliance data for each `OSPolicy` that is applied to the VM. + repeated OSPolicyCompliance os_policy_compliances = 4; + + // Timestamp for when the report was last generated. + google.protobuf.Timestamp update_time = 5; + + // Unique identifier of the last attempted run to apply the OS policies + // associated with this assignment on the VM. + // + // This ID is logged by the OS Config agent while applying the OS + // policies associated with this assignment on the VM. + // NOTE: If the service is unable to successfully connect to the agent for + // this run, then this id will not be available in the agent logs. + string last_run_id = 6; +} diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto index 4b9943aa438..0cd2f80b962 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1alpha/os_policy.proto"; @@ -27,7 +28,7 @@ import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; option java_multiple_files = true; -option java_outer_classname = "OSPolicyAssignments"; +option java_outer_classname = "OsPolicyAssignmentsProto"; option java_package = "com.google.cloud.osconfig.v1alpha"; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; @@ -65,15 +66,34 @@ message OSPolicyAssignment { map labels = 1; } - // Message to represent the filters to select VMs for an assignment + // Filters to select target VMs for an assignment. + // + // If more than one filter criteria is specified below, a VM will be selected + // if and only if it satisfies all of them. message InstanceFilter { + // VM inventory details. + message Inventory { + // Required. The OS short name + string os_short_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The OS version + // + // Prefix matches are supported if asterisk(*) is provided as the + // last character. For example, to match all versions with a major + // version of `7`, specify the following value for this field `7.*` + // + // An empty string matches all OS versions. + string os_version = 2; + } + // Target all VMs in the project. If true, no other criteria is // permitted. bool all = 1; - // A VM is included if it's OS short name matches with any of the + // Deprecated. Use the `inventories` field instead. + // A VM is selected if it's OS short name matches with any of the // values provided in this list. - repeated string os_short_names = 2; + repeated string os_short_names = 2 [deprecated = true]; // List of label sets used for VM inclusion. // @@ -85,11 +105,13 @@ message OSPolicyAssignment { // // If the list has more than one label set, the VM is excluded if any // of the label sets are applicable for the VM. - // - // This filter is applied last in the filtering chain and therefore a - // VM is guaranteed to be excluded if it satisfies one of the below - // label sets. repeated LabelSet exclusion_labels = 4; + + // List of inventories to select VMs. + // + // A VM is selected if its inventory data matches at least one of the + // following inventories. + repeated Inventory inventories = 5; } // Message to configure the rollout at the zonal level for the OS policy @@ -161,6 +183,10 @@ message OSPolicyAssignment { // Output only. The timestamp that the revision was created. google.protobuf.Timestamp revision_create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + // The etag for this OS policy assignment. + // If this is provided on update, it must match the server's etag. + string etag = 8; + // Output only. OS policy assignment rollout state RolloutState rollout_state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto index 9cd376c5fe8..3d5b6fe4ef7 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; + option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; option java_multiple_files = true; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto index 8d979fd5f21..bb73fbd0331 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto"; import "google/cloud/osconfig/v1alpha/inventory.proto"; +import "google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto"; import "google/cloud/osconfig/v1alpha/os_policy_assignments.proto"; import "google/cloud/osconfig/v1alpha/vulnerability.proto"; import "google/longrunning/operations.proto"; @@ -143,6 +144,7 @@ service OsConfigZonalService { // Get OS policies compliance data for the specified Compute Engine VM // instance. rpc GetInstanceOSPoliciesCompliance(GetInstanceOSPoliciesComplianceRequest) returns (InstanceOSPoliciesCompliance) { + option deprecated = true; option (google.api.http) = { get: "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}" }; @@ -152,12 +154,31 @@ service OsConfigZonalService { // List OS policies compliance data for all Compute Engine VM instances in the // specified zone. rpc ListInstanceOSPoliciesCompliances(ListInstanceOSPoliciesCompliancesRequest) returns (ListInstanceOSPoliciesCompliancesResponse) { + option deprecated = true; option (google.api.http) = { get: "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances" }; option (google.api.method_signature) = "parent"; } + // Get the OS policy asssignment report for the specified Compute Engine VM + // instance. + rpc GetOSPolicyAssignmentReport(GetOSPolicyAssignmentReportRequest) returns (OSPolicyAssignmentReport) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}" + }; + option (google.api.method_signature) = "name"; + } + + // List OS policy asssignment reports for all Compute Engine VM instances in + // the specified zone. + rpc ListOSPolicyAssignmentReports(ListOSPolicyAssignmentReportsRequest) returns (ListOSPolicyAssignmentReportsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports" + }; + option (google.api.method_signature) = "parent"; + } + // Get inventory data for the specified VM instance. If the VM has no // associated inventory, the message `NOT_FOUND` is returned. rpc GetInventory(GetInventoryRequest) returns (Inventory) { diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto index 6b9a5eb1056..668991a2392 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; @@ -48,6 +49,9 @@ message VulnerabilityReport { message Reference { // The url of the reference. string url = 1; + + // The source of the reference e.g. NVD. + string source = 2; } // The CVE of the vulnerability. CVE cannot be @@ -72,6 +76,32 @@ message VulnerabilityReport { repeated Reference references = 6; } + // OS inventory item that is affected by a vulnerability or fixed as a + // result of a vulnerability. + message Item { + // Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + // This field displays the inventory items affected by this vulnerability. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. For some + // operating systems, this field might be empty. + string installed_inventory_item_id = 1; + + // Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. If there is no + // available fix, the field is empty. The `inventory_item` value specifies + // the latest `SoftwarePackage` available to the VM that fixes the + // vulnerability. + string available_inventory_item_id = 2; + + // The recommended [CPE URI](https://cpe.mitre.org/specification/) update + // that contains a fix for this vulnerability. + string fixed_cpe_uri = 3; + + // The upstream OS patch, packages or KB that fixes the vulnerability. + string upstream_fix = 4; + } + // Contains metadata as per the upstream feed of the operating system and // NVD. Details details = 1; @@ -81,7 +111,7 @@ message VulnerabilityReport { // If the vulnerability report was not updated after the VM inventory // update, these values might not display in VM inventory. For some distros, // this field may be empty. - repeated string installed_inventory_item_ids = 2; + repeated string installed_inventory_item_ids = 2 [deprecated = true]; // Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. // If the vulnerability report was not updated after the VM inventory @@ -89,13 +119,16 @@ message VulnerabilityReport { // available fix, the field is empty. The `inventory_item` value specifies // the latest `SoftwarePackage` available to the VM that fixes the // vulnerability. - repeated string available_inventory_item_ids = 3; + repeated string available_inventory_item_ids = 3 [deprecated = true]; // The timestamp for when the vulnerability was first detected. google.protobuf.Timestamp create_time = 4; // The timestamp for when the vulnerability was last modified. google.protobuf.Timestamp update_time = 5; + + // List of items affected by the vulnerability. + repeated Item items = 6; } // Output only. The `vulnerabilityReport` API resource name. @@ -105,13 +138,11 @@ message VulnerabilityReport { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. List of vulnerabilities affecting the VM. - repeated Vulnerability vulnerabilities = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated Vulnerability vulnerabilities = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The timestamp for when the last vulnerability report was - // generated for the VM. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The timestamp for when the last vulnerability report was generated for the + // VM. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request message for getting the vulnerability report for the specified VM. @@ -137,11 +168,9 @@ message GetVulnerabilityReportRequest { message ListVulnerabilityReportsRequest { // Required. The parent resource name. // - // Format: `projects/{project}/locations/{location}/instances/{instance}` + // Format: `projects/{project}/locations/{location}/instances/-` // // For `{project}`, either `project-number` or `project-id` can be provided. - // For `{instance}`, only `-` character is supported to list vulnerability - // reports across VMs. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 3e619432d37..67990d1dafe 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -14605,6 +14605,13 @@ export namespace google { namespace OSPolicy { + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + VALIDATION = 1, + ENFORCEMENT = 2 + } + /** Properties of a OSFilter. */ interface IOSFilter { @@ -14701,6 +14708,102 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of an InventoryFilter. */ + interface IInventoryFilter { + + /** InventoryFilter osShortName */ + osShortName?: (string|null); + + /** InventoryFilter osVersion */ + osVersion?: (string|null); + } + + /** Represents an InventoryFilter. */ + class InventoryFilter implements IInventoryFilter { + + /** + * Constructs a new InventoryFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter); + + /** InventoryFilter osShortName. */ + public osShortName: string; + + /** InventoryFilter osVersion. */ + public osVersion: string; + + /** + * Creates a new InventoryFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InventoryFilter instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter): google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter; + + /** + * Encodes the specified InventoryFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.verify|verify} messages. + * @param message InventoryFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InventoryFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.verify|verify} messages. + * @param message InventoryFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InventoryFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InventoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter; + + /** + * Decodes an InventoryFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InventoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter; + + /** + * Verifies an InventoryFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InventoryFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InventoryFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter; + + /** + * Creates a plain object from an InventoryFilter message. Also converts values to other types if specified. + * @param message InventoryFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InventoryFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Resource. */ interface IResource { @@ -15269,6 +15372,13 @@ export namespace google { namespace PackageResource { + /** DesiredState enum. */ + enum DesiredState { + DESIRED_STATE_UNSPECIFIED = 0, + INSTALLED = 1, + REMOVED = 2 + } + /** Properties of a Deb. */ interface IDeb { @@ -15916,13 +16026,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** DesiredState enum. */ - enum DesiredState { - DESIRED_STATE_UNSPECIFIED = 0, - INSTALLED = 1, - REMOVED = 2 - } } /** Properties of a RepositoryResource. */ @@ -16837,6 +16940,9 @@ export namespace google { /** ResourceGroup osFilter */ osFilter?: (google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null); + /** ResourceGroup inventoryFilters */ + inventoryFilters?: (google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter[]|null); + /** ResourceGroup resources */ resources?: (google.cloud.osconfig.v1alpha.OSPolicy.IResource[]|null); } @@ -16853,6 +16959,9 @@ export namespace google { /** ResourceGroup osFilter. */ public osFilter?: (google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null); + /** ResourceGroup inventoryFilters. */ + public inventoryFilters: google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter[]; + /** ResourceGroup resources. */ public resources: google.cloud.osconfig.v1alpha.OSPolicy.IResource[]; @@ -16926,187 +17035,1046 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - VALIDATION = 1, - ENFORCEMENT = 2 - } } - /** Properties of a OSPolicyAssignment. */ - interface IOSPolicyAssignment { + /** Properties of a GetOSPolicyAssignmentReportRequest. */ + interface IGetOSPolicyAssignmentReportRequest { - /** OSPolicyAssignment name */ + /** GetOSPolicyAssignmentReportRequest name */ name?: (string|null); - - /** OSPolicyAssignment description */ - description?: (string|null); - - /** OSPolicyAssignment osPolicies */ - osPolicies?: (google.cloud.osconfig.v1alpha.IOSPolicy[]|null); - - /** OSPolicyAssignment instanceFilter */ - instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); - - /** OSPolicyAssignment rollout */ - rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); - - /** OSPolicyAssignment revisionId */ - revisionId?: (string|null); - - /** OSPolicyAssignment revisionCreateTime */ - revisionCreateTime?: (google.protobuf.ITimestamp|null); - - /** OSPolicyAssignment rolloutState */ - rolloutState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null); - - /** OSPolicyAssignment baseline */ - baseline?: (boolean|null); - - /** OSPolicyAssignment deleted */ - deleted?: (boolean|null); - - /** OSPolicyAssignment reconciling */ - reconciling?: (boolean|null); - - /** OSPolicyAssignment uid */ - uid?: (string|null); } - /** Represents a OSPolicyAssignment. */ - class OSPolicyAssignment implements IOSPolicyAssignment { + /** Represents a GetOSPolicyAssignmentReportRequest. */ + class GetOSPolicyAssignmentReportRequest implements IGetOSPolicyAssignmentReportRequest { /** - * Constructs a new OSPolicyAssignment. + * Constructs a new GetOSPolicyAssignmentReportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment); + constructor(properties?: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest); - /** OSPolicyAssignment name. */ + /** GetOSPolicyAssignmentReportRequest name. */ public name: string; - /** OSPolicyAssignment description. */ - public description: string; - - /** OSPolicyAssignment osPolicies. */ - public osPolicies: google.cloud.osconfig.v1alpha.IOSPolicy[]; - - /** OSPolicyAssignment instanceFilter. */ - public instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); - - /** OSPolicyAssignment rollout. */ - public rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); - - /** OSPolicyAssignment revisionId. */ - public revisionId: string; - - /** OSPolicyAssignment revisionCreateTime. */ - public revisionCreateTime?: (google.protobuf.ITimestamp|null); - - /** OSPolicyAssignment rolloutState. */ - public rolloutState: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState); - - /** OSPolicyAssignment baseline. */ - public baseline: boolean; - - /** OSPolicyAssignment deleted. */ - public deleted: boolean; - - /** OSPolicyAssignment reconciling. */ - public reconciling: boolean; - - /** OSPolicyAssignment uid. */ - public uid: string; - /** - * Creates a new OSPolicyAssignment instance using the specified properties. + * Creates a new GetOSPolicyAssignmentReportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OSPolicyAssignment instance + * @returns GetOSPolicyAssignmentReportRequest instance */ - public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + public static create(properties?: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest; /** - * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. - * @param message OSPolicyAssignment message or plain object to encode + * Encodes the specified GetOSPolicyAssignmentReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. - * @param message OSPolicyAssignment message or plain object to encode + * Encodes the specified GetOSPolicyAssignmentReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.verify|verify} messages. + * @param message GetOSPolicyAssignmentReportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * Decodes a GetOSPolicyAssignmentReportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OSPolicyAssignment + * @returns GetOSPolicyAssignmentReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest; /** - * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * Decodes a GetOSPolicyAssignmentReportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OSPolicyAssignment + * @returns GetOSPolicyAssignmentReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest; /** - * Verifies a OSPolicyAssignment message. + * Verifies a GetOSPolicyAssignmentReportRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * Creates a GetOSPolicyAssignmentReportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OSPolicyAssignment + * @returns GetOSPolicyAssignmentReportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest; /** - * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. - * @param message OSPolicyAssignment + * Creates a plain object from a GetOSPolicyAssignmentReportRequest message. Also converts values to other types if specified. + * @param message GetOSPolicyAssignmentReportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OSPolicyAssignment to JSON. + * Converts this GetOSPolicyAssignmentReportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace OSPolicyAssignment { + /** Properties of a ListOSPolicyAssignmentReportsRequest. */ + interface IListOSPolicyAssignmentReportsRequest { - /** Properties of a LabelSet. */ - interface ILabelSet { + /** ListOSPolicyAssignmentReportsRequest parent */ + parent?: (string|null); - /** LabelSet labels */ - labels?: ({ [k: string]: string }|null); - } + /** ListOSPolicyAssignmentReportsRequest pageSize */ + pageSize?: (number|null); - /** Represents a LabelSet. */ - class LabelSet implements ILabelSet { + /** ListOSPolicyAssignmentReportsRequest filter */ + filter?: (string|null); - /** - * Constructs a new LabelSet. - * @param [properties] Properties to set - */ + /** ListOSPolicyAssignmentReportsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentReportsRequest. */ + class ListOSPolicyAssignmentReportsRequest implements IListOSPolicyAssignmentReportsRequest { + + /** + * Constructs a new ListOSPolicyAssignmentReportsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest); + + /** ListOSPolicyAssignmentReportsRequest parent. */ + public parent: string; + + /** ListOSPolicyAssignmentReportsRequest pageSize. */ + public pageSize: number; + + /** ListOSPolicyAssignmentReportsRequest filter. */ + public filter: string; + + /** ListOSPolicyAssignmentReportsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentReportsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentReportsRequest instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.verify|verify} messages. + * @param message ListOSPolicyAssignmentReportsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentReportsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest; + + /** + * Decodes a ListOSPolicyAssignmentReportsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest; + + /** + * Verifies a ListOSPolicyAssignmentReportsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentReportsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentReportsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest; + + /** + * Creates a plain object from a ListOSPolicyAssignmentReportsRequest message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentReportsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentReportsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOSPolicyAssignmentReportsResponse. */ + interface IListOSPolicyAssignmentReportsResponse { + + /** ListOSPolicyAssignmentReportsResponse osPolicyAssignmentReports */ + osPolicyAssignmentReports?: (google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport[]|null); + + /** ListOSPolicyAssignmentReportsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOSPolicyAssignmentReportsResponse. */ + class ListOSPolicyAssignmentReportsResponse implements IListOSPolicyAssignmentReportsResponse { + + /** + * Constructs a new ListOSPolicyAssignmentReportsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse); + + /** ListOSPolicyAssignmentReportsResponse osPolicyAssignmentReports. */ + public osPolicyAssignmentReports: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport[]; + + /** ListOSPolicyAssignmentReportsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOSPolicyAssignmentReportsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOSPolicyAssignmentReportsResponse instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.verify|verify} messages. + * @param message ListOSPolicyAssignmentReportsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOSPolicyAssignmentReportsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOSPolicyAssignmentReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse; + + /** + * Decodes a ListOSPolicyAssignmentReportsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOSPolicyAssignmentReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse; + + /** + * Verifies a ListOSPolicyAssignmentReportsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOSPolicyAssignmentReportsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOSPolicyAssignmentReportsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse; + + /** + * Creates a plain object from a ListOSPolicyAssignmentReportsResponse message. Also converts values to other types if specified. + * @param message ListOSPolicyAssignmentReportsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOSPolicyAssignmentReportsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a OSPolicyAssignmentReport. */ + interface IOSPolicyAssignmentReport { + + /** OSPolicyAssignmentReport name */ + name?: (string|null); + + /** OSPolicyAssignmentReport instance */ + instance?: (string|null); + + /** OSPolicyAssignmentReport osPolicyAssignment */ + osPolicyAssignment?: (string|null); + + /** OSPolicyAssignmentReport osPolicyCompliances */ + osPolicyCompliances?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance[]|null); + + /** OSPolicyAssignmentReport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignmentReport lastRunId */ + lastRunId?: (string|null); + } + + /** Represents a OSPolicyAssignmentReport. */ + class OSPolicyAssignmentReport implements IOSPolicyAssignmentReport { + + /** + * Constructs a new OSPolicyAssignmentReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport); + + /** OSPolicyAssignmentReport name. */ + public name: string; + + /** OSPolicyAssignmentReport instance. */ + public instance: string; + + /** OSPolicyAssignmentReport osPolicyAssignment. */ + public osPolicyAssignment: string; + + /** OSPolicyAssignmentReport osPolicyCompliances. */ + public osPolicyCompliances: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance[]; + + /** OSPolicyAssignmentReport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignmentReport lastRunId. */ + public lastRunId: string; + + /** + * Creates a new OSPolicyAssignmentReport instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyAssignmentReport instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport; + + /** + * Encodes the specified OSPolicyAssignmentReport message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.verify|verify} messages. + * @param message OSPolicyAssignmentReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyAssignmentReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.verify|verify} messages. + * @param message OSPolicyAssignmentReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyAssignmentReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyAssignmentReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport; + + /** + * Decodes a OSPolicyAssignmentReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyAssignmentReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport; + + /** + * Verifies a OSPolicyAssignmentReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyAssignmentReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyAssignmentReport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport; + + /** + * Creates a plain object from a OSPolicyAssignmentReport message. Also converts values to other types if specified. + * @param message OSPolicyAssignmentReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyAssignmentReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyAssignmentReport { + + /** Properties of a OSPolicyCompliance. */ + interface IOSPolicyCompliance { + + /** OSPolicyCompliance osPolicyId */ + osPolicyId?: (string|null); + + /** OSPolicyCompliance complianceState */ + complianceState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState|null); + + /** OSPolicyCompliance complianceStateReason */ + complianceStateReason?: (string|null); + + /** OSPolicyCompliance osPolicyResourceCompliances */ + osPolicyResourceCompliances?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance[]|null); + } + + /** Represents a OSPolicyCompliance. */ + class OSPolicyCompliance implements IOSPolicyCompliance { + + /** + * Constructs a new OSPolicyCompliance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance); + + /** OSPolicyCompliance osPolicyId. */ + public osPolicyId: string; + + /** OSPolicyCompliance complianceState. */ + public complianceState: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState); + + /** OSPolicyCompliance complianceStateReason. */ + public complianceStateReason: string; + + /** OSPolicyCompliance osPolicyResourceCompliances. */ + public osPolicyResourceCompliances: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance[]; + + /** + * Creates a new OSPolicyCompliance instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyCompliance instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance; + + /** + * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.verify|verify} messages. + * @param message OSPolicyCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.verify|verify} messages. + * @param message OSPolicyCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance; + + /** + * Verifies a OSPolicyCompliance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyCompliance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance; + + /** + * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. + * @param message OSPolicyCompliance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyCompliance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyCompliance { + + /** ComplianceState enum. */ + enum ComplianceState { + UNKNOWN = 0, + COMPLIANT = 1, + NON_COMPLIANT = 2 + } + + /** Properties of a OSPolicyResourceCompliance. */ + interface IOSPolicyResourceCompliance { + + /** OSPolicyResourceCompliance osPolicyResourceId */ + osPolicyResourceId?: (string|null); + + /** OSPolicyResourceCompliance configSteps */ + configSteps?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep[]|null); + + /** OSPolicyResourceCompliance complianceState */ + complianceState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState|null); + + /** OSPolicyResourceCompliance complianceStateReason */ + complianceStateReason?: (string|null); + + /** OSPolicyResourceCompliance execResourceOutput */ + execResourceOutput?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput|null); + } + + /** Represents a OSPolicyResourceCompliance. */ + class OSPolicyResourceCompliance implements IOSPolicyResourceCompliance { + + /** + * Constructs a new OSPolicyResourceCompliance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance); + + /** OSPolicyResourceCompliance osPolicyResourceId. */ + public osPolicyResourceId: string; + + /** OSPolicyResourceCompliance configSteps. */ + public configSteps: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep[]; + + /** OSPolicyResourceCompliance complianceState. */ + public complianceState: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState); + + /** OSPolicyResourceCompliance complianceStateReason. */ + public complianceStateReason: string; + + /** OSPolicyResourceCompliance execResourceOutput. */ + public execResourceOutput?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput|null); + + /** OSPolicyResourceCompliance output. */ + public output?: "execResourceOutput"; + + /** + * Creates a new OSPolicyResourceCompliance instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyResourceCompliance instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance; + + /** + * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify|verify} messages. + * @param message OSPolicyResourceCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify|verify} messages. + * @param message OSPolicyResourceCompliance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance; + + /** + * Verifies a OSPolicyResourceCompliance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyResourceCompliance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance; + + /** + * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. + * @param message OSPolicyResourceCompliance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyResourceCompliance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyResourceCompliance { + + /** Properties of a OSPolicyResourceConfigStep. */ + interface IOSPolicyResourceConfigStep { + + /** OSPolicyResourceConfigStep type */ + type?: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type|null); + + /** OSPolicyResourceConfigStep errorMessage */ + errorMessage?: (string|null); + } + + /** Represents a OSPolicyResourceConfigStep. */ + class OSPolicyResourceConfigStep implements IOSPolicyResourceConfigStep { + + /** + * Constructs a new OSPolicyResourceConfigStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep); + + /** OSPolicyResourceConfigStep type. */ + public type: (google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type); + + /** OSPolicyResourceConfigStep errorMessage. */ + public errorMessage: string; + + /** + * Creates a new OSPolicyResourceConfigStep instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyResourceConfigStep instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep; + + /** + * Encodes the specified OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify|verify} messages. + * @param message OSPolicyResourceConfigStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify|verify} messages. + * @param message OSPolicyResourceConfigStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep; + + /** + * Verifies a OSPolicyResourceConfigStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyResourceConfigStep + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep; + + /** + * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. + * @param message OSPolicyResourceConfigStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyResourceConfigStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyResourceConfigStep { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + VALIDATION = 1, + DESIRED_STATE_CHECK = 2, + DESIRED_STATE_ENFORCEMENT = 3, + DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4 + } + } + + /** ComplianceState enum. */ + enum ComplianceState { + UNKNOWN = 0, + COMPLIANT = 1, + NON_COMPLIANT = 2 + } + + /** Properties of an ExecResourceOutput. */ + interface IExecResourceOutput { + + /** ExecResourceOutput enforcementOutput */ + enforcementOutput?: (Uint8Array|string|null); + } + + /** Represents an ExecResourceOutput. */ + class ExecResourceOutput implements IExecResourceOutput { + + /** + * Constructs a new ExecResourceOutput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput); + + /** ExecResourceOutput enforcementOutput. */ + public enforcementOutput: (Uint8Array|string); + + /** + * Creates a new ExecResourceOutput instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecResourceOutput instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @param message ExecResourceOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @param message ExecResourceOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Verifies an ExecResourceOutput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecResourceOutput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput; + + /** + * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. + * @param message ExecResourceOutput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecResourceOutput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Properties of a OSPolicyAssignment. */ + interface IOSPolicyAssignment { + + /** OSPolicyAssignment name */ + name?: (string|null); + + /** OSPolicyAssignment description */ + description?: (string|null); + + /** OSPolicyAssignment osPolicies */ + osPolicies?: (google.cloud.osconfig.v1alpha.IOSPolicy[]|null); + + /** OSPolicyAssignment instanceFilter */ + instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); + + /** OSPolicyAssignment rollout */ + rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); + + /** OSPolicyAssignment revisionId */ + revisionId?: (string|null); + + /** OSPolicyAssignment revisionCreateTime */ + revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignment etag */ + etag?: (string|null); + + /** OSPolicyAssignment rolloutState */ + rolloutState?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null); + + /** OSPolicyAssignment baseline */ + baseline?: (boolean|null); + + /** OSPolicyAssignment deleted */ + deleted?: (boolean|null); + + /** OSPolicyAssignment reconciling */ + reconciling?: (boolean|null); + + /** OSPolicyAssignment uid */ + uid?: (string|null); + } + + /** Represents a OSPolicyAssignment. */ + class OSPolicyAssignment implements IOSPolicyAssignment { + + /** + * Constructs a new OSPolicyAssignment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment); + + /** OSPolicyAssignment name. */ + public name: string; + + /** OSPolicyAssignment description. */ + public description: string; + + /** OSPolicyAssignment osPolicies. */ + public osPolicies: google.cloud.osconfig.v1alpha.IOSPolicy[]; + + /** OSPolicyAssignment instanceFilter. */ + public instanceFilter?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null); + + /** OSPolicyAssignment rollout. */ + public rollout?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null); + + /** OSPolicyAssignment revisionId. */ + public revisionId: string; + + /** OSPolicyAssignment revisionCreateTime. */ + public revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** OSPolicyAssignment etag. */ + public etag: string; + + /** OSPolicyAssignment rolloutState. */ + public rolloutState: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|keyof typeof google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState); + + /** OSPolicyAssignment baseline. */ + public baseline: boolean; + + /** OSPolicyAssignment deleted. */ + public deleted: boolean; + + /** OSPolicyAssignment reconciling. */ + public reconciling: boolean; + + /** OSPolicyAssignment uid. */ + public uid: string; + + /** + * Creates a new OSPolicyAssignment instance using the specified properties. + * @param [properties] Properties to set + * @returns OSPolicyAssignment instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.IOSPolicyAssignment): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + + /** + * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @param message OSPolicyAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @param message OSPolicyAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.IOSPolicyAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + + /** + * Verifies a OSPolicyAssignment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OSPolicyAssignment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment; + + /** + * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. + * @param message OSPolicyAssignment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OSPolicyAssignment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OSPolicyAssignment { + + /** Properties of a LabelSet. */ + interface ILabelSet { + + /** LabelSet labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a LabelSet. */ + class LabelSet implements ILabelSet { + + /** + * Constructs a new LabelSet. + * @param [properties] Properties to set + */ constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet); /** LabelSet labels. */ @@ -17197,6 +18165,9 @@ export namespace google { /** InstanceFilter exclusionLabels */ exclusionLabels?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]|null); + + /** InstanceFilter inventories */ + inventories?: (google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory[]|null); } /** Represents an InstanceFilter. */ @@ -17220,6 +18191,9 @@ export namespace google { /** InstanceFilter exclusionLabels. */ public exclusionLabels: google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet[]; + /** InstanceFilter inventories. */ + public inventories: google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory[]; + /** * Creates a new InstanceFilter instance using the specified properties. * @param [properties] Properties to set @@ -17291,6 +18265,105 @@ export namespace google { public toJSON(): { [k: string]: any }; } + namespace InstanceFilter { + + /** Properties of an Inventory. */ + interface IInventory { + + /** Inventory osShortName */ + osShortName?: (string|null); + + /** Inventory osVersion */ + osVersion?: (string|null); + } + + /** Represents an Inventory. */ + class Inventory implements IInventory { + + /** + * Constructs a new Inventory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory); + + /** Inventory osShortName. */ + public osShortName: string; + + /** Inventory osVersion. */ + public osVersion: string; + + /** + * Creates a new Inventory instance using the specified properties. + * @param [properties] Properties to set + * @returns Inventory instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory; + + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.verify|verify} messages. + * @param message Inventory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Inventory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory; + + /** + * Decodes an Inventory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory; + + /** + * Verifies an Inventory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Inventory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory; + + /** + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @param message Inventory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Inventory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + /** Properties of a Rollout. */ interface IRollout { @@ -18536,6 +19609,34 @@ export namespace google { */ public listInstanceOSPoliciesCompliances(request: google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest): Promise; + /** + * Calls GetOSPolicyAssignmentReport. + * @param request GetOSPolicyAssignmentReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OSPolicyAssignmentReport + */ + public getOSPolicyAssignmentReport(request: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentReportCallback): void; + + /** + * Calls GetOSPolicyAssignmentReport. + * @param request GetOSPolicyAssignmentReportRequest message or plain object + * @returns Promise + */ + public getOSPolicyAssignmentReport(request: google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest): Promise; + + /** + * Calls ListOSPolicyAssignmentReports. + * @param request ListOSPolicyAssignmentReportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentReportsResponse + */ + public listOSPolicyAssignmentReports(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, callback: google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentReportsCallback): void; + + /** + * Calls ListOSPolicyAssignmentReports. + * @param request ListOSPolicyAssignmentReportsRequest message or plain object + * @returns Promise + */ + public listOSPolicyAssignmentReports(request: google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest): Promise; + /** * Calls GetInventory. * @param request GetInventoryRequest message or plain object @@ -18651,6 +19752,20 @@ export namespace google { */ type ListInstanceOSPoliciesCompliancesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) => void; + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignmentReport}. + * @param error Error, if any + * @param [response] OSPolicyAssignmentReport + */ + type GetOSPolicyAssignmentReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) => void; + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentReports}. + * @param error Error, if any + * @param [response] ListOSPolicyAssignmentReportsResponse + */ + type ListOSPolicyAssignmentReportsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) => void; + /** * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. * @param error Error, if any @@ -18801,6 +19916,9 @@ export namespace google { /** Vulnerability updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + + /** Vulnerability items */ + items?: (google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem[]|null); } /** Represents a Vulnerability. */ @@ -18827,6 +19945,9 @@ export namespace google { /** Vulnerability updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** Vulnerability items. */ + public items: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem[]; + /** * Creates a new Vulnerability instance using the specified properties. * @param [properties] Properties to set @@ -19027,6 +20148,9 @@ export namespace google { /** Reference url */ url?: (string|null); + + /** Reference source */ + source?: (string|null); } /** Represents a Reference. */ @@ -19041,6 +20165,9 @@ export namespace google { /** Reference url. */ public url: string; + /** Reference source. */ + public source: string; + /** * Creates a new Reference instance using the specified properties. * @param [properties] Properties to set @@ -19112,6 +20239,114 @@ export namespace google { public toJSON(): { [k: string]: any }; } } + + /** Properties of an Item. */ + interface IItem { + + /** Item installedInventoryItemId */ + installedInventoryItemId?: (string|null); + + /** Item availableInventoryItemId */ + availableInventoryItemId?: (string|null); + + /** Item fixedCpeUri */ + fixedCpeUri?: (string|null); + + /** Item upstreamFix */ + upstreamFix?: (string|null); + } + + /** Represents an Item. */ + class Item implements IItem { + + /** + * Constructs a new Item. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem); + + /** Item installedInventoryItemId. */ + public installedInventoryItemId: string; + + /** Item availableInventoryItemId. */ + public availableInventoryItemId: string; + + /** Item fixedCpeUri. */ + public fixedCpeUri: string; + + /** Item upstreamFix. */ + public upstreamFix: string; + + /** + * Creates a new Item instance using the specified properties. + * @param [properties] Properties to set + * @returns Item instance + */ + public static create(properties?: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Item message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item; + + /** + * Verifies an Item message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Item + */ + public static fromObject(object: { [k: string]: any }): google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @param message Item + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Item to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } } diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 10230c84a94..cba88f6e01e 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -37064,6 +37064,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Mode enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} VALIDATION=1 VALIDATION value + * @property {number} ENFORCEMENT=2 ENFORCEMENT value + */ + OSPolicy.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VALIDATION"] = 1; + values[valuesById[2] = "ENFORCEMENT"] = 2; + return values; + })(); + OSPolicy.OSFilter = (function() { /** @@ -37274,6 +37290,216 @@ return OSFilter; })(); + OSPolicy.InventoryFilter = (function() { + + /** + * Properties of an InventoryFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @interface IInventoryFilter + * @property {string|null} [osShortName] InventoryFilter osShortName + * @property {string|null} [osVersion] InventoryFilter osVersion + */ + + /** + * Constructs a new InventoryFilter. + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @classdesc Represents an InventoryFilter. + * @implements IInventoryFilter + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter=} [properties] Properties to set + */ + function InventoryFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InventoryFilter osShortName. + * @member {string} osShortName + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @instance + */ + InventoryFilter.prototype.osShortName = ""; + + /** + * InventoryFilter osVersion. + * @member {string} osVersion + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @instance + */ + InventoryFilter.prototype.osVersion = ""; + + /** + * Creates a new InventoryFilter instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter} InventoryFilter instance + */ + InventoryFilter.create = function create(properties) { + return new InventoryFilter(properties); + }; + + /** + * Encodes the specified InventoryFilter message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter} message InventoryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InventoryFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osShortName != null && Object.hasOwnProperty.call(message, "osShortName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osShortName); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osVersion); + return writer; + }; + + /** + * Encodes the specified InventoryFilter message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.IInventoryFilter} message InventoryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InventoryFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InventoryFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter} InventoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InventoryFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osShortName = reader.string(); + break; + case 2: + message.osVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InventoryFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter} InventoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InventoryFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InventoryFilter message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InventoryFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + if (!$util.isString(message.osShortName)) + return "osShortName: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; + return null; + }; + + /** + * Creates an InventoryFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter} InventoryFilter + */ + InventoryFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter(); + if (object.osShortName != null) + message.osShortName = String(object.osShortName); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); + return message; + }; + + /** + * Creates a plain object from an InventoryFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter} message InventoryFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InventoryFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osShortName = ""; + object.osVersion = ""; + } + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + object.osShortName = message.osShortName; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; + return object; + }; + + /** + * Converts this InventoryFilter to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @instance + * @returns {Object.} JSON object + */ + InventoryFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InventoryFilter; + })(); + OSPolicy.Resource = (function() { /** @@ -38812,6 +39038,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * DesiredState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + * @enum {number} + * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value + * @property {number} INSTALLED=1 INSTALLED value + * @property {number} REMOVED=2 REMOVED value + */ + PackageResource.DesiredState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTALLED"] = 1; + values[valuesById[2] = "REMOVED"] = 2; + return values; + })(); + PackageResource.Deb = (function() { /** @@ -40221,22 +40463,6 @@ return MSI; })(); - /** - * DesiredState enum. - * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState - * @enum {number} - * @property {number} DESIRED_STATE_UNSPECIFIED=0 DESIRED_STATE_UNSPECIFIED value - * @property {number} INSTALLED=1 INSTALLED value - * @property {number} REMOVED=2 REMOVED value - */ - PackageResource.DesiredState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DESIRED_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTALLED"] = 1; - values[valuesById[2] = "REMOVED"] = 2; - return values; - })(); - return PackageResource; })(); @@ -42575,6 +42801,7 @@ * @memberof google.cloud.osconfig.v1alpha.OSPolicy * @interface IResourceGroup * @property {google.cloud.osconfig.v1alpha.OSPolicy.IOSFilter|null} [osFilter] ResourceGroup osFilter + * @property {Array.|null} [inventoryFilters] ResourceGroup inventoryFilters * @property {Array.|null} [resources] ResourceGroup resources */ @@ -42587,6 +42814,7 @@ * @param {google.cloud.osconfig.v1alpha.OSPolicy.IResourceGroup=} [properties] Properties to set */ function ResourceGroup(properties) { + this.inventoryFilters = []; this.resources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -42602,6 +42830,14 @@ */ ResourceGroup.prototype.osFilter = null; + /** + * ResourceGroup inventoryFilters. + * @member {Array.} inventoryFilters + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @instance + */ + ResourceGroup.prototype.inventoryFilters = $util.emptyArray; + /** * ResourceGroup resources. * @member {Array.} resources @@ -42639,6 +42875,9 @@ if (message.resources != null && message.resources.length) for (var i = 0; i < message.resources.length; ++i) $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.encode(message.resources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inventoryFilters != null && message.inventoryFilters.length) + for (var i = 0; i < message.inventoryFilters.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.encode(message.inventoryFilters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -42676,6 +42915,11 @@ case 1: message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.decode(reader, reader.uint32()); break; + case 3: + if (!(message.inventoryFilters && message.inventoryFilters.length)) + message.inventoryFilters = []; + message.inventoryFilters.push($root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.decode(reader, reader.uint32())); + break; case 2: if (!(message.resources && message.resources.length)) message.resources = []; @@ -42721,6 +42965,15 @@ if (error) return "osFilter." + error; } + if (message.inventoryFilters != null && message.hasOwnProperty("inventoryFilters")) { + if (!Array.isArray(message.inventoryFilters)) + return "inventoryFilters: array expected"; + for (var i = 0; i < message.inventoryFilters.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.verify(message.inventoryFilters[i]); + if (error) + return "inventoryFilters." + error; + } + } if (message.resources != null && message.hasOwnProperty("resources")) { if (!Array.isArray(message.resources)) return "resources: array expected"; @@ -42750,7 +43003,17 @@ throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.osFilter: object expected"); message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.fromObject(object.osFilter); } - if (object.resources) { + if (object.inventoryFilters) { + if (!Array.isArray(object.inventoryFilters)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.inventoryFilters: array expected"); + message.inventoryFilters = []; + for (var i = 0; i < object.inventoryFilters.length; ++i) { + if (typeof object.inventoryFilters[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.inventoryFilters: object expected"); + message.inventoryFilters[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.fromObject(object.inventoryFilters[i]); + } + } + if (object.resources) { if (!Array.isArray(object.resources)) throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.resources: array expected"); message.resources = []; @@ -42776,8 +43039,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.resources = []; + object.inventoryFilters = []; + } if (options.defaults) object.osFilter = null; if (message.osFilter != null && message.hasOwnProperty("osFilter")) @@ -42787,6 +43052,11 @@ for (var j = 0; j < message.resources.length; ++j) object.resources[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.toObject(message.resources[j], options); } + if (message.inventoryFilters && message.inventoryFilters.length) { + object.inventoryFilters = []; + for (var j = 0; j < message.inventoryFilters.length; ++j) + object.inventoryFilters[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.toObject(message.inventoryFilters[j], options); + } return object; }; @@ -42804,55 +43074,27 @@ return ResourceGroup; })(); - /** - * Mode enum. - * @name google.cloud.osconfig.v1alpha.OSPolicy.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} VALIDATION=1 VALIDATION value - * @property {number} ENFORCEMENT=2 ENFORCEMENT value - */ - OSPolicy.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VALIDATION"] = 1; - values[valuesById[2] = "ENFORCEMENT"] = 2; - return values; - })(); - return OSPolicy; })(); - v1alpha.OSPolicyAssignment = (function() { + v1alpha.GetOSPolicyAssignmentReportRequest = (function() { /** - * Properties of a OSPolicyAssignment. + * Properties of a GetOSPolicyAssignmentReportRequest. * @memberof google.cloud.osconfig.v1alpha - * @interface IOSPolicyAssignment - * @property {string|null} [name] OSPolicyAssignment name - * @property {string|null} [description] OSPolicyAssignment description - * @property {Array.|null} [osPolicies] OSPolicyAssignment osPolicies - * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null} [instanceFilter] OSPolicyAssignment instanceFilter - * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null} [rollout] OSPolicyAssignment rollout - * @property {string|null} [revisionId] OSPolicyAssignment revisionId - * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] OSPolicyAssignment revisionCreateTime - * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null} [rolloutState] OSPolicyAssignment rolloutState - * @property {boolean|null} [baseline] OSPolicyAssignment baseline - * @property {boolean|null} [deleted] OSPolicyAssignment deleted - * @property {boolean|null} [reconciling] OSPolicyAssignment reconciling - * @property {string|null} [uid] OSPolicyAssignment uid + * @interface IGetOSPolicyAssignmentReportRequest + * @property {string|null} [name] GetOSPolicyAssignmentReportRequest name */ /** - * Constructs a new OSPolicyAssignment. + * Constructs a new GetOSPolicyAssignmentReportRequest. * @memberof google.cloud.osconfig.v1alpha - * @classdesc Represents a OSPolicyAssignment. - * @implements IOSPolicyAssignment + * @classdesc Represents a GetOSPolicyAssignmentReportRequest. + * @implements IGetOSPolicyAssignmentReportRequest * @constructor - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest=} [properties] Properties to set */ - function OSPolicyAssignment(properties) { - this.osPolicies = []; + function GetOSPolicyAssignmentReportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42860,222 +43102,76 @@ } /** - * OSPolicyAssignment name. + * GetOSPolicyAssignmentReportRequest name. * @member {string} name - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.name = ""; - - /** - * OSPolicyAssignment description. - * @member {string} description - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.description = ""; - - /** - * OSPolicyAssignment osPolicies. - * @member {Array.} osPolicies - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.osPolicies = $util.emptyArray; - - /** - * OSPolicyAssignment instanceFilter. - * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null|undefined} instanceFilter - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.instanceFilter = null; - - /** - * OSPolicyAssignment rollout. - * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null|undefined} rollout - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.rollout = null; - - /** - * OSPolicyAssignment revisionId. - * @member {string} revisionId - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.revisionId = ""; - - /** - * OSPolicyAssignment revisionCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.revisionCreateTime = null; - - /** - * OSPolicyAssignment rolloutState. - * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState} rolloutState - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.rolloutState = 0; - - /** - * OSPolicyAssignment baseline. - * @member {boolean} baseline - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.baseline = false; - - /** - * OSPolicyAssignment deleted. - * @member {boolean} deleted - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.deleted = false; - - /** - * OSPolicyAssignment reconciling. - * @member {boolean} reconciling - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @instance - */ - OSPolicyAssignment.prototype.reconciling = false; - - /** - * OSPolicyAssignment uid. - * @member {string} uid - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @instance */ - OSPolicyAssignment.prototype.uid = ""; + GetOSPolicyAssignmentReportRequest.prototype.name = ""; /** - * Creates a new OSPolicyAssignment instance using the specified properties. + * Creates a new GetOSPolicyAssignmentReportRequest instance using the specified properties. * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment instance + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest} GetOSPolicyAssignmentReportRequest instance */ - OSPolicyAssignment.create = function create(properties) { - return new OSPolicyAssignment(properties); + GetOSPolicyAssignmentReportRequest.create = function create(properties) { + return new GetOSPolicyAssignmentReportRequest(properties); }; /** - * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * Encodes the specified GetOSPolicyAssignmentReportRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest} message GetOSPolicyAssignmentReportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OSPolicyAssignment.encode = function encode(message, writer) { + GetOSPolicyAssignmentReportRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.osPolicies != null && message.osPolicies.length) - for (var i = 0; i < message.osPolicies.length; ++i) - $root.google.cloud.osconfig.v1alpha.OSPolicy.encode(message.osPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.encode(message.rollout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.revisionId); - if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) - $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rolloutState); - if (message.baseline != null && Object.hasOwnProperty.call(message, "baseline")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.baseline); - if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deleted); - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.reconciling); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.uid); return writer; }; /** - * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * Encodes the specified GetOSPolicyAssignmentReportRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @static - * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest} message GetOSPolicyAssignmentReportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OSPolicyAssignment.encodeDelimited = function encodeDelimited(message, writer) { + GetOSPolicyAssignmentReportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * Decodes a GetOSPolicyAssignmentReportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest} GetOSPolicyAssignmentReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OSPolicyAssignment.decode = function decode(reader, length) { + GetOSPolicyAssignmentReportRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.osPolicies && message.osPolicies.length)) - message.osPolicies = []; - message.osPolicies.push($root.google.cloud.osconfig.v1alpha.OSPolicy.decode(reader, reader.uint32())); - break; - case 4: - message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); - break; - case 5: - message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); - break; - case 6: - message.revisionId = reader.string(); - break; - case 7: - message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.rolloutState = reader.int32(); - break; - case 10: - message.baseline = reader.bool(); - break; - case 11: - message.deleted = reader.bool(); - break; - case 12: - message.reconciling = reader.bool(); - break; - case 13: - message.uid = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -43085,298 +43181,2596 @@ }; /** - * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * Decodes a GetOSPolicyAssignmentReportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest} GetOSPolicyAssignmentReportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OSPolicyAssignment.decodeDelimited = function decodeDelimited(reader) { + GetOSPolicyAssignmentReportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a OSPolicyAssignment message. + * Verifies a GetOSPolicyAssignmentReportRequest message. * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OSPolicyAssignment.verify = function verify(message) { + GetOSPolicyAssignmentReportRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.osPolicies != null && message.hasOwnProperty("osPolicies")) { - if (!Array.isArray(message.osPolicies)) - return "osPolicies: array expected"; - for (var i = 0; i < message.osPolicies.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.verify(message.osPolicies[i]); - if (error) - return "osPolicies." + error; - } - } - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify(message.instanceFilter); - if (error) - return "instanceFilter." + error; - } - if (message.rollout != null && message.hasOwnProperty("rollout")) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify(message.rollout); - if (error) - return "rollout." + error; - } - if (message.revisionId != null && message.hasOwnProperty("revisionId")) - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); - if (error) - return "revisionCreateTime." + error; - } - if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - switch (message.rolloutState) { - default: - return "rolloutState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.baseline != null && message.hasOwnProperty("baseline")) - if (typeof message.baseline !== "boolean") - return "baseline: boolean expected"; - if (message.deleted != null && message.hasOwnProperty("deleted")) - if (typeof message.deleted !== "boolean") - return "deleted: boolean expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - if (typeof message.reconciling !== "boolean") - return "reconciling: boolean expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; return null; }; /** - * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * Creates a GetOSPolicyAssignmentReportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @returns {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest} GetOSPolicyAssignmentReportRequest */ - OSPolicyAssignment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment) + GetOSPolicyAssignmentReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + var message = new $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest(); if (object.name != null) message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.osPolicies) { - if (!Array.isArray(object.osPolicies)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: array expected"); - message.osPolicies = []; - for (var i = 0; i < object.osPolicies.length; ++i) { - if (typeof object.osPolicies[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: object expected"); - message.osPolicies[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.fromObject(object.osPolicies[i]); - } - } - if (object.instanceFilter != null) { - if (typeof object.instanceFilter !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.instanceFilter: object expected"); - message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.fromObject(object.instanceFilter); - } - if (object.rollout != null) { - if (typeof object.rollout !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.rollout: object expected"); - message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.fromObject(object.rollout); - } - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - if (object.revisionCreateTime != null) { - if (typeof object.revisionCreateTime !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.revisionCreateTime: object expected"); - message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); - } - switch (object.rolloutState) { - case "ROLLOUT_STATE_UNSPECIFIED": - case 0: - message.rolloutState = 0; - break; - case "IN_PROGRESS": - case 1: - message.rolloutState = 1; - break; - case "CANCELLING": - case 2: - message.rolloutState = 2; - break; - case "CANCELLED": - case 3: - message.rolloutState = 3; - break; - case "SUCCEEDED": - case 4: - message.rolloutState = 4; - break; - } - if (object.baseline != null) - message.baseline = Boolean(object.baseline); - if (object.deleted != null) - message.deleted = Boolean(object.deleted); - if (object.reconciling != null) - message.reconciling = Boolean(object.reconciling); - if (object.uid != null) - message.uid = String(object.uid); return message; }; /** - * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. + * Creates a plain object from a GetOSPolicyAssignmentReportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} message OSPolicyAssignment + * @param {google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest} message GetOSPolicyAssignmentReportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OSPolicyAssignment.toObject = function toObject(message, options) { + GetOSPolicyAssignmentReportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.osPolicies = []; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.description = ""; - object.instanceFilter = null; - object.rollout = null; - object.revisionId = ""; - object.revisionCreateTime = null; - object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; - object.baseline = false; - object.deleted = false; - object.reconciling = false; - object.uid = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.osPolicies && message.osPolicies.length) { - object.osPolicies = []; - for (var j = 0; j < message.osPolicies.length; ++j) - object.osPolicies[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.toObject(message.osPolicies[j], options); - } - if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) - object.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.toObject(message.instanceFilter, options); - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.toObject(message.rollout, options); - if (message.revisionId != null && message.hasOwnProperty("revisionId")) - object.revisionId = message.revisionId; - if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) - object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); - if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; - if (message.baseline != null && message.hasOwnProperty("baseline")) - object.baseline = message.baseline; - if (message.deleted != null && message.hasOwnProperty("deleted")) - object.deleted = message.deleted; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - object.reconciling = message.reconciling; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; return object; }; /** - * Converts this OSPolicyAssignment to JSON. + * Converts this GetOSPolicyAssignmentReportRequest to JSON. * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest * @instance * @returns {Object.} JSON object */ - OSPolicyAssignment.prototype.toJSON = function toJSON() { + GetOSPolicyAssignmentReportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - OSPolicyAssignment.LabelSet = (function() { + return GetOSPolicyAssignmentReportRequest; + })(); - /** - * Properties of a LabelSet. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @interface ILabelSet - * @property {Object.|null} [labels] LabelSet labels - */ + v1alpha.ListOSPolicyAssignmentReportsRequest = (function() { - /** - * Constructs a new LabelSet. - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment - * @classdesc Represents a LabelSet. - * @implements ILabelSet - * @constructor - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set - */ - function LabelSet(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ListOSPolicyAssignmentReportsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentReportsRequest + * @property {string|null} [parent] ListOSPolicyAssignmentReportsRequest parent + * @property {number|null} [pageSize] ListOSPolicyAssignmentReportsRequest pageSize + * @property {string|null} [filter] ListOSPolicyAssignmentReportsRequest filter + * @property {string|null} [pageToken] ListOSPolicyAssignmentReportsRequest pageToken + */ - /** - * LabelSet labels. - * @member {Object.} labels - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @instance - */ - LabelSet.prototype.labels = $util.emptyObject; + /** + * Constructs a new ListOSPolicyAssignmentReportsRequest. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentReportsRequest. + * @implements IListOSPolicyAssignmentReportsRequest + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest=} [properties] Properties to set + */ + function ListOSPolicyAssignmentReportsRequest(properties) { + if (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 LabelSet instance using the specified properties. - * @function create - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet instance - */ - LabelSet.create = function create(properties) { - return new LabelSet(properties); - }; + /** + * ListOSPolicyAssignmentReportsRequest parent. + * @member {string} parent + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @instance + */ + ListOSPolicyAssignmentReportsRequest.prototype.parent = ""; - /** - * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. - * @function encode - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; + /** + * ListOSPolicyAssignmentReportsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @instance + */ + ListOSPolicyAssignmentReportsRequest.prototype.pageSize = 0; + + /** + * ListOSPolicyAssignmentReportsRequest filter. + * @member {string} filter + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @instance + */ + ListOSPolicyAssignmentReportsRequest.prototype.filter = ""; + + /** + * ListOSPolicyAssignmentReportsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @instance + */ + ListOSPolicyAssignmentReportsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentReportsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest} ListOSPolicyAssignmentReportsRequest instance + */ + ListOSPolicyAssignmentReportsRequest.create = function create(properties) { + return new ListOSPolicyAssignmentReportsRequest(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsRequest message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest} message ListOSPolicyAssignmentReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentReportsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsRequest message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest} message ListOSPolicyAssignmentReportsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentReportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentReportsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest} ListOSPolicyAssignmentReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentReportsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.filter = reader.string(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentReportsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest} ListOSPolicyAssignmentReportsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentReportsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentReportsRequest message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentReportsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentReportsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest} ListOSPolicyAssignmentReportsRequest + */ + ListOSPolicyAssignmentReportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentReportsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @static + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest} message ListOSPolicyAssignmentReportsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentReportsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.filter = ""; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentReportsRequest to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentReportsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentReportsRequest; + })(); + + v1alpha.ListOSPolicyAssignmentReportsResponse = (function() { + + /** + * Properties of a ListOSPolicyAssignmentReportsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @interface IListOSPolicyAssignmentReportsResponse + * @property {Array.|null} [osPolicyAssignmentReports] ListOSPolicyAssignmentReportsResponse osPolicyAssignmentReports + * @property {string|null} [nextPageToken] ListOSPolicyAssignmentReportsResponse nextPageToken + */ + + /** + * Constructs a new ListOSPolicyAssignmentReportsResponse. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a ListOSPolicyAssignmentReportsResponse. + * @implements IListOSPolicyAssignmentReportsResponse + * @constructor + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse=} [properties] Properties to set + */ + function ListOSPolicyAssignmentReportsResponse(properties) { + this.osPolicyAssignmentReports = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOSPolicyAssignmentReportsResponse osPolicyAssignmentReports. + * @member {Array.} osPolicyAssignmentReports + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @instance + */ + ListOSPolicyAssignmentReportsResponse.prototype.osPolicyAssignmentReports = $util.emptyArray; + + /** + * ListOSPolicyAssignmentReportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @instance + */ + ListOSPolicyAssignmentReportsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOSPolicyAssignmentReportsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse} ListOSPolicyAssignmentReportsResponse instance + */ + ListOSPolicyAssignmentReportsResponse.create = function create(properties) { + return new ListOSPolicyAssignmentReportsResponse(properties); + }; + + /** + * Encodes the specified ListOSPolicyAssignmentReportsResponse message. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse} message ListOSPolicyAssignmentReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentReportsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyAssignmentReports != null && message.osPolicyAssignmentReports.length) + for (var i = 0; i < message.osPolicyAssignmentReports.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.encode(message.osPolicyAssignmentReports[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 ListOSPolicyAssignmentReportsResponse message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse} message ListOSPolicyAssignmentReportsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOSPolicyAssignmentReportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOSPolicyAssignmentReportsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse} ListOSPolicyAssignmentReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentReportsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.osPolicyAssignmentReports && message.osPolicyAssignmentReports.length)) + message.osPolicyAssignmentReports = []; + message.osPolicyAssignmentReports.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOSPolicyAssignmentReportsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse} ListOSPolicyAssignmentReportsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOSPolicyAssignmentReportsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOSPolicyAssignmentReportsResponse message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOSPolicyAssignmentReportsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyAssignmentReports != null && message.hasOwnProperty("osPolicyAssignmentReports")) { + if (!Array.isArray(message.osPolicyAssignmentReports)) + return "osPolicyAssignmentReports: array expected"; + for (var i = 0; i < message.osPolicyAssignmentReports.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.verify(message.osPolicyAssignmentReports[i]); + if (error) + return "osPolicyAssignmentReports." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOSPolicyAssignmentReportsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse} ListOSPolicyAssignmentReportsResponse + */ + ListOSPolicyAssignmentReportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse(); + if (object.osPolicyAssignmentReports) { + if (!Array.isArray(object.osPolicyAssignmentReports)) + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.osPolicyAssignmentReports: array expected"); + message.osPolicyAssignmentReports = []; + for (var i = 0; i < object.osPolicyAssignmentReports.length; ++i) { + if (typeof object.osPolicyAssignmentReports[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.osPolicyAssignmentReports: object expected"); + message.osPolicyAssignmentReports[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.fromObject(object.osPolicyAssignmentReports[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOSPolicyAssignmentReportsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @static + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse} message ListOSPolicyAssignmentReportsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOSPolicyAssignmentReportsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyAssignmentReports = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.osPolicyAssignmentReports && message.osPolicyAssignmentReports.length) { + object.osPolicyAssignmentReports = []; + for (var j = 0; j < message.osPolicyAssignmentReports.length; ++j) + object.osPolicyAssignmentReports[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.toObject(message.osPolicyAssignmentReports[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOSPolicyAssignmentReportsResponse to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOSPolicyAssignmentReportsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOSPolicyAssignmentReportsResponse; + })(); + + v1alpha.OSPolicyAssignmentReport = (function() { + + /** + * Properties of a OSPolicyAssignmentReport. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyAssignmentReport + * @property {string|null} [name] OSPolicyAssignmentReport name + * @property {string|null} [instance] OSPolicyAssignmentReport instance + * @property {string|null} [osPolicyAssignment] OSPolicyAssignmentReport osPolicyAssignment + * @property {Array.|null} [osPolicyCompliances] OSPolicyAssignmentReport osPolicyCompliances + * @property {google.protobuf.ITimestamp|null} [updateTime] OSPolicyAssignmentReport updateTime + * @property {string|null} [lastRunId] OSPolicyAssignmentReport lastRunId + */ + + /** + * Constructs a new OSPolicyAssignmentReport. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyAssignmentReport. + * @implements IOSPolicyAssignmentReport + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport=} [properties] Properties to set + */ + function OSPolicyAssignmentReport(properties) { + this.osPolicyCompliances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyAssignmentReport name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.name = ""; + + /** + * OSPolicyAssignmentReport instance. + * @member {string} instance + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.instance = ""; + + /** + * OSPolicyAssignmentReport osPolicyAssignment. + * @member {string} osPolicyAssignment + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.osPolicyAssignment = ""; + + /** + * OSPolicyAssignmentReport osPolicyCompliances. + * @member {Array.} osPolicyCompliances + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.osPolicyCompliances = $util.emptyArray; + + /** + * OSPolicyAssignmentReport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.updateTime = null; + + /** + * OSPolicyAssignmentReport lastRunId. + * @member {string} lastRunId + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @instance + */ + OSPolicyAssignmentReport.prototype.lastRunId = ""; + + /** + * Creates a new OSPolicyAssignmentReport instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport} OSPolicyAssignmentReport instance + */ + OSPolicyAssignmentReport.create = function create(properties) { + return new OSPolicyAssignmentReport(properties); + }; + + /** + * Encodes the specified OSPolicyAssignmentReport message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport} message OSPolicyAssignmentReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentReport.encode = function encode(message, writer) { + 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.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instance); + if (message.osPolicyAssignment != null && Object.hasOwnProperty.call(message, "osPolicyAssignment")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.osPolicyAssignment); + if (message.osPolicyCompliances != null && message.osPolicyCompliances.length) + for (var i = 0; i < message.osPolicyCompliances.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.encode(message.osPolicyCompliances[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.lastRunId != null && Object.hasOwnProperty.call(message, "lastRunId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.lastRunId); + return writer; + }; + + /** + * Encodes the specified OSPolicyAssignmentReport message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport} message OSPolicyAssignmentReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignmentReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyAssignmentReport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport} OSPolicyAssignmentReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentReport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.instance = reader.string(); + break; + case 3: + message.osPolicyAssignment = reader.string(); + break; + case 4: + if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) + message.osPolicyCompliances = []; + message.osPolicyCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.decode(reader, reader.uint32())); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.lastRunId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyAssignmentReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport} OSPolicyAssignmentReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignmentReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyAssignmentReport message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyAssignmentReport.verify = function verify(message) { + if (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.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + if (!$util.isString(message.osPolicyAssignment)) + return "osPolicyAssignment: string expected"; + if (message.osPolicyCompliances != null && message.hasOwnProperty("osPolicyCompliances")) { + if (!Array.isArray(message.osPolicyCompliances)) + return "osPolicyCompliances: array expected"; + for (var i = 0; i < message.osPolicyCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.verify(message.osPolicyCompliances[i]); + if (error) + return "osPolicyCompliances." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.lastRunId != null && message.hasOwnProperty("lastRunId")) + if (!$util.isString(message.lastRunId)) + return "lastRunId: string expected"; + return null; + }; + + /** + * Creates a OSPolicyAssignmentReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport} OSPolicyAssignmentReport + */ + OSPolicyAssignmentReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport(); + if (object.name != null) + message.name = String(object.name); + if (object.instance != null) + message.instance = String(object.instance); + if (object.osPolicyAssignment != null) + message.osPolicyAssignment = String(object.osPolicyAssignment); + if (object.osPolicyCompliances) { + if (!Array.isArray(object.osPolicyCompliances)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.osPolicyCompliances: array expected"); + message.osPolicyCompliances = []; + for (var i = 0; i < object.osPolicyCompliances.length; ++i) { + if (typeof object.osPolicyCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.osPolicyCompliances: object expected"); + message.osPolicyCompliances[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.fromObject(object.osPolicyCompliances[i]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastRunId != null) + message.lastRunId = String(object.lastRunId); + return message; + }; + + /** + * Creates a plain object from a OSPolicyAssignmentReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport} message OSPolicyAssignmentReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyAssignmentReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyCompliances = []; + if (options.defaults) { + object.name = ""; + object.instance = ""; + object.osPolicyAssignment = ""; + object.updateTime = null; + object.lastRunId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) + object.osPolicyAssignment = message.osPolicyAssignment; + if (message.osPolicyCompliances && message.osPolicyCompliances.length) { + object.osPolicyCompliances = []; + for (var j = 0; j < message.osPolicyCompliances.length; ++j) + object.osPolicyCompliances[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.toObject(message.osPolicyCompliances[j], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastRunId != null && message.hasOwnProperty("lastRunId")) + object.lastRunId = message.lastRunId; + return object; + }; + + /** + * Converts this OSPolicyAssignmentReport to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @instance + * @returns {Object.} JSON object + */ + OSPolicyAssignmentReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicyAssignmentReport.OSPolicyCompliance = (function() { + + /** + * Properties of a OSPolicyCompliance. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @interface IOSPolicyCompliance + * @property {string|null} [osPolicyId] OSPolicyCompliance osPolicyId + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState|null} [complianceState] OSPolicyCompliance complianceState + * @property {string|null} [complianceStateReason] OSPolicyCompliance complianceStateReason + * @property {Array.|null} [osPolicyResourceCompliances] OSPolicyCompliance osPolicyResourceCompliances + */ + + /** + * Constructs a new OSPolicyCompliance. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @classdesc Represents a OSPolicyCompliance. + * @implements IOSPolicyCompliance + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance=} [properties] Properties to set + */ + function OSPolicyCompliance(properties) { + this.osPolicyResourceCompliances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyCompliance osPolicyId. + * @member {string} osPolicyId + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyId = ""; + + /** + * OSPolicyCompliance complianceState. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState} complianceState + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.complianceState = 0; + + /** + * OSPolicyCompliance complianceStateReason. + * @member {string} complianceStateReason + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.complianceStateReason = ""; + + /** + * OSPolicyCompliance osPolicyResourceCompliances. + * @member {Array.} osPolicyResourceCompliances + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + */ + OSPolicyCompliance.prototype.osPolicyResourceCompliances = $util.emptyArray; + + /** + * Creates a new OSPolicyCompliance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance} OSPolicyCompliance instance + */ + OSPolicyCompliance.create = function create(properties) { + return new OSPolicyCompliance(properties); + }; + + /** + * Encodes the specified OSPolicyCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyCompliance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyId != null && Object.hasOwnProperty.call(message, "osPolicyId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyId); + if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.complianceState); + if (message.complianceStateReason != null && Object.hasOwnProperty.call(message, "complianceStateReason")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.complianceStateReason); + if (message.osPolicyResourceCompliances != null && message.osPolicyResourceCompliances.length) + for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.encode(message.osPolicyResourceCompliances[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OSPolicyCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.IOSPolicyCompliance} message OSPolicyCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyCompliance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance} OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyCompliance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyId = reader.string(); + break; + case 2: + message.complianceState = reader.int32(); + break; + case 3: + message.complianceStateReason = reader.string(); + break; + case 4: + if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) + message.osPolicyResourceCompliances = []; + message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyCompliance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance} OSPolicyCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyCompliance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyCompliance message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyCompliance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) + if (!$util.isString(message.osPolicyId)) + return "osPolicyId: string expected"; + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + switch (message.complianceState) { + default: + return "complianceState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) + if (!$util.isString(message.complianceStateReason)) + return "complianceStateReason: string expected"; + if (message.osPolicyResourceCompliances != null && message.hasOwnProperty("osPolicyResourceCompliances")) { + if (!Array.isArray(message.osPolicyResourceCompliances)) + return "osPolicyResourceCompliances: array expected"; + for (var i = 0; i < message.osPolicyResourceCompliances.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify(message.osPolicyResourceCompliances[i]); + if (error) + return "osPolicyResourceCompliances." + error; + } + } + return null; + }; + + /** + * Creates a OSPolicyCompliance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance} OSPolicyCompliance + */ + OSPolicyCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance(); + if (object.osPolicyId != null) + message.osPolicyId = String(object.osPolicyId); + switch (object.complianceState) { + case "UNKNOWN": + case 0: + message.complianceState = 0; + break; + case "COMPLIANT": + case 1: + message.complianceState = 1; + break; + case "NON_COMPLIANT": + case 2: + message.complianceState = 2; + break; + } + if (object.complianceStateReason != null) + message.complianceStateReason = String(object.complianceStateReason); + if (object.osPolicyResourceCompliances) { + if (!Array.isArray(object.osPolicyResourceCompliances)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.osPolicyResourceCompliances: array expected"); + message.osPolicyResourceCompliances = []; + for (var i = 0; i < object.osPolicyResourceCompliances.length; ++i) { + if (typeof object.osPolicyResourceCompliances[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.osPolicyResourceCompliances: object expected"); + message.osPolicyResourceCompliances[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.fromObject(object.osPolicyResourceCompliances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyCompliance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance} message OSPolicyCompliance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyCompliance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicyResourceCompliances = []; + if (options.defaults) { + object.osPolicyId = ""; + object.complianceState = options.enums === String ? "UNKNOWN" : 0; + object.complianceStateReason = ""; + } + if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) + object.osPolicyId = message.osPolicyId; + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState[message.complianceState] : message.complianceState; + if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) + object.complianceStateReason = message.complianceStateReason; + if (message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length) { + object.osPolicyResourceCompliances = []; + for (var j = 0; j < message.osPolicyResourceCompliances.length; ++j) + object.osPolicyResourceCompliances[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.toObject(message.osPolicyResourceCompliances[j], options); + } + return object; + }; + + /** + * Converts this OSPolicyCompliance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @instance + * @returns {Object.} JSON object + */ + OSPolicyCompliance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ComplianceState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} COMPLIANT=1 COMPLIANT value + * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value + */ + OSPolicyCompliance.ComplianceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "COMPLIANT"] = 1; + values[valuesById[2] = "NON_COMPLIANT"] = 2; + return values; + })(); + + OSPolicyCompliance.OSPolicyResourceCompliance = (function() { + + /** + * Properties of a OSPolicyResourceCompliance. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @interface IOSPolicyResourceCompliance + * @property {string|null} [osPolicyResourceId] OSPolicyResourceCompliance osPolicyResourceId + * @property {Array.|null} [configSteps] OSPolicyResourceCompliance configSteps + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState|null} [complianceState] OSPolicyResourceCompliance complianceState + * @property {string|null} [complianceStateReason] OSPolicyResourceCompliance complianceStateReason + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput|null} [execResourceOutput] OSPolicyResourceCompliance execResourceOutput + */ + + /** + * Constructs a new OSPolicyResourceCompliance. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @classdesc Represents a OSPolicyResourceCompliance. + * @implements IOSPolicyResourceCompliance + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance=} [properties] Properties to set + */ + function OSPolicyResourceCompliance(properties) { + this.configSteps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyResourceCompliance osPolicyResourceId. + * @member {string} osPolicyResourceId + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.osPolicyResourceId = ""; + + /** + * OSPolicyResourceCompliance configSteps. + * @member {Array.} configSteps + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.configSteps = $util.emptyArray; + + /** + * OSPolicyResourceCompliance complianceState. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState} complianceState + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.complianceState = 0; + + /** + * OSPolicyResourceCompliance complianceStateReason. + * @member {string} complianceStateReason + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.complianceStateReason = ""; + + /** + * OSPolicyResourceCompliance execResourceOutput. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput|null|undefined} execResourceOutput + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + OSPolicyResourceCompliance.prototype.execResourceOutput = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OSPolicyResourceCompliance output. + * @member {"execResourceOutput"|undefined} output + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + */ + Object.defineProperty(OSPolicyResourceCompliance.prototype, "output", { + get: $util.oneOfGetter($oneOfFields = ["execResourceOutput"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OSPolicyResourceCompliance instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} OSPolicyResourceCompliance instance + */ + OSPolicyResourceCompliance.create = function create(properties) { + return new OSPolicyResourceCompliance(properties); + }; + + /** + * Encodes the specified OSPolicyResourceCompliance message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceCompliance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osPolicyResourceId != null && Object.hasOwnProperty.call(message, "osPolicyResourceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osPolicyResourceId); + if (message.configSteps != null && message.configSteps.length) + for (var i = 0; i < message.configSteps.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.encode(message.configSteps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.complianceState); + if (message.complianceStateReason != null && Object.hasOwnProperty.call(message, "complianceStateReason")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.complianceStateReason); + if (message.execResourceOutput != null && Object.hasOwnProperty.call(message, "execResourceOutput")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.encode(message.execResourceOutput, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OSPolicyResourceCompliance message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.IOSPolicyResourceCompliance} message OSPolicyResourceCompliance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceCompliance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceCompliance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osPolicyResourceId = reader.string(); + break; + case 2: + if (!(message.configSteps && message.configSteps.length)) + message.configSteps = []; + message.configSteps.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); + break; + case 3: + message.complianceState = reader.int32(); + break; + case 4: + message.complianceStateReason = reader.string(); + break; + case 5: + message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyResourceCompliance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} OSPolicyResourceCompliance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceCompliance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyResourceCompliance message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyResourceCompliance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) + if (!$util.isString(message.osPolicyResourceId)) + return "osPolicyResourceId: string expected"; + if (message.configSteps != null && message.hasOwnProperty("configSteps")) { + if (!Array.isArray(message.configSteps)) + return "configSteps: array expected"; + for (var i = 0; i < message.configSteps.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify(message.configSteps[i]); + if (error) + return "configSteps." + error; + } + } + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + switch (message.complianceState) { + default: + return "complianceState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) + if (!$util.isString(message.complianceStateReason)) + return "complianceStateReason: string expected"; + if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { + properties.output = 1; + { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify(message.execResourceOutput); + if (error) + return "execResourceOutput." + error; + } + } + return null; + }; + + /** + * Creates a OSPolicyResourceCompliance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} OSPolicyResourceCompliance + */ + OSPolicyResourceCompliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance(); + if (object.osPolicyResourceId != null) + message.osPolicyResourceId = String(object.osPolicyResourceId); + if (object.configSteps) { + if (!Array.isArray(object.configSteps)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.configSteps: array expected"); + message.configSteps = []; + for (var i = 0; i < object.configSteps.length; ++i) { + if (typeof object.configSteps[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.configSteps: object expected"); + message.configSteps[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.fromObject(object.configSteps[i]); + } + } + switch (object.complianceState) { + case "UNKNOWN": + case 0: + message.complianceState = 0; + break; + case "COMPLIANT": + case 1: + message.complianceState = 1; + break; + case "NON_COMPLIANT": + case 2: + message.complianceState = 2; + break; + } + if (object.complianceStateReason != null) + message.complianceStateReason = String(object.complianceStateReason); + if (object.execResourceOutput != null) { + if (typeof object.execResourceOutput !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.execResourceOutput: object expected"); + message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.fromObject(object.execResourceOutput); + } + return message; + }; + + /** + * Creates a plain object from a OSPolicyResourceCompliance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} message OSPolicyResourceCompliance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyResourceCompliance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.configSteps = []; + if (options.defaults) { + object.osPolicyResourceId = ""; + object.complianceState = options.enums === String ? "UNKNOWN" : 0; + object.complianceStateReason = ""; + } + if (message.osPolicyResourceId != null && message.hasOwnProperty("osPolicyResourceId")) + object.osPolicyResourceId = message.osPolicyResourceId; + if (message.configSteps && message.configSteps.length) { + object.configSteps = []; + for (var j = 0; j < message.configSteps.length; ++j) + object.configSteps[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.toObject(message.configSteps[j], options); + } + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState[message.complianceState] : message.complianceState; + if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) + object.complianceStateReason = message.complianceStateReason; + if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { + object.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.toObject(message.execResourceOutput, options); + if (options.oneofs) + object.output = "execResourceOutput"; + } + return object; + }; + + /** + * Converts this OSPolicyResourceCompliance to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @instance + * @returns {Object.} JSON object + */ + OSPolicyResourceCompliance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicyResourceCompliance.OSPolicyResourceConfigStep = (function() { + + /** + * Properties of a OSPolicyResourceConfigStep. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @interface IOSPolicyResourceConfigStep + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type|null} [type] OSPolicyResourceConfigStep type + * @property {string|null} [errorMessage] OSPolicyResourceConfigStep errorMessage + */ + + /** + * Constructs a new OSPolicyResourceConfigStep. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @classdesc Represents a OSPolicyResourceConfigStep. + * @implements IOSPolicyResourceConfigStep + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep=} [properties] Properties to set + */ + function OSPolicyResourceConfigStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyResourceConfigStep type. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type} type + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.type = 0; + + /** + * OSPolicyResourceConfigStep errorMessage. + * @member {string} errorMessage + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @instance + */ + OSPolicyResourceConfigStep.prototype.errorMessage = ""; + + /** + * Creates a new OSPolicyResourceConfigStep instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep instance + */ + OSPolicyResourceConfigStep.create = function create(properties) { + return new OSPolicyResourceConfigStep(properties); + }; + + /** + * Encodes the specified OSPolicyResourceConfigStep message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceConfigStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); + return writer; + }; + + /** + * Encodes the specified OSPolicyResourceConfigStep message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IOSPolicyResourceConfigStep} message OSPolicyResourceConfigStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyResourceConfigStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceConfigStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.errorMessage = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyResourceConfigStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyResourceConfigStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyResourceConfigStep message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyResourceConfigStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + return null; + }; + + /** + * Creates a OSPolicyResourceConfigStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} OSPolicyResourceConfigStep + */ + OSPolicyResourceConfigStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "VALIDATION": + case 1: + message.type = 1; + break; + case "DESIRED_STATE_CHECK": + case 2: + message.type = 2; + break; + case "DESIRED_STATE_ENFORCEMENT": + case 3: + message.type = 3; + break; + case "DESIRED_STATE_CHECK_POST_ENFORCEMENT": + case 4: + message.type = 4; + break; + } + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + return message; + }; + + /** + * Creates a plain object from a OSPolicyResourceConfigStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} message OSPolicyResourceConfigStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyResourceConfigStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.errorMessage = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type[message.type] : message.type; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + return object; + }; + + /** + * Converts this OSPolicyResourceConfigStep to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @instance + * @returns {Object.} JSON object + */ + OSPolicyResourceConfigStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} VALIDATION=1 VALIDATION value + * @property {number} DESIRED_STATE_CHECK=2 DESIRED_STATE_CHECK value + * @property {number} DESIRED_STATE_ENFORCEMENT=3 DESIRED_STATE_ENFORCEMENT value + * @property {number} DESIRED_STATE_CHECK_POST_ENFORCEMENT=4 DESIRED_STATE_CHECK_POST_ENFORCEMENT value + */ + OSPolicyResourceConfigStep.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VALIDATION"] = 1; + values[valuesById[2] = "DESIRED_STATE_CHECK"] = 2; + values[valuesById[3] = "DESIRED_STATE_ENFORCEMENT"] = 3; + values[valuesById[4] = "DESIRED_STATE_CHECK_POST_ENFORCEMENT"] = 4; + return values; + })(); + + return OSPolicyResourceConfigStep; + })(); + + /** + * ComplianceState enum. + * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} COMPLIANT=1 COMPLIANT value + * @property {number} NON_COMPLIANT=2 NON_COMPLIANT value + */ + OSPolicyResourceCompliance.ComplianceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "COMPLIANT"] = 1; + values[valuesById[2] = "NON_COMPLIANT"] = 2; + return values; + })(); + + OSPolicyResourceCompliance.ExecResourceOutput = (function() { + + /** + * Properties of an ExecResourceOutput. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @interface IExecResourceOutput + * @property {Uint8Array|null} [enforcementOutput] ExecResourceOutput enforcementOutput + */ + + /** + * Constructs a new ExecResourceOutput. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @classdesc Represents an ExecResourceOutput. + * @implements IExecResourceOutput + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set + */ + function ExecResourceOutput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecResourceOutput enforcementOutput. + * @member {Uint8Array} enforcementOutput + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @instance + */ + ExecResourceOutput.prototype.enforcementOutput = $util.newBuffer([]); + + /** + * Creates a new ExecResourceOutput instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput instance + */ + ExecResourceOutput.create = function create(properties) { + return new ExecResourceOutput(properties); + }; + + /** + * Encodes the specified ExecResourceOutput message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResourceOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enforcementOutput != null && Object.hasOwnProperty.call(message, "enforcementOutput")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.enforcementOutput); + return writer; + }; + + /** + * Encodes the specified ExecResourceOutput message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.IExecResourceOutput} message ExecResourceOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecResourceOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResourceOutput.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.enforcementOutput = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecResourceOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecResourceOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecResourceOutput message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecResourceOutput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) + if (!(message.enforcementOutput && typeof message.enforcementOutput.length === "number" || $util.isString(message.enforcementOutput))) + return "enforcementOutput: buffer expected"; + return null; + }; + + /** + * Creates an ExecResourceOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} ExecResourceOutput + */ + ExecResourceOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput(); + if (object.enforcementOutput != null) + if (typeof object.enforcementOutput === "string") + $util.base64.decode(object.enforcementOutput, message.enforcementOutput = $util.newBuffer($util.base64.length(object.enforcementOutput)), 0); + else if (object.enforcementOutput.length) + message.enforcementOutput = object.enforcementOutput; + return message; + }; + + /** + * Creates a plain object from an ExecResourceOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} message ExecResourceOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecResourceOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.enforcementOutput = ""; + else { + object.enforcementOutput = []; + if (options.bytes !== Array) + object.enforcementOutput = $util.newBuffer(object.enforcementOutput); + } + if (message.enforcementOutput != null && message.hasOwnProperty("enforcementOutput")) + object.enforcementOutput = options.bytes === String ? $util.base64.encode(message.enforcementOutput, 0, message.enforcementOutput.length) : options.bytes === Array ? Array.prototype.slice.call(message.enforcementOutput) : message.enforcementOutput; + return object; + }; + + /** + * Converts this ExecResourceOutput to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @instance + * @returns {Object.} JSON object + */ + ExecResourceOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExecResourceOutput; + })(); + + return OSPolicyResourceCompliance; + })(); + + return OSPolicyCompliance; + })(); + + return OSPolicyAssignmentReport; + })(); + + v1alpha.OSPolicyAssignment = (function() { + + /** + * Properties of a OSPolicyAssignment. + * @memberof google.cloud.osconfig.v1alpha + * @interface IOSPolicyAssignment + * @property {string|null} [name] OSPolicyAssignment name + * @property {string|null} [description] OSPolicyAssignment description + * @property {Array.|null} [osPolicies] OSPolicyAssignment osPolicies + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null} [instanceFilter] OSPolicyAssignment instanceFilter + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null} [rollout] OSPolicyAssignment rollout + * @property {string|null} [revisionId] OSPolicyAssignment revisionId + * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] OSPolicyAssignment revisionCreateTime + * @property {string|null} [etag] OSPolicyAssignment etag + * @property {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState|null} [rolloutState] OSPolicyAssignment rolloutState + * @property {boolean|null} [baseline] OSPolicyAssignment baseline + * @property {boolean|null} [deleted] OSPolicyAssignment deleted + * @property {boolean|null} [reconciling] OSPolicyAssignment reconciling + * @property {string|null} [uid] OSPolicyAssignment uid + */ + + /** + * Constructs a new OSPolicyAssignment. + * @memberof google.cloud.osconfig.v1alpha + * @classdesc Represents a OSPolicyAssignment. + * @implements IOSPolicyAssignment + * @constructor + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set + */ + function OSPolicyAssignment(properties) { + this.osPolicies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OSPolicyAssignment name. + * @member {string} name + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.name = ""; + + /** + * OSPolicyAssignment description. + * @member {string} description + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.description = ""; + + /** + * OSPolicyAssignment osPolicies. + * @member {Array.} osPolicies + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.osPolicies = $util.emptyArray; + + /** + * OSPolicyAssignment instanceFilter. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IInstanceFilter|null|undefined} instanceFilter + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.instanceFilter = null; + + /** + * OSPolicyAssignment rollout. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.IRollout|null|undefined} rollout + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.rollout = null; + + /** + * OSPolicyAssignment revisionId. + * @member {string} revisionId + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.revisionId = ""; + + /** + * OSPolicyAssignment revisionCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.revisionCreateTime = null; + + /** + * OSPolicyAssignment etag. + * @member {string} etag + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.etag = ""; + + /** + * OSPolicyAssignment rolloutState. + * @member {google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState} rolloutState + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.rolloutState = 0; + + /** + * OSPolicyAssignment baseline. + * @member {boolean} baseline + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.baseline = false; + + /** + * OSPolicyAssignment deleted. + * @member {boolean} deleted + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.deleted = false; + + /** + * OSPolicyAssignment reconciling. + * @member {boolean} reconciling + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.reconciling = false; + + /** + * OSPolicyAssignment uid. + * @member {string} uid + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + */ + OSPolicyAssignment.prototype.uid = ""; + + /** + * Creates a new OSPolicyAssignment instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment instance + */ + OSPolicyAssignment.create = function create(properties) { + return new OSPolicyAssignment(properties); + }; + + /** + * Encodes the specified OSPolicyAssignment message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.osPolicies != null && message.osPolicies.length) + for (var i = 0; i < message.osPolicies.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicy.encode(message.osPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.instanceFilter != null && Object.hasOwnProperty.call(message, "instanceFilter")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.encode(message.instanceFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.encode(message.rollout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.revisionId); + if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rolloutState); + if (message.baseline != null && Object.hasOwnProperty.call(message, "baseline")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.baseline); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deleted); + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.reconciling); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.uid); + return writer; + }; + + /** + * Encodes the specified OSPolicyAssignment message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.IOSPolicyAssignment} message OSPolicyAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OSPolicyAssignment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.osPolicies && message.osPolicies.length)) + message.osPolicies = []; + message.osPolicies.push($root.google.cloud.osconfig.v1alpha.OSPolicy.decode(reader, reader.uint32())); + break; + case 4: + message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); + break; + case 5: + message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); + break; + case 6: + message.revisionId = reader.string(); + break; + case 7: + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.etag = reader.string(); + break; + case 9: + message.rolloutState = reader.int32(); + break; + case 10: + message.baseline = reader.bool(); + break; + case 11: + message.deleted = reader.bool(); + break; + case 12: + message.reconciling = reader.bool(); + break; + case 13: + message.uid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OSPolicyAssignment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OSPolicyAssignment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OSPolicyAssignment message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OSPolicyAssignment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.osPolicies != null && message.hasOwnProperty("osPolicies")) { + if (!Array.isArray(message.osPolicies)) + return "osPolicies: array expected"; + for (var i = 0; i < message.osPolicies.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicy.verify(message.osPolicies[i]); + if (error) + return "osPolicies." + error; + } + } + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.verify(message.instanceFilter); + if (error) + return "instanceFilter." + error; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); + if (error) + return "revisionCreateTime." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + switch (message.rolloutState) { + default: + return "rolloutState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.baseline != null && message.hasOwnProperty("baseline")) + if (typeof message.baseline !== "boolean") + return "baseline: boolean expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (typeof message.reconciling !== "boolean") + return "reconciling: boolean expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + return null; + }; + + /** + * Creates a OSPolicyAssignment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment} OSPolicyAssignment + */ + OSPolicyAssignment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.osPolicies) { + if (!Array.isArray(object.osPolicies)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: array expected"); + message.osPolicies = []; + for (var i = 0; i < object.osPolicies.length; ++i) { + if (typeof object.osPolicies[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.osPolicies: object expected"); + message.osPolicies[i] = $root.google.cloud.osconfig.v1alpha.OSPolicy.fromObject(object.osPolicies[i]); + } + } + if (object.instanceFilter != null) { + if (typeof object.instanceFilter !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.instanceFilter: object expected"); + message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.fromObject(object.instanceFilter); + } + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.rollout: object expected"); + message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.fromObject(object.rollout); + } + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.revisionCreateTime != null) { + if (typeof object.revisionCreateTime !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.revisionCreateTime: object expected"); + message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + switch (object.rolloutState) { + case "ROLLOUT_STATE_UNSPECIFIED": + case 0: + message.rolloutState = 0; + break; + case "IN_PROGRESS": + case 1: + message.rolloutState = 1; + break; + case "CANCELLING": + case 2: + message.rolloutState = 2; + break; + case "CANCELLED": + case 3: + message.rolloutState = 3; + break; + case "SUCCEEDED": + case 4: + message.rolloutState = 4; + break; + } + if (object.baseline != null) + message.baseline = Boolean(object.baseline); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + if (object.reconciling != null) + message.reconciling = Boolean(object.reconciling); + if (object.uid != null) + message.uid = String(object.uid); + return message; + }; + + /** + * Creates a plain object from a OSPolicyAssignment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment} message OSPolicyAssignment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OSPolicyAssignment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.osPolicies = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.instanceFilter = null; + object.rollout = null; + object.revisionId = ""; + object.revisionCreateTime = null; + object.etag = ""; + object.rolloutState = options.enums === String ? "ROLLOUT_STATE_UNSPECIFIED" : 0; + object.baseline = false; + object.deleted = false; + object.reconciling = false; + object.uid = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.osPolicies && message.osPolicies.length) { + object.osPolicies = []; + for (var j = 0; j < message.osPolicies.length; ++j) + object.osPolicies[j] = $root.google.cloud.osconfig.v1alpha.OSPolicy.toObject(message.osPolicies[j], options); + } + if (message.instanceFilter != null && message.hasOwnProperty("instanceFilter")) + object.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.toObject(message.instanceFilter, options); + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.toObject(message.rollout, options); + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) + object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; + if (message.baseline != null && message.hasOwnProperty("baseline")) + object.baseline = message.baseline; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + object.reconciling = message.reconciling; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + return object; + }; + + /** + * Converts this OSPolicyAssignment to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @instance + * @returns {Object.} JSON object + */ + OSPolicyAssignment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + OSPolicyAssignment.LabelSet = (function() { + + /** + * Properties of a LabelSet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @interface ILabelSet + * @property {Object.|null} [labels] LabelSet labels + */ + + /** + * Constructs a new LabelSet. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @classdesc Represents a LabelSet. + * @implements ILabelSet + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set + */ + function LabelSet(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelSet labels. + * @member {Object.} labels + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @instance + */ + LabelSet.prototype.labels = $util.emptyObject; + + /** + * Creates a new LabelSet instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} LabelSet instance + */ + LabelSet.create = function create(properties) { + return new LabelSet(properties); + }; + + /** + * Encodes the specified LabelSet message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.ILabelSet} message LabelSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; /** * Encodes the specified LabelSet message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify|verify} messages. @@ -43547,6 +45941,7 @@ * @property {Array.|null} [osShortNames] InstanceFilter osShortNames * @property {Array.|null} [inclusionLabels] InstanceFilter inclusionLabels * @property {Array.|null} [exclusionLabels] InstanceFilter exclusionLabels + * @property {Array.|null} [inventories] InstanceFilter inventories */ /** @@ -43561,6 +45956,7 @@ this.osShortNames = []; this.inclusionLabels = []; this.exclusionLabels = []; + this.inventories = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43599,6 +45995,14 @@ */ InstanceFilter.prototype.exclusionLabels = $util.emptyArray; + /** + * InstanceFilter inventories. + * @member {Array.} inventories + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @instance + */ + InstanceFilter.prototype.inventories = $util.emptyArray; + /** * Creates a new InstanceFilter instance using the specified properties. * @function create @@ -43634,6 +46038,9 @@ if (message.exclusionLabels != null && message.exclusionLabels.length) for (var i = 0; i < message.exclusionLabels.length; ++i) $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.encode(message.exclusionLabels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inventories != null && message.inventories.length) + for (var i = 0; i < message.inventories.length; ++i) + $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.encode(message.inventories[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -43651,201 +46058,441 @@ }; /** - * Decodes an InstanceFilter message from the specified reader or buffer. - * @function decode + * Decodes an InstanceFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.all = reader.bool(); + break; + case 2: + if (!(message.osShortNames && message.osShortNames.length)) + message.osShortNames = []; + message.osShortNames.push(reader.string()); + break; + case 3: + if (!(message.inclusionLabels && message.inclusionLabels.length)) + message.inclusionLabels = []; + message.inclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.exclusionLabels && message.exclusionLabels.length)) + message.exclusionLabels = []; + message.exclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.inventories && message.inventories.length)) + message.inventories = []; + message.inventories.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceFilter message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.all != null && message.hasOwnProperty("all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; + if (message.osShortNames != null && message.hasOwnProperty("osShortNames")) { + if (!Array.isArray(message.osShortNames)) + return "osShortNames: array expected"; + for (var i = 0; i < message.osShortNames.length; ++i) + if (!$util.isString(message.osShortNames[i])) + return "osShortNames: string[] expected"; + } + if (message.inclusionLabels != null && message.hasOwnProperty("inclusionLabels")) { + if (!Array.isArray(message.inclusionLabels)) + return "inclusionLabels: array expected"; + for (var i = 0; i < message.inclusionLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.inclusionLabels[i]); + if (error) + return "inclusionLabels." + error; + } + } + if (message.exclusionLabels != null && message.hasOwnProperty("exclusionLabels")) { + if (!Array.isArray(message.exclusionLabels)) + return "exclusionLabels: array expected"; + for (var i = 0; i < message.exclusionLabels.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.exclusionLabels[i]); + if (error) + return "exclusionLabels." + error; + } + } + if (message.inventories != null && message.hasOwnProperty("inventories")) { + if (!Array.isArray(message.inventories)) + return "inventories: array expected"; + for (var i = 0; i < message.inventories.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.verify(message.inventories[i]); + if (error) + return "inventories." + error; + } + } + return null; + }; + + /** + * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter + */ + InstanceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); + if (object.all != null) + message.all = Boolean(object.all); + if (object.osShortNames) { + if (!Array.isArray(object.osShortNames)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.osShortNames: array expected"); + message.osShortNames = []; + for (var i = 0; i < object.osShortNames.length; ++i) + message.osShortNames[i] = String(object.osShortNames[i]); + } + if (object.inclusionLabels) { + if (!Array.isArray(object.inclusionLabels)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: array expected"); + message.inclusionLabels = []; + for (var i = 0; i < object.inclusionLabels.length; ++i) { + if (typeof object.inclusionLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: object expected"); + message.inclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.inclusionLabels[i]); + } + } + if (object.exclusionLabels) { + if (!Array.isArray(object.exclusionLabels)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: array expected"); + message.exclusionLabels = []; + for (var i = 0; i < object.exclusionLabels.length; ++i) { + if (typeof object.exclusionLabels[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: object expected"); + message.exclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.exclusionLabels[i]); + } + } + if (object.inventories) { + if (!Array.isArray(object.inventories)) + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inventories: array expected"); + message.inventories = []; + for (var i = 0; i < object.inventories.length; ++i) { + if (typeof object.inventories[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inventories: object expected"); + message.inventories[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.fromObject(object.inventories[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. + * @function toObject * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} message InstanceFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - InstanceFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.all = reader.bool(); - break; - case 2: - if (!(message.osShortNames && message.osShortNames.length)) - message.osShortNames = []; - message.osShortNames.push(reader.string()); - break; - case 3: - if (!(message.inclusionLabels && message.inclusionLabels.length)) - message.inclusionLabels = []; - message.inclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.exclusionLabels && message.exclusionLabels.length)) - message.exclusionLabels = []; - message.exclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } + InstanceFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.osShortNames = []; + object.inclusionLabels = []; + object.exclusionLabels = []; + object.inventories = []; } - return message; + if (options.defaults) + object.all = false; + if (message.all != null && message.hasOwnProperty("all")) + object.all = message.all; + if (message.osShortNames && message.osShortNames.length) { + object.osShortNames = []; + for (var j = 0; j < message.osShortNames.length; ++j) + object.osShortNames[j] = message.osShortNames[j]; + } + if (message.inclusionLabels && message.inclusionLabels.length) { + object.inclusionLabels = []; + for (var j = 0; j < message.inclusionLabels.length; ++j) + object.inclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.inclusionLabels[j], options); + } + if (message.exclusionLabels && message.exclusionLabels.length) { + object.exclusionLabels = []; + for (var j = 0; j < message.exclusionLabels.length; ++j) + object.exclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.exclusionLabels[j], options); + } + if (message.inventories && message.inventories.length) { + object.inventories = []; + for (var j = 0; j < message.inventories.length; ++j) + object.inventories[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.toObject(message.inventories[j], options); + } + return object; }; /** - * Decodes an InstanceFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited + * Converts this InstanceFilter to JSON. + * @function toJSON * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @instance + * @returns {Object.} JSON object */ - InstanceFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + InstanceFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Verifies an InstanceFilter message. - * @function verify - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.all != null && message.hasOwnProperty("all")) - if (typeof message.all !== "boolean") - return "all: boolean expected"; - if (message.osShortNames != null && message.hasOwnProperty("osShortNames")) { - if (!Array.isArray(message.osShortNames)) - return "osShortNames: array expected"; - for (var i = 0; i < message.osShortNames.length; ++i) - if (!$util.isString(message.osShortNames[i])) - return "osShortNames: string[] expected"; - } - if (message.inclusionLabels != null && message.hasOwnProperty("inclusionLabels")) { - if (!Array.isArray(message.inclusionLabels)) - return "inclusionLabels: array expected"; - for (var i = 0; i < message.inclusionLabels.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.inclusionLabels[i]); - if (error) - return "inclusionLabels." + error; - } - } - if (message.exclusionLabels != null && message.hasOwnProperty("exclusionLabels")) { - if (!Array.isArray(message.exclusionLabels)) - return "exclusionLabels: array expected"; - for (var i = 0; i < message.exclusionLabels.length; ++i) { - var error = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.verify(message.exclusionLabels[i]); - if (error) - return "exclusionLabels." + error; + InstanceFilter.Inventory = (function() { + + /** + * Properties of an Inventory. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @interface IInventory + * @property {string|null} [osShortName] Inventory osShortName + * @property {string|null} [osVersion] Inventory osVersion + */ + + /** + * Constructs a new Inventory. + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @classdesc Represents an Inventory. + * @implements IInventory + * @constructor + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory=} [properties] Properties to set + */ + function Inventory(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Inventory osShortName. + * @member {string} osShortName + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @instance + */ + Inventory.prototype.osShortName = ""; + + /** + * Inventory osVersion. + * @member {string} osVersion + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @instance + */ + Inventory.prototype.osVersion = ""; + + /** + * Creates a new Inventory instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory} Inventory instance + */ + Inventory.create = function create(properties) { + return new Inventory(properties); + }; + + /** + * Encodes the specified Inventory message. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.osShortName != null && Object.hasOwnProperty.call(message, "osShortName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.osShortName); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.osVersion); + return writer; + }; + + /** + * Encodes the specified Inventory message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.IInventory} message Inventory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Inventory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Inventory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.osShortName = reader.string(); + break; + case 2: + message.osVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Inventory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory} Inventory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Inventory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Inventory message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Inventory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + if (!$util.isString(message.osShortName)) + return "osShortName: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; + return null; + }; + + /** + * Creates an Inventory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory} Inventory + */ + Inventory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory(); + if (object.osShortName != null) + message.osShortName = String(object.osShortName); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); + return message; + }; + + /** + * Creates a plain object from an Inventory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory} message Inventory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Inventory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.osShortName = ""; + object.osVersion = ""; } - } - return null; - }; - - /** - * Creates an InstanceFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} InstanceFilter - */ - InstanceFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + if (message.osShortName != null && message.hasOwnProperty("osShortName")) + object.osShortName = message.osShortName; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; return object; - var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); - if (object.all != null) - message.all = Boolean(object.all); - if (object.osShortNames) { - if (!Array.isArray(object.osShortNames)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.osShortNames: array expected"); - message.osShortNames = []; - for (var i = 0; i < object.osShortNames.length; ++i) - message.osShortNames[i] = String(object.osShortNames[i]); - } - if (object.inclusionLabels) { - if (!Array.isArray(object.inclusionLabels)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: array expected"); - message.inclusionLabels = []; - for (var i = 0; i < object.inclusionLabels.length; ++i) { - if (typeof object.inclusionLabels[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.inclusionLabels: object expected"); - message.inclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.inclusionLabels[i]); - } - } - if (object.exclusionLabels) { - if (!Array.isArray(object.exclusionLabels)) - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: array expected"); - message.exclusionLabels = []; - for (var i = 0; i < object.exclusionLabels.length; ++i) { - if (typeof object.exclusionLabels[i] !== "object") - throw TypeError(".google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.exclusionLabels: object expected"); - message.exclusionLabels[i] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.fromObject(object.exclusionLabels[i]); - } - } - return message; - }; + }; - /** - * Creates a plain object from an InstanceFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @static - * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} message InstanceFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.osShortNames = []; - object.inclusionLabels = []; - object.exclusionLabels = []; - } - if (options.defaults) - object.all = false; - if (message.all != null && message.hasOwnProperty("all")) - object.all = message.all; - if (message.osShortNames && message.osShortNames.length) { - object.osShortNames = []; - for (var j = 0; j < message.osShortNames.length; ++j) - object.osShortNames[j] = message.osShortNames[j]; - } - if (message.inclusionLabels && message.inclusionLabels.length) { - object.inclusionLabels = []; - for (var j = 0; j < message.inclusionLabels.length; ++j) - object.inclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.inclusionLabels[j], options); - } - if (message.exclusionLabels && message.exclusionLabels.length) { - object.exclusionLabels = []; - for (var j = 0; j < message.exclusionLabels.length; ++j) - object.exclusionLabels[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.toObject(message.exclusionLabels[j], options); - } - return object; - }; + /** + * Converts this Inventory to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @instance + * @returns {Object.} JSON object + */ + Inventory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this InstanceFilter to JSON. - * @function toJSON - * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - * @instance - * @returns {Object.} JSON object - */ - InstanceFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Inventory; + })(); return InstanceFilter; })(); @@ -46754,6 +49401,72 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignmentReport}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef GetOSPolicyAssignmentReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport} [response] OSPolicyAssignmentReport + */ + + /** + * Calls GetOSPolicyAssignmentReport. + * @function getOSPolicyAssignmentReport + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest} request GetOSPolicyAssignmentReportRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentReportCallback} callback Node-style callback called with the error, if any, and OSPolicyAssignmentReport + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.getOSPolicyAssignmentReport = function getOSPolicyAssignmentReport(request, callback) { + return this.rpcCall(getOSPolicyAssignmentReport, $root.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest, $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport, request, callback); + }, "name", { value: "GetOSPolicyAssignmentReport" }); + + /** + * Calls GetOSPolicyAssignmentReport. + * @function getOSPolicyAssignmentReport + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest} request GetOSPolicyAssignmentReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentReports}. + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @typedef ListOSPolicyAssignmentReportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse} [response] ListOSPolicyAssignmentReportsResponse + */ + + /** + * Calls ListOSPolicyAssignmentReports. + * @function listOSPolicyAssignmentReports + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest} request ListOSPolicyAssignmentReportsRequest message or plain object + * @param {google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentReportsCallback} callback Node-style callback called with the error, if any, and ListOSPolicyAssignmentReportsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsConfigZonalService.prototype.listOSPolicyAssignmentReports = function listOSPolicyAssignmentReports(request, callback) { + return this.rpcCall(listOSPolicyAssignmentReports, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest, $root.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse, request, callback); + }, "name", { value: "ListOSPolicyAssignmentReports" }); + + /** + * Calls ListOSPolicyAssignmentReports. + * @function listOSPolicyAssignmentReports + * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService + * @instance + * @param {google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest} request ListOSPolicyAssignmentReportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService @@ -47156,6 +49869,7 @@ * @property {Array.|null} [availableInventoryItemIds] Vulnerability availableInventoryItemIds * @property {google.protobuf.ITimestamp|null} [createTime] Vulnerability createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Vulnerability updateTime + * @property {Array.|null} [items] Vulnerability items */ /** @@ -47169,6 +49883,7 @@ function Vulnerability(properties) { this.installedInventoryItemIds = []; this.availableInventoryItemIds = []; + this.items = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47215,6 +49930,14 @@ */ Vulnerability.prototype.updateTime = null; + /** + * Vulnerability items. + * @member {Array.} items + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @instance + */ + Vulnerability.prototype.items = $util.emptyArray; + /** * Creates a new Vulnerability instance using the specified properties. * @function create @@ -47251,6 +49974,9 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.encode(message.items[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -47304,6 +50030,11 @@ case 5: message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; + case 6: + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -47368,6 +50099,15 @@ if (error) return "updateTime." + error; } + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.verify(message.items[i]); + if (error) + return "items." + error; + } + } return null; }; @@ -47412,6 +50152,16 @@ throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.items: object expected"); + message.items[i] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.fromObject(object.items[i]); + } + } return message; }; @@ -47431,6 +50181,7 @@ if (options.arrays || options.defaults) { object.installedInventoryItemIds = []; object.availableInventoryItemIds = []; + object.items = []; } if (options.defaults) { object.details = null; @@ -47453,6 +50204,11 @@ 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.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.toObject(message.items[j], options); + } return object; }; @@ -47796,6 +50552,7 @@ * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details * @interface IReference * @property {string|null} [url] Reference url + * @property {string|null} [source] Reference source */ /** @@ -47821,6 +50578,14 @@ */ Reference.prototype.url = ""; + /** + * Reference source. + * @member {string} source + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @instance + */ + Reference.prototype.source = ""; + /** * Creates a new Reference instance using the specified properties. * @function create @@ -47847,6 +50612,8 @@ writer = $Writer.create(); if (message.url != null && Object.hasOwnProperty.call(message, "url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.source); return writer; }; @@ -47884,6 +50651,9 @@ case 1: message.url = reader.string(); break; + case 2: + message.source = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -47922,6 +50692,9 @@ if (message.url != null && message.hasOwnProperty("url")) if (!$util.isString(message.url)) return "url: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; return null; }; @@ -47939,6 +50712,8 @@ var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference(); if (object.url != null) message.url = String(object.url); + if (object.source != null) + message.source = String(object.source); return message; }; @@ -47955,10 +50730,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.url = ""; + object.source = ""; + } if (message.url != null && message.hasOwnProperty("url")) object.url = message.url; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; return object; }; @@ -47979,6 +50758,260 @@ return Details; })(); + Vulnerability.Item = (function() { + + /** + * Properties of an Item. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @interface IItem + * @property {string|null} [installedInventoryItemId] Item installedInventoryItemId + * @property {string|null} [availableInventoryItemId] Item availableInventoryItemId + * @property {string|null} [fixedCpeUri] Item fixedCpeUri + * @property {string|null} [upstreamFix] Item upstreamFix + */ + + /** + * Constructs a new Item. + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @classdesc Represents an Item. + * @implements IItem + * @constructor + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem=} [properties] Properties to set + */ + function Item(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Item installedInventoryItemId. + * @member {string} installedInventoryItemId + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @instance + */ + Item.prototype.installedInventoryItemId = ""; + + /** + * Item availableInventoryItemId. + * @member {string} availableInventoryItemId + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @instance + */ + Item.prototype.availableInventoryItemId = ""; + + /** + * Item fixedCpeUri. + * @member {string} fixedCpeUri + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @instance + */ + Item.prototype.fixedCpeUri = ""; + + /** + * Item upstreamFix. + * @member {string} upstreamFix + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @instance + */ + Item.prototype.upstreamFix = ""; + + /** + * Creates a new Item instance using the specified properties. + * @function create + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem=} [properties] Properties to set + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item} Item instance + */ + Item.create = function create(properties) { + return new Item(properties); + }; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.verify|verify} messages. + * @function encode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.installedInventoryItemId != null && Object.hasOwnProperty.call(message, "installedInventoryItemId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.installedInventoryItemId); + if (message.availableInventoryItemId != null && Object.hasOwnProperty.call(message, "availableInventoryItemId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.availableInventoryItemId); + if (message.fixedCpeUri != null && Object.hasOwnProperty.call(message, "fixedCpeUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fixedCpeUri); + if (message.upstreamFix != null && Object.hasOwnProperty.call(message, "upstreamFix")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.upstreamFix); + return writer; + }; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Item message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.installedInventoryItemId = reader.string(); + break; + case 2: + message.availableInventoryItemId = reader.string(); + break; + case 3: + message.fixedCpeUri = reader.string(); + break; + case 4: + message.upstreamFix = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Item message. + * @function verify + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Item.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.installedInventoryItemId != null && message.hasOwnProperty("installedInventoryItemId")) + if (!$util.isString(message.installedInventoryItemId)) + return "installedInventoryItemId: string expected"; + if (message.availableInventoryItemId != null && message.hasOwnProperty("availableInventoryItemId")) + if (!$util.isString(message.availableInventoryItemId)) + return "availableInventoryItemId: string expected"; + if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) + if (!$util.isString(message.fixedCpeUri)) + return "fixedCpeUri: string expected"; + if (message.upstreamFix != null && message.hasOwnProperty("upstreamFix")) + if (!$util.isString(message.upstreamFix)) + return "upstreamFix: string expected"; + return null; + }; + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item} Item + */ + Item.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) + return object; + var message = new $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item(); + if (object.installedInventoryItemId != null) + message.installedInventoryItemId = String(object.installedInventoryItemId); + if (object.availableInventoryItemId != null) + message.availableInventoryItemId = String(object.availableInventoryItemId); + if (object.fixedCpeUri != null) + message.fixedCpeUri = String(object.fixedCpeUri); + if (object.upstreamFix != null) + message.upstreamFix = String(object.upstreamFix); + return message; + }; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @static + * @param {google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item} message Item + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Item.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.installedInventoryItemId = ""; + object.availableInventoryItemId = ""; + object.fixedCpeUri = ""; + object.upstreamFix = ""; + } + if (message.installedInventoryItemId != null && message.hasOwnProperty("installedInventoryItemId")) + object.installedInventoryItemId = message.installedInventoryItemId; + if (message.availableInventoryItemId != null && message.hasOwnProperty("availableInventoryItemId")) + object.availableInventoryItemId = message.availableInventoryItemId; + if (message.fixedCpeUri != null && message.hasOwnProperty("fixedCpeUri")) + object.fixedCpeUri = message.fixedCpeUri; + if (message.upstreamFix != null && message.hasOwnProperty("upstreamFix")) + object.upstreamFix = message.upstreamFix; + return object; + }; + + /** + * Converts this Item to JSON. + * @function toJSON + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @instance + * @returns {Object.} JSON object + */ + Item.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Item; + })(); + return Vulnerability; })(); diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 15e32a1edf0..343bd680f2a 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -3368,6 +3368,9 @@ }, "nested": { "OSPolicyResourceConfigStep": { + "options": { + "deprecated": true + }, "fields": { "type": { "type": "Type", @@ -3384,6 +3387,9 @@ }, "nested": { "Type": { + "options": { + "deprecated": true + }, "values": { "TYPE_UNSPECIFIED": 0, "VALIDATION": 1, @@ -3393,6 +3399,9 @@ } }, "Outcome": { + "options": { + "deprecated": true + }, "values": { "OUTCOME_UNSPECIFIED": 0, "SUCCEEDED": 1, @@ -3402,6 +3411,9 @@ } }, "OSPolicyResourceCompliance": { + "options": { + "deprecated": true + }, "oneofs": { "output": { "oneof": [ @@ -3430,6 +3442,9 @@ }, "nested": { "ExecResourceOutput": { + "options": { + "deprecated": true + }, "fields": { "enforcementOutput": { "type": "bytes", @@ -3440,6 +3455,9 @@ } }, "OSPolicyComplianceState": { + "options": { + "deprecated": true + }, "values": { "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": 0, "COMPLIANT": 1, @@ -3450,6 +3468,7 @@ }, "InstanceOSPoliciesCompliance": { "options": { + "deprecated": true, "(google.api.resource).type": "osconfig.googleapis.com/InstanceOSPoliciesCompliance", "(google.api.resource).pattern": "projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}" }, @@ -3514,6 +3533,9 @@ }, "nested": { "OSPolicyCompliance": { + "options": { + "deprecated": true + }, "fields": { "osPolicyId": { "type": "string", @@ -3540,6 +3562,9 @@ } }, "GetInstanceOSPoliciesComplianceRequest": { + "options": { + "deprecated": true + }, "fields": { "name": { "type": "string", @@ -3552,6 +3577,9 @@ } }, "ListInstanceOSPoliciesCompliancesRequest": { + "options": { + "deprecated": true + }, "fields": { "parent": { "type": "string", @@ -3576,6 +3604,9 @@ } }, "ListInstanceOSPoliciesCompliancesResponse": { + "options": { + "deprecated": true + }, "fields": { "instanceOsPoliciesCompliances": { "rule": "repeated", @@ -4008,6 +4039,13 @@ } }, "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "VALIDATION": 1, + "ENFORCEMENT": 2 + } + }, "OSFilter": { "fields": { "osShortName": { @@ -4020,6 +4058,21 @@ } } }, + "InventoryFilter": { + "fields": { + "osShortName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "osVersion": { + "type": "string", + "id": 2 + } + } + }, "Resource": { "oneofs": { "resourceType": { @@ -4177,6 +4230,13 @@ } }, "nested": { + "DesiredState": { + "values": { + "DESIRED_STATE_UNSPECIFIED": 0, + "INSTALLED": 1, + "REMOVED": 2 + } + }, "Deb": { "fields": { "source": { @@ -4266,13 +4326,6 @@ "id": 2 } } - }, - "DesiredState": { - "values": { - "DESIRED_STATE_UNSPECIFIED": 0, - "INSTALLED": 1, - "REMOVED": 2 - } } } }, @@ -4543,7 +4596,15 @@ "fields": { "osFilter": { "type": "OSFilter", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } + }, + "inventoryFilters": { + "rule": "repeated", + "type": "InventoryFilter", + "id": 3 }, "resources": { "rule": "repeated", @@ -4554,12 +4615,194 @@ } } } + } + } + }, + "GetOSPolicyAssignmentReportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignmentReport" + } + } + } + }, + "ListOSPolicyAssignmentReportsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/InstanceOSPolicyAssignment" + } }, - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "VALIDATION": 1, - "ENFORCEMENT": 2 + "pageSize": { + "type": "int32", + "id": 2 + }, + "filter": { + "type": "string", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListOSPolicyAssignmentReportsResponse": { + "fields": { + "osPolicyAssignmentReports": { + "rule": "repeated", + "type": "OSPolicyAssignmentReport", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "OSPolicyAssignmentReport": { + "options": { + "(google.api.resource).type": "osconfig.googleapis.com/OSPolicyAssignmentReport", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "instance": { + "type": "string", + "id": 2 + }, + "osPolicyAssignment": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "osconfig.googleapis.com/OSPolicyAssignment" + } + }, + "osPolicyCompliances": { + "rule": "repeated", + "type": "OSPolicyCompliance", + "id": 4 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "lastRunId": { + "type": "string", + "id": 6 + } + }, + "nested": { + "OSPolicyCompliance": { + "fields": { + "osPolicyId": { + "type": "string", + "id": 1 + }, + "complianceState": { + "type": "ComplianceState", + "id": 2 + }, + "complianceStateReason": { + "type": "string", + "id": 3 + }, + "osPolicyResourceCompliances": { + "rule": "repeated", + "type": "OSPolicyResourceCompliance", + "id": 4 + } + }, + "nested": { + "ComplianceState": { + "values": { + "UNKNOWN": 0, + "COMPLIANT": 1, + "NON_COMPLIANT": 2 + } + }, + "OSPolicyResourceCompliance": { + "oneofs": { + "output": { + "oneof": [ + "execResourceOutput" + ] + } + }, + "fields": { + "osPolicyResourceId": { + "type": "string", + "id": 1 + }, + "configSteps": { + "rule": "repeated", + "type": "OSPolicyResourceConfigStep", + "id": 2 + }, + "complianceState": { + "type": "ComplianceState", + "id": 3 + }, + "complianceStateReason": { + "type": "string", + "id": 4 + }, + "execResourceOutput": { + "type": "ExecResourceOutput", + "id": 5 + } + }, + "nested": { + "OSPolicyResourceConfigStep": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "errorMessage": { + "type": "string", + "id": 2 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "VALIDATION": 1, + "DESIRED_STATE_CHECK": 2, + "DESIRED_STATE_ENFORCEMENT": 3, + "DESIRED_STATE_CHECK_POST_ENFORCEMENT": 4 + } + } + } + }, + "ComplianceState": { + "values": { + "UNKNOWN": 0, + "COMPLIANT": 1, + "NON_COMPLIANT": 2 + } + }, + "ExecResourceOutput": { + "fields": { + "enforcementOutput": { + "type": "bytes", + "id": 2 + } + } + } + } + } } } } @@ -4614,6 +4857,10 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "etag": { + "type": "string", + "id": 8 + }, "rolloutState": { "type": "RolloutState", "id": 9, @@ -4669,7 +4916,10 @@ "osShortNames": { "rule": "repeated", "type": "string", - "id": 2 + "id": 2, + "options": { + "deprecated": true + } }, "inclusionLabels": { "rule": "repeated", @@ -4680,6 +4930,28 @@ "rule": "repeated", "type": "LabelSet", "id": 4 + }, + "inventories": { + "rule": "repeated", + "type": "Inventory", + "id": 5 + } + }, + "nested": { + "Inventory": { + "fields": { + "osShortName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "osVersion": { + "type": "string", + "id": 2 + } + } } } }, @@ -5058,10 +5330,14 @@ "requestType": "GetInstanceOSPoliciesComplianceRequest", "responseType": "InstanceOSPoliciesCompliance", "options": { + "deprecated": true, "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}" @@ -5076,10 +5352,14 @@ "requestType": "ListInstanceOSPoliciesCompliancesRequest", "responseType": "ListInstanceOSPoliciesCompliancesResponse", "options": { + "deprecated": true, "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances", "(google.api.method_signature)": "parent" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances" @@ -5090,6 +5370,42 @@ } ] }, + "GetOSPolicyAssignmentReport": { + "requestType": "GetOSPolicyAssignmentReportRequest", + "responseType": "OSPolicyAssignmentReport", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListOSPolicyAssignmentReports": { + "requestType": "ListOSPolicyAssignmentReportsRequest", + "responseType": "ListOSPolicyAssignmentReportsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, "GetInventory": { "requestType": "GetInventoryRequest", "responseType": "Inventory", @@ -5203,12 +5519,18 @@ "installedInventoryItemIds": { "rule": "repeated", "type": "string", - "id": 2 + "id": 2, + "options": { + "deprecated": true + } }, "availableInventoryItemIds": { "rule": "repeated", "type": "string", - "id": 3 + "id": 3, + "options": { + "deprecated": true + } }, "createTime": { "type": "google.protobuf.Timestamp", @@ -5217,6 +5539,11 @@ "updateTime": { "type": "google.protobuf.Timestamp", "id": 5 + }, + "items": { + "rule": "repeated", + "type": "Item", + "id": 6 } }, "nested": { @@ -5254,10 +5581,34 @@ "url": { "type": "string", "id": 1 + }, + "source": { + "type": "string", + "id": 2 } } } } + }, + "Item": { + "fields": { + "installedInventoryItemId": { + "type": "string", + "id": 1 + }, + "availableInventoryItemId": { + "type": "string", + "id": 2 + }, + "fixedCpeUri": { + "type": "string", + "id": 3 + }, + "upstreamFix": { + "type": "string", + "id": 4 + } + } } } } diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js new file mode 100644 index 00000000000..999fd736fd2 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js @@ -0,0 +1,59 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. API resource name for OS policy assignment report. + * Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + */ + // const name = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callGetOSPolicyAssignmentReport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await osconfigClient.getOSPolicyAssignmentReport(request); + console.log(response); + } + + callGetOSPolicyAssignmentReport(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js index 45a59764ab4..0150a5f456c 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js @@ -22,10 +22,8 @@ function main(parent) { */ /** * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/{instance}` - * For `{project}`, either `project-number` or `project-id` can be - * provided. For `{instance}`, only hyphen or dash character is supported to - * list inventories across VMs. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js new file mode 100644 index 00000000000..37e37dab861 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js @@ -0,0 +1,87 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + */ + // const parent = 'abc123' + /** + * The maximum number of results to return. + */ + // const pageSize = 1234 + /** + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + */ + // const filter = 'abc123' + /** + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + */ + // const pageToken = 'abc123' + + // Imports the Osconfig library + const {OsConfigZonalServiceClient} = require('@google-cloud/os-config').v1alpha; + + // Instantiates a client + const osconfigClient = new OsConfigZonalServiceClient(); + + async function callListOSPolicyAssignmentReports() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await osconfigClient.listOSPolicyAssignmentReportsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListOSPolicyAssignmentReports(); + // [END osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js index be8b817e806..0b0e18daf98 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js @@ -22,10 +22,8 @@ function main(parent) { */ /** * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Format: `projects/{project}/locations/{location}/instances/-` * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, only `-` character is supported to list vulnerability - * reports across VMs. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json b/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json index 9b8221378b1..014b66375b8 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json +++ b/packages/google-cloud-osconfig/src/v1alpha/gapic_metadata.json @@ -20,6 +20,11 @@ "getInstanceOSPoliciesCompliance" ] }, + "GetOSPolicyAssignmentReport": { + "methods": [ + "getOSPolicyAssignmentReport" + ] + }, "GetInventory": { "methods": [ "getInventory" @@ -66,6 +71,13 @@ "listInstanceOSPoliciesCompliancesAsync" ] }, + "ListOSPolicyAssignmentReports": { + "methods": [ + "listOSPolicyAssignmentReports", + "listOSPolicyAssignmentReportsStream", + "listOSPolicyAssignmentReportsAsync" + ] + }, "ListInventories": { "methods": [ "listInventories", @@ -95,6 +107,11 @@ "getInstanceOSPoliciesCompliance" ] }, + "GetOSPolicyAssignmentReport": { + "methods": [ + "getOSPolicyAssignmentReport" + ] + }, "GetInventory": { "methods": [ "getInventory" @@ -141,6 +158,13 @@ "listInstanceOSPoliciesCompliancesAsync" ] }, + "ListOSPolicyAssignmentReports": { + "methods": [ + "listOSPolicyAssignmentReports", + "listOSPolicyAssignmentReportsStream", + "listOSPolicyAssignmentReportsAsync" + ] + }, "ListInventories": { "methods": [ "listInventories", diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index e27e1c44628..15218a1201b 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -179,6 +179,9 @@ export class OsConfigZonalServiceClient { oSPolicyAssignmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}' ), + oSPolicyAssignmentReportPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report' + ), vulnerabilityReportPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport' ), @@ -203,6 +206,11 @@ export class OsConfigZonalServiceClient { 'nextPageToken', 'instanceOsPoliciesCompliances' ), + listOSPolicyAssignmentReports: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'osPolicyAssignmentReports' + ), listInventories: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -335,6 +343,8 @@ export class OsConfigZonalServiceClient { 'deleteOSPolicyAssignment', 'getInstanceOSPoliciesCompliance', 'listInstanceOSPoliciesCompliances', + 'getOSPolicyAssignmentReport', + 'listOSPolicyAssignmentReports', 'getInventory', 'listInventories', 'getVulnerabilityReport', @@ -553,6 +563,7 @@ export class OsConfigZonalServiceClient { * for more details and examples. * @example include:samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_GetInstanceOSPoliciesCompliance_async + * @deprecated GetInstanceOSPoliciesCompliance is deprecated and may be removed in a future version. */ getInstanceOSPoliciesCompliance( request?: protos.google.cloud.osconfig.v1alpha.IGetInstanceOSPoliciesComplianceRequest, @@ -632,12 +643,127 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); this.initialize(); + this.warn( + 'DEP$OsConfigZonalService-$GetInstanceOSPoliciesCompliance', + 'GetInstanceOSPoliciesCompliance is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.innerApiCalls.getInstanceOSPoliciesCompliance( request, options, callback ); } + /** + * Get the OS policy asssignment report for the specified Compute Engine VM + * instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. API resource name for OS policy assignment report. + * + * Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [OSPolicyAssignmentReport]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async + */ + getOSPolicyAssignmentReport( + request?: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport, + ( + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest + | undefined + ), + {} | undefined + ] + >; + getOSPolicyAssignmentReport( + request: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport, + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getOSPolicyAssignmentReport( + request: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest, + callback: Callback< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport, + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getOSPolicyAssignmentReport( + request?: protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport, + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport, + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport, + ( + | protos.google.cloud.osconfig.v1alpha.IGetOSPolicyAssignmentReportRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getOSPolicyAssignmentReport( + request, + options, + callback + ); + } /** * Get inventory data for the specified VM instance. If the VM has no * associated inventory, the message `NOT_FOUND` is returned. @@ -1750,6 +1876,7 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. + * @deprecated ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version. */ listInstanceOSPoliciesCompliances( request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, @@ -1823,6 +1950,11 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); this.initialize(); + this.warn( + 'DEP$OsConfigZonalService-$ListInstanceOSPoliciesCompliances', + 'ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.innerApiCalls.listInstanceOSPoliciesCompliances( request, options, @@ -1861,6 +1993,7 @@ export class OsConfigZonalServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. + * @deprecated ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version. */ listInstanceOSPoliciesCompliancesStream( request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, @@ -1878,6 +2011,11 @@ export class OsConfigZonalServiceClient { this._defaults['listInstanceOSPoliciesCompliances']; const callSettings = defaultCallSettings.merge(options); this.initialize(); + this.warn( + 'DEP$OsConfigZonalService-$ListInstanceOSPoliciesCompliances', + 'ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.descriptors.page.listInstanceOSPoliciesCompliances.createStream( this.innerApiCalls.listInstanceOSPoliciesCompliances as gax.GaxCall, request, @@ -1919,6 +2057,7 @@ export class OsConfigZonalServiceClient { * for more details and examples. * @example include:samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_ListInstanceOSPoliciesCompliances_async + * @deprecated ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version. */ listInstanceOSPoliciesCompliancesAsync( request?: protos.google.cloud.osconfig.v1alpha.IListInstanceOSPoliciesCompliancesRequest, @@ -1936,12 +2075,286 @@ export class OsConfigZonalServiceClient { this._defaults['listInstanceOSPoliciesCompliances']; const callSettings = defaultCallSettings.merge(options); this.initialize(); + this.warn( + 'DEP$OsConfigZonalService-$ListInstanceOSPoliciesCompliances', + 'ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.descriptors.page.listInstanceOSPoliciesCompliances.asyncIterate( this.innerApiCalls['listInstanceOSPoliciesCompliances'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; } + /** + * List OS policy asssignment reports for all Compute Engine VM instances in + * the specified zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * @param {string} request.pageToken + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [OSPolicyAssignmentReport]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport}. + * 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 `listOSPolicyAssignmentReportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentReports( + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport[], + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse + ] + >; + listOSPolicyAssignmentReports( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport + > + ): void; + listOSPolicyAssignmentReports( + request: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + callback: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport + > + ): void; + listOSPolicyAssignmentReports( + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport + >, + callback?: PaginationCallback< + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + | protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse + | null + | undefined, + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport + > + ): Promise< + [ + protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport[], + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest | null, + protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listOSPolicyAssignmentReports( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * @param {string} request.pageToken + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * @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 [OSPolicyAssignmentReport]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport} 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 `listOSPolicyAssignmentReportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listOSPolicyAssignmentReportsStream( + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listOSPolicyAssignmentReports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignmentReports.createStream( + this.innerApiCalls.listOSPolicyAssignmentReports as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listOSPolicyAssignmentReports`, 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 resource name. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * @param {number} request.pageSize + * The maximum number of results to return. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * @param {string} request.pageToken + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [OSPolicyAssignmentReport]{@link google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js + * region_tag:osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async + */ + listOSPolicyAssignmentReportsAsync( + request?: protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listOSPolicyAssignmentReports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listOSPolicyAssignmentReports.asyncIterate( + this.innerApiCalls['listOSPolicyAssignmentReports'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } /** * List inventory data for all VM instances in the specified zone. * @@ -1950,11 +2363,9 @@ export class OsConfigZonalServiceClient { * @param {string} request.parent * Required. The parent resource name. * - * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Format: `projects/{project}/locations/{location}/instances/-` * - * For `{project}`, either `project-number` or `project-id` can be - * provided. For `{instance}`, only hyphen or dash character is supported to - * list inventories across VMs. + * For `{project}`, either `project-number` or `project-id` can be provided. * @param {google.cloud.osconfig.v1alpha.InventoryView} request.view * Inventory view indicating what information should be included in the * inventory resource. If unspecified, the default view is BASIC. @@ -2062,11 +2473,9 @@ export class OsConfigZonalServiceClient { * @param {string} request.parent * Required. The parent resource name. * - * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Format: `projects/{project}/locations/{location}/instances/-` * - * For `{project}`, either `project-number` or `project-id` can be - * provided. For `{instance}`, only hyphen or dash character is supported to - * list inventories across VMs. + * For `{project}`, either `project-number` or `project-id` can be provided. * @param {google.cloud.osconfig.v1alpha.InventoryView} request.view * Inventory view indicating what information should be included in the * inventory resource. If unspecified, the default view is BASIC. @@ -2122,11 +2531,9 @@ export class OsConfigZonalServiceClient { * @param {string} request.parent * Required. The parent resource name. * - * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Format: `projects/{project}/locations/{location}/instances/-` * - * For `{project}`, either `project-number` or `project-id` can be - * provided. For `{instance}`, only hyphen or dash character is supported to - * list inventories across VMs. + * For `{project}`, either `project-number` or `project-id` can be provided. * @param {google.cloud.osconfig.v1alpha.InventoryView} request.view * Inventory view indicating what information should be included in the * inventory resource. If unspecified, the default view is BASIC. @@ -2181,11 +2588,9 @@ export class OsConfigZonalServiceClient { * @param {string} request.parent * Required. The parent resource name. * - * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Format: `projects/{project}/locations/{location}/instances/-` * * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, only `-` character is supported to list vulnerability - * reports across VMs. * @param {number} request.pageSize * The maximum number of results to return. * @param {string} request.pageToken @@ -2294,11 +2699,9 @@ export class OsConfigZonalServiceClient { * @param {string} request.parent * Required. The parent resource name. * - * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Format: `projects/{project}/locations/{location}/instances/-` * * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, only `-` character is supported to list vulnerability - * reports across VMs. * @param {number} request.pageSize * The maximum number of results to return. * @param {string} request.pageToken @@ -2351,11 +2754,9 @@ export class OsConfigZonalServiceClient { * @param {string} request.parent * Required. The parent resource name. * - * Format: `projects/{project}/locations/{location}/instances/{instance}` + * Format: `projects/{project}/locations/{location}/instances/-` * * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, only `-` character is supported to list vulnerability - * reports across VMs. * @param {number} request.pageSize * The maximum number of results to return. * @param {string} request.pageToken @@ -2581,6 +2982,89 @@ export class OsConfigZonalServiceClient { ).os_policy_assignment; } + /** + * Return a fully-qualified oSPolicyAssignmentReport resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @param {string} assignment + * @returns {string} Resource name string. + */ + oSPolicyAssignmentReportPath( + project: string, + location: string, + instance: string, + assignment: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.render({ + project: project, + location: location, + instance: instance, + assignment: assignment, + }); + } + + /** + * Parse the project from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the project. + */ + matchProjectFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).project; + } + + /** + * Parse the location from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).location; + } + + /** + * Parse the instance from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).instance; + } + + /** + * Parse the assignment from OSPolicyAssignmentReport resource. + * + * @param {string} oSPolicyAssignmentReportName + * A fully-qualified path representing OSPolicyAssignmentReport resource. + * @returns {string} A string representing the assignment. + */ + matchAssignmentFromOSPolicyAssignmentReportName( + oSPolicyAssignmentReportName: string + ) { + return this.pathTemplates.oSPolicyAssignmentReportPathTemplate.match( + oSPolicyAssignmentReportName + ).assignment; + } + /** * Return a fully-qualified vulnerabilityReport resource name string. * diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client_config.json b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client_config.json index b4c397687ac..130d4b4af17 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client_config.json +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client_config.json @@ -72,6 +72,16 @@ "retry_codes_name": "unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, + "GetOSPolicyAssignmentReport": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListOSPolicyAssignmentReports": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, "GetInventory": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_proto_list.json b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_proto_list.json index fbfb90ffb5c..8cf88654436 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_proto_list.json +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto", "../../protos/google/cloud/osconfig/v1alpha/inventory.proto", "../../protos/google/cloud/osconfig/v1alpha/os_policy.proto", + "../../protos/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto", "../../protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto", "../../protos/google/cloud/osconfig/v1alpha/osconfig_common.proto", "../../protos/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto", diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts index a347a8f1af4..6071f4a4784 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -359,6 +359,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() @@ -378,6 +379,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.innerApiCalls.getInstanceOSPoliciesCompliance = stubSimpleCall(expectedResponse); const [response] = await client.getInstanceOSPoliciesCompliance(request); + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( (client.innerApiCalls.getInstanceOSPoliciesCompliance as SinonStub) @@ -392,6 +394,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() @@ -426,6 +429,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); }); const response = await promise; + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( (client.innerApiCalls.getInstanceOSPoliciesCompliance as SinonStub) @@ -440,6 +444,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() @@ -462,6 +467,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.getInstanceOSPoliciesCompliance(request), expectedError ); + assert(stub.calledOnce); assert( (client.innerApiCalls.getInstanceOSPoliciesCompliance as SinonStub) .getCall(0) @@ -470,6 +476,124 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); }); + describe('getOSPolicyAssignmentReport', () => { + it('invokes getOSPolicyAssignmentReport without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ); + client.innerApiCalls.getOSPolicyAssignmentReport = + stubSimpleCall(expectedResponse); + const [response] = await client.getOSPolicyAssignmentReport(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getOSPolicyAssignmentReport without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ); + client.innerApiCalls.getOSPolicyAssignmentReport = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getOSPolicyAssignmentReport( + request, + ( + err?: Error | null, + result?: protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getOSPolicyAssignmentReport with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getOSPolicyAssignmentReport = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getOSPolicyAssignmentReport(request), + expectedError + ); + assert( + (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getInventory', () => { it('invokes getInventory without error', async () => { const client = @@ -2007,6 +2131,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() @@ -2036,6 +2161,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [response] = await client.listInstanceOSPoliciesCompliances( request ); + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( (client.innerApiCalls.listInstanceOSPoliciesCompliances as SinonStub) @@ -2050,6 +2176,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() @@ -2094,6 +2221,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); }); const response = await promise; + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( (client.innerApiCalls.listInstanceOSPoliciesCompliances as SinonStub) @@ -2108,6 +2236,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() @@ -2130,6 +2259,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.listInstanceOSPoliciesCompliances(request), expectedError ); + assert(stub.calledOnce); assert( (client.innerApiCalls.listInstanceOSPoliciesCompliances as SinonStub) .getCall(0) @@ -2143,6 +2273,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() @@ -2182,6 +2313,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); }); const responses = await promise; + assert(stub.calledOnce); assert.deepStrictEqual(responses, expectedResponse); assert( ( @@ -2209,6 +2341,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() @@ -2238,6 +2371,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); }); await assert.rejects(promise, expectedError); + assert(stub.calledOnce); assert( ( client.descriptors.page.listInstanceOSPoliciesCompliances @@ -2264,6 +2398,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() @@ -2289,6 +2424,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { for await (const resource of iterable) { responses.push(resource!); } + assert(stub.calledOnce); assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( @@ -2312,6 +2448,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() @@ -2329,6 +2466,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { responses.push(resource!); } }); + assert(stub.calledOnce); assert.deepStrictEqual( ( client.descriptors.page.listInstanceOSPoliciesCompliances @@ -2346,6 +2484,350 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); }); + describe('listOSPolicyAssignmentReports', () => { + it('invokes listOSPolicyAssignmentReports without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + ]; + client.innerApiCalls.listOSPolicyAssignmentReports = + stubSimpleCall(expectedResponse); + const [response] = await client.listOSPolicyAssignmentReports(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentReports without error using callback', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + ]; + client.innerApiCalls.listOSPolicyAssignmentReports = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listOSPolicyAssignmentReports( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listOSPolicyAssignmentReports with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listOSPolicyAssignmentReports = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listOSPolicyAssignmentReports(request), + expectedError + ); + assert( + (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listOSPolicyAssignmentReportsStream without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + ]; + client.descriptors.page.listOSPolicyAssignmentReports.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listOSPolicyAssignmentReportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + ) => { + 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.listOSPolicyAssignmentReports + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listOSPolicyAssignmentReports, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listOSPolicyAssignmentReportsStream with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignmentReports.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listOSPolicyAssignmentReportsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listOSPolicyAssignmentReports, + request + ) + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignmentReports without error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() + ), + ]; + client.descriptors.page.listOSPolicyAssignmentReports.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport[] = + []; + const iterable = client.listOSPolicyAssignmentReportsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listOSPolicyAssignmentReports with error', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listOSPolicyAssignmentReports.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listOSPolicyAssignmentReportsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.osconfig.v1alpha.IOSPolicyAssignmentReport[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listOSPolicyAssignmentReports + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + describe('listInventories', () => { it('invokes listInventories without error', async () => { const client = @@ -3218,6 +3700,102 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); }); + describe('oSPolicyAssignmentReport', () => { + const fakePath = '/rendered/path/oSPolicyAssignmentReport'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + instance: 'instanceValue', + assignment: 'assignmentValue', + }; + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.oSPolicyAssignmentReportPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.oSPolicyAssignmentReportPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('oSPolicyAssignmentReportPath', () => { + const result = client.oSPolicyAssignmentReportPath( + 'projectValue', + 'locationValue', + 'instanceValue', + 'assignmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromOSPolicyAssignmentReportName', () => { + const result = + client.matchProjectFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOSPolicyAssignmentReportName', () => { + const result = + client.matchLocationFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromOSPolicyAssignmentReportName', () => { + const result = + client.matchInstanceFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssignmentFromOSPolicyAssignmentReportName', () => { + const result = + client.matchAssignmentFromOSPolicyAssignmentReportName(fakePath); + assert.strictEqual(result, 'assignmentValue'); + assert( + ( + client.pathTemplates.oSPolicyAssignmentReportPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('vulnerabilityReport', () => { const fakePath = '/rendered/path/vulnerabilityReport'; const expectedParameters = { From ded0f6bdb71bfdef719a34c857f555721ece92a7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Feb 2022 09:08:59 -0800 Subject: [PATCH 125/154] chore(main): release 1.12.1 (#187) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index e8f46ff9aff..bdbd97b835d 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.12.1](https://github.com/googleapis/nodejs-os-config/compare/v1.12.0...v1.12.1) (2022-02-11) + + +### Bug Fixes + +* update third_party protos to the most actual version: ([#186](https://github.com/googleapis/nodejs-os-config/issues/186)) ([9aceeab](https://github.com/googleapis/nodejs-os-config/commit/9aceeab92c12856e88cb7e59db29ee41cfba5465)) + ## [1.12.0](https://github.com/googleapis/nodejs-os-config/compare/v1.11.0...v1.12.0) (2022-02-08) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index f904857019d..ba457a403ed 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.12.0", + "version": "1.12.1", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 285a439348f..1f59adaa326 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.12.0" + "@google-cloud/os-config": "^1.12.1" }, "devDependencies": { "c8": "^7.1.0", From d67c00cf63a33f6f1917d610c6a5634baf15d6dd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:07:05 +0000 Subject: [PATCH 126/154] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#188) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../v1/os_config_service.cancel_patch_job.js | 9 +- ..._config_service.create_patch_deployment.js | 9 +- ..._config_service.delete_patch_deployment.js | 9 +- .../v1/os_config_service.execute_patch_job.js | 9 +- .../os_config_service.get_patch_deployment.js | 9 +- .../v1/os_config_service.get_patch_job.js | 9 +- ...s_config_service.list_patch_deployments.js | 9 +- ...service.list_patch_job_instance_details.js | 9 +- .../v1/os_config_service.list_patch_jobs.js | 9 +- ...s_config_service.pause_patch_deployment.js | 9 +- ..._config_service.resume_patch_deployment.js | 9 +- ..._config_service.update_patch_deployment.js | 9 +- ...al_service.create_o_s_policy_assignment.js | 9 +- ...al_service.delete_o_s_policy_assignment.js | 9 +- .../os_config_zonal_service.get_inventory.js | 9 +- ...zonal_service.get_o_s_policy_assignment.js | 9 +- ...ervice.get_o_s_policy_assignment_report.js | 9 +- ..._zonal_service.get_vulnerability_report.js | 9 +- ...s_config_zonal_service.list_inventories.js | 9 +- ...vice.list_o_s_policy_assignment_reports.js | 9 +- ...ce.list_o_s_policy_assignment_revisions.js | 9 +- ...nal_service.list_o_s_policy_assignments.js | 9 +- ...onal_service.list_vulnerability_reports.js | 9 +- ...al_service.update_o_s_policy_assignment.js | 9 +- ...pet_metadata.google.cloud.osconfig.v1.json | 1119 +++++++++++++++++ ...al_service.create_o_s_policy_assignment.js | 9 +- ...al_service.delete_o_s_policy_assignment.js | 9 +- ...ce.get_instance_o_s_policies_compliance.js | 9 +- .../os_config_zonal_service.get_inventory.js | 9 +- ...zonal_service.get_o_s_policy_assignment.js | 9 +- ...ervice.get_o_s_policy_assignment_report.js | 9 +- ..._zonal_service.get_vulnerability_report.js | 9 +- ....list_instance_o_s_policies_compliances.js | 9 +- ...s_config_zonal_service.list_inventories.js | 9 +- ...vice.list_o_s_policy_assignment_reports.js | 9 +- ...ce.list_o_s_policy_assignment_revisions.js | 9 +- ...nal_service.list_o_s_policy_assignments.js | 9 +- ...onal_service.list_vulnerability_reports.js | 9 +- ...al_service.update_o_s_policy_assignment.js | 9 +- ...etadata.google.cloud.osconfig.v1alpha.json | 659 ++++++++++ .../src/v1/os_config_service_client.ts | 5 +- .../src/v1/os_config_zonal_service_client.ts | 5 +- .../v1alpha/os_config_zonal_service_client.ts | 5 +- .../test/gapic_os_config_service_v1.ts | 176 ++- .../test/gapic_os_config_zonal_service_v1.ts | 98 +- .../gapic_os_config_zonal_service_v1alpha.ts | 119 +- 46 files changed, 2437 insertions(+), 91 deletions(-) create mode 100644 packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json create mode 100644 packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js index a6ab059de65..7eb2084430c 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js index b4b881f45ae..a3b186bc3ba 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js index 9535b53050d..8d77309f137 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js index 65e24c02e36..f6036510905 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js index 0c84503f82a..2e4505753cf 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js index 5fc0884a2bc..47417e48204 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js index 32bb4229140..5d584c529e5 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js index 60af09f5f42..a90683ca655 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js index 6839de77580..161082e0022 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js index 7a785882aa1..83257bace34 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js index 907bb6d7e61..5d7899cddd1 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js index aefb2d2e1eb..55bead2cf16 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js index 03c4bee7eac..829fa20223f 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js index 09db2107bf4..e7beb85e9e4 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js index 750368118c8..6d71e5f563b 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js index d0a79241e00..af1326793a9 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js index 987d2465fc3..3692dc250d4 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js index 6bf6b54b464..7f08d93a357 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js index f34678840ad..0f87e97ff63 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js index 59d254e6ba8..5b4fa4cda93 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js index 0055cf2dd57..0dc73ec76b9 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js index 228fe2c0a9e..cb5801142e7 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js index 90e38c689cb..a32eddf90ec 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js index fe48947ee0a..7e2d07d4341 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json new file mode 100644 index 00000000000..b1f318412b5 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json @@ -0,0 +1,1119 @@ +{ + "clientLibrary": { + "name": "nodejs-osconfig", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.osconfig.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "osconfig_v1_generated_OsConfigService_ExecutePatchJob_async", + "title": "OsConfigServiceClient executePatchJob Sample", + "origin": "API_DEFINITION", + "description": " Patch VM instances by creating and running a patch job.", + "canonical": true, + "file": "os_config_service.execute_patch_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecutePatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ExecutePatchJob", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "description", + "type": "TYPE_STRING" + }, + { + "name": "instance_filter", + "type": ".google.cloud.osconfig.v1.PatchInstanceFilter" + }, + { + "name": "patch_config", + "type": ".google.cloud.osconfig.v1.PatchConfig" + }, + { + "name": "duration", + "type": ".google.protobuf.Duration" + }, + { + "name": "dry_run", + "type": "TYPE_BOOL" + }, + { + "name": "display_name", + "type": "TYPE_STRING" + }, + { + "name": "rollout", + "type": ".google.cloud.osconfig.v1.PatchRollout" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchJob", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ExecutePatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ExecutePatchJob", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_GetPatchJob_async", + "title": "OsConfigServiceClient getPatchJob Sample", + "origin": "API_DEFINITION", + "description": " Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.", + "canonical": true, + "file": "os_config_service.get_patch_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchJob", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "GetPatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchJob", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_CancelPatchJob_async", + "title": "OsConfigServiceClient cancelPatchJob Sample", + "origin": "API_DEFINITION", + "description": " Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.", + "canonical": true, + "file": "os_config_service.cancel_patch_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelPatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.CancelPatchJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchJob", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "CancelPatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.CancelPatchJob", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_ListPatchJobs_async", + "title": "OsConfigServiceClient listPatchJobs Sample", + "origin": "API_DEFINITION", + "description": " Get a list of patch jobs.", + "canonical": true, + "file": "os_config_service.list_patch_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPatchJobs", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListPatchJobsResponse", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ListPatchJobs", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobs", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_async", + "title": "OsConfigServiceClient listPatchJobInstanceDetails Sample", + "origin": "API_DEFINITION", + "description": " Get a list of instance details for a given patch job.", + "canonical": true, + "file": "os_config_service.list_patch_job_instance_details.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPatchJobInstanceDetails", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetails", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ListPatchJobInstanceDetails", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetails", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_CreatePatchDeployment_async", + "title": "OsConfigServiceClient createPatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Create an OS Config patch deployment.", + "canonical": true, + "file": "os_config_service.create_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.CreatePatchDeployment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "patch_deployment_id", + "type": "TYPE_STRING" + }, + { + "name": "patch_deployment", + "type": ".google.cloud.osconfig.v1.PatchDeployment" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "CreatePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.CreatePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_GetPatchDeployment_async", + "title": "OsConfigServiceClient getPatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Get an OS Config patch deployment.", + "canonical": true, + "file": "os_config_service.get_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "GetPatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_ListPatchDeployments_async", + "title": "OsConfigServiceClient listPatchDeployments Sample", + "origin": "API_DEFINITION", + "description": " Get a page of OS Config patch deployments.", + "canonical": true, + "file": "os_config_service.list_patch_deployments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPatchDeployments", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchDeployments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListPatchDeploymentsResponse", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ListPatchDeployments", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchDeployments", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_DeletePatchDeployment_async", + "title": "OsConfigServiceClient deletePatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Delete an OS Config patch deployment.", + "canonical": true, + "file": "os_config_service.delete_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.DeletePatchDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "DeletePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.DeletePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_UpdatePatchDeployment_async", + "title": "OsConfigServiceClient updatePatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Update an OS Config patch deployment.", + "canonical": true, + "file": "os_config_service.update_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdatePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.UpdatePatchDeployment", + "async": true, + "parameters": [ + { + "name": "patch_deployment", + "type": ".google.cloud.osconfig.v1.PatchDeployment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "UpdatePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.UpdatePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_PausePatchDeployment_async", + "title": "OsConfigServiceClient pausePatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Change state of patch deployment to \"PAUSED\". Patch deployment in paused state doesn't generate patch jobs.", + "canonical": true, + "file": "os_config_service.pause_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PausePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.PausePatchDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "PausePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.PausePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigService_ResumePatchDeployment_async", + "title": "OsConfigServiceClient resumePatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Change state of patch deployment back to \"ACTIVE\". Patch deployment in active state continues to generate patch jobs.", + "canonical": true, + "file": "os_config_service.resume_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResumePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ResumePatchDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ResumePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ResumePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_async", + "title": "OsConfigServiceClient createOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.create_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.CreateOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "os_policy_assignment", + "type": ".google.cloud.osconfig.v1.OSPolicyAssignment" + }, + { + "name": "os_policy_assignment_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "CreateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.CreateOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async", + "title": "OsConfigServiceClient updateOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.update_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.UpdateOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "os_policy_assignment", + "type": ".google.cloud.osconfig.v1.OSPolicyAssignment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "UpdateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.UpdateOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignment_async", + "title": "OsConfigServiceClient getOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.", + "canonical": true, + "file": "os_config_zonal_service.get_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.OSPolicyAssignment", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignments_async", + "title": "OsConfigServiceClient listOSPolicyAssignments Sample", + "origin": "API_DEFINITION", + "description": " List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignments", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignments", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignments", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async", + "title": "OsConfigServiceClient listOSPolicyAssignmentRevisions Sample", + "origin": "API_DEFINITION", + "description": " List the OS policy assignment revisions for a given OS policy assignment.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignment_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignmentRevisions", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentRevisions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignmentRevisions", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentRevisions", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async", + "title": "OsConfigServiceClient deleteOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.delete_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.DeleteOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "DeleteOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.DeleteOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async", + "title": "OsConfigServiceClient getOSPolicyAssignmentReport Sample", + "origin": "API_DEFINITION", + "description": " Get the OS policy asssignment report for the specified Compute Engine VM instance.", + "canonical": true, + "file": "os_config_zonal_service.get_o_s_policy_assignment_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOSPolicyAssignmentReport", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.OSPolicyAssignmentReport", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetOSPolicyAssignmentReport", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentReport", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async", + "title": "OsConfigServiceClient listOSPolicyAssignmentReports Sample", + "origin": "API_DEFINITION", + "description": " List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignment_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignmentReports", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentReports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignmentReports", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentReports", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetInventory_async", + "title": "OsConfigServiceClient getInventory Sample", + "origin": "API_DEFINITION", + "description": " Get inventory data for the specified VM instance. If the VM has no associated inventory, the message `NOT_FOUND` is returned.", + "canonical": true, + "file": "os_config_zonal_service.get_inventory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInventory", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetInventory", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.osconfig.v1.InventoryView" + } + ], + "resultType": ".google.cloud.osconfig.v1.Inventory", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetInventory", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetInventory", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListInventories_async", + "title": "OsConfigServiceClient listInventories Sample", + "origin": "API_DEFINITION", + "description": " List inventory data for all VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_inventories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInventories", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListInventories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.osconfig.v1.InventoryView" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListInventoriesResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListInventories", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListInventories", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_async", + "title": "OsConfigServiceClient getVulnerabilityReport Sample", + "origin": "API_DEFINITION", + "description": " Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.", + "canonical": true, + "file": "os_config_zonal_service.get_vulnerability_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVulnerabilityReport", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetVulnerabilityReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.VulnerabilityReport", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetVulnerabilityReport", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetVulnerabilityReport", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_async", + "title": "OsConfigServiceClient listVulnerabilityReports Sample", + "origin": "API_DEFINITION", + "description": " List vulnerability reports for all VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_vulnerability_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVulnerabilityReports", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListVulnerabilityReports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListVulnerabilityReportsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListVulnerabilityReports", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListVulnerabilityReports", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js index 61590fdfc82..b56e26f0af4 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js index 3e850caf0a4..f97e8f01953 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js index 773a4b4a865..409719dd165 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js index 64152dbb115..298aa15ef94 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js index 1369bdd6141..c330905edaf 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js index 999fd736fd2..ec6c9235eea 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js index eb605a87098..8f1c6adf44d 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js index 01a0e4ed8a9..38ad789cc95 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js index 0150a5f456c..3f77ce2927f 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js index 37e37dab861..169e1d84b78 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js index e7c8d66367f..b22fd1e0783 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js index 6018fecd363..887f04c1e13 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js index 0b0e18daf98..f06a13d8ebf 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js index 4c4e4f579e7..334e2339ed5 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json new file mode 100644 index 00000000000..5865646ea0f --- /dev/null +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json @@ -0,0 +1,659 @@ +{ + "clientLibrary": { + "name": "nodejs-osconfig", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.osconfig.v1alpha", + "version": "v1alpha" + } + ] + }, + "snippets": [ + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_CreateOSPolicyAssignment_async", + "title": "OsConfigZonalService createOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.create_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "os_policy_assignment", + "type": ".google.cloud.osconfig.v1alpha.OSPolicyAssignment" + }, + { + "name": "os_policy_assignment_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "CreateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async", + "title": "OsConfigZonalService updateOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.update_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "os_policy_assignment", + "type": ".google.cloud.osconfig.v1alpha.OSPolicyAssignment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "UpdateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignment_async", + "title": "OsConfigZonalService getOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.", + "canonical": true, + "file": "os_config_zonal_service.get_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.OSPolicyAssignment", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignments_async", + "title": "OsConfigZonalService listOSPolicyAssignments Sample", + "origin": "API_DEFINITION", + "description": " List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignments", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignments", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignments", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async", + "title": "OsConfigZonalService listOSPolicyAssignmentRevisions Sample", + "origin": "API_DEFINITION", + "description": " List the OS policy assignment revisions for a given OS policy assignment.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignment_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignmentRevisions", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignmentRevisions", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisions", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async", + "title": "OsConfigZonalService deleteOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.delete_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "DeleteOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetInstanceOSPoliciesCompliance_async", + "title": "OsConfigZonalService getInstanceOSPoliciesCompliance Sample", + "origin": "API_DEFINITION", + "description": " Get OS policies compliance data for the specified Compute Engine VM instance.", + "canonical": true, + "file": "os_config_zonal_service.get_instance_o_s_policies_compliance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInstanceOSPoliciesCompliance", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesCompliance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetInstanceOSPoliciesCompliance", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesCompliance", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListInstanceOSPoliciesCompliances_async", + "title": "OsConfigZonalService listInstanceOSPoliciesCompliances Sample", + "origin": "API_DEFINITION", + "description": " List OS policies compliance data for all Compute Engine VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_instance_o_s_policies_compliances.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInstanceOSPoliciesCompliances", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliances", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListInstanceOSPoliciesCompliances", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliances", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async", + "title": "OsConfigZonalService getOSPolicyAssignmentReport Sample", + "origin": "API_DEFINITION", + "description": " Get the OS policy asssignment report for the specified Compute Engine VM instance.", + "canonical": true, + "file": "os_config_zonal_service.get_o_s_policy_assignment_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOSPolicyAssignmentReport", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetOSPolicyAssignmentReport", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentReport", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async", + "title": "OsConfigZonalService listOSPolicyAssignmentReports Sample", + "origin": "API_DEFINITION", + "description": " List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignment_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignmentReports", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentReports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignmentReports", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentReports", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetInventory_async", + "title": "OsConfigZonalService getInventory Sample", + "origin": "API_DEFINITION", + "description": " Get inventory data for the specified VM instance. If the VM has no associated inventory, the message `NOT_FOUND` is returned.", + "canonical": true, + "file": "os_config_zonal_service.get_inventory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInventory", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventory", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.osconfig.v1alpha.InventoryView" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.Inventory", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetInventory", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventory", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListInventories_async", + "title": "OsConfigZonalService listInventories Sample", + "origin": "API_DEFINITION", + "description": " List inventory data for all VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_inventories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInventories", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.osconfig.v1alpha.InventoryView" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListInventoriesResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListInventories", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventories", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetVulnerabilityReport_async", + "title": "OsConfigZonalService getVulnerabilityReport Sample", + "origin": "API_DEFINITION", + "description": " Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.", + "canonical": true, + "file": "os_config_zonal_service.get_vulnerability_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVulnerabilityReport", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.VulnerabilityReport", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetVulnerabilityReport", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReport", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + }, + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListVulnerabilityReports_async", + "title": "OsConfigZonalService listVulnerabilityReports Sample", + "origin": "API_DEFINITION", + "description": " List vulnerability reports for all VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_vulnerability_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVulnerabilityReports", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListVulnerabilityReports", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReports", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 1f2360669a7..de38b76596c 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -2147,9 +2147,8 @@ export class OsConfigServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.osConfigServiceStub!.then(stub => { + if (this.osConfigServiceStub && !this._terminated) { + return this.osConfigServiceStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts index 65d2ca37c98..b7c6978dcd1 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -2762,9 +2762,8 @@ export class OsConfigZonalServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.osConfigZonalServiceStub!.then(stub => { + if (this.osConfigZonalServiceStub && !this._terminated) { + return this.osConfigZonalServiceStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index 15218a1201b..ca08dc0d843 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -3127,9 +3127,8 @@ export class OsConfigZonalServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.osConfigZonalServiceStub!.then(stub => { + if (this.osConfigZonalServiceStub && !this._terminated) { + return this.osConfigZonalServiceStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index e37375d9f91..0a6bfeb64c7 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -153,12 +153,27 @@ describe('v1.OsConfigServiceClient', () => { assert(client.osConfigServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new osconfigserviceModule.v1.OsConfigServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.osConfigServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -304,6 +319,22 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes executePatchJob with closed client', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.executePatchJob(request), expectedError); + }); }); describe('getPatchJob', () => { @@ -415,6 +446,22 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getPatchJob with closed client', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetPatchJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPatchJob(request), expectedError); + }); }); describe('cancelPatchJob', () => { @@ -526,6 +573,22 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes cancelPatchJob with closed client', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelPatchJob(request), expectedError); + }); }); describe('createPatchDeployment', () => { @@ -641,6 +704,25 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createPatchDeployment with closed client', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createPatchDeployment(request), + expectedError + ); + }); }); describe('getPatchDeployment', () => { @@ -753,6 +835,22 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getPatchDeployment with closed client', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPatchDeployment(request), expectedError); + }); }); describe('deletePatchDeployment', () => { @@ -868,6 +966,25 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deletePatchDeployment with closed client', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deletePatchDeployment(request), + expectedError + ); + }); }); describe('updatePatchDeployment', () => { @@ -986,6 +1103,26 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updatePatchDeployment with closed client', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() + ); + request.patchDeployment = {}; + request.patchDeployment.name = ''; + const expectedHeaderRequestParams = 'patch_deployment.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updatePatchDeployment(request), + expectedError + ); + }); }); describe('pausePatchDeployment', () => { @@ -1098,6 +1235,22 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes pausePatchDeployment with closed client', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pausePatchDeployment(request), expectedError); + }); }); describe('resumePatchDeployment', () => { @@ -1213,6 +1366,25 @@ describe('v1.OsConfigServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes resumePatchDeployment with closed client', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.resumePatchDeployment(request), + expectedError + ); + }); }); describe('listPatchJobs', () => { diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts index 1e3608fc5f3..3d25a054e41 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -190,14 +190,31 @@ describe('v1.OsConfigZonalServiceClient', () => { assert(client.osConfigZonalServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', } ); - client.close(); + client.initialize(); + assert(client.osConfigZonalServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.osConfigZonalServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -354,6 +371,26 @@ describe('v1.OsConfigZonalServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getOSPolicyAssignment with closed client', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getOSPolicyAssignment(request), + expectedError + ); + }); }); describe('getOSPolicyAssignmentReport', () => { @@ -472,6 +509,26 @@ describe('v1.OsConfigZonalServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getOSPolicyAssignmentReport with closed client', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getOSPolicyAssignmentReport(request), + expectedError + ); + }); }); describe('getInventory', () => { @@ -586,6 +643,23 @@ describe('v1.OsConfigZonalServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getInventory with closed client', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetInventoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getInventory(request), expectedError); + }); }); describe('getVulnerabilityReport', () => { @@ -704,6 +778,26 @@ describe('v1.OsConfigZonalServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getVulnerabilityReport with closed client', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getVulnerabilityReport(request), + expectedError + ); + }); }); describe('createOSPolicyAssignment', () => { diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts index 6071f4a4784..fa747f4a771 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -189,13 +189,29 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { assert(client.osConfigZonalServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.osConfigZonalServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigZonalServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -350,6 +366,26 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getOSPolicyAssignment with closed client', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getOSPolicyAssignment(request), + expectedError + ); + }); }); describe('getInstanceOSPoliciesCompliance', () => { @@ -474,6 +510,28 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getInstanceOSPoliciesCompliance with closed client', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getInstanceOSPoliciesCompliance(request), + expectedError + ); + assert(stub.calledOnce); + }); }); describe('getOSPolicyAssignmentReport', () => { @@ -592,6 +650,26 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getOSPolicyAssignmentReport with closed client', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getOSPolicyAssignmentReport(request), + expectedError + ); + }); }); describe('getInventory', () => { @@ -706,6 +784,23 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getInventory with closed client', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getInventory(request), expectedError); + }); }); describe('getVulnerabilityReport', () => { @@ -824,6 +919,26 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getVulnerabilityReport with closed client', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getVulnerabilityReport(request), + expectedError + ); + }); }); describe('createOSPolicyAssignment', () => { From 57becb1897b52c96a5004285b2e538364fe7c79a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:36:27 +0000 Subject: [PATCH 127/154] chore: update v2.14.2 gapic-generator-typescript (#192) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 --- .../test/gapic_os_config_service_v1.ts | 9 --------- .../test/gapic_os_config_zonal_service_v1.ts | 4 ---- .../test/gapic_os_config_zonal_service_v1alpha.ts | 5 ----- 3 files changed, 18 deletions(-) diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index 0a6bfeb64c7..17e9a2eeff7 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -330,7 +330,6 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.executePatchJob(request), expectedError); @@ -457,7 +456,6 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getPatchJob(request), expectedError); @@ -584,7 +582,6 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.cancelPatchJob(request), expectedError); @@ -715,7 +712,6 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -846,7 +842,6 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getPatchDeployment(request), expectedError); @@ -977,7 +972,6 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1115,7 +1109,6 @@ describe('v1.OsConfigServiceClient', () => { ); request.patchDeployment = {}; request.patchDeployment.name = ''; - const expectedHeaderRequestParams = 'patch_deployment.name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1246,7 +1239,6 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.pausePatchDeployment(request), expectedError); @@ -1377,7 +1369,6 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts index 3d25a054e41..96433e89d98 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -383,7 +383,6 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -521,7 +520,6 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -655,7 +653,6 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getInventory(request), expectedError); @@ -790,7 +787,6 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts index fa747f4a771..ddc01c12ed9 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -378,7 +378,6 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -523,7 +522,6 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -662,7 +660,6 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -796,7 +793,6 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getInventory(request), expectedError); @@ -931,7 +927,6 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( From 6503ad89f1f362027b46b837056be2effa77257c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 12:53:18 -0700 Subject: [PATCH 128/154] build(node): update client library version in samples metadata (#1356) (#199) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- ...pet_metadata.google.cloud.osconfig.v1.json | 2140 ++++++++--------- ...etadata.google.cloud.osconfig.v1alpha.json | 1260 +++++----- 2 files changed, 1700 insertions(+), 1700 deletions(-) diff --git a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json index b1f318412b5..c63535609d6 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json +++ b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json @@ -1,1119 +1,1119 @@ { - "clientLibrary": { - "name": "nodejs-osconfig", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.osconfig.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "osconfig_v1_generated_OsConfigService_ExecutePatchJob_async", - "title": "OsConfigServiceClient executePatchJob Sample", - "origin": "API_DEFINITION", - "description": " Patch VM instances by creating and running a patch job.", - "canonical": true, - "file": "os_config_service.execute_patch_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExecutePatchJob", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ExecutePatchJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "description", - "type": "TYPE_STRING" - }, - { - "name": "instance_filter", - "type": ".google.cloud.osconfig.v1.PatchInstanceFilter" - }, - { - "name": "patch_config", - "type": ".google.cloud.osconfig.v1.PatchConfig" - }, - { - "name": "duration", - "type": ".google.protobuf.Duration" - }, - { - "name": "dry_run", - "type": "TYPE_BOOL" - }, - { - "name": "display_name", - "type": "TYPE_STRING" - }, - { - "name": "rollout", - "type": ".google.cloud.osconfig.v1.PatchRollout" - } - ], - "resultType": ".google.cloud.osconfig.v1.PatchJob", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" - }, - "method": { - "shortName": "ExecutePatchJob", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ExecutePatchJob", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } + "clientLibrary": { + "name": "nodejs-osconfig", + "version": "1.12.1", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.osconfig.v1", + "version": "v1" + } + ] }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_GetPatchJob_async", - "title": "OsConfigServiceClient getPatchJob Sample", - "origin": "API_DEFINITION", - "description": " Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.", - "canonical": true, - "file": "os_config_service.get_patch_job.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPatchJob", - "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.PatchJob", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_ExecutePatchJob_async", + "title": "OsConfigServiceClient executePatchJob Sample", + "origin": "API_DEFINITION", + "description": " Patch VM instances by creating and running a patch job.", + "canonical": true, + "file": "os_config_service.execute_patch_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecutePatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ExecutePatchJob", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "description", + "type": "TYPE_STRING" + }, + { + "name": "instance_filter", + "type": ".google.cloud.osconfig.v1.PatchInstanceFilter" + }, + { + "name": "patch_config", + "type": ".google.cloud.osconfig.v1.PatchConfig" + }, + { + "name": "duration", + "type": ".google.protobuf.Duration" + }, + { + "name": "dry_run", + "type": "TYPE_BOOL" + }, + { + "name": "display_name", + "type": "TYPE_STRING" + }, + { + "name": "rollout", + "type": ".google.cloud.osconfig.v1.PatchRollout" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchJob", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ExecutePatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ExecutePatchJob", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "GetPatchJob", - "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchJob", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_CancelPatchJob_async", - "title": "OsConfigServiceClient cancelPatchJob Sample", - "origin": "API_DEFINITION", - "description": " Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.", - "canonical": true, - "file": "os_config_service.cancel_patch_job.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelPatchJob", - "fullName": "google.cloud.osconfig.v1.OsConfigService.CancelPatchJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.PatchJob", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_GetPatchJob_async", + "title": "OsConfigServiceClient getPatchJob Sample", + "origin": "API_DEFINITION", + "description": " Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.", + "canonical": true, + "file": "os_config_service.get_patch_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchJob", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "GetPatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchJob", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "CancelPatchJob", - "fullName": "google.cloud.osconfig.v1.OsConfigService.CancelPatchJob", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_ListPatchJobs_async", - "title": "OsConfigServiceClient listPatchJobs Sample", - "origin": "API_DEFINITION", - "description": " Get a list of patch jobs.", - "canonical": true, - "file": "os_config_service.list_patch_jobs.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPatchJobs", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.ListPatchJobsResponse", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_CancelPatchJob_async", + "title": "OsConfigServiceClient cancelPatchJob Sample", + "origin": "API_DEFINITION", + "description": " Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.", + "canonical": true, + "file": "os_config_service.cancel_patch_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelPatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.CancelPatchJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchJob", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "CancelPatchJob", + "fullName": "google.cloud.osconfig.v1.OsConfigService.CancelPatchJob", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "ListPatchJobs", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobs", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_async", - "title": "OsConfigServiceClient listPatchJobInstanceDetails Sample", - "origin": "API_DEFINITION", - "description": " Get a list of instance details for a given patch job.", - "canonical": true, - "file": "os_config_service.list_patch_job_instance_details.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPatchJobInstanceDetails", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetails", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_ListPatchJobs_async", + "title": "OsConfigServiceClient listPatchJobs Sample", + "origin": "API_DEFINITION", + "description": " Get a list of patch jobs.", + "canonical": true, + "file": "os_config_service.list_patch_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPatchJobs", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListPatchJobsResponse", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ListPatchJobs", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobs", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "ListPatchJobInstanceDetails", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetails", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_CreatePatchDeployment_async", - "title": "OsConfigServiceClient createPatchDeployment Sample", - "origin": "API_DEFINITION", - "description": " Create an OS Config patch deployment.", - "canonical": true, - "file": "os_config_service.create_patch_deployment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.CreatePatchDeployment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "patch_deployment_id", - "type": "TYPE_STRING" - }, - { - "name": "patch_deployment", - "type": ".google.cloud.osconfig.v1.PatchDeployment" - } - ], - "resultType": ".google.cloud.osconfig.v1.PatchDeployment", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_async", + "title": "OsConfigServiceClient listPatchJobInstanceDetails Sample", + "origin": "API_DEFINITION", + "description": " Get a list of instance details for a given patch job.", + "canonical": true, + "file": "os_config_service.list_patch_job_instance_details.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPatchJobInstanceDetails", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetails", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ListPatchJobInstanceDetails", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchJobInstanceDetails", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "CreatePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.CreatePatchDeployment", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_GetPatchDeployment_async", - "title": "OsConfigServiceClient getPatchDeployment Sample", - "origin": "API_DEFINITION", - "description": " Get an OS Config patch deployment.", - "canonical": true, - "file": "os_config_service.get_patch_deployment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.PatchDeployment", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_CreatePatchDeployment_async", + "title": "OsConfigServiceClient createPatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Create an OS Config patch deployment.", + "canonical": true, + "file": "os_config_service.create_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.CreatePatchDeployment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "patch_deployment_id", + "type": "TYPE_STRING" + }, + { + "name": "patch_deployment", + "type": ".google.cloud.osconfig.v1.PatchDeployment" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "CreatePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.CreatePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "GetPatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchDeployment", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_ListPatchDeployments_async", - "title": "OsConfigServiceClient listPatchDeployments Sample", - "origin": "API_DEFINITION", - "description": " Get a page of OS Config patch deployments.", - "canonical": true, - "file": "os_config_service.list_patch_deployments.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPatchDeployments", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchDeployments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.ListPatchDeploymentsResponse", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_GetPatchDeployment_async", + "title": "OsConfigServiceClient getPatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Get an OS Config patch deployment.", + "canonical": true, + "file": "os_config_service.get_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "GetPatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.GetPatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "ListPatchDeployments", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchDeployments", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_DeletePatchDeployment_async", - "title": "OsConfigServiceClient deletePatchDeployment Sample", - "origin": "API_DEFINITION", - "description": " Delete an OS Config patch deployment.", - "canonical": true, - "file": "os_config_service.delete_patch_deployment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.DeletePatchDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_ListPatchDeployments_async", + "title": "OsConfigServiceClient listPatchDeployments Sample", + "origin": "API_DEFINITION", + "description": " Get a page of OS Config patch deployments.", + "canonical": true, + "file": "os_config_service.list_patch_deployments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPatchDeployments", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchDeployments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListPatchDeploymentsResponse", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ListPatchDeployments", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ListPatchDeployments", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "DeletePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.DeletePatchDeployment", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_UpdatePatchDeployment_async", - "title": "OsConfigServiceClient updatePatchDeployment Sample", - "origin": "API_DEFINITION", - "description": " Update an OS Config patch deployment.", - "canonical": true, - "file": "os_config_service.update_patch_deployment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdatePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.UpdatePatchDeployment", - "async": true, - "parameters": [ - { - "name": "patch_deployment", - "type": ".google.cloud.osconfig.v1.PatchDeployment" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.osconfig.v1.PatchDeployment", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_DeletePatchDeployment_async", + "title": "OsConfigServiceClient deletePatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Delete an OS Config patch deployment.", + "canonical": true, + "file": "os_config_service.delete_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.DeletePatchDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "DeletePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.DeletePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "UpdatePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.UpdatePatchDeployment", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_PausePatchDeployment_async", - "title": "OsConfigServiceClient pausePatchDeployment Sample", - "origin": "API_DEFINITION", - "description": " Change state of patch deployment to \"PAUSED\". Patch deployment in paused state doesn't generate patch jobs.", - "canonical": true, - "file": "os_config_service.pause_patch_deployment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PausePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.PausePatchDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.PatchDeployment", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_UpdatePatchDeployment_async", + "title": "OsConfigServiceClient updatePatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Update an OS Config patch deployment.", + "canonical": true, + "file": "os_config_service.update_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdatePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.UpdatePatchDeployment", + "async": true, + "parameters": [ + { + "name": "patch_deployment", + "type": ".google.cloud.osconfig.v1.PatchDeployment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "UpdatePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.UpdatePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "PausePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.PausePatchDeployment", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigService_ResumePatchDeployment_async", - "title": "OsConfigServiceClient resumePatchDeployment Sample", - "origin": "API_DEFINITION", - "description": " Change state of patch deployment back to \"ACTIVE\". Patch deployment in active state continues to generate patch jobs.", - "canonical": true, - "file": "os_config_service.resume_patch_deployment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ResumePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ResumePatchDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.PatchDeployment", - "client": { - "shortName": "OsConfigServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_PausePatchDeployment_async", + "title": "OsConfigServiceClient pausePatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Change state of patch deployment to \"PAUSED\". Patch deployment in paused state doesn't generate patch jobs.", + "canonical": true, + "file": "os_config_service.pause_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PausePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.PausePatchDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "PausePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.PausePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "ResumePatchDeployment", - "fullName": "google.cloud.osconfig.v1.OsConfigService.ResumePatchDeployment", - "service": { - "shortName": "OsConfigService", - "fullName": "google.cloud.osconfig.v1.OsConfigService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_async", - "title": "OsConfigServiceClient createOSPolicyAssignment Sample", - "origin": "API_DEFINITION", - "description": " Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", - "canonical": true, - "file": "os_config_zonal_service.create_o_s_policy_assignment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.CreateOSPolicyAssignment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "os_policy_assignment", - "type": ".google.cloud.osconfig.v1.OSPolicyAssignment" - }, - { - "name": "os_policy_assignment_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigService_ResumePatchDeployment_async", + "title": "OsConfigServiceClient resumePatchDeployment Sample", + "origin": "API_DEFINITION", + "description": " Change state of patch deployment back to \"ACTIVE\". Patch deployment in active state continues to generate patch jobs.", + "canonical": true, + "file": "os_config_service.resume_patch_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResumePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ResumePatchDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.PatchDeployment", + "client": { + "shortName": "OsConfigServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigServiceClient" + }, + "method": { + "shortName": "ResumePatchDeployment", + "fullName": "google.cloud.osconfig.v1.OsConfigService.ResumePatchDeployment", + "service": { + "shortName": "OsConfigService", + "fullName": "google.cloud.osconfig.v1.OsConfigService" + } + } + } }, - "method": { - "shortName": "CreateOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.CreateOSPolicyAssignment", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async", - "title": "OsConfigServiceClient updateOSPolicyAssignment Sample", - "origin": "API_DEFINITION", - "description": " Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", - "canonical": true, - "file": "os_config_zonal_service.update_o_s_policy_assignment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.UpdateOSPolicyAssignment", - "async": true, - "parameters": [ - { - "name": "os_policy_assignment", - "type": ".google.cloud.osconfig.v1.OSPolicyAssignment" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_async", + "title": "OsConfigServiceClient createOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.create_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.CreateOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "os_policy_assignment", + "type": ".google.cloud.osconfig.v1.OSPolicyAssignment" + }, + { + "name": "os_policy_assignment_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "CreateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.CreateOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "UpdateOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.UpdateOSPolicyAssignment", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignment_async", - "title": "OsConfigServiceClient getOSPolicyAssignment Sample", - "origin": "API_DEFINITION", - "description": " Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.", - "canonical": true, - "file": "os_config_zonal_service.get_o_s_policy_assignment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.OSPolicyAssignment", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async", + "title": "OsConfigServiceClient updateOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.update_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.UpdateOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "os_policy_assignment", + "type": ".google.cloud.osconfig.v1.OSPolicyAssignment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "UpdateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.UpdateOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "GetOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignment", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignments_async", - "title": "OsConfigServiceClient listOSPolicyAssignments Sample", - "origin": "API_DEFINITION", - "description": " List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.", - "canonical": true, - "file": "os_config_zonal_service.list_o_s_policy_assignments.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOSPolicyAssignments", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignment_async", + "title": "OsConfigServiceClient getOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.", + "canonical": true, + "file": "os_config_zonal_service.get_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.OSPolicyAssignment", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListOSPolicyAssignments", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignments", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async", - "title": "OsConfigServiceClient listOSPolicyAssignmentRevisions Sample", - "origin": "API_DEFINITION", - "description": " List the OS policy assignment revisions for a given OS policy assignment.", - "canonical": true, - "file": "os_config_zonal_service.list_o_s_policy_assignment_revisions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOSPolicyAssignmentRevisions", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentRevisions", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignments_async", + "title": "OsConfigServiceClient listOSPolicyAssignments Sample", + "origin": "API_DEFINITION", + "description": " List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignments", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignments", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignments", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListOSPolicyAssignmentRevisions", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentRevisions", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async", - "title": "OsConfigServiceClient deleteOSPolicyAssignment Sample", - "origin": "API_DEFINITION", - "description": " Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", - "canonical": true, - "file": "os_config_zonal_service.delete_o_s_policy_assignment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.DeleteOSPolicyAssignment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async", + "title": "OsConfigServiceClient listOSPolicyAssignmentRevisions Sample", + "origin": "API_DEFINITION", + "description": " List the OS policy assignment revisions for a given OS policy assignment.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignment_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignmentRevisions", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentRevisions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignmentRevisions", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentRevisions", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "DeleteOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.DeleteOSPolicyAssignment", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async", - "title": "OsConfigServiceClient getOSPolicyAssignmentReport Sample", - "origin": "API_DEFINITION", - "description": " Get the OS policy asssignment report for the specified Compute Engine VM instance.", - "canonical": true, - "file": "os_config_zonal_service.get_o_s_policy_assignment_report.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetOSPolicyAssignmentReport", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentReport", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.OSPolicyAssignmentReport", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async", + "title": "OsConfigServiceClient deleteOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.delete_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.DeleteOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "DeleteOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.DeleteOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "GetOSPolicyAssignmentReport", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentReport", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async", - "title": "OsConfigServiceClient listOSPolicyAssignmentReports Sample", - "origin": "API_DEFINITION", - "description": " List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.", - "canonical": true, - "file": "os_config_zonal_service.list_o_s_policy_assignment_reports.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOSPolicyAssignmentReports", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentReports", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async", + "title": "OsConfigServiceClient getOSPolicyAssignmentReport Sample", + "origin": "API_DEFINITION", + "description": " Get the OS policy asssignment report for the specified Compute Engine VM instance.", + "canonical": true, + "file": "os_config_zonal_service.get_o_s_policy_assignment_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOSPolicyAssignmentReport", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.OSPolicyAssignmentReport", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetOSPolicyAssignmentReport", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetOSPolicyAssignmentReport", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListOSPolicyAssignmentReports", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentReports", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetInventory_async", - "title": "OsConfigServiceClient getInventory Sample", - "origin": "API_DEFINITION", - "description": " Get inventory data for the specified VM instance. If the VM has no associated inventory, the message `NOT_FOUND` is returned.", - "canonical": true, - "file": "os_config_zonal_service.get_inventory.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetInventory", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetInventory", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.osconfig.v1.InventoryView" - } - ], - "resultType": ".google.cloud.osconfig.v1.Inventory", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async", + "title": "OsConfigServiceClient listOSPolicyAssignmentReports Sample", + "origin": "API_DEFINITION", + "description": " List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignment_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignmentReports", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentReports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignmentReports", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListOSPolicyAssignmentReports", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "GetInventory", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetInventory", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListInventories_async", - "title": "OsConfigServiceClient listInventories Sample", - "origin": "API_DEFINITION", - "description": " List inventory data for all VM instances in the specified zone.", - "canonical": true, - "file": "os_config_zonal_service.list_inventories.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListInventories", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListInventories", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.osconfig.v1.InventoryView" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.ListInventoriesResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetInventory_async", + "title": "OsConfigServiceClient getInventory Sample", + "origin": "API_DEFINITION", + "description": " Get inventory data for the specified VM instance. If the VM has no associated inventory, the message `NOT_FOUND` is returned.", + "canonical": true, + "file": "os_config_zonal_service.get_inventory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInventory", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetInventory", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.osconfig.v1.InventoryView" + } + ], + "resultType": ".google.cloud.osconfig.v1.Inventory", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetInventory", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetInventory", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListInventories", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListInventories", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_async", - "title": "OsConfigServiceClient getVulnerabilityReport Sample", - "origin": "API_DEFINITION", - "description": " Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.", - "canonical": true, - "file": "os_config_zonal_service.get_vulnerability_report.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetVulnerabilityReport", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetVulnerabilityReport", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.VulnerabilityReport", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListInventories_async", + "title": "OsConfigServiceClient listInventories Sample", + "origin": "API_DEFINITION", + "description": " List inventory data for all VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_inventories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInventories", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListInventories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.osconfig.v1.InventoryView" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListInventoriesResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListInventories", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListInventories", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "GetVulnerabilityReport", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetVulnerabilityReport", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_async", - "title": "OsConfigServiceClient listVulnerabilityReports Sample", - "origin": "API_DEFINITION", - "description": " List vulnerability reports for all VM instances in the specified zone.", - "canonical": true, - "file": "os_config_zonal_service.list_vulnerability_reports.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListVulnerabilityReports", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListVulnerabilityReports", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1.ListVulnerabilityReportsResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_async", + "title": "OsConfigServiceClient getVulnerabilityReport Sample", + "origin": "API_DEFINITION", + "description": " Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.", + "canonical": true, + "file": "os_config_zonal_service.get_vulnerability_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVulnerabilityReport", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetVulnerabilityReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.VulnerabilityReport", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetVulnerabilityReport", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.GetVulnerabilityReport", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListVulnerabilityReports", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListVulnerabilityReports", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" - } + { + "regionTag": "osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_async", + "title": "OsConfigServiceClient listVulnerabilityReports Sample", + "origin": "API_DEFINITION", + "description": " List vulnerability reports for all VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_vulnerability_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVulnerabilityReports", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListVulnerabilityReports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1.ListVulnerabilityReportsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListVulnerabilityReports", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService.ListVulnerabilityReports", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1.OsConfigZonalService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json index 5865646ea0f..4f40e9f347a 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json @@ -1,659 +1,659 @@ { - "clientLibrary": { - "name": "nodejs-osconfig", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.osconfig.v1alpha", - "version": "v1alpha" - } - ] - }, - "snippets": [ - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_CreateOSPolicyAssignment_async", - "title": "OsConfigZonalService createOSPolicyAssignment Sample", - "origin": "API_DEFINITION", - "description": " Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", - "canonical": true, - "file": "os_config_zonal_service.create_o_s_policy_assignment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "os_policy_assignment", - "type": ".google.cloud.osconfig.v1alpha.OSPolicyAssignment" - }, - { - "name": "os_policy_assignment_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" - }, - "method": { - "shortName": "CreateOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignment", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } + "clientLibrary": { + "name": "nodejs-osconfig", + "version": "1.12.1", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.osconfig.v1alpha", + "version": "v1alpha" + } + ] }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async", - "title": "OsConfigZonalService updateOSPolicyAssignment Sample", - "origin": "API_DEFINITION", - "description": " Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", - "canonical": true, - "file": "os_config_zonal_service.update_o_s_policy_assignment.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignment", - "async": true, - "parameters": [ - { - "name": "os_policy_assignment", - "type": ".google.cloud.osconfig.v1alpha.OSPolicyAssignment" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_CreateOSPolicyAssignment_async", + "title": "OsConfigZonalService createOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.create_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "os_policy_assignment", + "type": ".google.cloud.osconfig.v1alpha.OSPolicyAssignment" + }, + { + "name": "os_policy_assignment_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "CreateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.CreateOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "UpdateOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignment", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignment_async", - "title": "OsConfigZonalService getOSPolicyAssignment Sample", - "origin": "API_DEFINITION", - "description": " Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.", - "canonical": true, - "file": "os_config_zonal_service.get_o_s_policy_assignment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.OSPolicyAssignment", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async", + "title": "OsConfigZonalService updateOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.update_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "os_policy_assignment", + "type": ".google.cloud.osconfig.v1alpha.OSPolicyAssignment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "UpdateOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.UpdateOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "GetOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignment", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignments_async", - "title": "OsConfigZonalService listOSPolicyAssignments Sample", - "origin": "API_DEFINITION", - "description": " List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.", - "canonical": true, - "file": "os_config_zonal_service.list_o_s_policy_assignments.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOSPolicyAssignments", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignment_async", + "title": "OsConfigZonalService getOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.", + "canonical": true, + "file": "os_config_zonal_service.get_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.OSPolicyAssignment", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListOSPolicyAssignments", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignments", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async", - "title": "OsConfigZonalService listOSPolicyAssignmentRevisions Sample", - "origin": "API_DEFINITION", - "description": " List the OS policy assignment revisions for a given OS policy assignment.", - "canonical": true, - "file": "os_config_zonal_service.list_o_s_policy_assignment_revisions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOSPolicyAssignmentRevisions", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisions", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignments_async", + "title": "OsConfigZonalService listOSPolicyAssignments Sample", + "origin": "API_DEFINITION", + "description": " List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignments", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignments", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignments", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListOSPolicyAssignmentRevisions", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisions", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async", - "title": "OsConfigZonalService deleteOSPolicyAssignment Sample", - "origin": "API_DEFINITION", - "description": " Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", - "canonical": true, - "file": "os_config_zonal_service.delete_o_s_policy_assignment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async", + "title": "OsConfigZonalService listOSPolicyAssignmentRevisions Sample", + "origin": "API_DEFINITION", + "description": " List the OS policy assignment revisions for a given OS policy assignment.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignment_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignmentRevisions", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignmentRevisions", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentRevisions", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "DeleteOSPolicyAssignment", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignment", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetInstanceOSPoliciesCompliance_async", - "title": "OsConfigZonalService getInstanceOSPoliciesCompliance Sample", - "origin": "API_DEFINITION", - "description": " Get OS policies compliance data for the specified Compute Engine VM instance.", - "canonical": true, - "file": "os_config_zonal_service.get_instance_o_s_policies_compliance.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetInstanceOSPoliciesCompliance", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesCompliance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async", + "title": "OsConfigZonalService deleteOSPolicyAssignment Sample", + "origin": "API_DEFINITION", + "description": " Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", + "canonical": true, + "file": "os_config_zonal_service.delete_o_s_policy_assignment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "DeleteOSPolicyAssignment", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.DeleteOSPolicyAssignment", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "GetInstanceOSPoliciesCompliance", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesCompliance", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListInstanceOSPoliciesCompliances_async", - "title": "OsConfigZonalService listInstanceOSPoliciesCompliances Sample", - "origin": "API_DEFINITION", - "description": " List OS policies compliance data for all Compute Engine VM instances in the specified zone.", - "canonical": true, - "file": "os_config_zonal_service.list_instance_o_s_policies_compliances.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListInstanceOSPoliciesCompliances", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliances", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetInstanceOSPoliciesCompliance_async", + "title": "OsConfigZonalService getInstanceOSPoliciesCompliance Sample", + "origin": "API_DEFINITION", + "description": " Get OS policies compliance data for the specified Compute Engine VM instance.", + "canonical": true, + "file": "os_config_zonal_service.get_instance_o_s_policies_compliance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInstanceOSPoliciesCompliance", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesCompliance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetInstanceOSPoliciesCompliance", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInstanceOSPoliciesCompliance", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListInstanceOSPoliciesCompliances", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliances", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async", - "title": "OsConfigZonalService getOSPolicyAssignmentReport Sample", - "origin": "API_DEFINITION", - "description": " Get the OS policy asssignment report for the specified Compute Engine VM instance.", - "canonical": true, - "file": "os_config_zonal_service.get_o_s_policy_assignment_report.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetOSPolicyAssignmentReport", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentReport", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListInstanceOSPoliciesCompliances_async", + "title": "OsConfigZonalService listInstanceOSPoliciesCompliances Sample", + "origin": "API_DEFINITION", + "description": " List OS policies compliance data for all Compute Engine VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_instance_o_s_policies_compliances.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInstanceOSPoliciesCompliances", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliances", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListInstanceOSPoliciesCompliances", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInstanceOSPoliciesCompliances", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "GetOSPolicyAssignmentReport", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentReport", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async", - "title": "OsConfigZonalService listOSPolicyAssignmentReports Sample", - "origin": "API_DEFINITION", - "description": " List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.", - "canonical": true, - "file": "os_config_zonal_service.list_o_s_policy_assignment_reports.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListOSPolicyAssignmentReports", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentReports", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async", + "title": "OsConfigZonalService getOSPolicyAssignmentReport Sample", + "origin": "API_DEFINITION", + "description": " Get the OS policy asssignment report for the specified Compute Engine VM instance.", + "canonical": true, + "file": "os_config_zonal_service.get_o_s_policy_assignment_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOSPolicyAssignmentReport", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetOSPolicyAssignmentReport", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetOSPolicyAssignmentReport", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListOSPolicyAssignmentReports", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentReports", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetInventory_async", - "title": "OsConfigZonalService getInventory Sample", - "origin": "API_DEFINITION", - "description": " Get inventory data for the specified VM instance. If the VM has no associated inventory, the message `NOT_FOUND` is returned.", - "canonical": true, - "file": "os_config_zonal_service.get_inventory.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetInventory", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventory", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.osconfig.v1alpha.InventoryView" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.Inventory", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async", + "title": "OsConfigZonalService listOSPolicyAssignmentReports Sample", + "origin": "API_DEFINITION", + "description": " List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_o_s_policy_assignment_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListOSPolicyAssignmentReports", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentReports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListOSPolicyAssignmentReports", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListOSPolicyAssignmentReports", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "GetInventory", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventory", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListInventories_async", - "title": "OsConfigZonalService listInventories Sample", - "origin": "API_DEFINITION", - "description": " List inventory data for all VM instances in the specified zone.", - "canonical": true, - "file": "os_config_zonal_service.list_inventories.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListInventories", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventories", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.osconfig.v1alpha.InventoryView" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.ListInventoriesResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetInventory_async", + "title": "OsConfigZonalService getInventory Sample", + "origin": "API_DEFINITION", + "description": " Get inventory data for the specified VM instance. If the VM has no associated inventory, the message `NOT_FOUND` is returned.", + "canonical": true, + "file": "os_config_zonal_service.get_inventory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInventory", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventory", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.osconfig.v1alpha.InventoryView" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.Inventory", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetInventory", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetInventory", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListInventories", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventories", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetVulnerabilityReport_async", - "title": "OsConfigZonalService getVulnerabilityReport Sample", - "origin": "API_DEFINITION", - "description": " Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.", - "canonical": true, - "file": "os_config_zonal_service.get_vulnerability_report.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetVulnerabilityReport", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReport", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.VulnerabilityReport", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListInventories_async", + "title": "OsConfigZonalService listInventories Sample", + "origin": "API_DEFINITION", + "description": " List inventory data for all VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_inventories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInventories", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.osconfig.v1alpha.InventoryView" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListInventoriesResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListInventories", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListInventories", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "GetVulnerabilityReport", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReport", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } - } - } - }, - { - "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListVulnerabilityReports_async", - "title": "OsConfigZonalService listVulnerabilityReports Sample", - "origin": "API_DEFINITION", - "description": " List vulnerability reports for all VM instances in the specified zone.", - "canonical": true, - "file": "os_config_zonal_service.list_vulnerability_reports.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListVulnerabilityReports", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReports", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse", - "client": { - "shortName": "OsConfigZonalServiceClient", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_GetVulnerabilityReport_async", + "title": "OsConfigZonalService getVulnerabilityReport Sample", + "origin": "API_DEFINITION", + "description": " Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.", + "canonical": true, + "file": "os_config_zonal_service.get_vulnerability_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVulnerabilityReport", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.VulnerabilityReport", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "GetVulnerabilityReport", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.GetVulnerabilityReport", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } }, - "method": { - "shortName": "ListVulnerabilityReports", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReports", - "service": { - "shortName": "OsConfigZonalService", - "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" - } + { + "regionTag": "osconfig_v1alpha_generated_OsConfigZonalService_ListVulnerabilityReports_async", + "title": "OsConfigZonalService listVulnerabilityReports Sample", + "origin": "API_DEFINITION", + "description": " List vulnerability reports for all VM instances in the specified zone.", + "canonical": true, + "file": "os_config_zonal_service.list_vulnerability_reports.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVulnerabilityReports", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReports", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse", + "client": { + "shortName": "OsConfigZonalServiceClient", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient" + }, + "method": { + "shortName": "ListVulnerabilityReports", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService.ListVulnerabilityReports", + "service": { + "shortName": "OsConfigZonalService", + "fullName": "google.cloud.osconfig.v1alpha.OsConfigZonalService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From 756be06ae4d82e2889b548b34d136ada17b56e00 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 3 May 2022 03:24:19 +0200 Subject: [PATCH 129/154] chore(deps): update dependency @types/mocha to v9 (#200) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.1.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/confidence-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index ba457a403ed..cbd1cc04bce 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -30,7 +30,7 @@ "google-gax": "^2.24.1" }, "devDependencies": { - "@types/mocha": "^8.0.0", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.1.2", From 253cc1be207b7a416a155ac232381a2b64e530c6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:36:15 +0200 Subject: [PATCH 130/154] chore(deps): update dependency sinon to v14 (#203) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index cbd1cc04bce..46dc368db2c 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -42,7 +42,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.0.0", "typescript": "~3.8.3" }, From 0880e89b28aa1278096429cc83295f573c2999b1 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Fri, 20 May 2022 11:33:27 -0700 Subject: [PATCH 131/154] build!: update library to use Node 12 (#204) * build!: Update library to use Node 12 --- packages/google-cloud-osconfig/package.json | 10 +++++----- packages/google-cloud-osconfig/samples/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 46dc368db2c..5c98c888203 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -27,26 +27,26 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.1.2", - "gts": "^3.0.0", + "gts": "^3.1.0", "jsdoc": "^3.6.4", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.4", "linkinator": "^2.1.0", - "mocha": "^8.0.0", + "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.0.0", - "typescript": "~3.8.3" + "typescript": "^4.6.4" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 1f59adaa326..57530da48c7 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js" From ab500e4e64dffdb6c4315da6baa8319f1a27ed35 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 11:57:05 -0400 Subject: [PATCH 132/154] chore(main): release 2.0.0 (#206) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-osconfig/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-osconfig/package.json | 2 +- .../v1/snippet_metadata.google.cloud.osconfig.v1.json | 2 +- ...nippet_metadata.google.cloud.osconfig.v1alpha.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index bdbd97b835d..76d96200951 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [2.0.0](https://github.com/googleapis/nodejs-os-config/compare/v1.12.1...v2.0.0) (2022-05-20) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#204) + +### Build System + +* update library to use Node 12 ([#204](https://github.com/googleapis/nodejs-os-config/issues/204)) ([39b393c](https://github.com/googleapis/nodejs-os-config/commit/39b393c6031079fba097b38458be6db8625515c5)) + ### [1.12.1](https://github.com/googleapis/nodejs-os-config/compare/v1.12.0...v1.12.1) (2022-02-11) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 5c98c888203..33bfd237ae2 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "1.12.1", + "version": "2.0.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json index c63535609d6..6cba9c3b09b 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json +++ b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "1.12.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json index 4f40e9f347a..55e69fab690 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "1.12.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 57530da48c7..09f97c47a78 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^1.12.1" + "@google-cloud/os-config": "^2.0.0" }, "devDependencies": { "c8": "^7.1.0", From 87fc164536ffd557bbc29c52ada5a548e0121856 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 16:58:36 +0200 Subject: [PATCH 133/154] chore(deps): update dependency jsdoc-region-tag to v2 (#210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.4` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 33bfd237ae2..509acae2230 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -37,7 +37,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.4", "jsdoc-fresh": "^1.0.2", - "jsdoc-region-tag": "^1.0.4", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.1.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", From fb7f8987736be4964d31e4f11904ff0e9214f1f8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 17:24:44 +0200 Subject: [PATCH 134/154] chore(deps): update dependency jsdoc-fresh to v2 (#209) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-fresh ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 509acae2230..af89cd66b66 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -36,7 +36,7 @@ "c8": "^7.1.2", "gts": "^3.1.0", "jsdoc": "^3.6.4", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.1.0", "mocha": "^9.2.2", From 242c5d7a99d3bf73011eebd651c87a9e602e884b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 18:02:06 -0700 Subject: [PATCH 135/154] feat: REGAPIC LRO; fix: make some camelcased methods work (#211) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: support regapic LRO Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: proper camel case for sequences of capital letters Use gapic-generator-typescript v2.15.2. PiperOrigin-RevId: 458552034 Source-Link: https://github.com/googleapis/googleapis/commit/ae65014049c6eb195741d7efbd0b10bee3f83d4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/b09ede435cce110446d4ab9f62a081b571d37e3f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjA5ZWRlNDM1Y2NlMTEwNDQ2ZDRhYjlmNjJhMDgxYjU3MWQzN2UzZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/os_config_service_client.ts | 11 +- .../src/v1/os_config_zonal_service_client.ts | 93 ++++++----- .../v1alpha/os_config_zonal_service_client.ts | 109 +++++++------ .../test/gapic_os_config_zonal_service_v1.ts | 120 +++++++------- .../gapic_os_config_zonal_service_v1alpha.ts | 148 +++++++++--------- 5 files changed, 253 insertions(+), 228 deletions(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index de38b76596c..6ebb9b1d9e8 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -73,7 +73,7 @@ export class OsConfigServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -96,11 +96,10 @@ export class OsConfigServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts index b7c6978dcd1..3974f67d2e4 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -75,7 +76,7 @@ export class OsConfigZonalServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -98,11 +99,10 @@ export class OsConfigZonalServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -221,16 +221,29 @@ export class OsConfigZonalServiceClient { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}', + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const createOSPolicyAssignmentResponse = protoFilesRoot.lookup( '.google.cloud.osconfig.v1.OSPolicyAssignment' @@ -331,14 +344,14 @@ export class OsConfigZonalServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const osConfigZonalServiceStubMethods = [ - 'createOSPolicyAssignment', - 'updateOSPolicyAssignment', - 'getOSPolicyAssignment', - 'listOSPolicyAssignments', - 'listOSPolicyAssignmentRevisions', - 'deleteOSPolicyAssignment', - 'getOSPolicyAssignmentReport', - 'listOSPolicyAssignmentReports', + 'createOsPolicyAssignment', + 'updateOsPolicyAssignment', + 'getOsPolicyAssignment', + 'listOsPolicyAssignments', + 'listOsPolicyAssignmentRevisions', + 'deleteOsPolicyAssignment', + 'getOsPolicyAssignmentReport', + 'listOsPolicyAssignmentReports', 'getInventory', 'listInventories', 'getVulnerabilityReport', @@ -524,7 +537,7 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); this.initialize(); - return this.innerApiCalls.getOSPolicyAssignment(request, options, callback); + return this.innerApiCalls.getOsPolicyAssignment(request, options, callback); } /** * Get the OS policy asssignment report for the specified Compute Engine VM @@ -630,7 +643,7 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); this.initialize(); - return this.innerApiCalls.getOSPolicyAssignmentReport( + return this.innerApiCalls.getOsPolicyAssignmentReport( request, options, callback @@ -963,7 +976,7 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.createOSPolicyAssignment( + return this.innerApiCalls.createOsPolicyAssignment( request, options, callback @@ -1115,7 +1128,7 @@ export class OsConfigZonalServiceClient { 'os_policy_assignment.name': request.osPolicyAssignment!.name || '', }); this.initialize(); - return this.innerApiCalls.updateOSPolicyAssignment( + return this.innerApiCalls.updateOsPolicyAssignment( request, options, callback @@ -1267,7 +1280,7 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); this.initialize(); - return this.innerApiCalls.deleteOSPolicyAssignment( + return this.innerApiCalls.deleteOsPolicyAssignment( request, options, callback @@ -1407,7 +1420,7 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listOSPolicyAssignments( + return this.innerApiCalls.listOsPolicyAssignments( request, options, callback @@ -1450,11 +1463,11 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listOSPolicyAssignments']; + const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignments.createStream( - this.innerApiCalls.listOSPolicyAssignments as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignments as gax.GaxCall, request, callSettings ); @@ -1499,11 +1512,11 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listOSPolicyAssignments']; + const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignments.asyncIterate( - this.innerApiCalls['listOSPolicyAssignments'] as GaxCall, + this.innerApiCalls['listOsPolicyAssignments'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; @@ -1606,7 +1619,7 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); this.initialize(); - return this.innerApiCalls.listOSPolicyAssignmentRevisions( + return this.innerApiCalls.listOsPolicyAssignmentRevisions( request, options, callback @@ -1650,11 +1663,11 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); const defaultCallSettings = - this._defaults['listOSPolicyAssignmentRevisions']; + this._defaults['listOsPolicyAssignmentRevisions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.createStream( - this.innerApiCalls.listOSPolicyAssignmentRevisions as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignmentRevisions as gax.GaxCall, request, callSettings ); @@ -1700,11 +1713,11 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); const defaultCallSettings = - this._defaults['listOSPolicyAssignmentRevisions']; + this._defaults['listOsPolicyAssignmentRevisions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate( - this.innerApiCalls['listOSPolicyAssignmentRevisions'] as GaxCall, + this.innerApiCalls['listOsPolicyAssignmentRevisions'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; @@ -1831,7 +1844,7 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listOSPolicyAssignmentReports( + return this.innerApiCalls.listOsPolicyAssignmentReports( request, options, callback @@ -1897,11 +1910,11 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listOSPolicyAssignmentReports']; + const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentReports.createStream( - this.innerApiCalls.listOSPolicyAssignmentReports as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignmentReports as gax.GaxCall, request, callSettings ); @@ -1969,11 +1982,11 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listOSPolicyAssignmentReports']; + const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentReports.asyncIterate( - this.innerApiCalls['listOSPolicyAssignmentReports'] as GaxCall, + this.innerApiCalls['listOsPolicyAssignmentReports'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index ca08dc0d843..8a56cd77b46 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -75,7 +76,7 @@ export class OsConfigZonalServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -98,11 +99,10 @@ export class OsConfigZonalServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -224,16 +224,29 @@ export class OsConfigZonalServiceClient { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}', + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const createOSPolicyAssignmentResponse = protoFilesRoot.lookup( '.google.cloud.osconfig.v1alpha.OSPolicyAssignment' @@ -335,16 +348,16 @@ export class OsConfigZonalServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const osConfigZonalServiceStubMethods = [ - 'createOSPolicyAssignment', - 'updateOSPolicyAssignment', - 'getOSPolicyAssignment', - 'listOSPolicyAssignments', - 'listOSPolicyAssignmentRevisions', - 'deleteOSPolicyAssignment', - 'getInstanceOSPoliciesCompliance', - 'listInstanceOSPoliciesCompliances', - 'getOSPolicyAssignmentReport', - 'listOSPolicyAssignmentReports', + 'createOsPolicyAssignment', + 'updateOsPolicyAssignment', + 'getOsPolicyAssignment', + 'listOsPolicyAssignments', + 'listOsPolicyAssignmentRevisions', + 'deleteOsPolicyAssignment', + 'getInstanceOsPoliciesCompliance', + 'listInstanceOsPoliciesCompliances', + 'getOsPolicyAssignmentReport', + 'listOsPolicyAssignmentReports', 'getInventory', 'listInventories', 'getVulnerabilityReport', @@ -536,7 +549,7 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); this.initialize(); - return this.innerApiCalls.getOSPolicyAssignment(request, options, callback); + return this.innerApiCalls.getOsPolicyAssignment(request, options, callback); } /** * Get OS policies compliance data for the specified Compute Engine VM @@ -648,7 +661,7 @@ export class OsConfigZonalServiceClient { 'GetInstanceOSPoliciesCompliance is deprecated and may be removed in a future version.', 'DeprecationWarning' ); - return this.innerApiCalls.getInstanceOSPoliciesCompliance( + return this.innerApiCalls.getInstanceOsPoliciesCompliance( request, options, callback @@ -758,7 +771,7 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); this.initialize(); - return this.innerApiCalls.getOSPolicyAssignmentReport( + return this.innerApiCalls.getOsPolicyAssignmentReport( request, options, callback @@ -1097,7 +1110,7 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.createOSPolicyAssignment( + return this.innerApiCalls.createOsPolicyAssignment( request, options, callback @@ -1248,7 +1261,7 @@ export class OsConfigZonalServiceClient { 'os_policy_assignment.name': request.osPolicyAssignment!.name || '', }); this.initialize(); - return this.innerApiCalls.updateOSPolicyAssignment( + return this.innerApiCalls.updateOsPolicyAssignment( request, options, callback @@ -1400,7 +1413,7 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); this.initialize(); - return this.innerApiCalls.deleteOSPolicyAssignment( + return this.innerApiCalls.deleteOsPolicyAssignment( request, options, callback @@ -1540,7 +1553,7 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listOSPolicyAssignments( + return this.innerApiCalls.listOsPolicyAssignments( request, options, callback @@ -1583,11 +1596,11 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listOSPolicyAssignments']; + const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignments.createStream( - this.innerApiCalls.listOSPolicyAssignments as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignments as gax.GaxCall, request, callSettings ); @@ -1632,11 +1645,11 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listOSPolicyAssignments']; + const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignments.asyncIterate( - this.innerApiCalls['listOSPolicyAssignments'] as GaxCall, + this.innerApiCalls['listOsPolicyAssignments'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; @@ -1739,7 +1752,7 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); this.initialize(); - return this.innerApiCalls.listOSPolicyAssignmentRevisions( + return this.innerApiCalls.listOsPolicyAssignmentRevisions( request, options, callback @@ -1783,11 +1796,11 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); const defaultCallSettings = - this._defaults['listOSPolicyAssignmentRevisions']; + this._defaults['listOsPolicyAssignmentRevisions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.createStream( - this.innerApiCalls.listOSPolicyAssignmentRevisions as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignmentRevisions as gax.GaxCall, request, callSettings ); @@ -1833,11 +1846,11 @@ export class OsConfigZonalServiceClient { name: request.name || '', }); const defaultCallSettings = - this._defaults['listOSPolicyAssignmentRevisions']; + this._defaults['listOsPolicyAssignmentRevisions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate( - this.innerApiCalls['listOSPolicyAssignmentRevisions'] as GaxCall, + this.innerApiCalls['listOsPolicyAssignmentRevisions'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; @@ -1955,7 +1968,7 @@ export class OsConfigZonalServiceClient { 'ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version.', 'DeprecationWarning' ); - return this.innerApiCalls.listInstanceOSPoliciesCompliances( + return this.innerApiCalls.listInstanceOsPoliciesCompliances( request, options, callback @@ -2008,7 +2021,7 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); const defaultCallSettings = - this._defaults['listInstanceOSPoliciesCompliances']; + this._defaults['listInstanceOsPoliciesCompliances']; const callSettings = defaultCallSettings.merge(options); this.initialize(); this.warn( @@ -2017,7 +2030,7 @@ export class OsConfigZonalServiceClient { 'DeprecationWarning' ); return this.descriptors.page.listInstanceOSPoliciesCompliances.createStream( - this.innerApiCalls.listInstanceOSPoliciesCompliances as gax.GaxCall, + this.innerApiCalls.listInstanceOsPoliciesCompliances as gax.GaxCall, request, callSettings ); @@ -2072,7 +2085,7 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); const defaultCallSettings = - this._defaults['listInstanceOSPoliciesCompliances']; + this._defaults['listInstanceOsPoliciesCompliances']; const callSettings = defaultCallSettings.merge(options); this.initialize(); this.warn( @@ -2081,7 +2094,7 @@ export class OsConfigZonalServiceClient { 'DeprecationWarning' ); return this.descriptors.page.listInstanceOSPoliciesCompliances.asyncIterate( - this.innerApiCalls['listInstanceOSPoliciesCompliances'] as GaxCall, + this.innerApiCalls['listInstanceOsPoliciesCompliances'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; @@ -2208,7 +2221,7 @@ export class OsConfigZonalServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listOSPolicyAssignmentReports( + return this.innerApiCalls.listOsPolicyAssignmentReports( request, options, callback @@ -2274,11 +2287,11 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listOSPolicyAssignmentReports']; + const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentReports.createStream( - this.innerApiCalls.listOSPolicyAssignmentReports as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignmentReports as gax.GaxCall, request, callSettings ); @@ -2346,11 +2359,11 @@ export class OsConfigZonalServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listOSPolicyAssignmentReports']; + const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentReports.asyncIterate( - this.innerApiCalls['listOSPolicyAssignmentReports'] as GaxCall, + this.innerApiCalls['listOsPolicyAssignmentReports'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts index 96433e89d98..175d8af2475 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -278,12 +278,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() ); - client.innerApiCalls.getOSPolicyAssignment = + client.innerApiCalls.getOsPolicyAssignment = stubSimpleCall(expectedResponse); const [response] = await client.getOSPolicyAssignment(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + (client.innerApiCalls.getOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -311,7 +311,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() ); - client.innerApiCalls.getOSPolicyAssignment = + client.innerApiCalls.getOsPolicyAssignment = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getOSPolicyAssignment( @@ -331,7 +331,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + (client.innerApiCalls.getOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -357,7 +357,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getOSPolicyAssignment = stubSimpleCall( + client.innerApiCalls.getOsPolicyAssignment = stubSimpleCall( undefined, expectedError ); @@ -366,7 +366,7 @@ describe('v1.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + (client.innerApiCalls.getOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -415,12 +415,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() ); - client.innerApiCalls.getOSPolicyAssignmentReport = + client.innerApiCalls.getOsPolicyAssignmentReport = stubSimpleCall(expectedResponse); const [response] = await client.getOSPolicyAssignmentReport(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -448,7 +448,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() ); - client.innerApiCalls.getOSPolicyAssignmentReport = + client.innerApiCalls.getOsPolicyAssignmentReport = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getOSPolicyAssignmentReport( @@ -468,7 +468,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -494,7 +494,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getOSPolicyAssignmentReport = stubSimpleCall( + client.innerApiCalls.getOsPolicyAssignmentReport = stubSimpleCall( undefined, expectedError ); @@ -503,7 +503,7 @@ describe('v1.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -819,13 +819,13 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createOSPolicyAssignment = + client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall(expectedResponse); const [operation] = await client.createOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + (client.innerApiCalls.createOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -853,7 +853,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createOSPolicyAssignment = + client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createOSPolicyAssignment( @@ -880,7 +880,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + (client.innerApiCalls.createOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -906,7 +906,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.createOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall( undefined, expectedError ); @@ -915,7 +915,7 @@ describe('v1.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + (client.innerApiCalls.createOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -941,7 +941,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.createOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall( undefined, undefined, expectedError @@ -949,7 +949,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const [operation] = await client.createOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + (client.innerApiCalls.createOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1024,13 +1024,13 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateOSPolicyAssignment = + client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall(expectedResponse); const [operation] = await client.updateOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1059,7 +1059,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateOSPolicyAssignment = + client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateOSPolicyAssignment( @@ -1086,7 +1086,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -1113,7 +1113,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall( undefined, expectedError ); @@ -1122,7 +1122,7 @@ describe('v1.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1149,7 +1149,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall( undefined, undefined, expectedError @@ -1157,7 +1157,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const [operation] = await client.updateOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1231,13 +1231,13 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteOSPolicyAssignment = + client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall(expectedResponse); const [operation] = await client.deleteOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1265,7 +1265,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteOSPolicyAssignment = + client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteOSPolicyAssignment( @@ -1292,7 +1292,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -1318,7 +1318,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.deleteOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall( undefined, expectedError ); @@ -1327,7 +1327,7 @@ describe('v1.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1353,7 +1353,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.deleteOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall( undefined, undefined, expectedError @@ -1361,7 +1361,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const [operation] = await client.deleteOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1443,12 +1443,12 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.OSPolicyAssignment() ), ]; - client.innerApiCalls.listOSPolicyAssignments = + client.innerApiCalls.listOsPolicyAssignments = stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignments(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + (client.innerApiCalls.listOsPolicyAssignments as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1484,7 +1484,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.OSPolicyAssignment() ), ]; - client.innerApiCalls.listOSPolicyAssignments = + client.innerApiCalls.listOsPolicyAssignments = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listOSPolicyAssignments( @@ -1506,7 +1506,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + (client.innerApiCalls.listOsPolicyAssignments as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -1532,7 +1532,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listOSPolicyAssignments = stubSimpleCall( + client.innerApiCalls.listOsPolicyAssignments = stubSimpleCall( undefined, expectedError ); @@ -1541,7 +1541,7 @@ describe('v1.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + (client.innerApiCalls.listOsPolicyAssignments as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1597,7 +1597,7 @@ describe('v1.OsConfigZonalServiceClient', () => { .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listOSPolicyAssignments, request) + .calledWith(client.innerApiCalls.listOsPolicyAssignments, request) ); assert.strictEqual( ( @@ -1647,7 +1647,7 @@ describe('v1.OsConfigZonalServiceClient', () => { .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listOSPolicyAssignments, request) + .calledWith(client.innerApiCalls.listOsPolicyAssignments, request) ); assert.strictEqual( ( @@ -1777,12 +1777,12 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.OSPolicyAssignment() ), ]; - client.innerApiCalls.listOSPolicyAssignmentRevisions = + client.innerApiCalls.listOsPolicyAssignmentRevisions = stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignmentRevisions(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1818,7 +1818,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.OSPolicyAssignment() ), ]; - client.innerApiCalls.listOSPolicyAssignmentRevisions = + client.innerApiCalls.listOsPolicyAssignmentRevisions = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listOSPolicyAssignmentRevisions( @@ -1840,7 +1840,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -1866,7 +1866,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listOSPolicyAssignmentRevisions = stubSimpleCall( + client.innerApiCalls.listOsPolicyAssignmentRevisions = stubSimpleCall( undefined, expectedError ); @@ -1875,7 +1875,7 @@ describe('v1.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1932,7 +1932,7 @@ describe('v1.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listOSPolicyAssignmentRevisions, + client.innerApiCalls.listOsPolicyAssignmentRevisions, request ) ); @@ -1985,7 +1985,7 @@ describe('v1.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listOSPolicyAssignmentRevisions, + client.innerApiCalls.listOsPolicyAssignmentRevisions, request ) ); @@ -2117,12 +2117,12 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() ), ]; - client.innerApiCalls.listOSPolicyAssignmentReports = + client.innerApiCalls.listOsPolicyAssignmentReports = stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignmentReports(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -2158,7 +2158,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() ), ]; - client.innerApiCalls.listOSPolicyAssignmentReports = + client.innerApiCalls.listOsPolicyAssignmentReports = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listOSPolicyAssignmentReports( @@ -2180,7 +2180,7 @@ describe('v1.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -2206,7 +2206,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listOSPolicyAssignmentReports = stubSimpleCall( + client.innerApiCalls.listOsPolicyAssignmentReports = stubSimpleCall( undefined, expectedError ); @@ -2215,7 +2215,7 @@ describe('v1.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -2274,7 +2274,7 @@ describe('v1.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listOSPolicyAssignmentReports, + client.innerApiCalls.listOsPolicyAssignmentReports, request ) ); @@ -2329,7 +2329,7 @@ describe('v1.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listOSPolicyAssignmentReports, + client.innerApiCalls.listOsPolicyAssignmentReports, request ) ); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts index ddc01c12ed9..dc1fb71d5b1 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -273,12 +273,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() ); - client.innerApiCalls.getOSPolicyAssignment = + client.innerApiCalls.getOsPolicyAssignment = stubSimpleCall(expectedResponse); const [response] = await client.getOSPolicyAssignment(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + (client.innerApiCalls.getOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -306,7 +306,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() ); - client.innerApiCalls.getOSPolicyAssignment = + client.innerApiCalls.getOsPolicyAssignment = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getOSPolicyAssignment( @@ -326,7 +326,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + (client.innerApiCalls.getOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -352,7 +352,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getOSPolicyAssignment = stubSimpleCall( + client.innerApiCalls.getOsPolicyAssignment = stubSimpleCall( undefined, expectedError ); @@ -361,7 +361,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.getOSPolicyAssignment as SinonStub) + (client.innerApiCalls.getOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -411,13 +411,13 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() ); - client.innerApiCalls.getInstanceOSPoliciesCompliance = + client.innerApiCalls.getInstanceOsPoliciesCompliance = stubSimpleCall(expectedResponse); const [response] = await client.getInstanceOSPoliciesCompliance(request); assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getInstanceOSPoliciesCompliance as SinonStub) + (client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -446,7 +446,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() ); - client.innerApiCalls.getInstanceOSPoliciesCompliance = + client.innerApiCalls.getInstanceOsPoliciesCompliance = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getInstanceOSPoliciesCompliance( @@ -467,7 +467,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getInstanceOSPoliciesCompliance as SinonStub) + (client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -494,7 +494,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getInstanceOSPoliciesCompliance = stubSimpleCall( + client.innerApiCalls.getInstanceOsPoliciesCompliance = stubSimpleCall( undefined, expectedError ); @@ -504,7 +504,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); assert(stub.calledOnce); assert( - (client.innerApiCalls.getInstanceOSPoliciesCompliance as SinonStub) + (client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -555,12 +555,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() ); - client.innerApiCalls.getOSPolicyAssignmentReport = + client.innerApiCalls.getOsPolicyAssignmentReport = stubSimpleCall(expectedResponse); const [response] = await client.getOSPolicyAssignmentReport(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -588,7 +588,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() ); - client.innerApiCalls.getOSPolicyAssignmentReport = + client.innerApiCalls.getOsPolicyAssignmentReport = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getOSPolicyAssignmentReport( @@ -608,7 +608,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -634,7 +634,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getOSPolicyAssignmentReport = stubSimpleCall( + client.innerApiCalls.getOsPolicyAssignmentReport = stubSimpleCall( undefined, expectedError ); @@ -643,7 +643,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.getOSPolicyAssignmentReport as SinonStub) + (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -959,13 +959,13 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createOSPolicyAssignment = + client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall(expectedResponse); const [operation] = await client.createOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + (client.innerApiCalls.createOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -993,7 +993,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createOSPolicyAssignment = + client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createOSPolicyAssignment( @@ -1020,7 +1020,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + (client.innerApiCalls.createOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -1046,7 +1046,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.createOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall( undefined, expectedError ); @@ -1055,7 +1055,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + (client.innerApiCalls.createOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1081,7 +1081,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.createOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall( undefined, undefined, expectedError @@ -1089,7 +1089,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [operation] = await client.createOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.createOSPolicyAssignment as SinonStub) + (client.innerApiCalls.createOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1164,13 +1164,13 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateOSPolicyAssignment = + client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall(expectedResponse); const [operation] = await client.updateOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1199,7 +1199,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateOSPolicyAssignment = + client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateOSPolicyAssignment( @@ -1226,7 +1226,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -1253,7 +1253,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall( undefined, expectedError ); @@ -1262,7 +1262,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1289,7 +1289,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall( undefined, undefined, expectedError @@ -1297,7 +1297,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [operation] = await client.updateOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.updateOSPolicyAssignment as SinonStub) + (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1371,13 +1371,13 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteOSPolicyAssignment = + client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall(expectedResponse); const [operation] = await client.deleteOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1405,7 +1405,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteOSPolicyAssignment = + client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteOSPolicyAssignment( @@ -1432,7 +1432,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -1458,7 +1458,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.deleteOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall( undefined, expectedError ); @@ -1467,7 +1467,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1493,7 +1493,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.deleteOSPolicyAssignment = stubLongRunningCall( + client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall( undefined, undefined, expectedError @@ -1501,7 +1501,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [operation] = await client.deleteOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.deleteOSPolicyAssignment as SinonStub) + (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1583,12 +1583,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() ), ]; - client.innerApiCalls.listOSPolicyAssignments = + client.innerApiCalls.listOsPolicyAssignments = stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignments(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + (client.innerApiCalls.listOsPolicyAssignments as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1624,7 +1624,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() ), ]; - client.innerApiCalls.listOSPolicyAssignments = + client.innerApiCalls.listOsPolicyAssignments = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listOSPolicyAssignments( @@ -1646,7 +1646,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + (client.innerApiCalls.listOsPolicyAssignments as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -1672,7 +1672,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listOSPolicyAssignments = stubSimpleCall( + client.innerApiCalls.listOsPolicyAssignments = stubSimpleCall( undefined, expectedError ); @@ -1681,7 +1681,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.listOSPolicyAssignments as SinonStub) + (client.innerApiCalls.listOsPolicyAssignments as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1739,7 +1739,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listOSPolicyAssignments, request) + .calledWith(client.innerApiCalls.listOsPolicyAssignments, request) ); assert.strictEqual( ( @@ -1791,7 +1791,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listOSPolicyAssignments, request) + .calledWith(client.innerApiCalls.listOsPolicyAssignments, request) ); assert.strictEqual( ( @@ -1921,12 +1921,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() ), ]; - client.innerApiCalls.listOSPolicyAssignmentRevisions = + client.innerApiCalls.listOsPolicyAssignmentRevisions = stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignmentRevisions(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1962,7 +1962,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() ), ]; - client.innerApiCalls.listOSPolicyAssignmentRevisions = + client.innerApiCalls.listOsPolicyAssignmentRevisions = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listOSPolicyAssignmentRevisions( @@ -1984,7 +1984,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -2010,7 +2010,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listOSPolicyAssignmentRevisions = stubSimpleCall( + client.innerApiCalls.listOsPolicyAssignmentRevisions = stubSimpleCall( undefined, expectedError ); @@ -2019,7 +2019,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.listOSPolicyAssignmentRevisions as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -2078,7 +2078,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listOSPolicyAssignmentRevisions, + client.innerApiCalls.listOsPolicyAssignmentRevisions, request ) ); @@ -2133,7 +2133,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listOSPolicyAssignmentRevisions, + client.innerApiCalls.listOsPolicyAssignmentRevisions, request ) ); @@ -2266,7 +2266,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() ), ]; - client.innerApiCalls.listInstanceOSPoliciesCompliances = + client.innerApiCalls.listInstanceOsPoliciesCompliances = stubSimpleCall(expectedResponse); const [response] = await client.listInstanceOSPoliciesCompliances( request @@ -2274,7 +2274,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listInstanceOSPoliciesCompliances as SinonStub) + (client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -2311,7 +2311,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() ), ]; - client.innerApiCalls.listInstanceOSPoliciesCompliances = + client.innerApiCalls.listInstanceOsPoliciesCompliances = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listInstanceOSPoliciesCompliances( @@ -2334,7 +2334,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listInstanceOSPoliciesCompliances as SinonStub) + (client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -2361,7 +2361,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listInstanceOSPoliciesCompliances = stubSimpleCall( + client.innerApiCalls.listInstanceOsPoliciesCompliances = stubSimpleCall( undefined, expectedError ); @@ -2371,7 +2371,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); assert(stub.calledOnce); assert( - (client.innerApiCalls.listInstanceOSPoliciesCompliances as SinonStub) + (client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -2432,7 +2432,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listInstanceOSPoliciesCompliances, + client.innerApiCalls.listInstanceOsPoliciesCompliances, request ) ); @@ -2489,7 +2489,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listInstanceOSPoliciesCompliances, + client.innerApiCalls.listInstanceOsPoliciesCompliances, request ) ); @@ -2625,12 +2625,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() ), ]; - client.innerApiCalls.listOSPolicyAssignmentReports = + client.innerApiCalls.listOsPolicyAssignmentReports = stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignmentReports(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -2666,7 +2666,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() ), ]; - client.innerApiCalls.listOSPolicyAssignmentReports = + client.innerApiCalls.listOsPolicyAssignmentReports = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listOSPolicyAssignmentReports( @@ -2688,7 +2688,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); @@ -2714,7 +2714,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listOSPolicyAssignmentReports = stubSimpleCall( + client.innerApiCalls.listOsPolicyAssignmentReports = stubSimpleCall( undefined, expectedError ); @@ -2723,7 +2723,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert( - (client.innerApiCalls.listOSPolicyAssignmentReports as SinonStub) + (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -2782,7 +2782,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listOSPolicyAssignmentReports, + client.innerApiCalls.listOsPolicyAssignmentReports, request ) ); @@ -2837,7 +2837,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ) .getCall(0) .calledWith( - client.innerApiCalls.listOSPolicyAssignmentReports, + client.innerApiCalls.listOsPolicyAssignmentReports, request ) ); From 11f27c24af471ab0280911ea141f170e3de2bbe6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 4 Jul 2022 15:35:33 -0400 Subject: [PATCH 136/154] chore(main): release 2.1.0 (#212) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-osconfig/CHANGELOG.md | 7 +++++++ packages/google-cloud-osconfig/package.json | 2 +- .../v1/snippet_metadata.google.cloud.osconfig.v1.json | 2 +- .../snippet_metadata.google.cloud.osconfig.v1alpha.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 76d96200951..499150d88d2 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/googleapis/nodejs-os-config/compare/v2.0.0...v2.1.0) (2022-07-02) + + +### Features + +* REGAPIC LRO; fix: make some camelcased methods work ([#211](https://github.com/googleapis/nodejs-os-config/issues/211)) ([af5d7d2](https://github.com/googleapis/nodejs-os-config/commit/af5d7d2c688c081a028c33f14490271ce2e52725)) + ## [2.0.0](https://github.com/googleapis/nodejs-os-config/compare/v1.12.1...v2.0.0) (2022-05-20) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index af89cd66b66..aeff58ffb28 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "2.0.0", + "version": "2.1.0", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json index 6cba9c3b09b..2e9e1966057 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json +++ b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json index 55e69fab690..fc38700972c 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index 09f97c47a78..b45650ba35b 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^2.0.0" + "@google-cloud/os-config": "^2.1.0" }, "devDependencies": { "c8": "^7.1.0", From f7a75a881994be6e3cccec3e98af16474b00d410 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 02:00:22 +0200 Subject: [PATCH 137/154] chore(deps): update dependency linkinator to v4 (#213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [linkinator](https://togithub.com/JustinBeckwith/linkinator) | [`^2.1.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/linkinator/2.16.2/4.0.2) | [![age](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/compatibility-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/confidence-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
JustinBeckwith/linkinator ### [`v4.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.1...v4.0.2) ##### Bug Fixes - address srcset parsing with multiple spaces ([#​512](https://togithub.com/JustinBeckwith/linkinator/issues/512)) ([fefb5b6](https://togithub.com/JustinBeckwith/linkinator/commit/fefb5b6734fc4ab335793358c5f491338ecbeb90)) ### [`v4.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.0...v4.0.1) ##### Bug Fixes - properly parse srcset attribute ([#​510](https://togithub.com/JustinBeckwith/linkinator/issues/510)) ([9a8a83c](https://togithub.com/JustinBeckwith/linkinator/commit/9a8a83c35182b3cd4daee62a00f156767fe5c6a7)) ### [`v4.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.1.0...v4.0.0) ##### Features - create new release with notes ([#​508](https://togithub.com/JustinBeckwith/linkinator/issues/508)) ([2cab633](https://togithub.com/JustinBeckwith/linkinator/commit/2cab633c9659eb10794a4bac06f8b0acdc3e2c0c)) ##### BREAKING CHANGES - The commits in [#​507](https://togithub.com/JustinBeckwith/linkinator/issues/507) and [#​506](https://togithub.com/JustinBeckwith/linkinator/issues/506) both had breaking changes. They included dropping support for Node.js 12.x and updating the CSV export to be streaming, and to use a new way of writing the CSV file. This is an empty to commit using the `BREAKING CHANGE` format in the commit message to ensure a release is triggered. ### [`v3.1.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.1.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.6...v3.1.0) ##### Features - allow --skip to be defined multiple times ([#​399](https://togithub.com/JustinBeckwith/linkinator/issues/399)) ([5ca5a46](https://togithub.com/JustinBeckwith/linkinator/commit/5ca5a461508e688de12e5ae6b4cfb6565f832ebf)) ### [`v3.0.6`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.6) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.5...v3.0.6) ##### Bug Fixes - **deps:** upgrade node-glob to v8 ([#​397](https://togithub.com/JustinBeckwith/linkinator/issues/397)) ([d334dc6](https://togithub.com/JustinBeckwith/linkinator/commit/d334dc6734cd7c2b73d7ed3dea0550a6c3072ad5)) ### [`v3.0.5`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.5) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.4...v3.0.5) ##### Bug Fixes - **deps:** upgrade to htmlparser2 v8.0.1 ([#​396](https://togithub.com/JustinBeckwith/linkinator/issues/396)) ([ba3b9a8](https://togithub.com/JustinBeckwith/linkinator/commit/ba3b9a8a9b19d39af6ed91790135e833b80c1eb6)) ### [`v3.0.4`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.4) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.3...v3.0.4) ##### Bug Fixes - **deps:** update dependency gaxios to v5 ([#​391](https://togithub.com/JustinBeckwith/linkinator/issues/391)) ([48af50e](https://togithub.com/JustinBeckwith/linkinator/commit/48af50e787731204aeb7eff41325c62291311e45)) ### [`v3.0.3`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.3) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.2...v3.0.3) ##### Bug Fixes - export getConfig from index ([#​371](https://togithub.com/JustinBeckwith/linkinator/issues/371)) ([0bc0355](https://togithub.com/JustinBeckwith/linkinator/commit/0bc0355c7e2ea457f247e6b52d1577b8c4ecb3a1)) ### [`v3.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.1...v3.0.2) ##### Bug Fixes - allow server root with trailing slash ([#​370](https://togithub.com/JustinBeckwith/linkinator/issues/370)) ([8adf6b0](https://togithub.com/JustinBeckwith/linkinator/commit/8adf6b025fda250e38461f1cdad40fe08c3b3b7c)) ### [`v3.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.0...v3.0.1) ##### Bug Fixes - decode path parts in local web server ([#​369](https://togithub.com/JustinBeckwith/linkinator/issues/369)) ([4696a0c](https://togithub.com/JustinBeckwith/linkinator/commit/4696a0c38c341b178ed815f47371fca955979feb)) ### [`v3.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v2.16.2...v3.0.0) ##### Bug Fixes - **deps:** update dependency chalk to v5 ([#​362](https://togithub.com/JustinBeckwith/linkinator/issues/362)) ([4b17a8d](https://togithub.com/JustinBeckwith/linkinator/commit/4b17a8d87b649eaf813428f8ee6955e1d21dae4f)) - feat!: convert to es modules, drop node 10 ([#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359)) ([efee299](https://togithub.com/JustinBeckwith/linkinator/commit/efee299ab8a805accef751eecf8538915a4e7783)), closes [#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359) ##### BREAKING CHANGES - this module now requires node.js 12 and above, and has moved to es modules by default.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index aeff58ffb28..37cade26f5b 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -38,7 +38,7 @@ "jsdoc": "^3.6.4", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.1.0", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", From 13d4e150762dc7892cc3ed3b33f310cc133dfaf2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 20:22:31 +0000 Subject: [PATCH 138/154] chore: remove unused proto imports (#214) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: https://github.com/googleapis/googleapis/commit/cfa1b3782da7ccae31673d45401a0b79d2d4a84b Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b7666656510f5b00b893f003a0ba5766f9e250 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9 --- .../protos/google/cloud/osconfig/v1alpha/config_common.proto | 1 - .../cloud/osconfig/v1alpha/instance_os_policies_compliance.proto | 1 - .../protos/google/cloud/osconfig/v1alpha/inventory.proto | 1 - .../protos/google/cloud/osconfig/v1alpha/os_policy.proto | 1 - .../cloud/osconfig/v1alpha/os_policy_assignment_reports.proto | 1 - .../google/cloud/osconfig/v1alpha/os_policy_assignments.proto | 1 - .../protos/google/cloud/osconfig/v1alpha/osconfig_common.proto | 1 - .../protos/google/cloud/osconfig/v1alpha/vulnerability.proto | 1 - 8 files changed, 8 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto index 4d85bd12c58..a7a50c716bf 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/config_common.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; -import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto index e29f1f5ccef..501ac3aef3f 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1alpha/config_common.proto"; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto index 6aed6a0ca88..c524ae1c93e 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/inventory.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto index 7d51c76b3c8..578d82a1e69 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto index 0fabd0439af..87905bbf5e8 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto index 0cd2f80b962..30106569fb8 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/os_policy_assignments.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1alpha/os_policy.proto"; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto index 3d5b6fe4ef7..1d2b58ac6cd 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/osconfig_common.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; -import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; diff --git a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto index 668991a2392..54080ba759d 100644 --- a/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto +++ b/packages/google-cloud-osconfig/protos/google/cloud/osconfig/v1alpha/vulnerability.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; From 1503ed07481828f1510140d195656fa6d1068613 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:18:21 +0000 Subject: [PATCH 139/154] fix: better support for fallback mode (#215) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../v1/os_config_service.cancel_patch_job.js | 3 + ..._config_service.create_patch_deployment.js | 3 + ..._config_service.delete_patch_deployment.js | 3 + .../v1/os_config_service.execute_patch_job.js | 3 + .../os_config_service.get_patch_deployment.js | 3 + .../v1/os_config_service.get_patch_job.js | 3 + ...s_config_service.list_patch_deployments.js | 3 + ...service.list_patch_job_instance_details.js | 3 + .../v1/os_config_service.list_patch_jobs.js | 3 + ...s_config_service.pause_patch_deployment.js | 3 + ..._config_service.resume_patch_deployment.js | 3 + ..._config_service.update_patch_deployment.js | 3 + ...al_service.create_o_s_policy_assignment.js | 3 + ...al_service.delete_o_s_policy_assignment.js | 3 + .../os_config_zonal_service.get_inventory.js | 3 + ...zonal_service.get_o_s_policy_assignment.js | 3 + ...ervice.get_o_s_policy_assignment_report.js | 3 + ..._zonal_service.get_vulnerability_report.js | 3 + ...s_config_zonal_service.list_inventories.js | 3 + ...vice.list_o_s_policy_assignment_reports.js | 3 + ...ce.list_o_s_policy_assignment_revisions.js | 3 + ...nal_service.list_o_s_policy_assignments.js | 3 + ...onal_service.list_vulnerability_reports.js | 3 + ...al_service.update_o_s_policy_assignment.js | 3 + ...pet_metadata.google.cloud.osconfig.v1.json | 48 ++--- ...al_service.create_o_s_policy_assignment.js | 3 + ...al_service.delete_o_s_policy_assignment.js | 3 + ...ce.get_instance_o_s_policies_compliance.js | 3 + .../os_config_zonal_service.get_inventory.js | 3 + ...zonal_service.get_o_s_policy_assignment.js | 3 + ...ervice.get_o_s_policy_assignment_report.js | 3 + ..._zonal_service.get_vulnerability_report.js | 3 + ....list_instance_o_s_policies_compliances.js | 3 + ...s_config_zonal_service.list_inventories.js | 3 + ...vice.list_o_s_policy_assignment_reports.js | 3 + ...ce.list_o_s_policy_assignment_revisions.js | 3 + ...nal_service.list_o_s_policy_assignments.js | 3 + ...onal_service.list_vulnerability_reports.js | 3 + ...al_service.update_o_s_policy_assignment.js | 3 + ...etadata.google.cloud.osconfig.v1alpha.json | 28 +-- .../src/v1/os_config_service_client.ts | 16 +- .../src/v1/os_config_zonal_service_client.ts | 30 +-- .../v1alpha/os_config_zonal_service_client.ts | 34 ++-- .../test/gapic_os_config_service_v1.ts | 160 +++++++-------- .../test/gapic_os_config_zonal_service_v1.ts | 187 +++++++++--------- .../gapic_os_config_zonal_service_v1alpha.ts | 180 ++++++++--------- 46 files changed, 457 insertions(+), 340 deletions(-) diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js index 7eb2084430c..92ca4d1cd52 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigService_CancelPatchJob_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js index a3b186bc3ba..7db719b045f 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js @@ -23,6 +23,9 @@ function main(parent, patchDeploymentId, patchDeployment) { // [START osconfig_v1_generated_OsConfigService_CreatePatchDeployment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js index 8d77309f137..5e498fd843c 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigService_DeletePatchDeployment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js index f6036510905..c28fcaecf8a 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js @@ -23,6 +23,9 @@ function main(parent, instanceFilter) { // [START osconfig_v1_generated_OsConfigService_ExecutePatchJob_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js index 2e4505753cf..a6f5ffa6621 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigService_GetPatchDeployment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js index 47417e48204..ed0fb711da5 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigService_GetPatchJob_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js index 5d584c529e5..2682958ceff 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1_generated_OsConfigService_ListPatchDeployments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js index a90683ca655..323f318f28d 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js index 161082e0022..0828a3bcea9 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1_generated_OsConfigService_ListPatchJobs_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js index 83257bace34..9ed79eb8b0e 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigService_PausePatchDeployment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js index 5d7899cddd1..a0ecdc6b35b 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigService_ResumePatchDeployment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js index 55bead2cf16..322f01540ae 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js @@ -23,6 +23,9 @@ function main(patchDeployment) { // [START osconfig_v1_generated_OsConfigService_UpdatePatchDeployment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js index 829fa20223f..d88a8993a18 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js @@ -23,6 +23,9 @@ function main(parent, osPolicyAssignment, osPolicyAssignmentId) { // [START osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js index e7beb85e9e4..42bfbb420e5 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js index 6d71e5f563b..5f00647e6c5 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigZonalService_GetInventory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js index af1326793a9..93cb840f438 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js index 3692dc250d4..b63c6f53ae5 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js index 7f08d93a357..be6b5621419 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js index 0f87e97ff63..81e7b974c01 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1_generated_OsConfigZonalService_ListInventories_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js index 5b4fa4cda93..c97380a4e46 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js index 0dc73ec76b9..ad00726b4e4 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js index cb5801142e7..264a2b20fc9 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js index a32eddf90ec..a4d76c8dfa2 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js index 7e2d07d4341..8df58285ae0 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js @@ -23,6 +23,9 @@ function main(osPolicyAssignment) { // [START osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json index 2e9e1966057..aee875a795b 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json +++ b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 84, + "end": 87, "type": "FULL" } ], @@ -90,7 +90,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -130,7 +130,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -170,7 +170,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -222,7 +222,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -274,7 +274,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -322,7 +322,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -362,7 +362,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -410,7 +410,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -450,7 +450,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -494,7 +494,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -534,7 +534,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -574,7 +574,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -622,7 +622,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -666,7 +666,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -706,7 +706,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -754,7 +754,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -802,7 +802,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -842,7 +842,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -882,7 +882,7 @@ "segments": [ { "start": 25, - "end": 84, + "end": 87, "type": "FULL" } ], @@ -934,7 +934,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -978,7 +978,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -1034,7 +1034,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1074,7 +1074,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js index b56e26f0af4..4ae773b1e39 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js @@ -23,6 +23,9 @@ function main(parent, osPolicyAssignment, osPolicyAssignmentId) { // [START osconfig_v1alpha_generated_OsConfigZonalService_CreateOSPolicyAssignment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js index f97e8f01953..5fd3a000055 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1alpha_generated_OsConfigZonalService_DeleteOSPolicyAssignment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js index 409719dd165..0c05296548e 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1alpha_generated_OsConfigZonalService_GetInstanceOSPoliciesCompliance_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js index 298aa15ef94..900a3ee49bf 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1alpha_generated_OsConfigZonalService_GetInventory_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js index c330905edaf..92a47ef93ff 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js index ec6c9235eea..4be13a6d374 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1alpha_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js index 8f1c6adf44d..ea5e979aa8e 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1alpha_generated_OsConfigZonalService_GetVulnerabilityReport_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js index 38ad789cc95..15f788a9feb 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1alpha_generated_OsConfigZonalService_ListInstanceOSPoliciesCompliances_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js index 3f77ce2927f..d9e4e6bd71d 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1alpha_generated_OsConfigZonalService_ListInventories_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js index 169e1d84b78..9cf7cfae43d 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js index b22fd1e0783..91ae44089a6 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js @@ -23,6 +23,9 @@ function main(name) { // [START osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js index 887f04c1e13..7f9c41542ea 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1alpha_generated_OsConfigZonalService_ListOSPolicyAssignments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js index f06a13d8ebf..b997c9437cc 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js @@ -23,6 +23,9 @@ function main(parent) { // [START osconfig_v1alpha_generated_OsConfigZonalService_ListVulnerabilityReports_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js index 334e2339ed5..40a10f60a23 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js @@ -23,6 +23,9 @@ function main(osPolicyAssignment) { // [START osconfig_v1alpha_generated_OsConfigZonalService_UpdateOSPolicyAssignment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json index fc38700972c..a8e68819593 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -114,7 +114,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -154,7 +154,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -202,7 +202,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -250,7 +250,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -290,7 +290,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -330,7 +330,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -382,7 +382,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -422,7 +422,7 @@ "segments": [ { "start": 25, - "end": 84, + "end": 87, "type": "FULL" } ], @@ -474,7 +474,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -518,7 +518,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -574,7 +574,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -614,7 +614,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 6ebb9b1d9e8..34ac31f3f21 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -28,7 +28,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -289,7 +288,8 @@ export class OsConfigServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1341,7 +1341,7 @@ export class OsConfigServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPatchJobs.createStream( - this.innerApiCalls.listPatchJobs as gax.GaxCall, + this.innerApiCalls.listPatchJobs as GaxCall, request, callSettings ); @@ -1394,7 +1394,7 @@ export class OsConfigServiceClient { this.initialize(); return this.descriptors.page.listPatchJobs.asyncIterate( this.innerApiCalls['listPatchJobs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1551,7 +1551,7 @@ export class OsConfigServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPatchJobInstanceDetails.createStream( - this.innerApiCalls.listPatchJobInstanceDetails as gax.GaxCall, + this.innerApiCalls.listPatchJobInstanceDetails as GaxCall, request, callSettings ); @@ -1605,7 +1605,7 @@ export class OsConfigServiceClient { this.initialize(); return this.descriptors.page.listPatchJobInstanceDetails.asyncIterate( this.innerApiCalls['listPatchJobInstanceDetails'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1752,7 +1752,7 @@ export class OsConfigServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPatchDeployments.createStream( - this.innerApiCalls.listPatchDeployments as gax.GaxCall, + this.innerApiCalls.listPatchDeployments as GaxCall, request, callSettings ); @@ -1803,7 +1803,7 @@ export class OsConfigServiceClient { this.initialize(); return this.descriptors.page.listPatchDeployments.asyncIterate( this.innerApiCalls['listPatchDeployments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts index 3974f67d2e4..f0006438c4d 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -379,7 +378,8 @@ export class OsConfigZonalServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1009,7 +1009,7 @@ export class OsConfigZonalServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createOSPolicyAssignment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.osconfig.v1.OSPolicyAssignment, @@ -1161,7 +1161,7 @@ export class OsConfigZonalServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateOSPolicyAssignment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.osconfig.v1.OSPolicyAssignment, @@ -1313,7 +1313,7 @@ export class OsConfigZonalServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteOSPolicyAssignment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1467,7 +1467,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignments.createStream( - this.innerApiCalls.listOsPolicyAssignments as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignments as GaxCall, request, callSettings ); @@ -1517,7 +1517,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listOSPolicyAssignments.asyncIterate( this.innerApiCalls['listOsPolicyAssignments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1667,7 +1667,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.createStream( - this.innerApiCalls.listOsPolicyAssignmentRevisions as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignmentRevisions as GaxCall, request, callSettings ); @@ -1718,7 +1718,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate( this.innerApiCalls['listOsPolicyAssignmentRevisions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1914,7 +1914,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentReports.createStream( - this.innerApiCalls.listOsPolicyAssignmentReports as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignmentReports as GaxCall, request, callSettings ); @@ -1987,7 +1987,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listOSPolicyAssignmentReports.asyncIterate( this.innerApiCalls['listOsPolicyAssignmentReports'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2152,7 +2152,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInventories.createStream( - this.innerApiCalls.listInventories as gax.GaxCall, + this.innerApiCalls.listInventories as GaxCall, request, callSettings ); @@ -2212,7 +2212,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listInventories.asyncIterate( this.innerApiCalls['listInventories'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2375,7 +2375,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVulnerabilityReports.createStream( - this.innerApiCalls.listVulnerabilityReports as gax.GaxCall, + this.innerApiCalls.listVulnerabilityReports as GaxCall, request, callSettings ); @@ -2432,7 +2432,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listVulnerabilityReports.asyncIterate( this.innerApiCalls['listVulnerabilityReports'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index 8a56cd77b46..6a980d747e7 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -385,7 +384,8 @@ export class OsConfigZonalServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1143,7 +1143,7 @@ export class OsConfigZonalServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createOSPolicyAssignment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment, @@ -1294,7 +1294,7 @@ export class OsConfigZonalServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateOSPolicyAssignment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment, @@ -1446,7 +1446,7 @@ export class OsConfigZonalServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteOSPolicyAssignment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1600,7 +1600,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignments.createStream( - this.innerApiCalls.listOsPolicyAssignments as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignments as GaxCall, request, callSettings ); @@ -1650,7 +1650,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listOSPolicyAssignments.asyncIterate( this.innerApiCalls['listOsPolicyAssignments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1800,7 +1800,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.createStream( - this.innerApiCalls.listOsPolicyAssignmentRevisions as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignmentRevisions as GaxCall, request, callSettings ); @@ -1851,7 +1851,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate( this.innerApiCalls['listOsPolicyAssignmentRevisions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2030,7 +2030,7 @@ export class OsConfigZonalServiceClient { 'DeprecationWarning' ); return this.descriptors.page.listInstanceOSPoliciesCompliances.createStream( - this.innerApiCalls.listInstanceOsPoliciesCompliances as gax.GaxCall, + this.innerApiCalls.listInstanceOsPoliciesCompliances as GaxCall, request, callSettings ); @@ -2095,7 +2095,7 @@ export class OsConfigZonalServiceClient { ); return this.descriptors.page.listInstanceOSPoliciesCompliances.asyncIterate( this.innerApiCalls['listInstanceOsPoliciesCompliances'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2291,7 +2291,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listOSPolicyAssignmentReports.createStream( - this.innerApiCalls.listOsPolicyAssignmentReports as gax.GaxCall, + this.innerApiCalls.listOsPolicyAssignmentReports as GaxCall, request, callSettings ); @@ -2364,7 +2364,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listOSPolicyAssignmentReports.asyncIterate( this.innerApiCalls['listOsPolicyAssignmentReports'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2529,7 +2529,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInventories.createStream( - this.innerApiCalls.listInventories as gax.GaxCall, + this.innerApiCalls.listInventories as GaxCall, request, callSettings ); @@ -2589,7 +2589,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listInventories.asyncIterate( this.innerApiCalls['listInventories'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2752,7 +2752,7 @@ export class OsConfigZonalServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVulnerabilityReports.createStream( - this.innerApiCalls.listVulnerabilityReports as gax.GaxCall, + this.innerApiCalls.listVulnerabilityReports as GaxCall, request, callSettings ); @@ -2809,7 +2809,7 @@ export class OsConfigZonalServiceClient { this.initialize(); return this.descriptors.page.listVulnerabilityReports.asyncIterate( this.innerApiCalls['listVulnerabilityReports'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index 17e9a2eeff7..af0634aae6a 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -113,101 +113,103 @@ function stubAsyncIterationCall( } describe('v1.OsConfigServiceClient', () => { - it('has servicePath', () => { - const servicePath = - osconfigserviceModule.v1.OsConfigServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - osconfigserviceModule.v1.OsConfigServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = osconfigserviceModule.v1.OsConfigServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + osconfigserviceModule.v1.OsConfigServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new osconfigserviceModule.v1.OsConfigServiceClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + osconfigserviceModule.v1.OsConfigServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new osconfigserviceModule.v1.OsConfigServiceClient({ - fallback: true, + it('has port', () => { + const port = osconfigserviceModule.v1.OsConfigServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new osconfigserviceModule.v1.OsConfigServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient(); + assert(client); }); - assert.strictEqual(client.osConfigServiceStub, undefined); - await client.initialize(); - assert(client.osConfigServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new osconfigserviceModule.v1.OsConfigServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.osConfigServiceStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigServiceStub, undefined); + await client.initialize(); + assert(client.osConfigServiceStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new osconfigserviceModule.v1.OsConfigServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.osConfigServiceStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.osConfigServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new osconfigserviceModule.v1.OsConfigServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new osconfigserviceModule.v1.OsConfigServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new osconfigserviceModule.v1.OsConfigServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('executePatchJob', () => { diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts index 175d8af2475..db1c29b104e 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -145,114 +145,111 @@ function stubAsyncIterationCall( } describe('v1.OsConfigZonalServiceClient', () => { - it('has servicePath', () => { - const servicePath = - osconfigzonalserviceModule.v1.OsConfigZonalServiceClient.servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + osconfigzonalserviceModule.v1.OsConfigZonalServiceClient.servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - osconfigzonalserviceModule.v1.OsConfigZonalServiceClient.apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + osconfigzonalserviceModule.v1.OsConfigZonalServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = osconfigzonalserviceModule.v1.OsConfigZonalServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + osconfigzonalserviceModule.v1.OsConfigZonalServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( - { - fallback: true, - } - ); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.osConfigZonalServiceStub, undefined); - await client.initialize(); - assert(client.osConfigZonalServiceStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigZonalServiceStub, undefined); + await client.initialize(); + assert(client.osConfigZonalServiceStub); + }); - it('has close method for the initialized client', done => { - const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - assert(client.osConfigZonalServiceStub); - client.close().then(() => { - done(); + it('has close method for the initialized client', done => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.osConfigZonalServiceStub); + client.close().then(() => { + done(); + }); }); - }); - it('has close method for the non-initialized client', done => { - const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.osConfigZonalServiceStub, undefined); - client.close().then(() => { - done(); + it('has close method for the non-initialized client', done => { + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigZonalServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( - { - 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', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + 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 osconfigzonalserviceModule.v1.OsConfigZonalServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new osconfigzonalserviceModule.v1.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getOSPolicyAssignment', () => { diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts index dc1fb71d5b1..58344212167 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -145,109 +145,113 @@ function stubAsyncIterationCall( } describe('v1alpha.OsConfigZonalServiceClient', () => { - it('has servicePath', () => { - const servicePath = - osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient.servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient + .servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient.apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.osConfigZonalServiceStub, undefined); - await client.initialize(); - assert(client.osConfigZonalServiceStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigZonalServiceStub, undefined); + await client.initialize(); + assert(client.osConfigZonalServiceStub); + }); - it('has close method for the initialized client', done => { - const client = - new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.osConfigZonalServiceStub); + client.close().then(() => { + done(); }); - client.initialize(); - assert(client.osConfigZonalServiceStub); - client.close().then(() => { - done(); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.osConfigZonalServiceStub, undefined); + client.close().then(() => { + done(); }); - assert.strictEqual(client.osConfigZonalServiceStub, undefined); - client.close().then(() => { - done(); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ - 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', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + 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 osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new osconfigzonalserviceModule.v1alpha.OsConfigZonalServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getOSPolicyAssignment', () => { From 92546121e2c4a8d2c94d53696fc85479647e35d5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:00:34 +0000 Subject: [PATCH 140/154] fix: change import long to require (#216) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../google-cloud-osconfig/protos/protos.d.ts | 1742 ++- .../google-cloud-osconfig/protos/protos.js | 10494 +++++++++++----- .../google-cloud-osconfig/protos/protos.json | 24 + 3 files changed, 9193 insertions(+), 3067 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 67990d1dafe..c2c89e7b993 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -132,6 +132,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Inventory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Inventory { @@ -266,6 +273,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OsInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Item. */ @@ -395,6 +409,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Item + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Item { @@ -552,6 +573,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoftwarePackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a VersionedPackage. */ @@ -654,6 +682,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersionedPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ZypperPatch. */ @@ -762,6 +797,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ZypperPatch + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WindowsUpdatePackage. */ @@ -900,6 +942,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsUpdatePackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WindowsUpdatePackage { @@ -998,6 +1047,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsUpdateCategory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1107,6 +1163,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsQuickFixEngineeringPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WindowsApplication. */ @@ -1221,6 +1284,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsApplication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1318,6 +1388,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetInventoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListInventoriesRequest. */ @@ -1432,6 +1509,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInventoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListInventoriesResponse. */ @@ -1528,6 +1612,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInventoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** InventoryView enum. */ @@ -1649,6 +1740,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicy { @@ -1754,6 +1852,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InventoryFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Resource. */ @@ -1871,6 +1976,13 @@ export namespace google { * @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 { @@ -1984,6 +2096,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for File + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace File { @@ -2082,6 +2201,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Remote + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Gcs. */ @@ -2184,6 +2310,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Gcs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2320,6 +2453,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PackageResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PackageResource { @@ -2425,6 +2565,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Deb + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a APT. */ @@ -2515,6 +2662,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for APT + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RPM. */ @@ -2611,6 +2765,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RPM + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a YUM. */ @@ -2701,6 +2862,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for YUM + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Zypper. */ @@ -2791,6 +2959,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Zypper + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GooGet. */ @@ -2881,6 +3056,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GooGet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MSI. */ @@ -2977,6 +3159,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MSI + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3089,6 +3278,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RepositoryResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace RepositoryResource { @@ -3205,6 +3401,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AptRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AptRepository { @@ -3323,6 +3526,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for YumRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ZypperRepository. */ @@ -3431,6 +3641,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ZypperRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GooRepository. */ @@ -3527,6 +3744,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GooRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3624,6 +3848,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ExecResource { @@ -3743,6 +3974,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Exec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Exec { @@ -3872,6 +4110,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileResource { @@ -3980,6 +4225,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -4071,6 +4323,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOSPolicyAssignmentReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentReportsRequest. */ @@ -4179,6 +4438,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentReportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentReportsResponse. */ @@ -4275,6 +4541,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentReportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a OSPolicyAssignmentReport. */ @@ -4395,6 +4668,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyAssignmentReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyAssignmentReport { @@ -4505,6 +4785,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyCompliance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyCompliance { @@ -4631,6 +4918,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyResourceCompliance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyResourceCompliance { @@ -4729,6 +5023,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyResourceConfigStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyResourceConfigStep { @@ -4838,6 +5139,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecResourceOutput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -5003,6 +5311,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyAssignment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyAssignment { @@ -5095,6 +5410,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LabelSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InstanceFilter. */ @@ -5203,6 +5525,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InstanceFilter { @@ -5301,6 +5630,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Inventory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -5398,6 +5734,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rollout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** RolloutState enum. */ @@ -5522,6 +5865,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyAssignmentOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyAssignmentOperationMetadata { @@ -5644,6 +5994,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateOSPolicyAssignmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateOSPolicyAssignmentRequest. */ @@ -5740,6 +6097,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateOSPolicyAssignmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOSPolicyAssignmentRequest. */ @@ -5830,6 +6194,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOSPolicyAssignmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentsRequest. */ @@ -5932,6 +6303,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentsResponse. */ @@ -6028,6 +6406,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentRevisionsRequest. */ @@ -6130,6 +6515,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentRevisionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentRevisionsResponse. */ @@ -6226,6 +6618,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentRevisionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOSPolicyAssignmentRequest. */ @@ -6316,6 +6715,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOSPolicyAssignmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FixedOrPercent. */ @@ -6415,6 +6821,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FixedOrPercent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents an OsConfigService */ @@ -6609,84 +7022,84 @@ export namespace google { namespace OsConfigService { /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|executePatchJob}. * @param error Error, if any * @param [response] PatchJob */ type ExecutePatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|getPatchJob}. * @param error Error, if any * @param [response] PatchJob */ type GetPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|cancelPatchJob}. * @param error Error, if any * @param [response] PatchJob */ type CancelPatchJobCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchJob) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|listPatchJobs}. * @param error Error, if any * @param [response] ListPatchJobsResponse */ type ListPatchJobsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobsResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|listPatchJobInstanceDetails}. * @param error Error, if any * @param [response] ListPatchJobInstanceDetailsResponse */ type ListPatchJobInstanceDetailsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|createPatchDeployment}. * @param error Error, if any * @param [response] PatchDeployment */ type CreatePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|getPatchDeployment}. * @param error Error, if any * @param [response] PatchDeployment */ type GetPatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|listPatchDeployments}. * @param error Error, if any * @param [response] ListPatchDeploymentsResponse */ type ListPatchDeploymentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListPatchDeploymentsResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|deletePatchDeployment}. * @param error Error, if any * @param [response] Empty */ type DeletePatchDeploymentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#updatePatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|updatePatchDeployment}. * @param error Error, if any * @param [response] PatchDeployment */ type UpdatePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#pausePatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|pausePatchDeployment}. * @param error Error, if any * @param [response] PatchDeployment */ type PausePatchDeploymentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.PatchDeployment) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#resumePatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|resumePatchDeployment}. * @param error Error, if any * @param [response] PatchDeployment */ @@ -6850,6 +7263,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PatchDeployment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PatchDeployment { @@ -6950,6 +7370,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneTimeSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RecurringSchedule. */ @@ -7091,6 +7518,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecurringSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace RecurringSchedule { @@ -7192,6 +7626,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeeklySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MonthlySchedule. */ @@ -7291,6 +7732,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonthlySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WeekDayOfMonth. */ @@ -7393,6 +7841,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeekDayOfMonth + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreatePatchDeploymentRequest. */ @@ -7495,6 +7950,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePatchDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetPatchDeploymentRequest. */ @@ -7585,6 +8047,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPatchDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListPatchDeploymentsRequest. */ @@ -7687,6 +8156,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPatchDeploymentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListPatchDeploymentsResponse. */ @@ -7783,6 +8259,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPatchDeploymentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeletePatchDeploymentRequest. */ @@ -7873,6 +8356,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePatchDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdatePatchDeploymentRequest. */ @@ -7969,6 +8459,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePatchDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PausePatchDeploymentRequest. */ @@ -8059,6 +8556,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PausePatchDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ResumePatchDeploymentRequest. */ @@ -8149,6 +8653,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResumePatchDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ExecutePatchJobRequest. */ @@ -8281,6 +8792,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutePatchJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetPatchJobRequest. */ @@ -8371,6 +8889,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPatchJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListPatchJobInstanceDetailsRequest. */ @@ -8479,6 +9004,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPatchJobInstanceDetailsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListPatchJobInstanceDetailsResponse. */ @@ -8575,6 +9107,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPatchJobInstanceDetailsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PatchJobInstanceDetails. */ @@ -8689,6 +9228,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PatchJobInstanceDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListPatchJobsRequest. */ @@ -8797,6 +9343,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPatchJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListPatchJobsResponse. */ @@ -8893,6 +9446,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPatchJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PatchJob. */ @@ -9067,6 +9627,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PatchJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PatchJob { @@ -9255,6 +9822,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceDetailsSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -9394,6 +9968,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PatchConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PatchConfig { @@ -9489,6 +10070,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Instance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Instance { @@ -9602,6 +10190,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelPatchJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AptSettings. */ @@ -9704,7 +10299,14 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } + + /** + * Gets the default type url for AptSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } namespace AptSettings { @@ -9822,6 +10424,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for YumSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GooSettings. */ @@ -9906,6 +10515,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GooSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ZypperSettings. */ @@ -10026,6 +10642,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ZypperSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WindowsUpdateSettings. */ @@ -10128,6 +10751,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsUpdateSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WindowsUpdateSettings { @@ -10241,6 +10871,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ExecStepConfig. */ @@ -10352,6 +10989,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecStepConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ExecStepConfig { @@ -10464,6 +11108,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsObject + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PatchInstanceFilter. */ @@ -10578,6 +11229,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PatchInstanceFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PatchInstanceFilter { @@ -10670,6 +11328,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GroupLabel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -10767,6 +11432,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PatchRollout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PatchRollout { @@ -10971,84 +11643,84 @@ export namespace google { namespace OsConfigZonalService { /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#createOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|createOSPolicyAssignment}. * @param error Error, if any * @param [response] Operation */ type CreateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#updateOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|updateOSPolicyAssignment}. * @param error Error, if any * @param [response] Operation */ type UpdateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|getOSPolicyAssignment}. * @param error Error, if any * @param [response] OSPolicyAssignment */ type GetOSPolicyAssignmentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.OSPolicyAssignment) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignments}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listOSPolicyAssignments}. * @param error Error, if any * @param [response] ListOSPolicyAssignmentsResponse */ type ListOSPolicyAssignmentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listOSPolicyAssignmentRevisions}. * @param error Error, if any * @param [response] ListOSPolicyAssignmentRevisionsResponse */ type ListOSPolicyAssignmentRevisionsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#deleteOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|deleteOSPolicyAssignment}. * @param error Error, if any * @param [response] Operation */ type DeleteOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getOSPolicyAssignmentReport}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|getOSPolicyAssignmentReport}. * @param error Error, if any * @param [response] OSPolicyAssignmentReport */ type GetOSPolicyAssignmentReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.OSPolicyAssignmentReport) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignmentReports}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listOSPolicyAssignmentReports}. * @param error Error, if any * @param [response] ListOSPolicyAssignmentReportsResponse */ type ListOSPolicyAssignmentReportsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getInventory}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|getInventory}. * @param error Error, if any * @param [response] Inventory */ type GetInventoryCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.Inventory) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listInventories}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listInventories}. * @param error Error, if any * @param [response] ListInventoriesResponse */ type ListInventoriesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.ListInventoriesResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getVulnerabilityReport}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|getVulnerabilityReport}. * @param error Error, if any * @param [response] VulnerabilityReport */ type GetVulnerabilityReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1.VulnerabilityReport) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listVulnerabilityReports}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listVulnerabilityReports}. * @param error Error, if any * @param [response] ListVulnerabilityReportsResponse */ @@ -11155,6 +11827,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VulnerabilityReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace VulnerabilityReport { @@ -11277,6 +11956,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Vulnerability + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Vulnerability { @@ -11399,6 +12085,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Details + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Details { @@ -11497,6 +12190,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Reference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11606,6 +12306,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Item + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -11698,6 +12405,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVulnerabilityReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListVulnerabilityReportsRequest. */ @@ -11806,6 +12520,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVulnerabilityReportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListVulnerabilityReportsResponse. */ @@ -11902,6 +12623,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVulnerabilityReportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CVSSv3. */ @@ -12052,6 +12780,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CVSSv3 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CVSSv3 { @@ -12207,6 +12942,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyResourceConfigStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyResourceConfigStep { @@ -12337,6 +13079,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyResourceCompliance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyResourceCompliance { @@ -12429,6 +13178,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecResourceOutput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -12571,6 +13327,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceOSPoliciesCompliance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InstanceOSPoliciesCompliance { @@ -12681,6 +13444,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyCompliance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -12772,6 +13542,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetInstanceOSPoliciesComplianceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListInstanceOSPoliciesCompliancesRequest. */ @@ -12880,6 +13657,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInstanceOSPoliciesCompliancesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListInstanceOSPoliciesCompliancesResponse. */ @@ -12976,6 +13760,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInstanceOSPoliciesCompliancesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Inventory. */ @@ -13084,6 +13875,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Inventory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Inventory { @@ -13218,6 +14016,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OsInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Item. */ @@ -13347,6 +14152,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Item + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Item { @@ -13504,6 +14316,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoftwarePackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a VersionedPackage. */ @@ -13606,6 +14425,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersionedPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ZypperPatch. */ @@ -13714,6 +14540,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ZypperPatch + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WindowsUpdatePackage. */ @@ -13852,6 +14685,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsUpdatePackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WindowsUpdatePackage { @@ -13950,6 +14790,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsUpdateCategory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -14059,6 +14906,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsQuickFixEngineeringPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WindowsApplication. */ @@ -14173,6 +15027,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsApplication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -14270,6 +15131,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetInventoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListInventoriesRequest. */ @@ -14384,6 +15252,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInventoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListInventoriesResponse. */ @@ -14480,6 +15355,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInventoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** InventoryView enum. */ @@ -14601,6 +15483,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicy { @@ -14706,6 +15595,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InventoryFilter. */ @@ -14802,6 +15698,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InventoryFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Resource. */ @@ -14919,6 +15822,13 @@ export namespace google { * @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 { @@ -15032,6 +15942,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for File + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace File { @@ -15130,6 +16047,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Remote + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Gcs. */ @@ -15232,6 +16156,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Gcs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -15368,6 +16299,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PackageResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PackageResource { @@ -15473,6 +16411,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Deb + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a APT. */ @@ -15563,6 +16508,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for APT + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RPM. */ @@ -15659,6 +16611,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RPM + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a YUM. */ @@ -15749,6 +16708,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for YUM + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Zypper. */ @@ -15839,6 +16805,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Zypper + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GooGet. */ @@ -15929,6 +16902,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GooGet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MSI. */ @@ -16025,6 +17005,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MSI + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -16137,6 +17124,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RepositoryResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace RepositoryResource { @@ -16253,6 +17247,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AptRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AptRepository { @@ -16371,6 +17372,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for YumRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ZypperRepository. */ @@ -16479,6 +17487,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ZypperRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GooRepository. */ @@ -16575,6 +17590,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GooRepository + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -16672,6 +17694,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ExecResource { @@ -16791,6 +17820,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Exec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Exec { @@ -16920,6 +17956,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileResource { @@ -17034,6 +18077,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -17125,6 +18175,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOSPolicyAssignmentReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentReportsRequest. */ @@ -17233,6 +18290,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentReportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentReportsResponse. */ @@ -17329,6 +18393,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentReportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a OSPolicyAssignmentReport. */ @@ -17449,6 +18520,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyAssignmentReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyAssignmentReport { @@ -17559,6 +18637,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyCompliance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyCompliance { @@ -17685,6 +18770,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyResourceCompliance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyResourceCompliance { @@ -17783,6 +18875,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyResourceConfigStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyResourceConfigStep { @@ -17892,6 +18991,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecResourceOutput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -18057,6 +19163,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyAssignment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyAssignment { @@ -18149,6 +19262,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LabelSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InstanceFilter. */ @@ -18263,6 +19383,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InstanceFilter { @@ -18361,6 +19488,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Inventory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -18458,6 +19592,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rollout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** RolloutState enum. */ @@ -18582,6 +19723,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OSPolicyAssignmentOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OSPolicyAssignmentOperationMetadata { @@ -18704,6 +19852,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateOSPolicyAssignmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateOSPolicyAssignmentRequest. */ @@ -18800,6 +19955,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateOSPolicyAssignmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOSPolicyAssignmentRequest. */ @@ -18890,6 +20052,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOSPolicyAssignmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentsRequest. */ @@ -18992,6 +20161,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentsResponse. */ @@ -19088,6 +20264,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentRevisionsRequest. */ @@ -19190,6 +20373,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentRevisionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOSPolicyAssignmentRevisionsResponse. */ @@ -19286,6 +20476,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOSPolicyAssignmentRevisionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOSPolicyAssignmentRequest. */ @@ -19376,6 +20573,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOSPolicyAssignmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FixedOrPercent. */ @@ -19475,6 +20679,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FixedOrPercent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents an OsConfigZonalService */ @@ -19697,98 +20908,98 @@ export namespace google { namespace OsConfigZonalService { /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#createOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|createOSPolicyAssignment}. * @param error Error, if any * @param [response] Operation */ type CreateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#updateOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|updateOSPolicyAssignment}. * @param error Error, if any * @param [response] Operation */ type UpdateOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getOSPolicyAssignment}. * @param error Error, if any * @param [response] OSPolicyAssignment */ type GetOSPolicyAssignmentCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.OSPolicyAssignment) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignments}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listOSPolicyAssignments}. * @param error Error, if any * @param [response] ListOSPolicyAssignmentsResponse */ type ListOSPolicyAssignmentsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listOSPolicyAssignmentRevisions}. * @param error Error, if any * @param [response] ListOSPolicyAssignmentRevisionsResponse */ type ListOSPolicyAssignmentRevisionsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#deleteOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|deleteOSPolicyAssignment}. * @param error Error, if any * @param [response] Operation */ type DeleteOSPolicyAssignmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInstanceOSPoliciesCompliance}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getInstanceOSPoliciesCompliance}. * @param error Error, if any * @param [response] InstanceOSPoliciesCompliance */ type GetInstanceOSPoliciesComplianceCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInstanceOSPoliciesCompliances}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listInstanceOSPoliciesCompliances}. * @param error Error, if any * @param [response] ListInstanceOSPoliciesCompliancesResponse */ type ListInstanceOSPoliciesCompliancesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignmentReport}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getOSPolicyAssignmentReport}. * @param error Error, if any * @param [response] OSPolicyAssignmentReport */ type GetOSPolicyAssignmentReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentReports}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listOSPolicyAssignmentReports}. * @param error Error, if any * @param [response] ListOSPolicyAssignmentReportsResponse */ type ListOSPolicyAssignmentReportsCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getInventory}. * @param error Error, if any * @param [response] Inventory */ type GetInventoryCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.Inventory) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInventories}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listInventories}. * @param error Error, if any * @param [response] ListInventoriesResponse */ type ListInventoriesCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.ListInventoriesResponse) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getVulnerabilityReport}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getVulnerabilityReport}. * @param error Error, if any * @param [response] VulnerabilityReport */ type GetVulnerabilityReportCallback = (error: (Error|null), response?: google.cloud.osconfig.v1alpha.VulnerabilityReport) => void; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listVulnerabilityReports}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listVulnerabilityReports}. * @param error Error, if any * @param [response] ListVulnerabilityReportsResponse */ @@ -19895,6 +21106,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VulnerabilityReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace VulnerabilityReport { @@ -20017,6 +21235,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Vulnerability + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Vulnerability { @@ -20139,6 +21364,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Details + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Details { @@ -20237,6 +21469,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Reference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -20346,6 +21585,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Item + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -20438,6 +21684,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVulnerabilityReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListVulnerabilityReportsRequest. */ @@ -20546,6 +21799,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVulnerabilityReportsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListVulnerabilityReportsResponse. */ @@ -20642,6 +21902,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVulnerabilityReportsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CVSSv3. */ @@ -20792,6 +22059,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CVSSv3 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CVSSv3 { @@ -20985,6 +22259,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -21097,6 +22378,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Http. */ @@ -21193,6 +22481,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -21340,6 +22635,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -21436,6 +22738,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -21530,6 +22839,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -21570,6 +22886,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -21617,6 +22936,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -21686,6 +23008,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -21830,6 +23159,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -21934,6 +23270,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -22030,6 +23373,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -22121,6 +23471,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -22271,6 +23628,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -22399,6 +23763,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -22513,6 +23884,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -22611,6 +23989,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -22714,6 +24099,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -22816,6 +24208,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -22936,6 +24335,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -23149,6 +24555,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -23276,6 +24689,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -23293,6 +24713,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -23330,6 +24753,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -23408,6 +24834,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -23515,6 +24948,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -23617,6 +25057,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -23713,6 +25160,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -23815,6 +25269,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -23926,6 +25387,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -24062,6 +25530,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -24160,6 +25635,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -24251,6 +25733,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -24367,6 +25856,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -24458,6 +25954,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -24476,6 +25979,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -24499,6 +26005,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -24568,6 +26077,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } @@ -24665,6 +26191,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Duration. */ @@ -24761,6 +26294,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldMask. */ @@ -24851,6 +26391,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -24935,6 +26482,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Any. */ @@ -25031,6 +26585,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -25137,6 +26698,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DateTime. */ @@ -25278,6 +26846,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateTime + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TimeZone. */ @@ -25374,6 +26949,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeZone + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** DayOfWeek enum. */ @@ -25494,6 +27076,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeOfDay + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -25594,35 +27183,35 @@ export namespace google { namespace Operations { /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @param error Error, if any * @param [response] ListOperationsResponse */ type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @param error Error, if any * @param [response] Operation */ type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @param error Error, if any * @param [response] Empty */ type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @param error Error, if any * @param [response] Empty */ type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @param error Error, if any * @param [response] Operation */ @@ -25744,6 +27333,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -25834,6 +27430,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -25942,6 +27545,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -26038,6 +27648,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -26128,6 +27745,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -26218,6 +27842,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -26314,6 +27945,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -26410,6 +28048,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -26516,6 +28161,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index cba88f6e01e..4b7f509add7 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -195,37 +195,41 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 1: - message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.decode(reader, reader.uint32()); - break; - case 2: - if (message.items === $util.emptyObject) - message.items = {}; - 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.osconfig.v1.Inventory.Item.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 3: { + message.name = reader.string(); + break; + } + case 1: { + message.osInfo = $root.google.cloud.osconfig.v1.Inventory.OsInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.items === $util.emptyObject) + message.items = {}; + 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.osconfig.v1.Inventory.Item.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.items[key] = value; + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; } - message.items[key] = value; - break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -370,6 +374,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Inventory + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Inventory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory"; + }; + Inventory.OsInfo = (function() { /** @@ -539,30 +558,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 9: - message.hostname = reader.string(); - break; - case 2: - message.longName = reader.string(); - break; - case 3: - message.shortName = reader.string(); - break; - case 4: - message.version = reader.string(); - break; - case 5: - message.architecture = reader.string(); - break; - case 6: - message.kernelVersion = reader.string(); - break; - case 7: - message.kernelRelease = reader.string(); - break; - case 8: - message.osconfigAgentVersion = reader.string(); - break; + case 9: { + message.hostname = reader.string(); + break; + } + case 2: { + message.longName = reader.string(); + break; + } + case 3: { + message.shortName = reader.string(); + break; + } + case 4: { + message.version = reader.string(); + break; + } + case 5: { + message.architecture = reader.string(); + break; + } + case 6: { + message.kernelVersion = reader.string(); + break; + } + case 7: { + message.kernelRelease = reader.string(); + break; + } + case 8: { + message.osconfigAgentVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -709,6 +736,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OsInfo + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory.OsInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OsInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory.OsInfo"; + }; + return OsInfo; })(); @@ -884,27 +926,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.originType = reader.int32(); - break; - case 8: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); - break; - case 7: - message.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.originType = reader.int32(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + } + case 7: { + message.availablePackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1107,6 +1156,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Item + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory.Item + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Item.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory.Item"; + }; + /** * OriginType enum. * @name google.cloud.osconfig.v1.Inventory.Item.OriginType @@ -1334,33 +1398,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 2: - message.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 3: - message.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 4: - message.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 5: - message.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.decode(reader, reader.uint32()); - break; - case 6: - message.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); - break; - case 7: - message.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); - break; - case 8: - message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 9: - message.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.decode(reader, reader.uint32()); - break; + case 1: { + message.yumPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.aptPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 3: { + message.zypperPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 4: { + message.googetPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 5: { + message.zypperPatch = $root.google.cloud.osconfig.v1.Inventory.ZypperPatch.decode(reader, reader.uint32()); + break; + } + case 6: { + message.wuaPackage = $root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); + break; + } + case 7: { + message.qfePackage = $root.google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); + break; + } + case 8: { + message.cosPackage = $root.google.cloud.osconfig.v1.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 9: { + message.windowsApplication = $root.google.cloud.osconfig.v1.Inventory.WindowsApplication.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1620,6 +1693,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SoftwarePackage + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory.SoftwarePackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoftwarePackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory.SoftwarePackage"; + }; + return SoftwarePackage; })(); @@ -1737,15 +1825,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.packageName = reader.string(); - break; - case 2: - message.architecture = reader.string(); - break; - case 3: - message.version = reader.string(); - break; + case 4: { + message.packageName = reader.string(); + break; + } + case 2: { + message.architecture = reader.string(); + break; + } + case 3: { + message.version = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1852,6 +1943,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for VersionedPackage + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory.VersionedPackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersionedPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory.VersionedPackage"; + }; + return VersionedPackage; })(); @@ -1980,18 +2086,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.patchName = reader.string(); - break; - case 2: - message.category = reader.string(); - break; - case 3: - message.severity = reader.string(); - break; - case 4: - message.summary = reader.string(); - break; + case 5: { + message.patchName = reader.string(); + break; + } + case 2: { + message.category = reader.string(); + break; + } + case 3: { + message.severity = reader.string(); + break; + } + case 4: { + message.summary = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2106,6 +2216,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ZypperPatch + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory.ZypperPatch + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ZypperPatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory.ZypperPatch"; + }; + return ZypperPatch; })(); @@ -2295,39 +2420,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.kbArticleIds && message.kbArticleIds.length)) - message.kbArticleIds = []; - message.kbArticleIds.push(reader.string()); - break; - case 11: - message.supportUrl = reader.string(); - break; - case 5: - if (!(message.moreInfoUrls && message.moreInfoUrls.length)) - message.moreInfoUrls = []; - message.moreInfoUrls.push(reader.string()); - break; - case 6: - message.updateId = reader.string(); - break; - case 7: - message.revisionNumber = reader.int32(); - break; - case 10: - message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.title = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.kbArticleIds && message.kbArticleIds.length)) + message.kbArticleIds = []; + message.kbArticleIds.push(reader.string()); + break; + } + case 11: { + message.supportUrl = reader.string(); + break; + } + case 5: { + if (!(message.moreInfoUrls && message.moreInfoUrls.length)) + message.moreInfoUrls = []; + message.moreInfoUrls.push(reader.string()); + break; + } + case 6: { + message.updateId = reader.string(); + break; + } + case 7: { + message.revisionNumber = reader.int32(); + break; + } + case 10: { + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2530,6 +2664,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsUpdatePackage + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsUpdatePackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage"; + }; + WindowsUpdatePackage.WindowsUpdateCategory = (function() { /** @@ -2633,12 +2782,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2737,6 +2888,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsUpdateCategory + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsUpdateCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory"; + }; + return WindowsUpdateCategory; })(); @@ -2868,18 +3034,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.caption = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.hotFixId = reader.string(); - break; - case 5: - message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.caption = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.hotFixId = reader.string(); + break; + } + case 5: { + message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2999,6 +3169,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsQuickFixEngineeringPackage + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsQuickFixEngineeringPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage"; + }; + return WindowsQuickFixEngineeringPackage; })(); @@ -3138,21 +3323,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - case 2: - message.displayVersion = reader.string(); - break; - case 3: - message.publisher = reader.string(); - break; - case 4: - message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - case 5: - message.helpLink = reader.string(); - break; + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.displayVersion = reader.string(); + break; + } + case 3: { + message.publisher = reader.string(); + break; + } + case 4: { + message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 5: { + message.helpLink = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3280,6 +3470,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsApplication + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Inventory.WindowsApplication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Inventory.WindowsApplication"; + }; + return WindowsApplication; })(); @@ -3389,12 +3594,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3511,6 +3718,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetInventoryRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.GetInventoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetInventoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.GetInventoryRequest"; + }; + return GetInventoryRequest; })(); @@ -3650,21 +3872,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3805,6 +4032,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListInventoriesRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListInventoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInventoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListInventoriesRequest"; + }; + return ListInventoriesRequest; })(); @@ -3913,14 +4155,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.inventories && message.inventories.length)) - message.inventories = []; - message.inventories.push($root.google.cloud.osconfig.v1.Inventory.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.inventories && message.inventories.length)) + message.inventories = []; + message.inventories.push($root.google.cloud.osconfig.v1.Inventory.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4036,6 +4280,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListInventoriesResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListInventoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInventoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListInventoriesResponse"; + }; + return ListInventoriesResponse; })(); @@ -4193,23 +4452,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.mode = reader.int32(); - break; - case 4: - if (!(message.resourceGroups && message.resourceGroups.length)) - message.resourceGroups = []; - message.resourceGroups.push($root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup.decode(reader, reader.uint32())); - break; - case 5: - message.allowNoResourceGroupMatch = reader.bool(); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.mode = reader.int32(); + break; + } + case 4: { + if (!(message.resourceGroups && message.resourceGroups.length)) + message.resourceGroups = []; + message.resourceGroups.push($root.google.cloud.osconfig.v1.OSPolicy.ResourceGroup.decode(reader, reader.uint32())); + break; + } + case 5: { + message.allowNoResourceGroupMatch = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -4368,6 +4632,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicy + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy"; + }; + /** * Mode enum. * @name google.cloud.osconfig.v1.OSPolicy.Mode @@ -4487,12 +4766,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osShortName = reader.string(); - break; - case 2: - message.osVersion = reader.string(); - break; + case 1: { + message.osShortName = reader.string(); + break; + } + case 2: { + message.osVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4591,6 +4872,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InventoryFilter + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.InventoryFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InventoryFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.InventoryFilter"; + }; + return InventoryFilter; })(); @@ -4744,21 +5040,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.pkg = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.decode(reader, reader.uint32()); - break; - case 3: - message.repository = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.decode(reader, reader.uint32()); - break; - case 4: - message.exec = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.decode(reader, reader.uint32()); - break; - case 5: - message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.decode(reader, reader.uint32()); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.pkg = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.repository = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.exec = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.decode(reader, reader.uint32()); + break; + } + case 5: { + message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4927,6 +5228,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Resource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.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.osconfig.v1.OSPolicy.Resource"; + }; + Resource.File = (function() { /** @@ -5066,18 +5382,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.remote = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.decode(reader, reader.uint32()); - break; - case 2: - message.gcs = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.decode(reader, reader.uint32()); - break; - case 3: - message.localPath = reader.string(); - break; - case 4: - message.allowInsecure = reader.bool(); - break; + case 1: { + message.remote = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote.decode(reader, reader.uint32()); + break; + } + case 2: { + message.gcs = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs.decode(reader, reader.uint32()); + break; + } + case 3: { + message.localPath = reader.string(); + break; + } + case 4: { + message.allowInsecure = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -5220,6 +5540,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for File + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.File"; + }; + File.Remote = (function() { /** @@ -5323,12 +5658,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.uri = reader.string(); - break; - case 2: - message.sha256Checksum = reader.string(); - break; + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.sha256Checksum = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5427,6 +5764,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Remote + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Remote.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote"; + }; + return Remote; })(); @@ -5544,15 +5896,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.bucket = reader.string(); - break; - case 2: - message.object = reader.string(); - break; - case 3: - message.generation = reader.int64(); - break; + case 1: { + message.bucket = reader.string(); + break; + } + case 2: { + message.object = reader.string(); + break; + } + case 3: { + message.generation = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -5673,6 +6028,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Gcs + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Gcs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs"; + }; + return Gcs; })(); @@ -5862,30 +6232,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.desiredState = reader.int32(); - break; - case 2: - message.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.decode(reader, reader.uint32()); - break; - case 3: - message.deb = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.decode(reader, reader.uint32()); - break; - case 4: - message.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.decode(reader, reader.uint32()); - break; - case 5: - message.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.decode(reader, reader.uint32()); - break; - case 6: - message.rpm = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.decode(reader, reader.uint32()); - break; - case 7: - message.googet = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.decode(reader, reader.uint32()); - break; - case 8: - message.msi = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.decode(reader, reader.uint32()); - break; + case 1: { + message.desiredState = reader.int32(); + break; + } + case 2: { + message.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.decode(reader, reader.uint32()); + break; + } + case 3: { + message.deb = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb.decode(reader, reader.uint32()); + break; + } + case 4: { + message.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM.decode(reader, reader.uint32()); + break; + } + case 5: { + message.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper.decode(reader, reader.uint32()); + break; + } + case 6: { + message.rpm = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM.decode(reader, reader.uint32()); + break; + } + case 7: { + message.googet = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet.decode(reader, reader.uint32()); + break; + } + case 8: { + message.msi = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6132,6 +6510,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PackageResource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PackageResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource"; + }; + /** * DesiredState enum. * @name google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState @@ -6251,12 +6644,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.pullDeps = reader.bool(); - break; + case 1: { + message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pullDeps = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6360,6 +6755,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Deb + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Deb.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb"; + }; + return Deb; })(); @@ -6455,9 +6865,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6547,6 +6958,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for APT + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + APT.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT"; + }; + return APT; })(); @@ -6653,12 +7079,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.pullDeps = reader.bool(); - break; + case 1: { + message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pullDeps = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6762,6 +7190,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RPM + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RPM.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM"; + }; + return RPM; })(); @@ -6857,9 +7300,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6949,6 +7393,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for YUM + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YUM.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM"; + }; + return YUM; })(); @@ -7044,9 +7503,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7136,6 +7596,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Zypper + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Zypper.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper"; + }; + return Zypper; })(); @@ -7231,9 +7706,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7323,6 +7799,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GooGet + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GooGet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet"; + }; + return GooGet; })(); @@ -7431,14 +7922,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.properties && message.properties.length)) - message.properties = []; - message.properties.push(reader.string()); - break; + case 1: { + message.source = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -7554,6 +8047,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MSI + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MSI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI"; + }; + return MSI; })(); @@ -7699,18 +8207,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.decode(reader, reader.uint32()); - break; - case 2: - message.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.decode(reader, reader.uint32()); - break; - case 3: - message.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.decode(reader, reader.uint32()); - break; - case 4: - message.goo = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.decode(reader, reader.uint32()); - break; + case 1: { + message.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.decode(reader, reader.uint32()); + break; + } + case 2: { + message.yum = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.zypper = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository.decode(reader, reader.uint32()); + break; + } + case 4: { + message.goo = $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7870,6 +8382,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RepositoryResource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RepositoryResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource"; + }; + RepositoryResource.AptRepository = (function() { /** @@ -8008,23 +8535,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.archiveType = reader.int32(); - break; - case 2: - message.uri = reader.string(); - break; - case 3: - message.distribution = reader.string(); - break; - case 4: - if (!(message.components && message.components.length)) - message.components = []; - message.components.push(reader.string()); - break; - case 5: - message.gpgKey = reader.string(); - break; + case 1: { + message.archiveType = reader.int32(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.distribution = reader.string(); + break; + } + case 4: { + if (!(message.components && message.components.length)) + message.components = []; + message.components.push(reader.string()); + break; + } + case 5: { + message.gpgKey = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8178,6 +8710,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AptRepository + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AptRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository"; + }; + /** * ArchiveType enum. * @name google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType @@ -8324,20 +8871,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.baseUrl = reader.string(); - break; - case 4: - if (!(message.gpgKeys && message.gpgKeys.length)) - message.gpgKeys = []; - message.gpgKeys.push(reader.string()); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.baseUrl = reader.string(); + break; + } + case 4: { + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -8465,6 +9016,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for YumRepository + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YumRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository"; + }; + return YumRepository; })(); @@ -8595,20 +9161,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.baseUrl = reader.string(); - break; - case 4: - if (!(message.gpgKeys && message.gpgKeys.length)) - message.gpgKeys = []; - message.gpgKeys.push(reader.string()); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.baseUrl = reader.string(); + break; + } + case 4: { + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -8736,6 +9306,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ZypperRepository + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ZypperRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository"; + }; + return ZypperRepository; })(); @@ -8842,12 +9427,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.url = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.url = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8946,6 +9533,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GooRepository + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GooRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository"; + }; + return GooRepository; })(); @@ -9055,12 +9657,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validate = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); - break; - case 2: - message.enforce = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); - break; + case 1: { + message.validate = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.enforce = $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9169,6 +9773,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecResource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource"; + }; + ExecResource.Exec = (function() { /** @@ -9321,23 +9940,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.script = reader.string(); - break; - case 3: - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); - break; - case 4: - message.interpreter = reader.int32(); - break; - case 5: - message.outputFilePath = reader.string(); - break; + case 1: { + message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + message.script = reader.string(); + break; + } + case 3: { + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); + break; + } + case 4: { + message.interpreter = reader.int32(); + break; + } + case 5: { + message.outputFilePath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9513,6 +10137,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Exec + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Exec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec"; + }; + /** * Interpreter enum. * @name google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter @@ -9687,21 +10326,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.content = reader.string(); - break; - case 3: - message.path = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.permissions = reader.string(); - break; + case 1: { + message.file = $root.google.cloud.osconfig.v1.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + message.content = reader.string(); + break; + } + case 3: { + message.path = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.permissions = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9864,6 +10508,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileResource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.Resource.FileResource"; + }; + /** * DesiredState enum. * @name google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState @@ -9995,16 +10654,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.inventoryFilters && message.inventoryFilters.length)) - message.inventoryFilters = []; - message.inventoryFilters.push($root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.osconfig.v1.OSPolicy.Resource.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.inventoryFilters && message.inventoryFilters.length)) + message.inventoryFilters = []; + message.inventoryFilters.push($root.google.cloud.osconfig.v1.OSPolicy.InventoryFilter.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.osconfig.v1.OSPolicy.Resource.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -10137,6 +10798,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceGroup + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicy.ResourceGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicy.ResourceGroup"; + }; + return ResourceGroup; })(); @@ -10235,9 +10911,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10327,6 +11004,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOSPolicyAssignmentReportRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOSPolicyAssignmentReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest"; + }; + return GetOSPolicyAssignmentReportRequest; })(); @@ -10455,18 +11147,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10581,6 +11277,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentReportsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest"; + }; + return ListOSPolicyAssignmentReportsRequest; })(); @@ -10689,14 +11400,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.osPolicyAssignmentReports && message.osPolicyAssignmentReports.length)) - message.osPolicyAssignmentReports = []; - message.osPolicyAssignmentReports.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.osPolicyAssignmentReports && message.osPolicyAssignmentReports.length)) + message.osPolicyAssignmentReports = []; + message.osPolicyAssignmentReports.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10812,6 +11525,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentReportsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse"; + }; + return ListOSPolicyAssignmentReportsResponse; })(); @@ -10964,26 +11692,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.instance = reader.string(); - break; - case 3: - message.osPolicyAssignment = reader.string(); - break; - case 4: - if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) - message.osPolicyCompliances = []; - message.osPolicyCompliances.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.decode(reader, reader.uint32())); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.lastRunId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.instance = reader.string(); + break; + } + case 3: { + message.osPolicyAssignment = reader.string(); + break; + } + case 4: { + if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) + message.osPolicyCompliances = []; + message.osPolicyCompliances.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.decode(reader, reader.uint32())); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.lastRunId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11137,6 +11871,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyAssignmentReport + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyAssignmentReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignmentReport"; + }; + OSPolicyAssignmentReport.OSPolicyCompliance = (function() { /** @@ -11264,20 +12013,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyId = reader.string(); - break; - case 2: - message.complianceState = reader.int32(); - break; - case 3: - message.complianceStateReason = reader.string(); - break; - case 4: - if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) - message.osPolicyResourceCompliances = []; - message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.decode(reader, reader.uint32())); - break; + case 1: { + message.osPolicyId = reader.string(); + break; + } + case 2: { + message.complianceState = reader.int32(); + break; + } + case 3: { + message.complianceStateReason = reader.string(); + break; + } + case 4: { + if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) + message.osPolicyResourceCompliances = []; + message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -11428,6 +12181,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyCompliance + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyCompliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance"; + }; + /** * ComplianceState enum. * @name google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState @@ -11596,23 +12364,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyResourceId = reader.string(); - break; - case 2: - if (!(message.configSteps && message.configSteps.length)) - message.configSteps = []; - message.configSteps.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); - break; - case 3: - message.complianceState = reader.int32(); - break; - case 4: - message.complianceStateReason = reader.string(); - break; - case 5: - message.execResourceOutput = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); - break; + case 1: { + message.osPolicyResourceId = reader.string(); + break; + } + case 2: { + if (!(message.configSteps && message.configSteps.length)) + message.configSteps = []; + message.configSteps.push($root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); + break; + } + case 3: { + message.complianceState = reader.int32(); + break; + } + case 4: { + message.complianceStateReason = reader.string(); + break; + } + case 5: { + message.execResourceOutput = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -11782,6 +12555,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyResourceCompliance + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyResourceCompliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance"; + }; + OSPolicyResourceCompliance.OSPolicyResourceConfigStep = (function() { /** @@ -11885,12 +12673,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.errorMessage = reader.string(); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12017,6 +12807,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyResourceConfigStep + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyResourceConfigStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep"; + }; + /** * Type enum. * @name google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type @@ -12148,9 +12953,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.enforcementOutput = reader.bytes(); - break; + case 2: { + message.enforcementOutput = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -12207,7 +13013,7 @@ if (object.enforcementOutput != null) if (typeof object.enforcementOutput === "string") $util.base64.decode(object.enforcementOutput, message.enforcementOutput = $util.newBuffer($util.base64.length(object.enforcementOutput)), 0); - else if (object.enforcementOutput.length) + else if (object.enforcementOutput.length >= 0) message.enforcementOutput = object.enforcementOutput; return message; }; @@ -12249,6 +13055,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecResourceOutput + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecResourceOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput"; + }; + return ExecResourceOutput; })(); @@ -12487,47 +13308,60 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.osPolicies && message.osPolicies.length)) - message.osPolicies = []; - message.osPolicies.push($root.google.cloud.osconfig.v1.OSPolicy.decode(reader, reader.uint32())); - break; - case 4: - message.instanceFilter = $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); - break; - case 5: - message.rollout = $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); - break; - case 6: - message.revisionId = reader.string(); - break; - case 7: - message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.etag = reader.string(); - break; - case 9: - message.rolloutState = reader.int32(); - break; - case 10: - message.baseline = reader.bool(); - break; - case 11: - message.deleted = reader.bool(); - break; - case 12: - message.reconciling = reader.bool(); - break; - case 13: - message.uid = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.osPolicies && message.osPolicies.length)) + message.osPolicies = []; + message.osPolicies.push($root.google.cloud.osconfig.v1.OSPolicy.decode(reader, reader.uint32())); + break; + } + case 4: { + message.instanceFilter = $root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.rollout = $root.google.cloud.osconfig.v1.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); + break; + } + case 6: { + message.revisionId = reader.string(); + break; + } + case 7: { + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.etag = reader.string(); + break; + } + case 9: { + message.rolloutState = reader.int32(); + break; + } + case 10: { + message.baseline = reader.bool(); + break; + } + case 11: { + message.deleted = reader.bool(); + break; + } + case 12: { + message.reconciling = reader.bool(); + break; + } + case 13: { + message.uid = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12775,6 +13609,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyAssignment + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyAssignment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignment"; + }; + OSPolicyAssignment.LabelSet = (function() { /** @@ -12869,28 +13718,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -12994,6 +13844,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LabelSet + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LabelSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet"; + }; + return LabelSet; })(); @@ -13128,24 +13993,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.all = reader.bool(); - break; - case 2: - if (!(message.inclusionLabels && message.inclusionLabels.length)) - message.inclusionLabels = []; - message.inclusionLabels.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.exclusionLabels && message.exclusionLabels.length)) - message.exclusionLabels = []; - message.exclusionLabels.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.inventories && message.inventories.length)) - message.inventories = []; - message.inventories.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.decode(reader, reader.uint32())); - break; + case 1: { + message.all = reader.bool(); + break; + } + case 2: { + if (!(message.inclusionLabels && message.inclusionLabels.length)) + message.inclusionLabels = []; + message.inclusionLabels.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.exclusionLabels && message.exclusionLabels.length)) + message.exclusionLabels = []; + message.exclusionLabels.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.inventories && message.inventories.length)) + message.inventories = []; + message.inventories.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -13312,6 +14181,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InstanceFilter + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter"; + }; + InstanceFilter.Inventory = (function() { /** @@ -13415,12 +14299,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osShortName = reader.string(); - break; - case 2: - message.osVersion = reader.string(); - break; + case 1: { + message.osShortName = reader.string(); + break; + } + case 2: { + message.osVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13519,6 +14405,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Inventory + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Inventory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory"; + }; + return Inventory; })(); @@ -13628,12 +14529,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.decode(reader, reader.uint32()); - break; - case 2: - message.minWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.decode(reader, reader.uint32()); + break; + } + case 2: { + message.minWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -13742,6 +14645,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Rollout + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rollout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignment.Rollout"; + }; + return Rollout; })(); @@ -13904,21 +14822,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyAssignment = reader.string(); - break; - case 2: - message.apiMethod = reader.int32(); - break; - case 3: - message.rolloutState = reader.int32(); - break; - case 4: - message.rolloutStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.rolloutUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.osPolicyAssignment = reader.string(); + break; + } + case 2: { + message.apiMethod = reader.int32(); + break; + } + case 3: { + message.rolloutState = reader.int32(); + break; + } + case 4: { + message.rolloutStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.rolloutUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14102,6 +15025,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyAssignmentOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyAssignmentOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata"; + }; + /** * APIMethod enum. * @name google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod @@ -14257,15 +15195,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32()); - break; - case 3: - message.osPolicyAssignmentId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.osPolicyAssignmentId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14377,6 +15318,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateOSPolicyAssignmentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateOSPolicyAssignmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest"; + }; + return CreateOSPolicyAssignmentRequest; })(); @@ -14483,12 +15439,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.osPolicyAssignment = $root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14597,6 +15555,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateOSPolicyAssignmentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateOSPolicyAssignmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest"; + }; + return UpdateOSPolicyAssignmentRequest; })(); @@ -14692,9 +15665,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14784,6 +15758,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOSPolicyAssignmentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOSPolicyAssignmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest"; + }; + return GetOSPolicyAssignmentRequest; })(); @@ -14901,15 +15890,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15016,6 +16008,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest"; + }; + return ListOSPolicyAssignmentsRequest; })(); @@ -15124,14 +16131,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) - message.osPolicyAssignments = []; - message.osPolicyAssignments.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15247,6 +16256,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse"; + }; + return ListOSPolicyAssignmentsResponse; })(); @@ -15364,15 +16388,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15479,6 +16506,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentRevisionsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest"; + }; + return ListOSPolicyAssignmentRevisionsRequest; })(); @@ -15587,14 +16629,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) - message.osPolicyAssignments = []; - message.osPolicyAssignments.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15710,6 +16754,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentRevisionsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse"; + }; + return ListOSPolicyAssignmentRevisionsResponse; })(); @@ -15805,9 +16864,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15897,6 +16957,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOSPolicyAssignmentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOSPolicyAssignmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest"; + }; + return DeleteOSPolicyAssignmentRequest; })(); @@ -16017,12 +17092,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fixed = reader.int32(); - break; - case 2: - message.percent = reader.int32(); - break; + case 1: { + message.fixed = reader.int32(); + break; + } + case 2: { + message.percent = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -16130,6 +17207,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FixedOrPercent + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.FixedOrPercent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FixedOrPercent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.FixedOrPercent"; + }; + return FixedOrPercent; })(); @@ -16166,7 +17258,7 @@ }; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#executePatchJob}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|executePatchJob}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef ExecutePatchJobCallback * @type {function} @@ -16199,7 +17291,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchJob}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|getPatchJob}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef GetPatchJobCallback * @type {function} @@ -16232,7 +17324,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#cancelPatchJob}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|cancelPatchJob}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef CancelPatchJobCallback * @type {function} @@ -16265,7 +17357,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobs}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|listPatchJobs}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef ListPatchJobsCallback * @type {function} @@ -16298,7 +17390,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchJobInstanceDetails}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|listPatchJobInstanceDetails}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef ListPatchJobInstanceDetailsCallback * @type {function} @@ -16331,7 +17423,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#createPatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|createPatchDeployment}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef CreatePatchDeploymentCallback * @type {function} @@ -16364,7 +17456,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#getPatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|getPatchDeployment}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef GetPatchDeploymentCallback * @type {function} @@ -16397,7 +17489,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#listPatchDeployments}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|listPatchDeployments}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef ListPatchDeploymentsCallback * @type {function} @@ -16430,7 +17522,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#deletePatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|deletePatchDeployment}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef DeletePatchDeploymentCallback * @type {function} @@ -16463,7 +17555,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#updatePatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|updatePatchDeployment}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef UpdatePatchDeploymentCallback * @type {function} @@ -16496,7 +17588,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#pausePatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|pausePatchDeployment}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef PausePatchDeploymentCallback * @type {function} @@ -16529,7 +17621,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService#resumePatchDeployment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigService|resumePatchDeployment}. * @memberof google.cloud.osconfig.v1.OsConfigService * @typedef ResumePatchDeploymentCallback * @type {function} @@ -16791,42 +17883,54 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); - break; - case 4: - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); - break; - case 5: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.decode(reader, reader.uint32()); - break; - case 7: - message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.decode(reader, reader.uint32()); - break; - case 8: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); - break; - case 12: - message.state = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.oneTimeSchedule = $root.google.cloud.osconfig.v1.OneTimeSchedule.decode(reader, reader.uint32()); + break; + } + case 7: { + message.recurringSchedule = $root.google.cloud.osconfig.v1.RecurringSchedule.decode(reader, reader.uint32()); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + break; + } + case 12: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -17081,6 +18185,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PatchDeployment + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.PatchDeployment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PatchDeployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.PatchDeployment"; + }; + /** * State enum. * @name google.cloud.osconfig.v1.PatchDeployment.State @@ -17192,9 +18311,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.executeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.executeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17289,6 +18409,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneTimeSchedule + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.OneTimeSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneTimeSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.OneTimeSchedule"; + }; + return OneTimeSchedule; })(); @@ -17486,33 +18621,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); - break; - case 2: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.timeOfDay = $root.google.type.TimeOfDay.decode(reader, reader.uint32()); - break; - case 5: - message.frequency = reader.int32(); - break; - case 6: - message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.decode(reader, reader.uint32()); - break; - case 7: - message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.decode(reader, reader.uint32()); - break; - case 9: - message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.nextExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.timeOfDay = $root.google.type.TimeOfDay.decode(reader, reader.uint32()); + break; + } + case 5: { + message.frequency = reader.int32(); + break; + } + case 6: { + message.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.decode(reader, reader.uint32()); + break; + } + case 7: { + message.monthly = $root.google.cloud.osconfig.v1.MonthlySchedule.decode(reader, reader.uint32()); + break; + } + case 9: { + message.lastExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.nextExecuteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17743,6 +18887,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RecurringSchedule + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.RecurringSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecurringSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.RecurringSchedule"; + }; + /** * Frequency enum. * @name google.cloud.osconfig.v1.RecurringSchedule.Frequency @@ -17856,9 +19015,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.dayOfWeek = reader.int32(); - break; + case 1: { + message.dayOfWeek = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -17991,6 +19151,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WeeklySchedule + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.WeeklySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeeklySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.WeeklySchedule"; + }; + return WeeklySchedule; })(); @@ -18111,12 +19286,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.decode(reader, reader.uint32()); - break; - case 2: - message.monthDay = reader.int32(); - break; + case 1: { + message.weekDayOfMonth = $root.google.cloud.osconfig.v1.WeekDayOfMonth.decode(reader, reader.uint32()); + break; + } + case 2: { + message.monthDay = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -18230,6 +19407,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MonthlySchedule + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.MonthlySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonthlySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.MonthlySchedule"; + }; + return MonthlySchedule; })(); @@ -18347,15 +19539,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.weekOrdinal = reader.int32(); - break; - case 2: - message.dayOfWeek = reader.int32(); - break; - case 3: - message.dayOffset = reader.int32(); - break; + case 1: { + message.weekOrdinal = reader.int32(); + break; + } + case 2: { + message.dayOfWeek = reader.int32(); + break; + } + case 3: { + message.dayOffset = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -18505,6 +19700,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WeekDayOfMonth + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.WeekDayOfMonth + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeekDayOfMonth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.WeekDayOfMonth"; + }; + return WeekDayOfMonth; })(); @@ -18622,15 +19832,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.patchDeploymentId = reader.string(); - break; - case 3: - message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.patchDeploymentId = reader.string(); + break; + } + case 3: { + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18742,6 +19955,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreatePatchDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.CreatePatchDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePatchDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.CreatePatchDeploymentRequest"; + }; + return CreatePatchDeploymentRequest; })(); @@ -18837,9 +20065,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18929,6 +20158,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetPatchDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.GetPatchDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPatchDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.GetPatchDeploymentRequest"; + }; + return GetPatchDeploymentRequest; })(); @@ -19046,15 +20290,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19161,6 +20408,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListPatchDeploymentsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPatchDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListPatchDeploymentsRequest"; + }; + return ListPatchDeploymentsRequest; })(); @@ -19269,14 +20531,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.patchDeployments && message.patchDeployments.length)) - message.patchDeployments = []; - message.patchDeployments.push($root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.patchDeployments && message.patchDeployments.length)) + message.patchDeployments = []; + message.patchDeployments.push($root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19392,6 +20656,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListPatchDeploymentsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListPatchDeploymentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPatchDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListPatchDeploymentsResponse"; + }; + return ListPatchDeploymentsResponse; })(); @@ -19487,9 +20766,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19579,6 +20859,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeletePatchDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.DeletePatchDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePatchDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.DeletePatchDeploymentRequest"; + }; + return DeletePatchDeploymentRequest; })(); @@ -19685,12 +20980,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.patchDeployment = $root.google.cloud.osconfig.v1.PatchDeployment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19799,6 +21096,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdatePatchDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePatchDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.UpdatePatchDeploymentRequest"; + }; + return UpdatePatchDeploymentRequest; })(); @@ -19894,9 +21206,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19986,6 +21299,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PausePatchDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.PausePatchDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PausePatchDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.PausePatchDeploymentRequest"; + }; + return PausePatchDeploymentRequest; })(); @@ -20081,9 +21409,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20173,6 +21502,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResumePatchDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ResumePatchDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResumePatchDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ResumePatchDeploymentRequest"; + }; + return ResumePatchDeploymentRequest; })(); @@ -20345,30 +21689,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 7: - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); - break; - case 4: - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); - break; - case 5: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.dryRun = reader.bool(); - break; - case 8: - message.displayName = reader.string(); - break; - case 9: - message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 7: { + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.dryRun = reader.bool(); + break; + } + case 8: { + message.displayName = reader.string(); + break; + } + case 9: { + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20535,6 +21887,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecutePatchJobRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ExecutePatchJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutePatchJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ExecutePatchJobRequest"; + }; + return ExecutePatchJobRequest; })(); @@ -20630,9 +21997,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20722,6 +22090,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetPatchJobRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.GetPatchJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPatchJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.GetPatchJobRequest"; + }; + return GetPatchJobRequest; })(); @@ -20850,18 +22233,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20976,6 +22363,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListPatchJobInstanceDetailsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPatchJobInstanceDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest"; + }; + return ListPatchJobInstanceDetailsRequest; })(); @@ -21084,14 +22486,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.patchJobInstanceDetails && message.patchJobInstanceDetails.length)) - message.patchJobInstanceDetails = []; - message.patchJobInstanceDetails.push($root.google.cloud.osconfig.v1.PatchJobInstanceDetails.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.patchJobInstanceDetails && message.patchJobInstanceDetails.length)) + message.patchJobInstanceDetails = []; + message.patchJobInstanceDetails.push($root.google.cloud.osconfig.v1.PatchJobInstanceDetails.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21207,6 +22611,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListPatchJobInstanceDetailsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPatchJobInstanceDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse"; + }; + return ListPatchJobInstanceDetailsResponse; })(); @@ -21346,21 +22765,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.instanceSystemId = reader.string(); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.failureReason = reader.string(); - break; - case 5: - message.attemptCount = reader.int64(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.instanceSystemId = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.failureReason = reader.string(); + break; + } + case 5: { + message.attemptCount = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -21580,6 +23004,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PatchJobInstanceDetails + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.PatchJobInstanceDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PatchJobInstanceDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.PatchJobInstanceDetails"; + }; + return PatchJobInstanceDetails; })(); @@ -21708,18 +23147,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21834,6 +23277,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListPatchJobsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListPatchJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPatchJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListPatchJobsRequest"; + }; + return ListPatchJobsRequest; })(); @@ -21942,14 +23400,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.patchJobs && message.patchJobs.length)) - message.patchJobs = []; - message.patchJobs.push($root.google.cloud.osconfig.v1.PatchJob.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.patchJobs && message.patchJobs.length)) + message.patchJobs = []; + message.patchJobs.push($root.google.cloud.osconfig.v1.PatchJob.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22065,6 +23525,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListPatchJobsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListPatchJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPatchJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListPatchJobsResponse"; + }; + return ListPatchJobsResponse; })(); @@ -22314,51 +23789,66 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 14: - message.displayName = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.state = reader.int32(); - break; - case 13: - message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); - break; - case 7: - message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); - break; - case 8: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 9: - message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.decode(reader, reader.uint32()); - break; - case 10: - message.dryRun = reader.bool(); - break; - case 11: - message.errorMessage = reader.string(); - break; - case 12: - message.percentComplete = reader.double(); - break; - case 15: - message.patchDeployment = reader.string(); - break; - case 16: - message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 14: { + message.displayName = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 13: { + message.instanceFilter = $root.google.cloud.osconfig.v1.PatchInstanceFilter.decode(reader, reader.uint32()); + break; + } + case 7: { + message.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.instanceDetailsSummary = $root.google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary.decode(reader, reader.uint32()); + break; + } + case 10: { + message.dryRun = reader.bool(); + break; + } + case 11: { + message.errorMessage = reader.string(); + break; + } + case 12: { + message.percentComplete = reader.double(); + break; + } + case 15: { + message.patchDeployment = reader.string(); + break; + } + case 16: { + message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22639,6 +24129,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PatchJob + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.PatchJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PatchJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.PatchJob"; + }; + /** * State enum. * @name google.cloud.osconfig.v1.PatchJob.State @@ -22911,51 +24416,66 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pendingInstanceCount = reader.int64(); - break; - case 2: - message.inactiveInstanceCount = reader.int64(); - break; - case 3: - message.notifiedInstanceCount = reader.int64(); - break; - case 4: - message.startedInstanceCount = reader.int64(); - break; - case 5: - message.downloadingPatchesInstanceCount = reader.int64(); - break; - case 6: - message.applyingPatchesInstanceCount = reader.int64(); - break; - case 7: - message.rebootingInstanceCount = reader.int64(); - break; - case 8: - message.succeededInstanceCount = reader.int64(); - break; - case 9: - message.succeededRebootRequiredInstanceCount = reader.int64(); - break; - case 10: - message.failedInstanceCount = reader.int64(); - break; - case 11: - message.ackedInstanceCount = reader.int64(); - break; - case 12: - message.timedOutInstanceCount = reader.int64(); - break; - case 13: - message.prePatchStepInstanceCount = reader.int64(); - break; - case 14: - message.postPatchStepInstanceCount = reader.int64(); - break; - case 15: - message.noAgentDetectedInstanceCount = reader.int64(); - break; + case 1: { + message.pendingInstanceCount = reader.int64(); + break; + } + case 2: { + message.inactiveInstanceCount = reader.int64(); + break; + } + case 3: { + message.notifiedInstanceCount = reader.int64(); + break; + } + case 4: { + message.startedInstanceCount = reader.int64(); + break; + } + case 5: { + message.downloadingPatchesInstanceCount = reader.int64(); + break; + } + case 6: { + message.applyingPatchesInstanceCount = reader.int64(); + break; + } + case 7: { + message.rebootingInstanceCount = reader.int64(); + break; + } + case 8: { + message.succeededInstanceCount = reader.int64(); + break; + } + case 9: { + message.succeededRebootRequiredInstanceCount = reader.int64(); + break; + } + case 10: { + message.failedInstanceCount = reader.int64(); + break; + } + case 11: { + message.ackedInstanceCount = reader.int64(); + break; + } + case 12: { + message.timedOutInstanceCount = reader.int64(); + break; + } + case 13: { + message.prePatchStepInstanceCount = reader.int64(); + break; + } + case 14: { + message.postPatchStepInstanceCount = reader.int64(); + break; + } + case 15: { + message.noAgentDetectedInstanceCount = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -23368,6 +24888,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InstanceDetailsSummary + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceDetailsSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary"; + }; + return InstanceDetailsSummary; })(); @@ -23554,33 +25089,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rebootConfig = reader.int32(); - break; - case 3: - message.apt = $root.google.cloud.osconfig.v1.AptSettings.decode(reader, reader.uint32()); - break; - case 4: - message.yum = $root.google.cloud.osconfig.v1.YumSettings.decode(reader, reader.uint32()); - break; - case 5: - message.goo = $root.google.cloud.osconfig.v1.GooSettings.decode(reader, reader.uint32()); - break; - case 6: - message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.decode(reader, reader.uint32()); - break; - case 7: - message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.decode(reader, reader.uint32()); - break; - case 8: - message.preStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); - break; - case 9: - message.postStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); - break; - case 10: - message.migInstancesAllowed = reader.bool(); - break; + case 1: { + message.rebootConfig = reader.int32(); + break; + } + case 3: { + message.apt = $root.google.cloud.osconfig.v1.AptSettings.decode(reader, reader.uint32()); + break; + } + case 4: { + message.yum = $root.google.cloud.osconfig.v1.YumSettings.decode(reader, reader.uint32()); + break; + } + case 5: { + message.goo = $root.google.cloud.osconfig.v1.GooSettings.decode(reader, reader.uint32()); + break; + } + case 6: { + message.zypper = $root.google.cloud.osconfig.v1.ZypperSettings.decode(reader, reader.uint32()); + break; + } + case 7: { + message.windowsUpdate = $root.google.cloud.osconfig.v1.WindowsUpdateSettings.decode(reader, reader.uint32()); + break; + } + case 8: { + message.preStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); + break; + } + case 9: { + message.postStep = $root.google.cloud.osconfig.v1.ExecStep.decode(reader, reader.uint32()); + break; + } + case 10: { + message.migInstancesAllowed = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -23793,6 +25337,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PatchConfig + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.PatchConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PatchConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.PatchConfig"; + }; + /** * RebootConfig enum. * @name google.cloud.osconfig.v1.PatchConfig.RebootConfig @@ -23971,6 +25530,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Instance + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.Instance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Instance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.Instance"; + }; + /** * PatchState enum. * @name google.cloud.osconfig.v1.Instance.PatchState @@ -24108,9 +25682,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24200,6 +25775,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelPatchJobRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.CancelPatchJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelPatchJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.CancelPatchJobRequest"; + }; + return CancelPatchJobRequest; })(); @@ -24321,19 +25911,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 3: - if (!(message.exclusivePackages && message.exclusivePackages.length)) - message.exclusivePackages = []; - message.exclusivePackages.push(reader.string()); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + } + case 3: { + if (!(message.exclusivePackages && message.exclusivePackages.length)) + message.exclusivePackages = []; + message.exclusivePackages.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -24483,6 +26076,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AptSettings + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.AptSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AptSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.AptSettings"; + }; + /** * Type enum. * @name google.cloud.osconfig.v1.AptSettings.Type @@ -24631,22 +26239,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.security = reader.bool(); - break; - case 2: - message.minimal = reader.bool(); - break; - case 3: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 4: - if (!(message.exclusivePackages && message.exclusivePackages.length)) - message.exclusivePackages = []; - message.exclusivePackages.push(reader.string()); - break; + case 1: { + message.security = reader.bool(); + break; + } + case 2: { + message.minimal = reader.bool(); + break; + } + case 3: { + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + } + case 4: { + if (!(message.exclusivePackages && message.exclusivePackages.length)) + message.exclusivePackages = []; + message.exclusivePackages.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -24787,6 +26399,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for YumSettings + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.YumSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YumSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.YumSettings"; + }; + return YumSettings; })(); @@ -24947,6 +26574,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GooSettings + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.GooSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GooSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.GooSettings"; + }; + return GooSettings; })(); @@ -25105,32 +26747,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.withOptional = reader.bool(); - break; - case 2: - message.withUpdate = reader.bool(); - break; - case 3: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push(reader.string()); - break; - case 4: - if (!(message.severities && message.severities.length)) - message.severities = []; - message.severities.push(reader.string()); - break; - case 5: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 6: - if (!(message.exclusivePatches && message.exclusivePatches.length)) - message.exclusivePatches = []; - message.exclusivePatches.push(reader.string()); - break; + case 1: { + message.withOptional = reader.bool(); + break; + } + case 2: { + message.withUpdate = reader.bool(); + break; + } + case 3: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push(reader.string()); + break; + } + case 4: { + if (!(message.severities && message.severities.length)) + message.severities = []; + message.severities.push(reader.string()); + break; + } + case 5: { + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + } + case 6: { + if (!(message.exclusivePatches && message.exclusivePatches.length)) + message.exclusivePatches = []; + message.exclusivePatches.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -25311,6 +26959,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ZypperSettings + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ZypperSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ZypperSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ZypperSettings"; + }; + return ZypperSettings; })(); @@ -25437,26 +27100,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.classifications && message.classifications.length)) - message.classifications = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.classifications && message.classifications.length)) + message.classifications = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.classifications.push(reader.int32()); + } else message.classifications.push(reader.int32()); - } else - message.classifications.push(reader.int32()); - break; - case 2: - if (!(message.excludes && message.excludes.length)) - message.excludes = []; - message.excludes.push(reader.string()); - break; - case 3: - if (!(message.exclusivePatches && message.exclusivePatches.length)) - message.exclusivePatches = []; - message.exclusivePatches.push(reader.string()); - break; + break; + } + case 2: { + if (!(message.excludes && message.excludes.length)) + message.excludes = []; + message.excludes.push(reader.string()); + break; + } + case 3: { + if (!(message.exclusivePatches && message.exclusivePatches.length)) + message.exclusivePatches = []; + message.exclusivePatches.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -25654,6 +27320,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsUpdateSettings + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.WindowsUpdateSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsUpdateSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.WindowsUpdateSettings"; + }; + /** * Classification enum. * @name google.cloud.osconfig.v1.WindowsUpdateSettings.Classification @@ -25790,12 +27471,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); - break; - case 2: - message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); - break; + case 1: { + message.linuxExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.windowsExecStepConfig = $root.google.cloud.osconfig.v1.ExecStepConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -25904,6 +27587,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecStep + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ExecStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ExecStep"; + }; + return ExecStep; })(); @@ -26051,25 +27749,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.localPath = reader.string(); - break; - case 2: - message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.allowedSuccessCodes && message.allowedSuccessCodes.length)) - message.allowedSuccessCodes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.localPath = reader.string(); + break; + } + case 2: { + message.gcsObject = $root.google.cloud.osconfig.v1.GcsObject.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.allowedSuccessCodes && message.allowedSuccessCodes.length)) + message.allowedSuccessCodes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowedSuccessCodes.push(reader.int32()); + } else message.allowedSuccessCodes.push(reader.int32()); - } else - message.allowedSuccessCodes.push(reader.int32()); - break; - case 4: - message.interpreter = reader.int32(); - break; + break; + } + case 4: { + message.interpreter = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -26231,6 +27933,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecStepConfig + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ExecStepConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecStepConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ExecStepConfig"; + }; + /** * Interpreter enum. * @name google.cloud.osconfig.v1.ExecStepConfig.Interpreter @@ -26364,15 +28081,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.bucket = reader.string(); - break; - case 2: - message.object = reader.string(); - break; - case 3: - message.generationNumber = reader.int64(); - break; + case 1: { + message.bucket = reader.string(); + break; + } + case 2: { + message.object = reader.string(); + break; + } + case 3: { + message.generationNumber = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -26493,6 +28213,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GcsObject + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.GcsObject + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsObject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.GcsObject"; + }; + return GcsObject; })(); @@ -26640,29 +28375,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.all = reader.bool(); - break; - case 2: - if (!(message.groupLabels && message.groupLabels.length)) - message.groupLabels = []; - message.groupLabels.push($root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.zones && message.zones.length)) - message.zones = []; - message.zones.push(reader.string()); - break; - case 4: - if (!(message.instances && message.instances.length)) - message.instances = []; - message.instances.push(reader.string()); - break; - case 5: - if (!(message.instanceNamePrefixes && message.instanceNamePrefixes.length)) - message.instanceNamePrefixes = []; - message.instanceNamePrefixes.push(reader.string()); - break; + case 1: { + message.all = reader.bool(); + break; + } + case 2: { + if (!(message.groupLabels && message.groupLabels.length)) + message.groupLabels = []; + message.groupLabels.push($root.google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push(reader.string()); + break; + } + case 4: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push(reader.string()); + break; + } + case 5: { + if (!(message.instanceNamePrefixes && message.instanceNamePrefixes.length)) + message.instanceNamePrefixes = []; + message.instanceNamePrefixes.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -26839,6 +28579,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PatchInstanceFilter + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PatchInstanceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.PatchInstanceFilter"; + }; + PatchInstanceFilter.GroupLabel = (function() { /** @@ -26933,28 +28688,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -27058,6 +28814,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GroupLabel + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GroupLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel"; + }; + return GroupLabel; })(); @@ -27167,12 +28938,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.mode = reader.int32(); - break; - case 2: - message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.decode(reader, reader.uint32()); - break; + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + message.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27294,6 +29067,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PatchRollout + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.PatchRollout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PatchRollout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.PatchRollout"; + }; + /** * Mode enum. * @name google.cloud.osconfig.v1.PatchRollout.Mode @@ -27346,7 +29134,7 @@ }; /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#createOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|createOSPolicyAssignment}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef CreateOSPolicyAssignmentCallback * @type {function} @@ -27379,7 +29167,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#updateOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|updateOSPolicyAssignment}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef UpdateOSPolicyAssignmentCallback * @type {function} @@ -27412,7 +29200,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|getOSPolicyAssignment}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef GetOSPolicyAssignmentCallback * @type {function} @@ -27445,7 +29233,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignments}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listOSPolicyAssignments}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef ListOSPolicyAssignmentsCallback * @type {function} @@ -27478,7 +29266,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listOSPolicyAssignmentRevisions}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef ListOSPolicyAssignmentRevisionsCallback * @type {function} @@ -27511,7 +29299,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#deleteOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|deleteOSPolicyAssignment}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef DeleteOSPolicyAssignmentCallback * @type {function} @@ -27544,7 +29332,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getOSPolicyAssignmentReport}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|getOSPolicyAssignmentReport}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef GetOSPolicyAssignmentReportCallback * @type {function} @@ -27577,7 +29365,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listOSPolicyAssignmentReports}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listOSPolicyAssignmentReports}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef ListOSPolicyAssignmentReportsCallback * @type {function} @@ -27610,7 +29398,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getInventory}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|getInventory}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef GetInventoryCallback * @type {function} @@ -27643,7 +29431,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listInventories}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listInventories}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef ListInventoriesCallback * @type {function} @@ -27676,7 +29464,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#getVulnerabilityReport}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|getVulnerabilityReport}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef GetVulnerabilityReportCallback * @type {function} @@ -27709,7 +29497,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService#listVulnerabilityReports}. + * Callback as used by {@link google.cloud.osconfig.v1.OsConfigZonalService|listVulnerabilityReports}. * @memberof google.cloud.osconfig.v1.OsConfigZonalService * @typedef ListVulnerabilityReportsCallback * @type {function} @@ -27860,17 +29648,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.vulnerabilities && message.vulnerabilities.length)) - message.vulnerabilities = []; - message.vulnerabilities.push($root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.decode(reader, reader.uint32())); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.vulnerabilities && message.vulnerabilities.length)) + message.vulnerabilities = []; + message.vulnerabilities.push($root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.decode(reader, reader.uint32())); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -28000,6 +29791,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for VulnerabilityReport + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.VulnerabilityReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VulnerabilityReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.VulnerabilityReport"; + }; + VulnerabilityReport.Vulnerability = (function() { /** @@ -28153,30 +29959,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.details = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.installedInventoryItemIds && message.installedInventoryItemIds.length)) - message.installedInventoryItemIds = []; - message.installedInventoryItemIds.push(reader.string()); - break; - case 3: - if (!(message.availableInventoryItemIds && message.availableInventoryItemIds.length)) - message.availableInventoryItemIds = []; - message.availableInventoryItemIds.push(reader.string()); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.decode(reader, reader.uint32())); - break; + case 1: { + message.details = $root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.installedInventoryItemIds && message.installedInventoryItemIds.length)) + message.installedInventoryItemIds = []; + message.installedInventoryItemIds.push(reader.string()); + break; + } + case 3: { + if (!(message.availableInventoryItemIds && message.availableInventoryItemIds.length)) + message.availableInventoryItemIds = []; + message.availableInventoryItemIds.push(reader.string()); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -28365,6 +30177,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Vulnerability + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Vulnerability.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability"; + }; + Vulnerability.Details = (function() { /** @@ -28514,26 +30341,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cve = reader.string(); - break; - case 2: - message.cvssV2Score = reader.float(); - break; - case 3: - message.cvssV3 = $root.google.cloud.osconfig.v1.CVSSv3.decode(reader, reader.uint32()); - break; - case 4: - message.severity = reader.string(); - break; - case 5: - message.description = reader.string(); - break; - case 6: - if (!(message.references && message.references.length)) - message.references = []; - message.references.push($root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.decode(reader, reader.uint32())); - break; + case 1: { + message.cve = reader.string(); + break; + } + case 2: { + message.cvssV2Score = reader.float(); + break; + } + case 3: { + message.cvssV3 = $root.google.cloud.osconfig.v1.CVSSv3.decode(reader, reader.uint32()); + break; + } + case 4: { + message.severity = reader.string(); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -28687,6 +30520,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Details + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Details.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details"; + }; + Details.Reference = (function() { /** @@ -28790,12 +30638,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.source = reader.string(); - break; + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.source = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28894,6 +30744,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Reference + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Reference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference"; + }; + return Reference; })(); @@ -29025,18 +30890,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.installedInventoryItemId = reader.string(); - break; - case 2: - message.availableInventoryItemId = reader.string(); - break; - case 3: - message.fixedCpeUri = reader.string(); - break; - case 4: - message.upstreamFix = reader.string(); - break; + case 1: { + message.installedInventoryItemId = reader.string(); + break; + } + case 2: { + message.availableInventoryItemId = reader.string(); + break; + } + case 3: { + message.fixedCpeUri = reader.string(); + break; + } + case 4: { + message.upstreamFix = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29151,6 +31020,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Item + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Item.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item"; + }; + return Item; })(); @@ -29252,9 +31136,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29344,6 +31229,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetVulnerabilityReportRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.GetVulnerabilityReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVulnerabilityReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.GetVulnerabilityReportRequest"; + }; + return GetVulnerabilityReportRequest; })(); @@ -29472,18 +31372,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29598,6 +31502,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListVulnerabilityReportsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVulnerabilityReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListVulnerabilityReportsRequest"; + }; + return ListVulnerabilityReportsRequest; })(); @@ -29706,14 +31625,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.vulnerabilityReports && message.vulnerabilityReports.length)) - message.vulnerabilityReports = []; - message.vulnerabilityReports.push($root.google.cloud.osconfig.v1.VulnerabilityReport.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.vulnerabilityReports && message.vulnerabilityReports.length)) + message.vulnerabilityReports = []; + message.vulnerabilityReports.push($root.google.cloud.osconfig.v1.VulnerabilityReport.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29829,6 +31750,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListVulnerabilityReportsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.ListVulnerabilityReportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVulnerabilityReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.ListVulnerabilityReportsResponse"; + }; + return ListVulnerabilityReportsResponse; })(); @@ -30034,39 +31970,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseScore = reader.float(); - break; - case 2: - message.exploitabilityScore = reader.float(); - break; - case 3: - message.impactScore = reader.float(); - break; - case 5: - message.attackVector = reader.int32(); - break; - case 6: - message.attackComplexity = reader.int32(); - break; - case 7: - message.privilegesRequired = reader.int32(); - break; - case 8: - message.userInteraction = reader.int32(); - break; - case 9: - message.scope = reader.int32(); - break; - case 10: - message.confidentialityImpact = reader.int32(); - break; - case 11: - message.integrityImpact = reader.int32(); - break; - case 12: - message.availabilityImpact = reader.int32(); - break; + case 1: { + message.baseScore = reader.float(); + break; + } + case 2: { + message.exploitabilityScore = reader.float(); + break; + } + case 3: { + message.impactScore = reader.float(); + break; + } + case 5: { + message.attackVector = reader.int32(); + break; + } + case 6: { + message.attackComplexity = reader.int32(); + break; + } + case 7: { + message.privilegesRequired = reader.int32(); + break; + } + case 8: { + message.userInteraction = reader.int32(); + break; + } + case 9: { + message.scope = reader.int32(); + break; + } + case 10: { + message.confidentialityImpact = reader.int32(); + break; + } + case 11: { + message.integrityImpact = reader.int32(); + break; + } + case 12: { + message.availabilityImpact = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -30411,6 +32358,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CVSSv3 + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1.CVSSv3 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CVSSv3.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1.CVSSv3"; + }; + /** * AttackVector enum. * @name google.cloud.osconfig.v1.CVSSv3.AttackVector @@ -30644,15 +32606,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.outcome = reader.int32(); - break; - case 3: - message.errorMessage = reader.string(); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.outcome = reader.int32(); + break; + } + case 3: { + message.errorMessage = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30805,6 +32770,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyResourceConfigStep + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyResourceConfigStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep"; + }; + /** * Type enum. * @name google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type @@ -30985,20 +32965,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyResourceId = reader.string(); - break; - case 2: - if (!(message.configSteps && message.configSteps.length)) - message.configSteps = []; - message.configSteps.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); - break; + case 1: { + message.osPolicyResourceId = reader.string(); + break; + } + case 2: { + if (!(message.configSteps && message.configSteps.length)) + message.configSteps = []; + message.configSteps.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -31170,6 +33154,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyResourceCompliance + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyResourceCompliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance"; + }; + OSPolicyResourceCompliance.ExecResourceOutput = (function() { /** @@ -31262,9 +33261,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.enforcementOutput = reader.bytes(); - break; + case 2: { + message.enforcementOutput = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -31321,7 +33321,7 @@ if (object.enforcementOutput != null) if (typeof object.enforcementOutput === "string") $util.base64.decode(object.enforcementOutput, message.enforcementOutput = $util.newBuffer($util.base64.length(object.enforcementOutput)), 0); - else if (object.enforcementOutput.length) + else if (object.enforcementOutput.length >= 0) message.enforcementOutput = object.enforcementOutput; return message; }; @@ -31363,6 +33363,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecResourceOutput + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecResourceOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput"; + }; + return ExecResourceOutput; })(); @@ -31560,32 +33575,40 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.instance = reader.string(); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.detailedState = reader.string(); - break; - case 5: - message.detailedStateReason = reader.string(); - break; - case 6: - if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) - message.osPolicyCompliances = []; - message.osPolicyCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.decode(reader, reader.uint32())); - break; - case 7: - message.lastComplianceCheckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.lastComplianceRunId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.instance = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.detailedState = reader.string(); + break; + } + case 5: { + message.detailedStateReason = reader.string(); + break; + } + case 6: { + if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) + message.osPolicyCompliances = []; + message.osPolicyCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.decode(reader, reader.uint32())); + break; + } + case 7: { + message.lastComplianceCheckTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.lastComplianceRunId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31783,6 +33806,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InstanceOSPoliciesCompliance + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceOSPoliciesCompliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance"; + }; + InstanceOSPoliciesCompliance.OSPolicyCompliance = (function() { /** @@ -31910,20 +33948,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyId = reader.string(); - break; - case 2: - message.osPolicyAssignment = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) - message.osPolicyResourceCompliances = []; - message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.decode(reader, reader.uint32())); - break; + case 1: { + message.osPolicyId = reader.string(); + break; + } + case 2: { + message.osPolicyAssignment = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) + message.osPolicyResourceCompliances = []; + message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -32084,6 +34126,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyCompliance + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyCompliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance"; + }; + return OSPolicyCompliance; })(); @@ -32182,9 +34239,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32274,6 +34332,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetInstanceOSPoliciesComplianceRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetInstanceOSPoliciesComplianceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest"; + }; + return GetInstanceOSPoliciesComplianceRequest; })(); @@ -32402,18 +34475,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32528,6 +34605,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListInstanceOSPoliciesCompliancesRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInstanceOSPoliciesCompliancesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest"; + }; + return ListInstanceOSPoliciesCompliancesRequest; })(); @@ -32636,14 +34728,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.instanceOsPoliciesCompliances && message.instanceOsPoliciesCompliances.length)) - message.instanceOsPoliciesCompliances = []; - message.instanceOsPoliciesCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.instanceOsPoliciesCompliances && message.instanceOsPoliciesCompliances.length)) + message.instanceOsPoliciesCompliances = []; + message.instanceOsPoliciesCompliances.push($root.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32759,6 +34853,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListInstanceOSPoliciesCompliancesResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInstanceOSPoliciesCompliancesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse"; + }; + return ListInstanceOSPoliciesCompliancesResponse; })(); @@ -32891,37 +35000,41 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 1: - message.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.decode(reader, reader.uint32()); - break; - case 2: - if (message.items === $util.emptyObject) - message.items = {}; - 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.osconfig.v1alpha.Inventory.Item.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 3: { + message.name = reader.string(); + break; + } + case 1: { + message.osInfo = $root.google.cloud.osconfig.v1alpha.Inventory.OsInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.items === $util.emptyObject) + message.items = {}; + 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.osconfig.v1alpha.Inventory.Item.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.items[key] = value; + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; } - message.items[key] = value; - break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -33066,6 +35179,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Inventory + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Inventory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory"; + }; + Inventory.OsInfo = (function() { /** @@ -33235,30 +35363,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 9: - message.hostname = reader.string(); - break; - case 2: - message.longName = reader.string(); - break; - case 3: - message.shortName = reader.string(); - break; - case 4: - message.version = reader.string(); - break; - case 5: - message.architecture = reader.string(); - break; - case 6: - message.kernelVersion = reader.string(); - break; - case 7: - message.kernelRelease = reader.string(); - break; - case 8: - message.osconfigAgentVersion = reader.string(); - break; + case 9: { + message.hostname = reader.string(); + break; + } + case 2: { + message.longName = reader.string(); + break; + } + case 3: { + message.shortName = reader.string(); + break; + } + case 4: { + message.version = reader.string(); + break; + } + case 5: { + message.architecture = reader.string(); + break; + } + case 6: { + message.kernelVersion = reader.string(); + break; + } + case 7: { + message.kernelRelease = reader.string(); + break; + } + case 8: { + message.osconfigAgentVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -33405,6 +35541,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OsInfo + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.OsInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OsInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory.OsInfo"; + }; + return OsInfo; })(); @@ -33580,27 +35731,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.originType = reader.int32(); - break; - case 8: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); - break; - case 7: - message.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.originType = reader.int32(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + } + case 7: { + message.availablePackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -33803,6 +35961,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Item + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.Item + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Item.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory.Item"; + }; + /** * OriginType enum. * @name google.cloud.osconfig.v1alpha.Inventory.Item.OriginType @@ -34030,33 +36203,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 2: - message.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 3: - message.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 4: - message.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 5: - message.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.decode(reader, reader.uint32()); - break; - case 6: - message.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); - break; - case 7: - message.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); - break; - case 8: - message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); - break; - case 9: - message.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.decode(reader, reader.uint32()); - break; + case 1: { + message.yumPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.aptPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 3: { + message.zypperPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 4: { + message.googetPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 5: { + message.zypperPatch = $root.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.decode(reader, reader.uint32()); + break; + } + case 6: { + message.wuaPackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.decode(reader, reader.uint32()); + break; + } + case 7: { + message.qfePackage = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.decode(reader, reader.uint32()); + break; + } + case 8: { + message.cosPackage = $root.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.decode(reader, reader.uint32()); + break; + } + case 9: { + message.windowsApplication = $root.google.cloud.osconfig.v1alpha.Inventory.WindowsApplication.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -34316,6 +36498,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SoftwarePackage + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoftwarePackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage"; + }; + return SoftwarePackage; })(); @@ -34433,15 +36630,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.packageName = reader.string(); - break; - case 2: - message.architecture = reader.string(); - break; - case 3: - message.version = reader.string(); - break; + case 4: { + message.packageName = reader.string(); + break; + } + case 2: { + message.architecture = reader.string(); + break; + } + case 3: { + message.version = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -34548,6 +36748,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for VersionedPackage + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersionedPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory.VersionedPackage"; + }; + return VersionedPackage; })(); @@ -34676,18 +36891,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.patchName = reader.string(); - break; - case 2: - message.category = reader.string(); - break; - case 3: - message.severity = reader.string(); - break; - case 4: - message.summary = reader.string(); - break; + case 5: { + message.patchName = reader.string(); + break; + } + case 2: { + message.category = reader.string(); + break; + } + case 3: { + message.severity = reader.string(); + break; + } + case 4: { + message.summary = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -34802,6 +37021,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ZypperPatch + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.ZypperPatch + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ZypperPatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory.ZypperPatch"; + }; + return ZypperPatch; })(); @@ -34991,39 +37225,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.kbArticleIds && message.kbArticleIds.length)) - message.kbArticleIds = []; - message.kbArticleIds.push(reader.string()); - break; - case 11: - message.supportUrl = reader.string(); - break; - case 5: - if (!(message.moreInfoUrls && message.moreInfoUrls.length)) - message.moreInfoUrls = []; - message.moreInfoUrls.push(reader.string()); - break; - case 6: - message.updateId = reader.string(); - break; - case 7: - message.revisionNumber = reader.int32(); - break; - case 10: - message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.title = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.kbArticleIds && message.kbArticleIds.length)) + message.kbArticleIds = []; + message.kbArticleIds.push(reader.string()); + break; + } + case 11: { + message.supportUrl = reader.string(); + break; + } + case 5: { + if (!(message.moreInfoUrls && message.moreInfoUrls.length)) + message.moreInfoUrls = []; + message.moreInfoUrls.push(reader.string()); + break; + } + case 6: { + message.updateId = reader.string(); + break; + } + case 7: { + message.revisionNumber = reader.int32(); + break; + } + case 10: { + message.lastDeploymentChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -35226,6 +37469,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsUpdatePackage + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsUpdatePackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage"; + }; + WindowsUpdatePackage.WindowsUpdateCategory = (function() { /** @@ -35329,12 +37587,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35433,6 +37693,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsUpdateCategory + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsUpdateCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory"; + }; + return WindowsUpdateCategory; })(); @@ -35564,18 +37839,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.caption = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.hotFixId = reader.string(); - break; - case 5: - message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.caption = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.hotFixId = reader.string(); + break; + } + case 5: { + message.installTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -35695,6 +37974,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsQuickFixEngineeringPackage + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsQuickFixEngineeringPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage"; + }; + return WindowsQuickFixEngineeringPackage; })(); @@ -35834,21 +38128,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - case 2: - message.displayVersion = reader.string(); - break; - case 3: - message.publisher = reader.string(); - break; - case 4: - message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - case 5: - message.helpLink = reader.string(); - break; + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.displayVersion = reader.string(); + break; + } + case 3: { + message.publisher = reader.string(); + break; + } + case 4: { + message.installDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 5: { + message.helpLink = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35976,6 +38275,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsApplication + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.Inventory.WindowsApplication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.Inventory.WindowsApplication"; + }; + return WindowsApplication; })(); @@ -36085,12 +38399,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -36207,6 +38523,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetInventoryRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.GetInventoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetInventoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.GetInventoryRequest"; + }; + return GetInventoryRequest; })(); @@ -36346,21 +38677,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -36501,6 +38837,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListInventoriesRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInventoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListInventoriesRequest"; + }; + return ListInventoriesRequest; })(); @@ -36609,14 +38960,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.inventories && message.inventories.length)) - message.inventories = []; - message.inventories.push($root.google.cloud.osconfig.v1alpha.Inventory.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.inventories && message.inventories.length)) + message.inventories = []; + message.inventories.push($root.google.cloud.osconfig.v1alpha.Inventory.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -36732,6 +39085,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListInventoriesResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListInventoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInventoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListInventoriesResponse"; + }; + return ListInventoriesResponse; })(); @@ -36889,23 +39257,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.mode = reader.int32(); - break; - case 4: - if (!(message.resourceGroups && message.resourceGroups.length)) - message.resourceGroups = []; - message.resourceGroups.push($root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.decode(reader, reader.uint32())); - break; - case 5: - message.allowNoResourceGroupMatch = reader.bool(); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.mode = reader.int32(); + break; + } + case 4: { + if (!(message.resourceGroups && message.resourceGroups.length)) + message.resourceGroups = []; + message.resourceGroups.push($root.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.decode(reader, reader.uint32())); + break; + } + case 5: { + message.allowNoResourceGroupMatch = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -37064,6 +39437,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicy + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy"; + }; + /** * Mode enum. * @name google.cloud.osconfig.v1alpha.OSPolicy.Mode @@ -37183,12 +39571,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osShortName = reader.string(); - break; - case 2: - message.osVersion = reader.string(); - break; + case 1: { + message.osShortName = reader.string(); + break; + } + case 2: { + message.osVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -37287,6 +39677,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSFilter + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.OSFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.OSFilter"; + }; + return OSFilter; })(); @@ -37393,12 +39798,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osShortName = reader.string(); - break; - case 2: - message.osVersion = reader.string(); - break; + case 1: { + message.osShortName = reader.string(); + break; + } + case 2: { + message.osVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -37497,6 +39904,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InventoryFilter + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InventoryFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter"; + }; + return InventoryFilter; })(); @@ -37650,21 +40072,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.decode(reader, reader.uint32()); - break; - case 3: - message.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.decode(reader, reader.uint32()); - break; - case 4: - message.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.decode(reader, reader.uint32()); - break; - case 5: - message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.decode(reader, reader.uint32()); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.pkg = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.repository = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.exec = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.decode(reader, reader.uint32()); + break; + } + case 5: { + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -37833,6 +40260,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Resource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.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.osconfig.v1alpha.OSPolicy.Resource"; + }; + Resource.File = (function() { /** @@ -37972,18 +40414,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.decode(reader, reader.uint32()); - break; - case 2: - message.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.decode(reader, reader.uint32()); - break; - case 3: - message.localPath = reader.string(); - break; - case 4: - message.allowInsecure = reader.bool(); - break; + case 1: { + message.remote = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.decode(reader, reader.uint32()); + break; + } + case 2: { + message.gcs = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.decode(reader, reader.uint32()); + break; + } + case 3: { + message.localPath = reader.string(); + break; + } + case 4: { + message.allowInsecure = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -38126,6 +40572,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for File + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.File"; + }; + File.Remote = (function() { /** @@ -38229,12 +40690,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.uri = reader.string(); - break; - case 2: - message.sha256Checksum = reader.string(); - break; + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.sha256Checksum = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -38333,6 +40796,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Remote + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Remote.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote"; + }; + return Remote; })(); @@ -38450,15 +40928,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.bucket = reader.string(); - break; - case 2: - message.object = reader.string(); - break; - case 3: - message.generation = reader.int64(); - break; + case 1: { + message.bucket = reader.string(); + break; + } + case 2: { + message.object = reader.string(); + break; + } + case 3: { + message.generation = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -38579,6 +41060,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Gcs + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Gcs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs"; + }; + return Gcs; })(); @@ -38768,30 +41264,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.desiredState = reader.int32(); - break; - case 2: - message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.decode(reader, reader.uint32()); - break; - case 3: - message.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.decode(reader, reader.uint32()); - break; - case 4: - message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.decode(reader, reader.uint32()); - break; - case 5: - message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.decode(reader, reader.uint32()); - break; - case 6: - message.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.decode(reader, reader.uint32()); - break; - case 7: - message.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.decode(reader, reader.uint32()); - break; - case 8: - message.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.decode(reader, reader.uint32()); - break; + case 1: { + message.desiredState = reader.int32(); + break; + } + case 2: { + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.decode(reader, reader.uint32()); + break; + } + case 3: { + message.deb = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.decode(reader, reader.uint32()); + break; + } + case 4: { + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.decode(reader, reader.uint32()); + break; + } + case 5: { + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.decode(reader, reader.uint32()); + break; + } + case 6: { + message.rpm = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.decode(reader, reader.uint32()); + break; + } + case 7: { + message.googet = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.decode(reader, reader.uint32()); + break; + } + case 8: { + message.msi = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -39038,6 +41542,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PackageResource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PackageResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource"; + }; + /** * DesiredState enum. * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState @@ -39157,12 +41676,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.pullDeps = reader.bool(); - break; + case 1: { + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pullDeps = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -39266,6 +41787,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Deb + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Deb.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb"; + }; + return Deb; })(); @@ -39361,9 +41897,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -39453,6 +41990,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for APT + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + APT.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT"; + }; + return APT; })(); @@ -39559,12 +42111,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.pullDeps = reader.bool(); - break; + case 1: { + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pullDeps = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -39668,6 +42222,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RPM + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RPM.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM"; + }; + return RPM; })(); @@ -39763,9 +42332,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -39855,6 +42425,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for YUM + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YUM.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM"; + }; + return YUM; })(); @@ -39950,9 +42535,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -40042,6 +42628,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Zypper + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Zypper.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper"; + }; + return Zypper; })(); @@ -40137,9 +42738,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -40229,6 +42831,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GooGet + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GooGet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet"; + }; + return GooGet; })(); @@ -40337,14 +42954,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.properties && message.properties.length)) - message.properties = []; - message.properties.push(reader.string()); - break; + case 1: { + message.source = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -40460,6 +43079,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MSI + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MSI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI"; + }; + return MSI; })(); @@ -40605,18 +43239,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.decode(reader, reader.uint32()); - break; - case 2: - message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.decode(reader, reader.uint32()); - break; - case 3: - message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.decode(reader, reader.uint32()); - break; - case 4: - message.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.decode(reader, reader.uint32()); - break; + case 1: { + message.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.decode(reader, reader.uint32()); + break; + } + case 2: { + message.yum = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.decode(reader, reader.uint32()); + break; + } + case 3: { + message.zypper = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.decode(reader, reader.uint32()); + break; + } + case 4: { + message.goo = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -40776,6 +43414,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RepositoryResource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RepositoryResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource"; + }; + RepositoryResource.AptRepository = (function() { /** @@ -40914,23 +43567,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.archiveType = reader.int32(); - break; - case 2: - message.uri = reader.string(); - break; - case 3: - message.distribution = reader.string(); - break; - case 4: - if (!(message.components && message.components.length)) - message.components = []; - message.components.push(reader.string()); - break; - case 5: - message.gpgKey = reader.string(); - break; + case 1: { + message.archiveType = reader.int32(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.distribution = reader.string(); + break; + } + case 4: { + if (!(message.components && message.components.length)) + message.components = []; + message.components.push(reader.string()); + break; + } + case 5: { + message.gpgKey = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -41084,6 +43742,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AptRepository + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AptRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository"; + }; + /** * ArchiveType enum. * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType @@ -41230,20 +43903,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.baseUrl = reader.string(); - break; - case 4: - if (!(message.gpgKeys && message.gpgKeys.length)) - message.gpgKeys = []; - message.gpgKeys.push(reader.string()); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.baseUrl = reader.string(); + break; + } + case 4: { + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -41371,6 +44048,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for YumRepository + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YumRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository"; + }; + return YumRepository; })(); @@ -41501,20 +44193,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.baseUrl = reader.string(); - break; - case 4: - if (!(message.gpgKeys && message.gpgKeys.length)) - message.gpgKeys = []; - message.gpgKeys.push(reader.string()); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.baseUrl = reader.string(); + break; + } + case 4: { + if (!(message.gpgKeys && message.gpgKeys.length)) + message.gpgKeys = []; + message.gpgKeys.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -41642,6 +44338,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ZypperRepository + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ZypperRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository"; + }; + return ZypperRepository; })(); @@ -41748,12 +44459,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.url = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.url = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -41852,6 +44565,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GooRepository + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GooRepository.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository"; + }; + return GooRepository; })(); @@ -41961,12 +44689,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); - break; - case 2: - message.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); - break; + case 1: { + message.validate = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.enforce = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -42075,6 +44805,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecResource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource"; + }; + ExecResource.Exec = (function() { /** @@ -42227,23 +44972,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.script = reader.string(); - break; - case 3: - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); - break; - case 4: - message.interpreter = reader.int32(); - break; - case 5: - message.outputFilePath = reader.string(); - break; + case 1: { + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + message.script = reader.string(); + break; + } + case 3: { + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); + break; + } + case 4: { + message.interpreter = reader.int32(); + break; + } + case 5: { + message.outputFilePath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -42419,6 +45169,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Exec + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Exec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec"; + }; + /** * Interpreter enum. * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter @@ -42593,21 +45358,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); - break; - case 2: - message.content = reader.string(); - break; - case 3: - message.path = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.permissions = reader.string(); - break; + case 1: { + message.file = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.decode(reader, reader.uint32()); + break; + } + case 2: { + message.content = reader.string(); + break; + } + case 3: { + message.path = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.permissions = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -42770,6 +45540,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileResource + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource"; + }; + /** * DesiredState enum. * @name google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState @@ -42912,19 +45697,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.inventoryFilters && message.inventoryFilters.length)) - message.inventoryFilters = []; - message.inventoryFilters.push($root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.decode(reader, reader.uint32())); - break; + case 1: { + message.osFilter = $root.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.inventoryFilters && message.inventoryFilters.length)) + message.inventoryFilters = []; + message.inventoryFilters.push($root.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -43071,6 +45859,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceGroup + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup"; + }; + return ResourceGroup; })(); @@ -43169,9 +45972,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -43261,6 +46065,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOSPolicyAssignmentReportRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOSPolicyAssignmentReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest"; + }; + return GetOSPolicyAssignmentReportRequest; })(); @@ -43389,18 +46208,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.filter = reader.string(); - break; - case 4: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -43515,6 +46338,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentReportsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest"; + }; + return ListOSPolicyAssignmentReportsRequest; })(); @@ -43623,14 +46461,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.osPolicyAssignmentReports && message.osPolicyAssignmentReports.length)) - message.osPolicyAssignmentReports = []; - message.osPolicyAssignmentReports.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.osPolicyAssignmentReports && message.osPolicyAssignmentReports.length)) + message.osPolicyAssignmentReports = []; + message.osPolicyAssignmentReports.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -43746,6 +46586,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentReportsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse"; + }; + return ListOSPolicyAssignmentReportsResponse; })(); @@ -43898,26 +46753,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.instance = reader.string(); - break; - case 3: - message.osPolicyAssignment = reader.string(); - break; - case 4: - if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) - message.osPolicyCompliances = []; - message.osPolicyCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.decode(reader, reader.uint32())); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.lastRunId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.instance = reader.string(); + break; + } + case 3: { + message.osPolicyAssignment = reader.string(); + break; + } + case 4: { + if (!(message.osPolicyCompliances && message.osPolicyCompliances.length)) + message.osPolicyCompliances = []; + message.osPolicyCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.decode(reader, reader.uint32())); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.lastRunId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -44071,6 +46932,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyAssignmentReport + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyAssignmentReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport"; + }; + OSPolicyAssignmentReport.OSPolicyCompliance = (function() { /** @@ -44198,20 +47074,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyId = reader.string(); - break; - case 2: - message.complianceState = reader.int32(); - break; - case 3: - message.complianceStateReason = reader.string(); - break; - case 4: - if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) - message.osPolicyResourceCompliances = []; - message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.decode(reader, reader.uint32())); - break; + case 1: { + message.osPolicyId = reader.string(); + break; + } + case 2: { + message.complianceState = reader.int32(); + break; + } + case 3: { + message.complianceStateReason = reader.string(); + break; + } + case 4: { + if (!(message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length)) + message.osPolicyResourceCompliances = []; + message.osPolicyResourceCompliances.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -44362,6 +47242,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyCompliance + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyCompliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance"; + }; + /** * ComplianceState enum. * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState @@ -44530,23 +47425,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyResourceId = reader.string(); - break; - case 2: - if (!(message.configSteps && message.configSteps.length)) - message.configSteps = []; - message.configSteps.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); - break; - case 3: - message.complianceState = reader.int32(); - break; - case 4: - message.complianceStateReason = reader.string(); - break; - case 5: - message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); - break; + case 1: { + message.osPolicyResourceId = reader.string(); + break; + } + case 2: { + if (!(message.configSteps && message.configSteps.length)) + message.configSteps = []; + message.configSteps.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.decode(reader, reader.uint32())); + break; + } + case 3: { + message.complianceState = reader.int32(); + break; + } + case 4: { + message.complianceStateReason = reader.string(); + break; + } + case 5: { + message.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -44716,6 +47616,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyResourceCompliance + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyResourceCompliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance"; + }; + OSPolicyResourceCompliance.OSPolicyResourceConfigStep = (function() { /** @@ -44819,12 +47734,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.errorMessage = reader.string(); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -44951,6 +47868,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyResourceConfigStep + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyResourceConfigStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep"; + }; + /** * Type enum. * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type @@ -45082,9 +48014,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.enforcementOutput = reader.bytes(); - break; + case 2: { + message.enforcementOutput = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -45141,7 +48074,7 @@ if (object.enforcementOutput != null) if (typeof object.enforcementOutput === "string") $util.base64.decode(object.enforcementOutput, message.enforcementOutput = $util.newBuffer($util.base64.length(object.enforcementOutput)), 0); - else if (object.enforcementOutput.length) + else if (object.enforcementOutput.length >= 0) message.enforcementOutput = object.enforcementOutput; return message; }; @@ -45183,6 +48116,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecResourceOutput + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecResourceOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput"; + }; + return ExecResourceOutput; })(); @@ -45421,47 +48369,60 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.osPolicies && message.osPolicies.length)) - message.osPolicies = []; - message.osPolicies.push($root.google.cloud.osconfig.v1alpha.OSPolicy.decode(reader, reader.uint32())); - break; - case 4: - message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); - break; - case 5: - message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); - break; - case 6: - message.revisionId = reader.string(); - break; - case 7: - message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.etag = reader.string(); - break; - case 9: - message.rolloutState = reader.int32(); - break; - case 10: - message.baseline = reader.bool(); - break; - case 11: - message.deleted = reader.bool(); - break; - case 12: - message.reconciling = reader.bool(); - break; - case 13: - message.uid = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.osPolicies && message.osPolicies.length)) + message.osPolicies = []; + message.osPolicies.push($root.google.cloud.osconfig.v1alpha.OSPolicy.decode(reader, reader.uint32())); + break; + } + case 4: { + message.instanceFilter = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.rollout = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.decode(reader, reader.uint32()); + break; + } + case 6: { + message.revisionId = reader.string(); + break; + } + case 7: { + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.etag = reader.string(); + break; + } + case 9: { + message.rolloutState = reader.int32(); + break; + } + case 10: { + message.baseline = reader.bool(); + break; + } + case 11: { + message.deleted = reader.bool(); + break; + } + case 12: { + message.reconciling = reader.bool(); + break; + } + case 13: { + message.uid = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -45709,6 +48670,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyAssignment + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyAssignment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignment"; + }; + OSPolicyAssignment.LabelSet = (function() { /** @@ -45803,28 +48779,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -45928,6 +48905,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LabelSet + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LabelSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet"; + }; + return LabelSet; })(); @@ -46075,29 +49067,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.all = reader.bool(); - break; - case 2: - if (!(message.osShortNames && message.osShortNames.length)) - message.osShortNames = []; - message.osShortNames.push(reader.string()); - break; - case 3: - if (!(message.inclusionLabels && message.inclusionLabels.length)) - message.inclusionLabels = []; - message.inclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.exclusionLabels && message.exclusionLabels.length)) - message.exclusionLabels = []; - message.exclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.inventories && message.inventories.length)) - message.inventories = []; - message.inventories.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.decode(reader, reader.uint32())); - break; + case 1: { + message.all = reader.bool(); + break; + } + case 2: { + if (!(message.osShortNames && message.osShortNames.length)) + message.osShortNames = []; + message.osShortNames.push(reader.string()); + break; + } + case 3: { + if (!(message.inclusionLabels && message.inclusionLabels.length)) + message.inclusionLabels = []; + message.inclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.exclusionLabels && message.exclusionLabels.length)) + message.exclusionLabels = []; + message.exclusionLabels.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.inventories && message.inventories.length)) + message.inventories = []; + message.inventories.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -46284,6 +49281,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InstanceFilter + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter"; + }; + InstanceFilter.Inventory = (function() { /** @@ -46387,12 +49399,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osShortName = reader.string(); - break; - case 2: - message.osVersion = reader.string(); - break; + case 1: { + message.osShortName = reader.string(); + break; + } + case 2: { + message.osVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -46491,6 +49505,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Inventory + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Inventory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory"; + }; + return Inventory; })(); @@ -46600,12 +49629,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.decode(reader, reader.uint32()); - break; - case 2: - message.minWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.disruptionBudget = $root.google.cloud.osconfig.v1alpha.FixedOrPercent.decode(reader, reader.uint32()); + break; + } + case 2: { + message.minWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -46714,6 +49745,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Rollout + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rollout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout"; + }; + return Rollout; })(); @@ -46876,21 +49922,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyAssignment = reader.string(); - break; - case 2: - message.apiMethod = reader.int32(); - break; - case 3: - message.rolloutState = reader.int32(); - break; - case 4: - message.rolloutStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.rolloutUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.osPolicyAssignment = reader.string(); + break; + } + case 2: { + message.apiMethod = reader.int32(); + break; + } + case 3: { + message.rolloutState = reader.int32(); + break; + } + case 4: { + message.rolloutStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.rolloutUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -47074,6 +50125,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OSPolicyAssignmentOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OSPolicyAssignmentOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata"; + }; + /** * APIMethod enum. * @name google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod @@ -47229,15 +50295,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); - break; - case 3: - message.osPolicyAssignmentId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.osPolicyAssignmentId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47349,6 +50418,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateOSPolicyAssignmentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateOSPolicyAssignmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest"; + }; + return CreateOSPolicyAssignmentRequest; })(); @@ -47455,12 +50539,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.osPolicyAssignment = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -47569,6 +50655,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateOSPolicyAssignmentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateOSPolicyAssignmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest"; + }; + return UpdateOSPolicyAssignmentRequest; })(); @@ -47664,9 +50765,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47756,6 +50858,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOSPolicyAssignmentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOSPolicyAssignmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest"; + }; + return GetOSPolicyAssignmentRequest; })(); @@ -47873,15 +50990,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47988,6 +51108,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest"; + }; + return ListOSPolicyAssignmentsRequest; })(); @@ -48096,14 +51231,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) - message.osPolicyAssignments = []; - message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -48219,6 +51356,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse"; + }; + return ListOSPolicyAssignmentsResponse; })(); @@ -48336,15 +51488,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -48451,6 +51606,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentRevisionsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest"; + }; + return ListOSPolicyAssignmentRevisionsRequest; })(); @@ -48559,14 +51729,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) - message.osPolicyAssignments = []; - message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.osPolicyAssignments && message.osPolicyAssignments.length)) + message.osPolicyAssignments = []; + message.osPolicyAssignments.push($root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -48682,6 +51854,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOSPolicyAssignmentRevisionsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOSPolicyAssignmentRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse"; + }; + return ListOSPolicyAssignmentRevisionsResponse; })(); @@ -48777,9 +51964,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -48869,6 +52057,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOSPolicyAssignmentRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOSPolicyAssignmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest"; + }; + return DeleteOSPolicyAssignmentRequest; })(); @@ -48989,12 +52192,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fixed = reader.int32(); - break; - case 2: - message.percent = reader.int32(); - break; + case 1: { + message.fixed = reader.int32(); + break; + } + case 2: { + message.percent = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -49102,6 +52307,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FixedOrPercent + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.FixedOrPercent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FixedOrPercent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.FixedOrPercent"; + }; + return FixedOrPercent; })(); @@ -49138,7 +52358,7 @@ }; /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#createOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|createOSPolicyAssignment}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef CreateOSPolicyAssignmentCallback * @type {function} @@ -49171,7 +52391,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#updateOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|updateOSPolicyAssignment}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef UpdateOSPolicyAssignmentCallback * @type {function} @@ -49204,7 +52424,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getOSPolicyAssignment}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef GetOSPolicyAssignmentCallback * @type {function} @@ -49237,7 +52457,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignments}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listOSPolicyAssignments}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef ListOSPolicyAssignmentsCallback * @type {function} @@ -49270,7 +52490,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentRevisions}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listOSPolicyAssignmentRevisions}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef ListOSPolicyAssignmentRevisionsCallback * @type {function} @@ -49303,7 +52523,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#deleteOSPolicyAssignment}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|deleteOSPolicyAssignment}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef DeleteOSPolicyAssignmentCallback * @type {function} @@ -49336,7 +52556,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInstanceOSPoliciesCompliance}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getInstanceOSPoliciesCompliance}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef GetInstanceOSPoliciesComplianceCallback * @type {function} @@ -49369,7 +52589,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInstanceOSPoliciesCompliances}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listInstanceOSPoliciesCompliances}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef ListInstanceOSPoliciesCompliancesCallback * @type {function} @@ -49402,7 +52622,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getOSPolicyAssignmentReport}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getOSPolicyAssignmentReport}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef GetOSPolicyAssignmentReportCallback * @type {function} @@ -49435,7 +52655,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listOSPolicyAssignmentReports}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listOSPolicyAssignmentReports}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef ListOSPolicyAssignmentReportsCallback * @type {function} @@ -49468,7 +52688,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getInventory}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getInventory}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef GetInventoryCallback * @type {function} @@ -49501,7 +52721,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listInventories}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listInventories}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef ListInventoriesCallback * @type {function} @@ -49534,7 +52754,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#getVulnerabilityReport}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|getVulnerabilityReport}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef GetVulnerabilityReportCallback * @type {function} @@ -49567,7 +52787,7 @@ */ /** - * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService#listVulnerabilityReports}. + * Callback as used by {@link google.cloud.osconfig.v1alpha.OsConfigZonalService|listVulnerabilityReports}. * @memberof google.cloud.osconfig.v1alpha.OsConfigZonalService * @typedef ListVulnerabilityReportsCallback * @type {function} @@ -49718,17 +52938,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.vulnerabilities && message.vulnerabilities.length)) - message.vulnerabilities = []; - message.vulnerabilities.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.decode(reader, reader.uint32())); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.vulnerabilities && message.vulnerabilities.length)) + message.vulnerabilities = []; + message.vulnerabilities.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.decode(reader, reader.uint32())); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -49858,6 +53081,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for VulnerabilityReport + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VulnerabilityReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.VulnerabilityReport"; + }; + VulnerabilityReport.Vulnerability = (function() { /** @@ -50011,30 +53249,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.installedInventoryItemIds && message.installedInventoryItemIds.length)) - message.installedInventoryItemIds = []; - message.installedInventoryItemIds.push(reader.string()); - break; - case 3: - if (!(message.availableInventoryItemIds && message.availableInventoryItemIds.length)) - message.availableInventoryItemIds = []; - message.availableInventoryItemIds.push(reader.string()); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.decode(reader, reader.uint32())); - break; + case 1: { + message.details = $root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.installedInventoryItemIds && message.installedInventoryItemIds.length)) + message.installedInventoryItemIds = []; + message.installedInventoryItemIds.push(reader.string()); + break; + } + case 3: { + if (!(message.availableInventoryItemIds && message.availableInventoryItemIds.length)) + message.availableInventoryItemIds = []; + message.availableInventoryItemIds.push(reader.string()); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -50223,6 +53467,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Vulnerability + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Vulnerability.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability"; + }; + Vulnerability.Details = (function() { /** @@ -50372,26 +53631,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cve = reader.string(); - break; - case 2: - message.cvssV2Score = reader.float(); - break; - case 3: - message.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.decode(reader, reader.uint32()); - break; - case 4: - message.severity = reader.string(); - break; - case 5: - message.description = reader.string(); - break; - case 6: - if (!(message.references && message.references.length)) - message.references = []; - message.references.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.decode(reader, reader.uint32())); - break; + case 1: { + message.cve = reader.string(); + break; + } + case 2: { + message.cvssV2Score = reader.float(); + break; + } + case 3: { + message.cvssV3 = $root.google.cloud.osconfig.v1alpha.CVSSv3.decode(reader, reader.uint32()); + break; + } + case 4: { + message.severity = reader.string(); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -50545,6 +53810,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Details + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Details.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details"; + }; + Details.Reference = (function() { /** @@ -50648,12 +53928,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.source = reader.string(); - break; + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.source = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -50752,6 +54034,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Reference + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Reference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference"; + }; + return Reference; })(); @@ -50883,18 +54180,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.installedInventoryItemId = reader.string(); - break; - case 2: - message.availableInventoryItemId = reader.string(); - break; - case 3: - message.fixedCpeUri = reader.string(); - break; - case 4: - message.upstreamFix = reader.string(); - break; + case 1: { + message.installedInventoryItemId = reader.string(); + break; + } + case 2: { + message.availableInventoryItemId = reader.string(); + break; + } + case 3: { + message.fixedCpeUri = reader.string(); + break; + } + case 4: { + message.upstreamFix = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -51009,6 +54310,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Item + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Item.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item"; + }; + return Item; })(); @@ -51110,9 +54426,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -51202,6 +54519,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetVulnerabilityReportRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVulnerabilityReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest"; + }; + return GetVulnerabilityReportRequest; })(); @@ -51330,18 +54662,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -51456,6 +54792,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListVulnerabilityReportsRequest + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVulnerabilityReportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest"; + }; + return ListVulnerabilityReportsRequest; })(); @@ -51564,14 +54915,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.vulnerabilityReports && message.vulnerabilityReports.length)) - message.vulnerabilityReports = []; - message.vulnerabilityReports.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.vulnerabilityReports && message.vulnerabilityReports.length)) + message.vulnerabilityReports = []; + message.vulnerabilityReports.push($root.google.cloud.osconfig.v1alpha.VulnerabilityReport.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -51687,6 +55040,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListVulnerabilityReportsResponse + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVulnerabilityReportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse"; + }; + return ListVulnerabilityReportsResponse; })(); @@ -51892,39 +55260,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseScore = reader.float(); - break; - case 2: - message.exploitabilityScore = reader.float(); - break; - case 3: - message.impactScore = reader.float(); - break; - case 5: - message.attackVector = reader.int32(); - break; - case 6: - message.attackComplexity = reader.int32(); - break; - case 7: - message.privilegesRequired = reader.int32(); - break; - case 8: - message.userInteraction = reader.int32(); - break; - case 9: - message.scope = reader.int32(); - break; - case 10: - message.confidentialityImpact = reader.int32(); - break; - case 11: - message.integrityImpact = reader.int32(); - break; - case 12: - message.availabilityImpact = reader.int32(); - break; + case 1: { + message.baseScore = reader.float(); + break; + } + case 2: { + message.exploitabilityScore = reader.float(); + break; + } + case 3: { + message.impactScore = reader.float(); + break; + } + case 5: { + message.attackVector = reader.int32(); + break; + } + case 6: { + message.attackComplexity = reader.int32(); + break; + } + case 7: { + message.privilegesRequired = reader.int32(); + break; + } + case 8: { + message.userInteraction = reader.int32(); + break; + } + case 9: { + message.scope = reader.int32(); + break; + } + case 10: { + message.confidentialityImpact = reader.int32(); + break; + } + case 11: { + message.integrityImpact = reader.int32(); + break; + } + case 12: { + message.availabilityImpact = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -52269,6 +55648,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CVSSv3 + * @function getTypeUrl + * @memberof google.cloud.osconfig.v1alpha.CVSSv3 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CVSSv3.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.osconfig.v1alpha.CVSSv3"; + }; + /** * AttackVector enum. * @name google.cloud.osconfig.v1alpha.CVSSv3.AttackVector @@ -52585,36 +55979,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -52812,6 +56213,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + /** * History enum. * @name google.api.ResourceDescriptor.History @@ -52948,12 +56364,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -53052,6 +56470,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + return ResourceReference; })(); @@ -53160,14 +56593,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -53283,6 +56718,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -53493,38 +56943,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -53746,6 +57206,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -53852,12 +57327,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -53956,6 +57433,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -54065,11 +57557,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -54176,6 +57669,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -54197,6 +57705,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -54317,6 +57826,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -54372,6 +57889,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -54406,66 +57925,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -54577,6 +58112,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -54669,6 +58207,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -54700,6 +58240,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -54746,6 +58287,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -54760,6 +58303,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -54970,52 +58528,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -55316,6 +58884,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -55430,15 +59013,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -55550,6 +59136,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -55656,12 +59257,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -55760,6 +59363,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -55860,11 +59478,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -55971,6 +59590,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + return ExtensionRangeOptions; })(); @@ -56176,39 +59810,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -56495,6 +60140,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -56663,12 +60323,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -56772,6 +60434,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -56917,27 +60594,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -57113,6 +60795,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -57216,12 +60913,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -57320,6 +61019,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -57440,15 +61154,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -57560,6 +61277,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -57679,17 +61411,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -57819,6 +61554,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -57969,24 +61719,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -58122,6 +61878,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -58452,76 +62223,98 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -58834,6 +62627,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -59002,26 +62810,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -59175,6 +62989,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -59188,6 +63017,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -59244,6 +63074,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -59320,6 +63158,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -59365,42 +63205,55 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -59460,6 +63313,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -59545,6 +63401,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -59632,6 +63490,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -59646,6 +63505,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -59672,6 +63533,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -59801,11 +63677,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -59912,6 +63789,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -60031,17 +63923,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -60166,6 +64061,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -60274,14 +64184,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -60397,6 +64309,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -60527,20 +64454,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -60673,6 +64604,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + return ServiceOptions; })(); @@ -60827,28 +64773,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -61038,6 +64990,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -61217,29 +65184,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -61352,7 +65326,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -61433,6 +65407,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -61534,12 +65523,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -61640,6 +65631,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -61740,11 +65746,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -61851,6 +65858,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -61999,37 +66021,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -62190,6 +66217,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -62290,11 +66332,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -62401,6 +66444,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -62411,6 +66469,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -62461,6 +66520,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -62497,6 +66564,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -62531,25 +66600,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -62601,6 +66678,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -62629,6 +66715,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -62651,6 +66751,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -62663,6 +66764,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -62677,6 +66780,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); @@ -62786,12 +66920,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -62904,6 +67040,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); @@ -63010,12 +67161,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -63128,6 +67281,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + return Duration; })(); @@ -63225,11 +67393,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -63331,6 +67500,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -63491,6 +67675,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + return Empty; })(); @@ -63597,12 +67796,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -63664,7 +67865,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -63710,6 +67911,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + return Any; })(); @@ -63839,15 +68055,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.year = reader.int32(); - break; - case 2: - message.month = reader.int32(); - break; - case 3: - message.day = reader.int32(); - break; + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -63954,6 +68173,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + return Date; })(); @@ -64151,33 +68385,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.year = reader.int32(); - break; - case 2: - message.month = reader.int32(); - break; - case 3: - message.day = reader.int32(); - break; - case 4: - message.hours = reader.int32(); - break; - case 5: - message.minutes = reader.int32(); - break; - case 6: - message.seconds = reader.int32(); - break; - case 7: - message.nanos = reader.int32(); - break; - case 8: - message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 9: - message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); - break; + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + case 4: { + message.hours = reader.int32(); + break; + } + case 5: { + message.minutes = reader.int32(); + break; + } + case 6: { + message.seconds = reader.int32(); + break; + } + case 7: { + message.nanos = reader.int32(); + break; + } + case 8: { + message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -64355,6 +68598,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DateTime + * @function getTypeUrl + * @memberof google.type.DateTime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateTime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.DateTime"; + }; + return DateTime; })(); @@ -64461,12 +68719,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.version = reader.string(); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -64565,6 +68825,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeZone + * @function getTypeUrl + * @memberof google.type.TimeZone + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeZone.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.TimeZone"; + }; + return TimeZone; })(); @@ -64719,18 +68994,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hours = reader.int32(); - break; - case 2: - message.minutes = reader.int32(); - break; - case 3: - message.seconds = reader.int32(); - break; - case 4: - message.nanos = reader.int32(); - break; + case 1: { + message.hours = reader.int32(); + break; + } + case 2: { + message.minutes = reader.int32(); + break; + } + case 3: { + message.seconds = reader.int32(); + break; + } + case 4: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -64845,6 +69124,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeOfDay + * @function getTypeUrl + * @memberof google.type.TimeOfDay + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeOfDay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.TimeOfDay"; + }; + return TimeOfDay; })(); @@ -64893,7 +69187,7 @@ }; /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @memberof google.longrunning.Operations * @typedef ListOperationsCallback * @type {function} @@ -64926,7 +69220,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @memberof google.longrunning.Operations * @typedef GetOperationCallback * @type {function} @@ -64959,7 +69253,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @memberof google.longrunning.Operations * @typedef DeleteOperationCallback * @type {function} @@ -64992,7 +69286,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @memberof google.longrunning.Operations * @typedef CancelOperationCallback * @type {function} @@ -65025,7 +69319,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @memberof google.longrunning.Operations * @typedef WaitOperationCallback * @type {function} @@ -65210,21 +69504,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.done = reader.bool(); - break; - case 4: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -65375,6 +69674,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -65470,9 +69784,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -65562,6 +69877,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -65690,18 +70020,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.filter = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -65816,6 +70150,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -65924,14 +70273,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -66047,6 +70398,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -66142,9 +70508,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -66234,6 +70601,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -66329,9 +70711,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -66421,6 +70804,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -66527,12 +70925,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -66636,6 +71036,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -66742,12 +71157,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.responseType = reader.string(); - break; - case 2: - message.metadataType = reader.string(); - break; + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -66846,6 +71263,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); @@ -66977,17 +71409,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -67112,6 +71547,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + return Status; })(); diff --git a/packages/google-cloud-osconfig/protos/protos.json b/packages/google-cloud-osconfig/protos/protos.json index 343bd680f2a..f77584b4d57 100644 --- a/packages/google-cloud-osconfig/protos/protos.json +++ b/packages/google-cloud-osconfig/protos/protos.json @@ -6057,6 +6057,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -6585,6 +6589,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -6877,6 +6888,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 1220aa96bfe4f0cc99ccc1ed59cf4dc509eb63b5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Aug 2022 12:30:59 -0700 Subject: [PATCH 141/154] chore(main): release 2.1.1 (#217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-osconfig/CHANGELOG.md | 9 +++++++++ packages/google-cloud-osconfig/package.json | 2 +- .../v1/snippet_metadata.google.cloud.osconfig.v1.json | 2 +- .../snippet_metadata.google.cloud.osconfig.v1alpha.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 499150d88d2..3fbb137dd4c 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [2.1.1](https://github.com/googleapis/nodejs-os-config/compare/v2.1.0...v2.1.1) (2022-08-23) + + +### Bug Fixes + +* better support for fallback mode ([#215](https://github.com/googleapis/nodejs-os-config/issues/215)) ([6460d25](https://github.com/googleapis/nodejs-os-config/commit/6460d2540ee1c65230c5bfefac19d5f60e57dd35)) +* change import long to require ([#216](https://github.com/googleapis/nodejs-os-config/issues/216)) ([4a53d92](https://github.com/googleapis/nodejs-os-config/commit/4a53d9258f285f29b7fe47659d76368f7f116b35)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-os-config/issues/1546)) ([#218](https://github.com/googleapis/nodejs-os-config/issues/218)) ([60e2d27](https://github.com/googleapis/nodejs-os-config/commit/60e2d273dcff7b2d88db8b4689524341e138edd3)) + ## [2.1.0](https://github.com/googleapis/nodejs-os-config/compare/v2.0.0...v2.1.0) (2022-07-02) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 37cade26f5b..c1ae4de7cde 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "2.1.0", + "version": "2.1.1", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json index aee875a795b..b059df35f13 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json +++ b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "2.1.0", + "version": "2.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json index a8e68819593..c048b34dc1d 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "2.1.0", + "version": "2.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index b45650ba35b..c007f1dcb8d 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^2.1.0" + "@google-cloud/os-config": "^2.1.1" }, "devDependencies": { "c8": "^7.1.0", From 4d8098309a51945dd9857be7674517413d9cadd9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 05:06:17 +0000 Subject: [PATCH 142/154] fix: do not import the whole google-gax from proto JS (#1553) (#219) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-cloud-osconfig/package.json | 2 +- packages/google-cloud-osconfig/protos/protos.d.ts | 2 +- packages/google-cloud-osconfig/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index c1ae4de7cde..24b169926fc 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -27,7 +27,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index c2c89e7b993..0e554bf01c3 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index 4b7f509add7..d6770fea54d 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From 351d033984008f3dd88250ca696103893143093e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:42:30 +0000 Subject: [PATCH 143/154] fix: allow passing gax instance to client constructor (#220) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1/os_config_service_client.ts | 63 ++++++----- .../src/v1/os_config_zonal_service_client.ts | 98 +++++++++------- .../v1alpha/os_config_zonal_service_client.ts | 106 ++++++++++-------- 3 files changed, 156 insertions(+), 111 deletions(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index 34ac31f3f21..e472cab35b5 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -36,7 +35,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './os_config_service_client_config.json'; - const version = require('../../../package.json').version; /** @@ -99,8 +97,18 @@ export class OsConfigServiceClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new OsConfigServiceClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof OsConfigServiceClient; const servicePath = @@ -120,8 +128,13 @@ export class OsConfigServiceClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -220,7 +233,7 @@ export class OsConfigServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -455,7 +468,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -541,7 +554,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -627,7 +640,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -729,7 +742,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -821,7 +834,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -913,7 +926,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1007,7 +1020,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'patch_deployment.name': request.patchDeployment!.name || '', }); this.initialize(); @@ -1100,7 +1113,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1193,7 +1206,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1291,7 +1304,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1334,7 +1347,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listPatchJobs']; @@ -1386,7 +1399,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listPatchJobs']; @@ -1496,7 +1509,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1544,7 +1557,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; @@ -1597,7 +1610,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; @@ -1704,7 +1717,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1745,7 +1758,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listPatchDeployments']; @@ -1795,7 +1808,7 @@ export class OsConfigServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listPatchDeployments']; diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts index f0006438c4d..fb35ed6727e 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -28,7 +28,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -38,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './os_config_zonal_service_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -102,8 +100,18 @@ export class OsConfigZonalServiceClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new OsConfigZonalServiceClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof OsConfigZonalServiceClient; const servicePath = @@ -123,8 +131,13 @@ export class OsConfigZonalServiceClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -307,7 +320,7 @@ export class OsConfigZonalServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -533,7 +546,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -639,7 +652,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -739,7 +752,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -844,7 +857,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -972,7 +985,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1002,11 +1015,12 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createOSPolicyAssignment, this._gaxModule.createDefaultBackoffSettings() @@ -1124,7 +1138,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'os_policy_assignment.name': request.osPolicyAssignment!.name || '', }); this.initialize(); @@ -1154,11 +1168,12 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateOSPolicyAssignment, this._gaxModule.createDefaultBackoffSettings() @@ -1276,7 +1291,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1306,11 +1321,12 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteOSPolicyAssignment, this._gaxModule.createDefaultBackoffSettings() @@ -1416,7 +1432,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1460,7 +1476,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; @@ -1509,7 +1525,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; @@ -1615,7 +1631,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1659,7 +1675,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = @@ -1709,7 +1725,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = @@ -1840,7 +1856,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1907,7 +1923,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; @@ -1979,7 +1995,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; @@ -2095,7 +2111,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2145,7 +2161,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listInventories']; @@ -2204,7 +2220,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listInventories']; @@ -2317,7 +2333,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2368,7 +2384,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; @@ -2424,7 +2440,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index 6a980d747e7..a168a7b72ab 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -28,7 +28,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -38,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './os_config_zonal_service_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -102,8 +100,18 @@ export class OsConfigZonalServiceClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new OsConfigZonalServiceClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof OsConfigZonalServiceClient; const servicePath = @@ -123,8 +131,13 @@ export class OsConfigZonalServiceClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -310,7 +323,7 @@ export class OsConfigZonalServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -545,7 +558,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -652,7 +665,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -767,7 +780,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -873,7 +886,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -978,7 +991,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1106,7 +1119,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1136,11 +1149,12 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createOSPolicyAssignment, this._gaxModule.createDefaultBackoffSettings() @@ -1257,7 +1271,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'os_policy_assignment.name': request.osPolicyAssignment!.name || '', }); this.initialize(); @@ -1287,11 +1301,12 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateOSPolicyAssignment, this._gaxModule.createDefaultBackoffSettings() @@ -1409,7 +1424,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1439,11 +1454,12 @@ export class OsConfigZonalServiceClient { protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteOSPolicyAssignment, this._gaxModule.createDefaultBackoffSettings() @@ -1549,7 +1565,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1593,7 +1609,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; @@ -1642,7 +1658,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; @@ -1748,7 +1764,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1792,7 +1808,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = @@ -1842,7 +1858,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); const defaultCallSettings = @@ -1959,7 +1975,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2017,7 +2033,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = @@ -2081,7 +2097,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = @@ -2217,7 +2233,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2284,7 +2300,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; @@ -2356,7 +2372,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; @@ -2472,7 +2488,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2522,7 +2538,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listInventories']; @@ -2581,7 +2597,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listInventories']; @@ -2694,7 +2710,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2745,7 +2761,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; @@ -2801,7 +2817,7 @@ export class OsConfigZonalServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; From ddfa8096e041ba9086d1d9eda942ac901d07fb85 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:40:30 +0000 Subject: [PATCH 144/154] fix: preserve default values in x-goog-request-params header (#222) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../src/v1/os_config_service_client.ts | 36 +- .../src/v1/os_config_zonal_service_client.ts | 44 +- .../v1alpha/os_config_zonal_service_client.ts | 52 +- .../test/gapic_os_config_service_v1.ts | 1263 ++++++------ .../test/gapic_os_config_zonal_service_v1.ts | 1476 +++++++------- .../gapic_os_config_zonal_service_v1alpha.ts | 1718 +++++++++-------- 6 files changed, 2501 insertions(+), 2088 deletions(-) diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index e472cab35b5..f7692fd8d61 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -469,7 +469,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.executePatchJob(request, options, callback); @@ -555,7 +555,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getPatchJob(request, options, callback); @@ -641,7 +641,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.cancelPatchJob(request, options, callback); @@ -743,7 +743,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createPatchDeployment(request, options, callback); @@ -835,7 +835,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getPatchDeployment(request, options, callback); @@ -927,7 +927,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deletePatchDeployment(request, options, callback); @@ -1021,7 +1021,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'patch_deployment.name': request.patchDeployment!.name || '', + 'patch_deployment.name': request.patchDeployment!.name ?? '', }); this.initialize(); return this.innerApiCalls.updatePatchDeployment(request, options, callback); @@ -1114,7 +1114,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.pausePatchDeployment(request, options, callback); @@ -1207,7 +1207,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.resumePatchDeployment(request, options, callback); @@ -1305,7 +1305,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listPatchJobs(request, options, callback); @@ -1348,7 +1348,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listPatchJobs']; const callSettings = defaultCallSettings.merge(options); @@ -1400,7 +1400,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listPatchJobs']; const callSettings = defaultCallSettings.merge(options); @@ -1510,7 +1510,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listPatchJobInstanceDetails( @@ -1558,7 +1558,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; const callSettings = defaultCallSettings.merge(options); @@ -1611,7 +1611,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; const callSettings = defaultCallSettings.merge(options); @@ -1718,7 +1718,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listPatchDeployments(request, options, callback); @@ -1759,7 +1759,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listPatchDeployments']; const callSettings = defaultCallSettings.merge(options); @@ -1809,7 +1809,7 @@ export class OsConfigServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listPatchDeployments']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts index fb35ed6727e..589fd2729fb 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -547,7 +547,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getOsPolicyAssignment(request, options, callback); @@ -653,7 +653,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getOsPolicyAssignmentReport( @@ -753,7 +753,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getInventory(request, options, callback); @@ -858,7 +858,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getVulnerabilityReport( @@ -986,7 +986,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createOsPolicyAssignment( @@ -1139,7 +1139,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'os_policy_assignment.name': request.osPolicyAssignment!.name || '', + 'os_policy_assignment.name': request.osPolicyAssignment!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateOsPolicyAssignment( @@ -1292,7 +1292,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteOsPolicyAssignment( @@ -1433,7 +1433,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listOsPolicyAssignments( @@ -1477,7 +1477,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); @@ -1526,7 +1526,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); @@ -1632,7 +1632,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.listOsPolicyAssignmentRevisions( @@ -1676,7 +1676,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentRevisions']; @@ -1726,7 +1726,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentRevisions']; @@ -1857,7 +1857,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listOsPolicyAssignmentReports( @@ -1924,7 +1924,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); @@ -1996,7 +1996,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); @@ -2112,7 +2112,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listInventories(request, options, callback); @@ -2162,7 +2162,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); @@ -2221,7 +2221,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); @@ -2334,7 +2334,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listVulnerabilityReports( @@ -2385,7 +2385,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); @@ -2441,7 +2441,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index a168a7b72ab..9390a9178db 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -559,7 +559,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getOsPolicyAssignment(request, options, callback); @@ -666,7 +666,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); this.warn( @@ -781,7 +781,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getOsPolicyAssignmentReport( @@ -887,7 +887,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getInventory(request, options, callback); @@ -992,7 +992,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getVulnerabilityReport( @@ -1120,7 +1120,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createOsPolicyAssignment( @@ -1272,7 +1272,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'os_policy_assignment.name': request.osPolicyAssignment!.name || '', + 'os_policy_assignment.name': request.osPolicyAssignment!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateOsPolicyAssignment( @@ -1425,7 +1425,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteOsPolicyAssignment( @@ -1566,7 +1566,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listOsPolicyAssignments( @@ -1610,7 +1610,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); @@ -1659,7 +1659,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); @@ -1765,7 +1765,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.listOsPolicyAssignmentRevisions( @@ -1809,7 +1809,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentRevisions']; @@ -1859,7 +1859,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentRevisions']; @@ -1976,7 +1976,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); this.warn( @@ -2034,7 +2034,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listInstanceOsPoliciesCompliances']; @@ -2098,7 +2098,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listInstanceOsPoliciesCompliances']; @@ -2234,7 +2234,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listOsPolicyAssignmentReports( @@ -2301,7 +2301,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); @@ -2373,7 +2373,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); @@ -2489,7 +2489,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listInventories(request, options, callback); @@ -2539,7 +2539,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); @@ -2598,7 +2598,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); @@ -2711,7 +2711,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listVulnerabilityReports( @@ -2762,7 +2762,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); @@ -2818,7 +2818,7 @@ export class OsConfigZonalServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index af0634aae6a..5cea4423038 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -222,26 +237,25 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ExecutePatchJobRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJob() ); client.innerApiCalls.executePatchJob = stubSimpleCall(expectedResponse); const [response] = await client.executePatchJob(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.executePatchJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.executePatchJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.executePatchJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes executePatchJob without error using callback', async () => { @@ -253,15 +267,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ExecutePatchJobRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJob() ); @@ -284,11 +294,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.executePatchJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.executePatchJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.executePatchJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes executePatchJob with error', async () => { @@ -300,26 +313,25 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ExecutePatchJobRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.executePatchJob = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.executePatchJob(request), expectedError); - assert( - (client.innerApiCalls.executePatchJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.executePatchJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.executePatchJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes executePatchJob with closed client', async () => { @@ -331,7 +343,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('ExecutePatchJobRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.executePatchJob(request), expectedError); @@ -348,26 +363,23 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetPatchJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJob() ); client.innerApiCalls.getPatchJob = stubSimpleCall(expectedResponse); const [response] = await client.getPatchJob(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getPatchJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getPatchJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPatchJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getPatchJob without error using callback', async () => { @@ -379,15 +391,9 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetPatchJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJob() ); @@ -410,11 +416,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getPatchJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getPatchJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPatchJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getPatchJob with error', async () => { @@ -426,26 +435,23 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetPatchJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getPatchJob = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getPatchJob(request), expectedError); - assert( - (client.innerApiCalls.getPatchJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getPatchJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPatchJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getPatchJob with closed client', async () => { @@ -457,7 +463,8 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetPatchJobRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getPatchJob(request), expectedError); @@ -474,26 +481,25 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CancelPatchJobRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJob() ); client.innerApiCalls.cancelPatchJob = stubSimpleCall(expectedResponse); const [response] = await client.cancelPatchJob(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelPatchJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelPatchJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelPatchJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelPatchJob without error using callback', async () => { @@ -505,15 +511,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CancelPatchJobRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJob() ); @@ -536,11 +538,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelPatchJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.cancelPatchJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelPatchJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelPatchJob with error', async () => { @@ -552,26 +557,25 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CancelPatchJobRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.cancelPatchJob = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.cancelPatchJob(request), expectedError); - assert( - (client.innerApiCalls.cancelPatchJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelPatchJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelPatchJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelPatchJob with closed client', async () => { @@ -583,7 +587,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('CancelPatchJobRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.cancelPatchJob(request), expectedError); @@ -600,15 +607,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreatePatchDeploymentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -616,11 +620,14 @@ describe('v1.OsConfigServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.createPatchDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createPatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createPatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createPatchDeployment without error using callback', async () => { @@ -632,15 +639,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreatePatchDeploymentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -663,11 +667,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createPatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createPatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createPatchDeployment with error', async () => { @@ -679,15 +686,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreatePatchDeploymentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createPatchDeployment = stubSimpleCall( undefined, @@ -697,11 +701,14 @@ describe('v1.OsConfigServiceClient', () => { client.createPatchDeployment(request), expectedError ); - assert( - (client.innerApiCalls.createPatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createPatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createPatchDeployment with closed client', async () => { @@ -713,7 +720,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + 'CreatePatchDeploymentRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -733,15 +744,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetPatchDeploymentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -749,11 +756,14 @@ describe('v1.OsConfigServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getPatchDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getPatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getPatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getPatchDeployment without error using callback', async () => { @@ -765,15 +775,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetPatchDeploymentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -796,11 +802,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getPatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getPatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getPatchDeployment with error', async () => { @@ -812,26 +821,25 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetPatchDeploymentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getPatchDeployment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getPatchDeployment(request), expectedError); - assert( - (client.innerApiCalls.getPatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getPatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getPatchDeployment with closed client', async () => { @@ -843,7 +851,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetPatchDeploymentRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getPatchDeployment(request), expectedError); @@ -860,15 +871,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeletePatchDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -876,11 +884,14 @@ describe('v1.OsConfigServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.deletePatchDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deletePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deletePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deletePatchDeployment without error using callback', async () => { @@ -892,15 +903,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeletePatchDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -923,11 +931,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deletePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deletePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deletePatchDeployment with error', async () => { @@ -939,15 +950,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeletePatchDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deletePatchDeployment = stubSimpleCall( undefined, @@ -957,11 +965,14 @@ describe('v1.OsConfigServiceClient', () => { client.deletePatchDeployment(request), expectedError ); - assert( - (client.innerApiCalls.deletePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deletePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deletePatchDeployment with closed client', async () => { @@ -973,7 +984,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'DeletePatchDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -993,16 +1008,13 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() ); - request.patchDeployment = {}; - request.patchDeployment.name = ''; - const expectedHeaderRequestParams = 'patch_deployment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.patchDeployment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdatePatchDeploymentRequest', + ['patchDeployment', 'name'] + ); + request.patchDeployment.name = defaultValue1; + const expectedHeaderRequestParams = `patch_deployment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -1010,11 +1022,14 @@ describe('v1.OsConfigServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.updatePatchDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updatePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updatePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updatePatchDeployment without error using callback', async () => { @@ -1026,16 +1041,13 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() ); - request.patchDeployment = {}; - request.patchDeployment.name = ''; - const expectedHeaderRequestParams = 'patch_deployment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.patchDeployment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdatePatchDeploymentRequest', + ['patchDeployment', 'name'] + ); + request.patchDeployment.name = defaultValue1; + const expectedHeaderRequestParams = `patch_deployment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -1058,11 +1070,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updatePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updatePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updatePatchDeployment with error', async () => { @@ -1074,16 +1089,13 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() ); - request.patchDeployment = {}; - request.patchDeployment.name = ''; - const expectedHeaderRequestParams = 'patch_deployment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.patchDeployment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdatePatchDeploymentRequest', + ['patchDeployment', 'name'] + ); + request.patchDeployment.name = defaultValue1; + const expectedHeaderRequestParams = `patch_deployment.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updatePatchDeployment = stubSimpleCall( undefined, @@ -1093,11 +1105,14 @@ describe('v1.OsConfigServiceClient', () => { client.updatePatchDeployment(request), expectedError ); - assert( - (client.innerApiCalls.updatePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updatePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updatePatchDeployment with closed client', async () => { @@ -1109,8 +1124,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() ); - request.patchDeployment = {}; - request.patchDeployment.name = ''; + request.patchDeployment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdatePatchDeploymentRequest', + ['patchDeployment', 'name'] + ); + request.patchDeployment.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1130,15 +1149,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PausePatchDeploymentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -1146,11 +1161,14 @@ describe('v1.OsConfigServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.pausePatchDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pausePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pausePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pausePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pausePatchDeployment without error using callback', async () => { @@ -1162,15 +1180,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PausePatchDeploymentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -1193,11 +1207,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.pausePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.pausePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pausePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pausePatchDeployment with error', async () => { @@ -1209,26 +1226,25 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('PausePatchDeploymentRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.pausePatchDeployment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.pausePatchDeployment(request), expectedError); - assert( - (client.innerApiCalls.pausePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.pausePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pausePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes pausePatchDeployment with closed client', async () => { @@ -1240,7 +1256,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('PausePatchDeploymentRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.pausePatchDeployment(request), expectedError); @@ -1257,15 +1276,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ResumePatchDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -1273,11 +1289,14 @@ describe('v1.OsConfigServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.resumePatchDeployment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.resumePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.resumePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes resumePatchDeployment without error using callback', async () => { @@ -1289,15 +1308,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ResumePatchDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() ); @@ -1320,11 +1336,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.resumePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.resumePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes resumePatchDeployment with error', async () => { @@ -1336,15 +1355,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ResumePatchDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.resumePatchDeployment = stubSimpleCall( undefined, @@ -1354,11 +1370,14 @@ describe('v1.OsConfigServiceClient', () => { client.resumePatchDeployment(request), expectedError ); - assert( - (client.innerApiCalls.resumePatchDeployment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.resumePatchDeployment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumePatchDeployment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes resumePatchDeployment with closed client', async () => { @@ -1370,7 +1389,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'ResumePatchDeploymentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1390,15 +1413,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), @@ -1407,11 +1426,14 @@ describe('v1.OsConfigServiceClient', () => { client.innerApiCalls.listPatchJobs = stubSimpleCall(expectedResponse); const [response] = await client.listPatchJobs(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listPatchJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listPatchJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPatchJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPatchJobs without error using callback', async () => { @@ -1423,15 +1445,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), @@ -1456,11 +1474,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listPatchJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listPatchJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPatchJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPatchJobs with error', async () => { @@ -1472,26 +1493,25 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listPatchJobs = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listPatchJobs(request), expectedError); - assert( - (client.innerApiCalls.listPatchJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listPatchJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPatchJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPatchJobsStream without error', async () => { @@ -1503,8 +1523,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), @@ -1535,11 +1558,12 @@ describe('v1.OsConfigServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listPatchJobs, request) ); - assert.strictEqual( - ( - client.descriptors.page.listPatchJobs.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPatchJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1552,8 +1576,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listPatchJobs.createStream = stubPageStreamingCall(undefined, expectedError); @@ -1579,11 +1606,12 @@ describe('v1.OsConfigServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listPatchJobs, request) ); - assert.strictEqual( - ( - client.descriptors.page.listPatchJobs.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPatchJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1596,8 +1624,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), generateSampleMessage(new protos.google.cloud.osconfig.v1.PatchJob()), @@ -1617,11 +1648,12 @@ describe('v1.OsConfigServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listPatchJobs.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPatchJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1634,8 +1666,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listPatchJobs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1652,11 +1687,12 @@ describe('v1.OsConfigServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listPatchJobs.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPatchJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -1671,15 +1707,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListPatchJobInstanceDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() @@ -1695,11 +1728,14 @@ describe('v1.OsConfigServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listPatchJobInstanceDetails(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listPatchJobInstanceDetails as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listPatchJobInstanceDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPatchJobInstanceDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPatchJobInstanceDetails without error using callback', async () => { @@ -1711,15 +1747,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListPatchJobInstanceDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() @@ -1752,11 +1785,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listPatchJobInstanceDetails as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listPatchJobInstanceDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPatchJobInstanceDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPatchJobInstanceDetails with error', async () => { @@ -1768,15 +1804,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListPatchJobInstanceDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listPatchJobInstanceDetails = stubSimpleCall( undefined, @@ -1786,11 +1819,14 @@ describe('v1.OsConfigServiceClient', () => { client.listPatchJobInstanceDetails(request), expectedError ); - assert( - (client.innerApiCalls.listPatchJobInstanceDetails as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listPatchJobInstanceDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPatchJobInstanceDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPatchJobInstanceDetailsStream without error', async () => { @@ -1802,8 +1838,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListPatchJobInstanceDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() @@ -1846,12 +1886,15 @@ describe('v1.OsConfigServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listPatchJobInstanceDetails, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listPatchJobInstanceDetails .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1864,8 +1907,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListPatchJobInstanceDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listPatchJobInstanceDetails.createStream = stubPageStreamingCall(undefined, expectedError); @@ -1897,12 +1944,15 @@ describe('v1.OsConfigServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listPatchJobInstanceDetails, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listPatchJobInstanceDetails .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1915,8 +1965,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListPatchJobInstanceDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchJobInstanceDetails() @@ -1944,12 +1998,15 @@ describe('v1.OsConfigServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listPatchJobInstanceDetails .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1962,8 +2019,12 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListPatchJobInstanceDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listPatchJobInstanceDetails.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1982,12 +2043,15 @@ describe('v1.OsConfigServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listPatchJobInstanceDetails .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2002,15 +2066,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() @@ -2026,11 +2086,14 @@ describe('v1.OsConfigServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listPatchDeployments(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listPatchDeployments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listPatchDeployments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPatchDeployments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPatchDeployments without error using callback', async () => { @@ -2042,15 +2105,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() @@ -2081,11 +2140,14 @@ describe('v1.OsConfigServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listPatchDeployments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listPatchDeployments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPatchDeployments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPatchDeployments with error', async () => { @@ -2097,26 +2159,25 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listPatchDeployments = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listPatchDeployments(request), expectedError); - assert( - (client.innerApiCalls.listPatchDeployments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listPatchDeployments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPatchDeployments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPatchDeploymentsStream without error', async () => { @@ -2128,8 +2189,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() @@ -2166,11 +2230,12 @@ describe('v1.OsConfigServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listPatchDeployments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listPatchDeployments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPatchDeployments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2183,8 +2248,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listPatchDeployments.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2210,11 +2278,12 @@ describe('v1.OsConfigServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listPatchDeployments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listPatchDeployments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPatchDeployments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2227,8 +2296,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.PatchDeployment() @@ -2254,11 +2326,12 @@ describe('v1.OsConfigServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listPatchDeployments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPatchDeployments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2271,8 +2344,11 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listPatchDeployments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2290,11 +2366,12 @@ describe('v1.OsConfigServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listPatchDeployments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPatchDeployments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts index db1c29b104e..3a5559518c4 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -263,15 +278,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() ); @@ -279,11 +291,14 @@ describe('v1.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getOSPolicyAssignment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignment without error using callback', async () => { @@ -296,15 +311,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() ); @@ -327,11 +339,14 @@ describe('v1.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignment with error', async () => { @@ -344,15 +359,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getOsPolicyAssignment = stubSimpleCall( undefined, @@ -362,11 +374,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.getOSPolicyAssignment(request), expectedError ); - assert( - (client.innerApiCalls.getOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignment with closed client', async () => { @@ -379,7 +394,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -400,15 +419,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() ); @@ -416,11 +432,14 @@ describe('v1.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getOSPolicyAssignmentReport(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignmentReport without error using callback', async () => { @@ -433,15 +452,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() ); @@ -464,11 +480,14 @@ describe('v1.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignmentReport with error', async () => { @@ -481,15 +500,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getOsPolicyAssignmentReport = stubSimpleCall( undefined, @@ -499,11 +515,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.getOSPolicyAssignmentReport(request), expectedError ); - assert( - (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignmentReport with closed client', async () => { @@ -516,7 +535,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentReportRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -537,26 +560,25 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.Inventory() ); client.innerApiCalls.getInventory = stubSimpleCall(expectedResponse); const [response] = await client.getInventory(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getInventory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInventory without error using callback', async () => { @@ -569,15 +591,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.Inventory() ); @@ -600,11 +618,14 @@ describe('v1.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getInventory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInventory with error', async () => { @@ -617,26 +638,25 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getInventory = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getInventory(request), expectedError); - assert( - (client.innerApiCalls.getInventory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInventory with closed client', async () => { @@ -649,7 +669,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getInventory(request), expectedError); @@ -667,15 +690,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetVulnerabilityReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.VulnerabilityReport() ); @@ -683,11 +703,14 @@ describe('v1.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getVulnerabilityReport(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getVulnerabilityReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getVulnerabilityReport without error using callback', async () => { @@ -700,15 +723,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetVulnerabilityReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1.VulnerabilityReport() ); @@ -731,11 +751,14 @@ describe('v1.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getVulnerabilityReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getVulnerabilityReport with error', async () => { @@ -748,15 +771,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetVulnerabilityReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getVulnerabilityReport = stubSimpleCall( undefined, @@ -766,11 +786,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.getVulnerabilityReport(request), expectedError ); - assert( - (client.innerApiCalls.getVulnerabilityReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getVulnerabilityReport with closed client', async () => { @@ -783,7 +806,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetVulnerabilityReportRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -804,15 +831,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateOSPolicyAssignmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -821,11 +845,14 @@ describe('v1.OsConfigZonalServiceClient', () => { const [operation] = await client.createOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createOSPolicyAssignment without error using callback', async () => { @@ -838,15 +865,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateOSPolicyAssignmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -876,11 +900,14 @@ describe('v1.OsConfigZonalServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createOSPolicyAssignment with call error', async () => { @@ -893,15 +920,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateOSPolicyAssignmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall( undefined, @@ -911,11 +935,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.createOSPolicyAssignment(request), expectedError ); - assert( - (client.innerApiCalls.createOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createOSPolicyAssignment with LRO error', async () => { @@ -928,15 +955,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateOSPolicyAssignmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall( undefined, @@ -945,11 +969,14 @@ describe('v1.OsConfigZonalServiceClient', () => { ); const [operation] = await client.createOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateOSPolicyAssignmentProgress without error', async () => { @@ -1008,16 +1035,13 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() ); - request.osPolicyAssignment = {}; - request.osPolicyAssignment.name = ''; - const expectedHeaderRequestParams = 'os_policy_assignment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.osPolicyAssignment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateOSPolicyAssignmentRequest', + ['osPolicyAssignment', 'name'] + ); + request.osPolicyAssignment.name = defaultValue1; + const expectedHeaderRequestParams = `os_policy_assignment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1026,11 +1050,14 @@ describe('v1.OsConfigZonalServiceClient', () => { const [operation] = await client.updateOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateOSPolicyAssignment without error using callback', async () => { @@ -1043,16 +1070,13 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() ); - request.osPolicyAssignment = {}; - request.osPolicyAssignment.name = ''; - const expectedHeaderRequestParams = 'os_policy_assignment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.osPolicyAssignment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateOSPolicyAssignmentRequest', + ['osPolicyAssignment', 'name'] + ); + request.osPolicyAssignment.name = defaultValue1; + const expectedHeaderRequestParams = `os_policy_assignment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1082,11 +1106,14 @@ describe('v1.OsConfigZonalServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateOSPolicyAssignment with call error', async () => { @@ -1099,16 +1126,13 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() ); - request.osPolicyAssignment = {}; - request.osPolicyAssignment.name = ''; - const expectedHeaderRequestParams = 'os_policy_assignment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.osPolicyAssignment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateOSPolicyAssignmentRequest', + ['osPolicyAssignment', 'name'] + ); + request.osPolicyAssignment.name = defaultValue1; + const expectedHeaderRequestParams = `os_policy_assignment.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1118,11 +1142,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.updateOSPolicyAssignment(request), expectedError ); - assert( - (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateOSPolicyAssignment with LRO error', async () => { @@ -1135,16 +1162,13 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() ); - request.osPolicyAssignment = {}; - request.osPolicyAssignment.name = ''; - const expectedHeaderRequestParams = 'os_policy_assignment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.osPolicyAssignment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateOSPolicyAssignmentRequest', + ['osPolicyAssignment', 'name'] + ); + request.osPolicyAssignment.name = defaultValue1; + const expectedHeaderRequestParams = `os_policy_assignment.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1153,11 +1177,14 @@ describe('v1.OsConfigZonalServiceClient', () => { ); const [operation] = await client.updateOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateOSPolicyAssignmentProgress without error', async () => { @@ -1216,15 +1243,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1233,11 +1257,14 @@ describe('v1.OsConfigZonalServiceClient', () => { const [operation] = await client.deleteOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteOSPolicyAssignment without error using callback', async () => { @@ -1250,15 +1277,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1288,11 +1312,14 @@ describe('v1.OsConfigZonalServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteOSPolicyAssignment with call error', async () => { @@ -1305,15 +1332,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1323,11 +1347,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.deleteOSPolicyAssignment(request), expectedError ); - assert( - (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteOSPolicyAssignment with LRO error', async () => { @@ -1340,15 +1367,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1357,11 +1381,14 @@ describe('v1.OsConfigZonalServiceClient', () => { ); const [operation] = await client.deleteOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteOSPolicyAssignmentProgress without error', async () => { @@ -1420,15 +1447,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() @@ -1444,11 +1468,14 @@ describe('v1.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignments(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignments without error using callback', async () => { @@ -1461,15 +1488,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() @@ -1502,11 +1526,14 @@ describe('v1.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignments with error', async () => { @@ -1519,15 +1546,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listOsPolicyAssignments = stubSimpleCall( undefined, @@ -1537,11 +1561,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.listOSPolicyAssignments(request), expectedError ); - assert( - (client.innerApiCalls.listOsPolicyAssignments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentsStream without error', async () => { @@ -1554,8 +1581,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() @@ -1596,12 +1627,15 @@ describe('v1.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listOsPolicyAssignments, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignments .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1615,8 +1649,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignments.createStream = stubPageStreamingCall(undefined, expectedError); @@ -1646,12 +1684,15 @@ describe('v1.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listOsPolicyAssignments, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignments .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1665,8 +1706,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() @@ -1694,12 +1739,15 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignments .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1713,8 +1761,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1733,12 +1785,15 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignments .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -1754,15 +1809,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() @@ -1778,11 +1830,14 @@ describe('v1.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignmentRevisions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentRevisions without error using callback', async () => { @@ -1795,15 +1850,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() @@ -1836,11 +1888,14 @@ describe('v1.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentRevisions with error', async () => { @@ -1853,15 +1908,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listOsPolicyAssignmentRevisions = stubSimpleCall( undefined, @@ -1871,11 +1923,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.listOSPolicyAssignmentRevisions(request), expectedError ); - assert( - (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentRevisionsStream without error', async () => { @@ -1888,8 +1943,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() @@ -1933,12 +1992,15 @@ describe('v1.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentRevisions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1952,8 +2014,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignmentRevisions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -1986,12 +2052,15 @@ describe('v1.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentRevisions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2005,8 +2074,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignment() @@ -2034,12 +2107,15 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentRevisions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2053,8 +2129,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2073,12 +2153,15 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentRevisions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2094,15 +2177,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() @@ -2118,11 +2198,14 @@ describe('v1.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignmentReports(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentReports without error using callback', async () => { @@ -2135,15 +2218,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() @@ -2176,11 +2256,14 @@ describe('v1.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentReports with error', async () => { @@ -2193,15 +2276,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listOsPolicyAssignmentReports = stubSimpleCall( undefined, @@ -2211,11 +2291,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.listOSPolicyAssignmentReports(request), expectedError ); - assert( - (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentReportsStream without error', async () => { @@ -2228,8 +2311,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() @@ -2275,12 +2362,15 @@ describe('v1.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentReports .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2294,8 +2384,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignmentReports.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2330,12 +2424,15 @@ describe('v1.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentReports .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2349,8 +2446,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.OSPolicyAssignmentReport() @@ -2378,12 +2479,15 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentReports .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2397,8 +2501,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignmentReports.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2417,12 +2525,15 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentReports .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2438,15 +2549,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), @@ -2455,11 +2562,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.innerApiCalls.listInventories = stubSimpleCall(expectedResponse); const [response] = await client.listInventories(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listInventories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listInventories without error using callback', async () => { @@ -2472,15 +2582,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), @@ -2505,11 +2611,14 @@ describe('v1.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listInventories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listInventories with error', async () => { @@ -2522,26 +2631,25 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listInventories = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listInventories(request), expectedError); - assert( - (client.innerApiCalls.listInventories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listInventoriesStream without error', async () => { @@ -2554,8 +2662,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), @@ -2586,11 +2697,12 @@ describe('v1.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listInventories, request) ); - assert.strictEqual( - ( - client.descriptors.page.listInventories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listInventories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2604,8 +2716,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listInventories.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2631,11 +2746,12 @@ describe('v1.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listInventories, request) ); - assert.strictEqual( - ( - client.descriptors.page.listInventories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listInventories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2649,8 +2765,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), generateSampleMessage(new protos.google.cloud.osconfig.v1.Inventory()), @@ -2670,11 +2789,12 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listInventories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listInventories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2688,8 +2808,11 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listInventories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2706,11 +2829,12 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listInventories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listInventories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2726,15 +2850,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.VulnerabilityReport() @@ -2750,11 +2871,14 @@ describe('v1.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listVulnerabilityReports(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listVulnerabilityReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listVulnerabilityReports without error using callback', async () => { @@ -2767,15 +2891,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.VulnerabilityReport() @@ -2808,11 +2929,14 @@ describe('v1.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listVulnerabilityReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listVulnerabilityReports with error', async () => { @@ -2825,15 +2949,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listVulnerabilityReports = stubSimpleCall( undefined, @@ -2843,11 +2964,14 @@ describe('v1.OsConfigZonalServiceClient', () => { client.listVulnerabilityReports(request), expectedError ); - assert( - (client.innerApiCalls.listVulnerabilityReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listVulnerabilityReportsStream without error', async () => { @@ -2860,8 +2984,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.VulnerabilityReport() @@ -2902,12 +3030,15 @@ describe('v1.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listVulnerabilityReports, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listVulnerabilityReports .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2921,8 +3052,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listVulnerabilityReports.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2952,12 +3087,15 @@ describe('v1.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listVulnerabilityReports, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listVulnerabilityReports .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2971,8 +3109,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1.VulnerabilityReport() @@ -3000,12 +3142,15 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listVulnerabilityReports .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3019,8 +3164,12 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listVulnerabilityReports.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -3039,12 +3188,15 @@ describe('v1.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listVulnerabilityReports .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts index 58344212167..962d2bcead3 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -265,15 +280,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() ); @@ -281,11 +293,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getOSPolicyAssignment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignment without error using callback', async () => { @@ -298,15 +313,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() ); @@ -329,11 +341,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignment with error', async () => { @@ -346,15 +361,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getOsPolicyAssignment = stubSimpleCall( undefined, @@ -364,11 +376,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.getOSPolicyAssignment(request), expectedError ); - assert( - (client.innerApiCalls.getOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignment with closed client', async () => { @@ -381,7 +396,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -403,15 +422,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetInstanceOSPoliciesComplianceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() ); @@ -420,11 +436,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [response] = await client.getInstanceOSPoliciesCompliance(request); assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInstanceOSPoliciesCompliance without error using callback', async () => { @@ -438,15 +457,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetInstanceOSPoliciesComplianceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() ); @@ -470,11 +486,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const response = await promise; assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInstanceOSPoliciesCompliance with error', async () => { @@ -488,15 +507,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetInstanceOSPoliciesComplianceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getInstanceOsPoliciesCompliance = stubSimpleCall( undefined, @@ -507,11 +523,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert(stub.calledOnce); - assert( - (client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInstanceOsPoliciesCompliance as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInstanceOSPoliciesCompliance with closed client', async () => { @@ -525,7 +544,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetInstanceOSPoliciesComplianceRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -547,15 +570,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() ); @@ -563,11 +583,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getOSPolicyAssignmentReport(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignmentReport without error using callback', async () => { @@ -580,15 +603,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() ); @@ -611,11 +631,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignmentReport with error', async () => { @@ -628,15 +651,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getOsPolicyAssignmentReport = stubSimpleCall( undefined, @@ -646,11 +666,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.getOSPolicyAssignmentReport(request), expectedError ); - assert( - (client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOsPolicyAssignmentReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getOSPolicyAssignmentReport with closed client', async () => { @@ -663,7 +686,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetOSPolicyAssignmentReportRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -684,26 +711,25 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.Inventory() ); client.innerApiCalls.getInventory = stubSimpleCall(expectedResponse); const [response] = await client.getInventory(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getInventory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInventory without error using callback', async () => { @@ -716,15 +742,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.Inventory() ); @@ -747,11 +769,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getInventory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInventory with error', async () => { @@ -764,26 +789,25 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getInventory = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getInventory(request), expectedError); - assert( - (client.innerApiCalls.getInventory as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInventory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getInventory with closed client', async () => { @@ -796,7 +820,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getInventory(request), expectedError); @@ -814,15 +841,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetVulnerabilityReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() ); @@ -830,11 +854,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getVulnerabilityReport(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getVulnerabilityReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getVulnerabilityReport without error using callback', async () => { @@ -847,15 +874,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetVulnerabilityReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() ); @@ -878,11 +902,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getVulnerabilityReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getVulnerabilityReport with error', async () => { @@ -895,15 +922,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetVulnerabilityReportRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getVulnerabilityReport = stubSimpleCall( undefined, @@ -913,11 +937,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.getVulnerabilityReport(request), expectedError ); - assert( - (client.innerApiCalls.getVulnerabilityReport as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVulnerabilityReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getVulnerabilityReport with closed client', async () => { @@ -930,7 +957,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetVulnerabilityReportRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -951,15 +982,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateOSPolicyAssignmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -968,11 +996,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [operation] = await client.createOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createOSPolicyAssignment without error using callback', async () => { @@ -985,15 +1016,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateOSPolicyAssignmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1023,11 +1051,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createOSPolicyAssignment with call error', async () => { @@ -1040,15 +1071,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateOSPolicyAssignmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1058,11 +1086,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.createOSPolicyAssignment(request), expectedError ); - assert( - (client.innerApiCalls.createOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createOSPolicyAssignment with LRO error', async () => { @@ -1075,15 +1106,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateOSPolicyAssignmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1092,11 +1120,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); const [operation] = await client.createOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateOSPolicyAssignmentProgress without error', async () => { @@ -1155,16 +1186,13 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() ); - request.osPolicyAssignment = {}; - request.osPolicyAssignment.name = ''; - const expectedHeaderRequestParams = 'os_policy_assignment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.osPolicyAssignment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateOSPolicyAssignmentRequest', + ['osPolicyAssignment', 'name'] + ); + request.osPolicyAssignment.name = defaultValue1; + const expectedHeaderRequestParams = `os_policy_assignment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1173,11 +1201,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [operation] = await client.updateOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateOSPolicyAssignment without error using callback', async () => { @@ -1190,16 +1221,13 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() ); - request.osPolicyAssignment = {}; - request.osPolicyAssignment.name = ''; - const expectedHeaderRequestParams = 'os_policy_assignment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.osPolicyAssignment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateOSPolicyAssignmentRequest', + ['osPolicyAssignment', 'name'] + ); + request.osPolicyAssignment.name = defaultValue1; + const expectedHeaderRequestParams = `os_policy_assignment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1229,11 +1257,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateOSPolicyAssignment with call error', async () => { @@ -1246,16 +1277,13 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() ); - request.osPolicyAssignment = {}; - request.osPolicyAssignment.name = ''; - const expectedHeaderRequestParams = 'os_policy_assignment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.osPolicyAssignment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateOSPolicyAssignmentRequest', + ['osPolicyAssignment', 'name'] + ); + request.osPolicyAssignment.name = defaultValue1; + const expectedHeaderRequestParams = `os_policy_assignment.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1265,11 +1293,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.updateOSPolicyAssignment(request), expectedError ); - assert( - (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateOSPolicyAssignment with LRO error', async () => { @@ -1282,16 +1313,13 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() ); - request.osPolicyAssignment = {}; - request.osPolicyAssignment.name = ''; - const expectedHeaderRequestParams = 'os_policy_assignment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.osPolicyAssignment ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateOSPolicyAssignmentRequest', + ['osPolicyAssignment', 'name'] + ); + request.osPolicyAssignment.name = defaultValue1; + const expectedHeaderRequestParams = `os_policy_assignment.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1300,11 +1328,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); const [operation] = await client.updateOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateOSPolicyAssignmentProgress without error', async () => { @@ -1363,15 +1394,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1380,11 +1408,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const [operation] = await client.deleteOSPolicyAssignment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteOSPolicyAssignment without error using callback', async () => { @@ -1397,15 +1428,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1435,11 +1463,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteOSPolicyAssignment with call error', async () => { @@ -1452,15 +1483,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1470,11 +1498,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.deleteOSPolicyAssignment(request), expectedError ); - assert( - (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteOSPolicyAssignment with LRO error', async () => { @@ -1487,15 +1518,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteOSPolicyAssignmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteOsPolicyAssignment = stubLongRunningCall( undefined, @@ -1504,11 +1532,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); const [operation] = await client.deleteOSPolicyAssignment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteOsPolicyAssignment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteOsPolicyAssignment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteOSPolicyAssignmentProgress without error', async () => { @@ -1567,15 +1598,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() @@ -1591,11 +1619,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignments(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignments without error using callback', async () => { @@ -1608,15 +1639,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() @@ -1649,11 +1677,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignments with error', async () => { @@ -1666,15 +1697,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listOsPolicyAssignments = stubSimpleCall( undefined, @@ -1684,11 +1712,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.listOSPolicyAssignments(request), expectedError ); - assert( - (client.innerApiCalls.listOsPolicyAssignments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentsStream without error', async () => { @@ -1701,8 +1732,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() @@ -1745,12 +1780,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listOsPolicyAssignments, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignments .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1764,8 +1802,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignments.createStream = stubPageStreamingCall(undefined, expectedError); @@ -1797,12 +1839,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listOsPolicyAssignments, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignments .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1816,8 +1861,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() @@ -1845,12 +1894,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignments .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1864,8 +1916,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1884,12 +1940,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignments .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -1905,15 +1964,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() @@ -1929,11 +1985,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignmentRevisions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentRevisions without error using callback', async () => { @@ -1946,15 +2005,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() @@ -1987,11 +2043,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentRevisions with error', async () => { @@ -2004,15 +2063,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listOsPolicyAssignmentRevisions = stubSimpleCall( undefined, @@ -2022,11 +2078,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.listOSPolicyAssignmentRevisions(request), expectedError ); - assert( - (client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentRevisionsStream without error', async () => { @@ -2039,8 +2098,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() @@ -2086,12 +2149,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentRevisions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2105,8 +2171,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignmentRevisions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2141,12 +2211,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentRevisions .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2160,8 +2233,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignment() @@ -2189,12 +2266,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentRevisions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2208,8 +2288,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2228,12 +2312,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentRevisions .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2250,15 +2337,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListInstanceOSPoliciesCompliancesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() @@ -2277,11 +2361,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listInstanceOSPoliciesCompliances without error using callback', async () => { @@ -2295,15 +2382,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListInstanceOSPoliciesCompliancesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() @@ -2337,11 +2421,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const response = await promise; assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listInstanceOSPoliciesCompliances with error', async () => { @@ -2355,15 +2442,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListInstanceOSPoliciesCompliancesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listInstanceOsPoliciesCompliances = stubSimpleCall( undefined, @@ -2374,11 +2458,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { expectedError ); assert(stub.calledOnce); - assert( - (client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInstanceOsPoliciesCompliances as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listInstanceOSPoliciesCompliancesStream without error', async () => { @@ -2392,8 +2479,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListInstanceOSPoliciesCompliancesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() @@ -2440,12 +2531,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listInstanceOSPoliciesCompliances .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2460,8 +2554,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListInstanceOSPoliciesCompliancesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listInstanceOSPoliciesCompliances.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2497,12 +2595,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listInstanceOSPoliciesCompliances .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2517,8 +2618,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListInstanceOSPoliciesCompliancesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance() @@ -2547,12 +2652,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listInstanceOSPoliciesCompliances .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2567,8 +2675,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListInstanceOSPoliciesCompliancesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listInstanceOSPoliciesCompliances.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2588,12 +2700,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listInstanceOSPoliciesCompliances .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2609,15 +2724,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() @@ -2633,11 +2745,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listOSPolicyAssignmentReports(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentReports without error using callback', async () => { @@ -2650,15 +2765,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() @@ -2691,11 +2803,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentReports with error', async () => { @@ -2708,15 +2823,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listOsPolicyAssignmentReports = stubSimpleCall( undefined, @@ -2726,11 +2838,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.listOSPolicyAssignmentReports(request), expectedError ); - assert( - (client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listOsPolicyAssignmentReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listOSPolicyAssignmentReportsStream without error', async () => { @@ -2743,8 +2858,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() @@ -2790,12 +2909,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentReports .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2809,8 +2931,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignmentReports.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2845,12 +2971,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentReports .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2864,8 +2993,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport() @@ -2893,12 +3026,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentReports .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2912,8 +3048,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListOSPolicyAssignmentReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listOSPolicyAssignmentReports.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2932,12 +3072,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listOSPolicyAssignmentReports .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2953,15 +3096,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.Inventory() @@ -2976,11 +3115,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.innerApiCalls.listInventories = stubSimpleCall(expectedResponse); const [response] = await client.listInventories(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listInventories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listInventories without error using callback', async () => { @@ -2993,15 +3135,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.Inventory() @@ -3032,11 +3170,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listInventories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listInventories with error', async () => { @@ -3049,26 +3190,25 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listInventories = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listInventories(request), expectedError); - assert( - (client.innerApiCalls.listInventories as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInventories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listInventoriesStream without error', async () => { @@ -3081,8 +3221,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.Inventory() @@ -3119,11 +3262,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listInventories, request) ); - assert.strictEqual( - ( - client.descriptors.page.listInventories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listInventories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3137,8 +3281,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listInventories.createStream = stubPageStreamingCall(undefined, expectedError); @@ -3164,11 +3311,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listInventories, request) ); - assert.strictEqual( - ( - client.descriptors.page.listInventories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listInventories.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3182,8 +3330,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.Inventory() @@ -3209,11 +3360,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listInventories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listInventories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3227,8 +3379,11 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listInventories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -3245,11 +3400,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listInventories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listInventories.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -3265,15 +3421,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() @@ -3289,11 +3442,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listVulnerabilityReports(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listVulnerabilityReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listVulnerabilityReports without error using callback', async () => { @@ -3306,15 +3462,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() @@ -3347,11 +3500,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listVulnerabilityReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listVulnerabilityReports with error', async () => { @@ -3364,15 +3520,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listVulnerabilityReports = stubSimpleCall( undefined, @@ -3382,11 +3535,14 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { client.listVulnerabilityReports(request), expectedError ); - assert( - (client.innerApiCalls.listVulnerabilityReports as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVulnerabilityReports as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listVulnerabilityReportsStream without error', async () => { @@ -3399,8 +3555,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() @@ -3443,12 +3603,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listVulnerabilityReports, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listVulnerabilityReports .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3462,8 +3625,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listVulnerabilityReports.createStream = stubPageStreamingCall(undefined, expectedError); @@ -3495,12 +3662,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listVulnerabilityReports, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listVulnerabilityReports .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3514,8 +3684,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.VulnerabilityReport() @@ -3543,12 +3717,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listVulnerabilityReports .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3562,8 +3739,12 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListVulnerabilityReportsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listVulnerabilityReports.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -3582,12 +3763,15 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listVulnerabilityReports .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From 5947a27cce2294b0e0be26dd5883c594194cb304 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 14:50:40 -0700 Subject: [PATCH 145/154] build: use fully qualified request type name in tests (#224) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: https://github.com/googleapis/googleapis/commit/7a129736313ceb1f277c3b7f7e16d2e04cc901dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../test/gapic_os_config_service_v1.ts | 276 ++++++++++-------- .../test/gapic_os_config_zonal_service_v1.ts | 181 ++++++------ .../gapic_os_config_zonal_service_v1alpha.ts | 203 +++++++------ 3 files changed, 362 insertions(+), 298 deletions(-) diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index 5cea4423038..0c0ee2cfe1b 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -237,9 +237,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('ExecutePatchJobRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ExecutePatchJobRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -267,9 +268,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('ExecutePatchJobRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ExecutePatchJobRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -313,9 +315,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('ExecutePatchJobRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ExecutePatchJobRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -343,9 +346,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('ExecutePatchJobRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ExecutePatchJobRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -363,7 +367,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('GetPatchJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetPatchJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -391,7 +398,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('GetPatchJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetPatchJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -435,7 +445,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('GetPatchJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetPatchJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -463,7 +476,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('GetPatchJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetPatchJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -481,9 +497,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('CancelPatchJobRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.CancelPatchJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -511,9 +528,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('CancelPatchJobRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.CancelPatchJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -557,9 +575,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('CancelPatchJobRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.CancelPatchJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -587,9 +606,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); - const defaultValue1 = getTypeDefaultValue('CancelPatchJobRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.CancelPatchJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -608,7 +628,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreatePatchDeploymentRequest', + '.google.cloud.osconfig.v1.CreatePatchDeploymentRequest', ['parent'] ); request.parent = defaultValue1; @@ -640,7 +660,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreatePatchDeploymentRequest', + '.google.cloud.osconfig.v1.CreatePatchDeploymentRequest', ['parent'] ); request.parent = defaultValue1; @@ -687,7 +707,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreatePatchDeploymentRequest', + '.google.cloud.osconfig.v1.CreatePatchDeploymentRequest', ['parent'] ); request.parent = defaultValue1; @@ -721,7 +741,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreatePatchDeploymentRequest', + '.google.cloud.osconfig.v1.CreatePatchDeploymentRequest', ['parent'] ); request.parent = defaultValue1; @@ -744,9 +764,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetPatchDeploymentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetPatchDeploymentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -775,9 +796,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetPatchDeploymentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetPatchDeploymentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -821,9 +843,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetPatchDeploymentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetPatchDeploymentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -851,9 +874,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); - const defaultValue1 = getTypeDefaultValue('GetPatchDeploymentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetPatchDeploymentRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -872,7 +896,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeletePatchDeploymentRequest', + '.google.cloud.osconfig.v1.DeletePatchDeploymentRequest', ['name'] ); request.name = defaultValue1; @@ -904,7 +928,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeletePatchDeploymentRequest', + '.google.cloud.osconfig.v1.DeletePatchDeploymentRequest', ['name'] ); request.name = defaultValue1; @@ -951,7 +975,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeletePatchDeploymentRequest', + '.google.cloud.osconfig.v1.DeletePatchDeploymentRequest', ['name'] ); request.name = defaultValue1; @@ -985,7 +1009,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeletePatchDeploymentRequest', + '.google.cloud.osconfig.v1.DeletePatchDeploymentRequest', ['name'] ); request.name = defaultValue1; @@ -1010,7 +1034,7 @@ describe('v1.OsConfigServiceClient', () => { ); request.patchDeployment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdatePatchDeploymentRequest', + '.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest', ['patchDeployment', 'name'] ); request.patchDeployment.name = defaultValue1; @@ -1043,7 +1067,7 @@ describe('v1.OsConfigServiceClient', () => { ); request.patchDeployment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdatePatchDeploymentRequest', + '.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest', ['patchDeployment', 'name'] ); request.patchDeployment.name = defaultValue1; @@ -1091,7 +1115,7 @@ describe('v1.OsConfigServiceClient', () => { ); request.patchDeployment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdatePatchDeploymentRequest', + '.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest', ['patchDeployment', 'name'] ); request.patchDeployment.name = defaultValue1; @@ -1126,7 +1150,7 @@ describe('v1.OsConfigServiceClient', () => { ); request.patchDeployment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdatePatchDeploymentRequest', + '.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest', ['patchDeployment', 'name'] ); request.patchDeployment.name = defaultValue1; @@ -1149,9 +1173,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); - const defaultValue1 = getTypeDefaultValue('PausePatchDeploymentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.PausePatchDeploymentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1180,9 +1205,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); - const defaultValue1 = getTypeDefaultValue('PausePatchDeploymentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.PausePatchDeploymentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1226,9 +1252,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); - const defaultValue1 = getTypeDefaultValue('PausePatchDeploymentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.PausePatchDeploymentRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1256,9 +1283,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); - const defaultValue1 = getTypeDefaultValue('PausePatchDeploymentRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.PausePatchDeploymentRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1277,7 +1305,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResumePatchDeploymentRequest', + '.google.cloud.osconfig.v1.ResumePatchDeploymentRequest', ['name'] ); request.name = defaultValue1; @@ -1309,7 +1337,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResumePatchDeploymentRequest', + '.google.cloud.osconfig.v1.ResumePatchDeploymentRequest', ['name'] ); request.name = defaultValue1; @@ -1356,7 +1384,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResumePatchDeploymentRequest', + '.google.cloud.osconfig.v1.ResumePatchDeploymentRequest', ['name'] ); request.name = defaultValue1; @@ -1390,7 +1418,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ResumePatchDeploymentRequest', + '.google.cloud.osconfig.v1.ResumePatchDeploymentRequest', ['name'] ); request.name = defaultValue1; @@ -1413,9 +1441,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1445,9 +1474,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1493,9 +1523,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1523,9 +1554,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1576,9 +1608,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1624,9 +1657,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1666,9 +1700,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchJobsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1708,7 +1743,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListPatchJobInstanceDetailsRequest', + '.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1748,7 +1783,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListPatchJobInstanceDetailsRequest', + '.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1805,7 +1840,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListPatchJobInstanceDetailsRequest', + '.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1839,7 +1874,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListPatchJobInstanceDetailsRequest', + '.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1908,7 +1943,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListPatchJobInstanceDetailsRequest', + '.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1966,7 +2001,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListPatchJobInstanceDetailsRequest', + '.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2020,7 +2055,7 @@ describe('v1.OsConfigServiceClient', () => { new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListPatchJobInstanceDetailsRequest', + '.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2066,9 +2101,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchDeploymentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2105,9 +2141,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchDeploymentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2159,9 +2196,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchDeploymentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2189,9 +2227,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchDeploymentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2248,9 +2287,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchDeploymentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2296,9 +2336,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchDeploymentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2344,9 +2385,10 @@ describe('v1.OsConfigServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListPatchDeploymentsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListPatchDeploymentsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts index 3a5559518c4..0471e7989fb 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -279,7 +279,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -312,7 +312,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -360,7 +360,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -395,7 +395,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -420,7 +420,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentReportRequest', + '.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest', ['name'] ); request.name = defaultValue1; @@ -453,7 +453,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentReportRequest', + '.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest', ['name'] ); request.name = defaultValue1; @@ -501,7 +501,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentReportRequest', + '.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest', ['name'] ); request.name = defaultValue1; @@ -536,7 +536,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentReportRequest', + '.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest', ['name'] ); request.name = defaultValue1; @@ -560,9 +560,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetInventoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -591,9 +592,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetInventoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -638,9 +640,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetInventoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -669,9 +672,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.GetInventoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -691,7 +695,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetVulnerabilityReportRequest', + '.google.cloud.osconfig.v1.GetVulnerabilityReportRequest', ['name'] ); request.name = defaultValue1; @@ -724,7 +728,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetVulnerabilityReportRequest', + '.google.cloud.osconfig.v1.GetVulnerabilityReportRequest', ['name'] ); request.name = defaultValue1; @@ -772,7 +776,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetVulnerabilityReportRequest', + '.google.cloud.osconfig.v1.GetVulnerabilityReportRequest', ['name'] ); request.name = defaultValue1; @@ -807,7 +811,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetVulnerabilityReportRequest', + '.google.cloud.osconfig.v1.GetVulnerabilityReportRequest', ['name'] ); request.name = defaultValue1; @@ -832,7 +836,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest', ['parent'] ); request.parent = defaultValue1; @@ -866,7 +870,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest', ['parent'] ); request.parent = defaultValue1; @@ -921,7 +925,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest', ['parent'] ); request.parent = defaultValue1; @@ -956,7 +960,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest', ['parent'] ); request.parent = defaultValue1; @@ -1037,7 +1041,7 @@ describe('v1.OsConfigZonalServiceClient', () => { ); request.osPolicyAssignment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest', ['osPolicyAssignment', 'name'] ); request.osPolicyAssignment.name = defaultValue1; @@ -1072,7 +1076,7 @@ describe('v1.OsConfigZonalServiceClient', () => { ); request.osPolicyAssignment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest', ['osPolicyAssignment', 'name'] ); request.osPolicyAssignment.name = defaultValue1; @@ -1128,7 +1132,7 @@ describe('v1.OsConfigZonalServiceClient', () => { ); request.osPolicyAssignment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest', ['osPolicyAssignment', 'name'] ); request.osPolicyAssignment.name = defaultValue1; @@ -1164,7 +1168,7 @@ describe('v1.OsConfigZonalServiceClient', () => { ); request.osPolicyAssignment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest', ['osPolicyAssignment', 'name'] ); request.osPolicyAssignment.name = defaultValue1; @@ -1244,7 +1248,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -1278,7 +1282,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -1333,7 +1337,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -1368,7 +1372,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -1448,7 +1452,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1489,7 +1493,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1547,7 +1551,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1582,7 +1586,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1650,7 +1654,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1707,7 +1711,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1762,7 +1766,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1810,7 +1814,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -1851,7 +1855,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -1909,7 +1913,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -1944,7 +1948,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2015,7 +2019,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2075,7 +2079,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2130,7 +2134,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2178,7 +2182,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2219,7 +2223,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2277,7 +2281,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2312,7 +2316,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2385,7 +2389,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2447,7 +2451,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2502,7 +2506,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2549,9 +2553,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2582,9 +2587,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2631,9 +2637,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2662,9 +2669,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2716,9 +2724,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2765,9 +2774,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2808,9 +2818,10 @@ describe('v1.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2851,7 +2862,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2892,7 +2903,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2950,7 +2961,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2985,7 +2996,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3053,7 +3064,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3110,7 +3121,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3165,7 +3176,7 @@ describe('v1.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts index 962d2bcead3..ece81748ae0 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -281,7 +281,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -314,7 +314,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -362,7 +362,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -397,7 +397,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -423,7 +423,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetInstanceOSPoliciesComplianceRequest', + '.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest', ['name'] ); request.name = defaultValue1; @@ -458,7 +458,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetInstanceOSPoliciesComplianceRequest', + '.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest', ['name'] ); request.name = defaultValue1; @@ -508,7 +508,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetInstanceOSPoliciesComplianceRequest', + '.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest', ['name'] ); request.name = defaultValue1; @@ -545,7 +545,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetInstanceOSPoliciesComplianceRequest', + '.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest', ['name'] ); request.name = defaultValue1; @@ -571,7 +571,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentReportRequest', + '.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest', ['name'] ); request.name = defaultValue1; @@ -604,7 +604,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentReportRequest', + '.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest', ['name'] ); request.name = defaultValue1; @@ -652,7 +652,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentReportRequest', + '.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest', ['name'] ); request.name = defaultValue1; @@ -687,7 +687,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetOSPolicyAssignmentReportRequest', + '.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest', ['name'] ); request.name = defaultValue1; @@ -711,9 +711,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.GetInventoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -742,9 +743,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.GetInventoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -789,9 +791,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.GetInventoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -820,9 +823,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); - const defaultValue1 = getTypeDefaultValue('GetInventoryRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.GetInventoryRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -842,7 +846,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetVulnerabilityReportRequest', + '.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest', ['name'] ); request.name = defaultValue1; @@ -875,7 +879,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetVulnerabilityReportRequest', + '.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest', ['name'] ); request.name = defaultValue1; @@ -923,7 +927,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetVulnerabilityReportRequest', + '.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest', ['name'] ); request.name = defaultValue1; @@ -958,7 +962,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetVulnerabilityReportRequest', + '.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest', ['name'] ); request.name = defaultValue1; @@ -983,7 +987,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest', ['parent'] ); request.parent = defaultValue1; @@ -1017,7 +1021,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest', ['parent'] ); request.parent = defaultValue1; @@ -1072,7 +1076,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest', ['parent'] ); request.parent = defaultValue1; @@ -1107,7 +1111,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest', ['parent'] ); request.parent = defaultValue1; @@ -1188,7 +1192,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); request.osPolicyAssignment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest', ['osPolicyAssignment', 'name'] ); request.osPolicyAssignment.name = defaultValue1; @@ -1223,7 +1227,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); request.osPolicyAssignment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest', ['osPolicyAssignment', 'name'] ); request.osPolicyAssignment.name = defaultValue1; @@ -1279,7 +1283,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); request.osPolicyAssignment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest', ['osPolicyAssignment', 'name'] ); request.osPolicyAssignment.name = defaultValue1; @@ -1315,7 +1319,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { ); request.osPolicyAssignment ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest', ['osPolicyAssignment', 'name'] ); request.osPolicyAssignment.name = defaultValue1; @@ -1395,7 +1399,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -1429,7 +1433,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -1484,7 +1488,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -1519,7 +1523,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteOSPolicyAssignmentRequest', + '.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest', ['name'] ); request.name = defaultValue1; @@ -1599,7 +1603,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1640,7 +1644,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1698,7 +1702,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1733,7 +1737,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1803,7 +1807,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1862,7 +1866,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1917,7 +1921,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest', ['parent'] ); request.parent = defaultValue1; @@ -1965,7 +1969,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2006,7 +2010,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2064,7 +2068,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2099,7 +2103,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2172,7 +2176,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2234,7 +2238,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2289,7 +2293,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentRevisionsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest', ['name'] ); request.name = defaultValue1; @@ -2338,7 +2342,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListInstanceOSPoliciesCompliancesRequest', + '.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2383,7 +2387,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListInstanceOSPoliciesCompliancesRequest', + '.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2443,7 +2447,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListInstanceOSPoliciesCompliancesRequest', + '.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2480,7 +2484,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListInstanceOSPoliciesCompliancesRequest', + '.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2555,7 +2559,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListInstanceOSPoliciesCompliancesRequest', + '.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2619,7 +2623,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListInstanceOSPoliciesCompliancesRequest', + '.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2676,7 +2680,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListInstanceOSPoliciesCompliancesRequest', + '.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2725,7 +2729,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2766,7 +2770,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2824,7 +2828,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2859,7 +2863,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2932,7 +2936,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -2994,7 +2998,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3049,7 +3053,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListOSPolicyAssignmentReportsRequest', + '.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3096,9 +3100,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3135,9 +3140,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3190,9 +3196,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3221,9 +3228,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3281,9 +3289,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3330,9 +3339,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3379,9 +3389,10 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListInventoriesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.osconfig.v1alpha.ListInventoriesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3422,7 +3433,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3463,7 +3474,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3521,7 +3532,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3556,7 +3567,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3626,7 +3637,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3685,7 +3696,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3740,7 +3751,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListVulnerabilityReportsRequest', + '.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest', ['parent'] ); request.parent = defaultValue1; From c8f5fd9205b2594760d38e8671c13299d7dce6ab Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 3 Nov 2022 23:43:55 -0700 Subject: [PATCH 146/154] fix(deps): use google-gax v3.5.2 (#228) --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 24b169926fc..223a1d99a43 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -27,7 +27,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^3.3.0" + "google-gax": "^3.5.2" }, "devDependencies": { "@types/mocha": "^9.0.0", From a97a6f076c38c448352de3ce3c0b47f18a8b4612 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:24:32 +0100 Subject: [PATCH 147/154] chore(deps): update dependency @types/node to v18 (#226) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`^16.0.0` -> `^18.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/16.18.3/18.11.9) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/compatibility-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/confidence-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 223a1d99a43..9c46ff18b8a 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/mocha": "^9.0.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/sinon": "^10.0.0", "c8": "^7.1.2", "gts": "^3.1.0", From 53aea4eef99c70e4181f1621d3a088793deb228d Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 11:06:20 +0100 Subject: [PATCH 148/154] chore(deps): update dependency jsdoc to v4 (#230) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc](https://togithub.com/jsdoc/jsdoc) | [`^3.6.4` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
jsdoc/jsdoc ### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#​400-November-2022) [Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28) - JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes backwards-incompatible changes in the future, the major version will be incremented. - JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or plugin uses the `taffydb` package, see the [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template). - JSDoc now supports Node.js 12.0.0 and later.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-os-config). --- packages/google-cloud-osconfig/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 9c46ff18b8a..d98e8cd01f3 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -35,7 +35,7 @@ "@types/sinon": "^10.0.0", "c8": "^7.1.2", "gts": "^3.1.0", - "jsdoc": "^3.6.4", + "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", From bcc24fc7e4ceff227c0bea5483f58c5ff6b04cd5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 01:46:17 +0000 Subject: [PATCH 149/154] fix: regenerated protos JS and TS definitions (#231) samples: pull in latest typeless bot, clean up some comments Source-Link: https://togithub.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e --- .../google-cloud-osconfig/protos/protos.d.ts | 2 +- .../google-cloud-osconfig/protos/protos.js | 570 +++++++++++++++--- 2 files changed, 499 insertions(+), 73 deletions(-) diff --git a/packages/google-cloud-osconfig/protos/protos.d.ts b/packages/google-cloud-osconfig/protos/protos.d.ts index 0e554bf01c3..bad4c5cc71d 100644 --- a/packages/google-cloud-osconfig/protos/protos.d.ts +++ b/packages/google-cloud-osconfig/protos/protos.d.ts @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import Long = require("long"); import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-osconfig/protos/protos.js b/packages/google-cloud-osconfig/protos/protos.js index d6770fea54d..89b549dccc9 100644 --- a/packages/google-cloud-osconfig/protos/protos.js +++ b/packages/google-cloud-osconfig/protos/protos.js @@ -1056,6 +1056,12 @@ if (object.id != null) message.id = String(object.id); switch (object.originType) { + default: + if (typeof object.originType === "number") { + message.originType = object.originType; + break; + } + break; case "ORIGIN_TYPE_UNSPECIFIED": case 0: message.originType = 0; @@ -1076,6 +1082,12 @@ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -1125,9 +1137,9 @@ if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.originType != null && message.hasOwnProperty("originType")) - object.originType = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.OriginType[message.originType] : message.originType; + object.originType = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.OriginType[message.originType] === undefined ? message.originType : $root.google.cloud.osconfig.v1.Inventory.Item.OriginType[message.originType] : message.originType; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.osconfig.v1.Inventory.Item.Type[message.type] === undefined ? message.type : $root.google.cloud.osconfig.v1.Inventory.Item.Type[message.type] : message.type; if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { object.installedPackage = $root.google.cloud.osconfig.v1.Inventory.SoftwarePackage.toObject(message.installedPackage, options); if (options.oneofs) @@ -3667,6 +3679,12 @@ if (object.name != null) message.name = String(object.name); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "INVENTORY_VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -3703,7 +3721,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.osconfig.v1.InventoryView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.osconfig.v1.InventoryView[message.view] === undefined ? message.view : $root.google.cloud.osconfig.v1.InventoryView[message.view] : message.view; return object; }; @@ -3966,6 +3984,12 @@ if (object.parent != null) message.parent = String(object.parent); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "INVENTORY_VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -4011,7 +4035,7 @@ if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.osconfig.v1.InventoryView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.osconfig.v1.InventoryView[message.view] === undefined ? message.view : $root.google.cloud.osconfig.v1.InventoryView[message.view] : message.view; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -4556,6 +4580,12 @@ if (object.description != null) message.description = String(object.description); switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; case "MODE_UNSPECIFIED": case 0: message.mode = 0; @@ -4610,7 +4640,7 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Mode[message.mode] : message.mode; + object.mode = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.osconfig.v1.OSPolicy.Mode[message.mode] : message.mode; if (message.resourceGroups && message.resourceGroups.length) { object.resourceGroups = []; for (var j = 0; j < message.resourceGroups.length; ++j) @@ -6393,6 +6423,12 @@ return object; var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource(); switch (object.desiredState) { + default: + if (typeof object.desiredState === "number") { + message.desiredState = object.desiredState; + break; + } + break; case "DESIRED_STATE_UNSPECIFIED": case 0: message.desiredState = 0; @@ -6460,7 +6496,7 @@ if (options.defaults) object.desiredState = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; if (message.desiredState != null && message.hasOwnProperty("desiredState")) - object.desiredState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] : message.desiredState; + object.desiredState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] === undefined ? message.desiredState : $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] : message.desiredState; if (message.apt != null && message.hasOwnProperty("apt")) { object.apt = $root.google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT.toObject(message.apt, options); if (options.oneofs) @@ -8633,6 +8669,12 @@ return object; var message = new $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository(); switch (object.archiveType) { + default: + if (typeof object.archiveType === "number") { + message.archiveType = object.archiveType; + break; + } + break; case "ARCHIVE_TYPE_UNSPECIFIED": case 0: message.archiveType = 0; @@ -8684,7 +8726,7 @@ object.gpgKey = ""; } if (message.archiveType != null && message.hasOwnProperty("archiveType")) - object.archiveType = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] : message.archiveType; + object.archiveType = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] === undefined ? message.archiveType : $root.google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] : message.archiveType; if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; if (message.distribution != null && message.hasOwnProperty("distribution")) @@ -10063,6 +10105,12 @@ message.args[i] = String(object.args[i]); } switch (object.interpreter) { + default: + if (typeof object.interpreter === "number") { + message.interpreter = object.interpreter; + break; + } + break; case "INTERPRETER_UNSPECIFIED": case 0: message.interpreter = 0; @@ -10120,7 +10168,7 @@ object.args[j] = message.args[j]; } if (message.interpreter != null && message.hasOwnProperty("interpreter")) - object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] : message.interpreter; + object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] === undefined ? message.interpreter : $root.google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] : message.interpreter; if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) object.outputFilePath = message.outputFilePath; return object; @@ -10438,6 +10486,12 @@ if (object.path != null) message.path = String(object.path); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "DESIRED_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -10491,7 +10545,7 @@ if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState[message.state] === undefined ? message.state : $root.google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState[message.state] : message.state; if (message.permissions != null && message.hasOwnProperty("permissions")) object.permissions = message.permissions; return object; @@ -12108,6 +12162,12 @@ if (object.osPolicyId != null) message.osPolicyId = String(object.osPolicyId); switch (object.complianceState) { + default: + if (typeof object.complianceState === "number") { + message.complianceState = object.complianceState; + break; + } + break; case "UNKNOWN": case 0: message.complianceState = 0; @@ -12159,7 +12219,7 @@ if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) object.osPolicyId = message.osPolicyId; if (message.complianceState != null && message.hasOwnProperty("complianceState")) - object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState[message.complianceState] : message.complianceState; + object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState[message.complianceState] : message.complianceState; if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) object.complianceStateReason = message.complianceStateReason; if (message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length) { @@ -12482,6 +12542,12 @@ } } switch (object.complianceState) { + default: + if (typeof object.complianceState === "number") { + message.complianceState = object.complianceState; + break; + } + break; case "UNKNOWN": case 0: message.complianceState = 0; @@ -12533,7 +12599,7 @@ object.configSteps[j] = $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.toObject(message.configSteps[j], options); } if (message.complianceState != null && message.hasOwnProperty("complianceState")) - object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState[message.complianceState] : message.complianceState; + object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState[message.complianceState] : message.complianceState; if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) object.complianceStateReason = message.complianceStateReason; if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { @@ -12746,6 +12812,12 @@ return object; var message = new $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -12790,7 +12862,7 @@ object.errorMessage = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type[message.type] === undefined ? message.type : $root.google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type[message.type] : message.type; if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) object.errorMessage = message.errorMessage; return object; @@ -13505,6 +13577,12 @@ if (object.etag != null) message.etag = String(object.etag); switch (object.rolloutState) { + default: + if (typeof object.rolloutState === "number") { + message.rolloutState = object.rolloutState; + break; + } + break; case "ROLLOUT_STATE_UNSPECIFIED": case 0: message.rolloutState = 0; @@ -13586,7 +13664,7 @@ if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState[message.rolloutState] === undefined ? message.rolloutState : $root.google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; if (message.baseline != null && message.hasOwnProperty("baseline")) object.baseline = message.baseline; if (message.deleted != null && message.hasOwnProperty("deleted")) @@ -14929,6 +15007,12 @@ if (object.osPolicyAssignment != null) message.osPolicyAssignment = String(object.osPolicyAssignment); switch (object.apiMethod) { + default: + if (typeof object.apiMethod === "number") { + message.apiMethod = object.apiMethod; + break; + } + break; case "API_METHOD_UNSPECIFIED": case 0: message.apiMethod = 0; @@ -14947,6 +15031,12 @@ break; } switch (object.rolloutState) { + default: + if (typeof object.rolloutState === "number") { + message.rolloutState = object.rolloutState; + break; + } + break; case "ROLLOUT_STATE_UNSPECIFIED": case 0: message.rolloutState = 0; @@ -15004,9 +15094,9 @@ if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) object.osPolicyAssignment = message.osPolicyAssignment; if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) - object.apiMethod = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] : message.apiMethod; + object.apiMethod = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] === undefined ? message.apiMethod : $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] : message.apiMethod; if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] : message.rolloutState; + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] === undefined ? message.rolloutState : $root.google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] : message.rolloutState; if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) object.rolloutStartTime = $root.google.protobuf.Timestamp.toObject(message.rolloutStartTime, options); if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) @@ -18100,6 +18190,12 @@ message.rollout = $root.google.cloud.osconfig.v1.PatchRollout.fromObject(object.rollout); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -18170,7 +18266,7 @@ if (message.rollout != null && message.hasOwnProperty("rollout")) object.rollout = $root.google.cloud.osconfig.v1.PatchRollout.toObject(message.rollout, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchDeployment.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchDeployment.State[message.state] === undefined ? message.state : $root.google.cloud.osconfig.v1.PatchDeployment.State[message.state] : message.state; return object; }; @@ -18787,6 +18883,12 @@ message.timeOfDay = $root.google.type.TimeOfDay.fromObject(object.timeOfDay); } switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; case "FREQUENCY_UNSPECIFIED": case 0: message.frequency = 0; @@ -18858,7 +18960,7 @@ if (message.timeOfDay != null && message.hasOwnProperty("timeOfDay")) object.timeOfDay = $root.google.type.TimeOfDay.toObject(message.timeOfDay, options); if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = options.enums === String ? $root.google.cloud.osconfig.v1.RecurringSchedule.Frequency[message.frequency] : message.frequency; + object.frequency = options.enums === String ? $root.google.cloud.osconfig.v1.RecurringSchedule.Frequency[message.frequency] === undefined ? message.frequency : $root.google.cloud.osconfig.v1.RecurringSchedule.Frequency[message.frequency] : message.frequency; if (message.weekly != null && message.hasOwnProperty("weekly")) { object.weekly = $root.google.cloud.osconfig.v1.WeeklySchedule.toObject(message.weekly, options); if (options.oneofs) @@ -19084,6 +19186,12 @@ return object; var message = new $root.google.cloud.osconfig.v1.WeeklySchedule(); switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; case "DAY_OF_WEEK_UNSPECIFIED": case 0: message.dayOfWeek = 0; @@ -19136,7 +19244,7 @@ if (options.defaults) object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; return object; }; @@ -19624,6 +19732,12 @@ if (object.weekOrdinal != null) message.weekOrdinal = object.weekOrdinal | 0; switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; case "DAY_OF_WEEK_UNSPECIFIED": case 0: message.dayOfWeek = 0; @@ -19683,7 +19797,7 @@ if (message.weekOrdinal != null && message.hasOwnProperty("weekOrdinal")) object.weekOrdinal = message.weekOrdinal; if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; if (message.dayOffset != null && message.hasOwnProperty("dayOffset")) object.dayOffset = message.dayOffset; return object; @@ -22874,6 +22988,12 @@ if (object.instanceSystemId != null) message.instanceSystemId = String(object.instanceSystemId); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "PATCH_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -22982,7 +23102,7 @@ if (message.instanceSystemId != null && message.hasOwnProperty("instanceSystemId")) object.instanceSystemId = message.instanceSystemId; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1.Instance.PatchState[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.Instance.PatchState[message.state] === undefined ? message.state : $root.google.cloud.osconfig.v1.Instance.PatchState[message.state] : message.state; if (message.failureReason != null && message.hasOwnProperty("failureReason")) object.failureReason = message.failureReason; if (message.attemptCount != null && message.hasOwnProperty("attemptCount")) @@ -23986,6 +24106,12 @@ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -24094,7 +24220,7 @@ if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchJob.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.osconfig.v1.PatchJob.State[message.state] === undefined ? message.state : $root.google.cloud.osconfig.v1.PatchJob.State[message.state] : message.state; if (message.patchConfig != null && message.hasOwnProperty("patchConfig")) object.patchConfig = $root.google.cloud.osconfig.v1.PatchConfig.toObject(message.patchConfig, options); if (message.duration != null && message.hasOwnProperty("duration")) @@ -25224,6 +25350,12 @@ return object; var message = new $root.google.cloud.osconfig.v1.PatchConfig(); switch (object.rebootConfig) { + default: + if (typeof object.rebootConfig === "number") { + message.rebootConfig = object.rebootConfig; + break; + } + break; case "REBOOT_CONFIG_UNSPECIFIED": case 0: message.rebootConfig = 0; @@ -25306,7 +25438,7 @@ object.migInstancesAllowed = false; } if (message.rebootConfig != null && message.hasOwnProperty("rebootConfig")) - object.rebootConfig = options.enums === String ? $root.google.cloud.osconfig.v1.PatchConfig.RebootConfig[message.rebootConfig] : message.rebootConfig; + object.rebootConfig = options.enums === String ? $root.google.cloud.osconfig.v1.PatchConfig.RebootConfig[message.rebootConfig] === undefined ? message.rebootConfig : $root.google.cloud.osconfig.v1.PatchConfig.RebootConfig[message.rebootConfig] : message.rebootConfig; if (message.apt != null && message.hasOwnProperty("apt")) object.apt = $root.google.cloud.osconfig.v1.AptSettings.toObject(message.apt, options); if (message.yum != null && message.hasOwnProperty("yum")) @@ -26001,6 +26133,12 @@ return object; var message = new $root.google.cloud.osconfig.v1.AptSettings(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -26051,7 +26189,7 @@ if (options.defaults) object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1.AptSettings.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.osconfig.v1.AptSettings.Type[message.type] === undefined ? message.type : $root.google.cloud.osconfig.v1.AptSettings.Type[message.type] : message.type; if (message.excludes && message.excludes.length) { object.excludes = []; for (var j = 0; j < message.excludes.length; ++j) @@ -27214,6 +27352,10 @@ for (var i = 0; i < object.classifications.length; ++i) switch (object.classifications[i]) { default: + if (typeof object.classifications[i] === "number") { + message.classifications[i] = object.classifications[i]; + break; + } case "CLASSIFICATION_UNSPECIFIED": case 0: message.classifications[i] = 0; @@ -27294,7 +27436,7 @@ if (message.classifications && message.classifications.length) { object.classifications = []; for (var j = 0; j < message.classifications.length; ++j) - object.classifications[j] = options.enums === String ? $root.google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[message.classifications[j]] : message.classifications[j]; + object.classifications[j] = options.enums === String ? $root.google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[message.classifications[j]] === undefined ? message.classifications[j] : $root.google.cloud.osconfig.v1.WindowsUpdateSettings.Classification[message.classifications[j]] : message.classifications[j]; } if (message.excludes && message.excludes.length) { object.excludes = []; @@ -27869,6 +28011,12 @@ message.allowedSuccessCodes[i] = object.allowedSuccessCodes[i] | 0; } switch (object.interpreter) { + default: + if (typeof object.interpreter === "number") { + message.interpreter = object.interpreter; + break; + } + break; case "INTERPRETER_UNSPECIFIED": case 0: message.interpreter = 0; @@ -27918,7 +28066,7 @@ object.allowedSuccessCodes[j] = message.allowedSuccessCodes[j]; } if (message.interpreter != null && message.hasOwnProperty("interpreter")) - object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.ExecStepConfig.Interpreter[message.interpreter] : message.interpreter; + object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1.ExecStepConfig.Interpreter[message.interpreter] === undefined ? message.interpreter : $root.google.cloud.osconfig.v1.ExecStepConfig.Interpreter[message.interpreter] : message.interpreter; return object; }; @@ -29011,6 +29159,12 @@ return object; var message = new $root.google.cloud.osconfig.v1.PatchRollout(); switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; case "MODE_UNSPECIFIED": case 0: message.mode = 0; @@ -29050,7 +29204,7 @@ object.disruptionBudget = null; } if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.osconfig.v1.PatchRollout.Mode[message.mode] : message.mode; + object.mode = options.enums === String ? $root.google.cloud.osconfig.v1.PatchRollout.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.osconfig.v1.PatchRollout.Mode[message.mode] : message.mode; if (message.disruptionBudget != null && message.hasOwnProperty("disruptionBudget")) object.disruptionBudget = $root.google.cloud.osconfig.v1.FixedOrPercent.toObject(message.disruptionBudget, options); return object; @@ -32158,6 +32312,12 @@ if (object.impactScore != null) message.impactScore = Number(object.impactScore); switch (object.attackVector) { + default: + if (typeof object.attackVector === "number") { + message.attackVector = object.attackVector; + break; + } + break; case "ATTACK_VECTOR_UNSPECIFIED": case 0: message.attackVector = 0; @@ -32180,6 +32340,12 @@ break; } switch (object.attackComplexity) { + default: + if (typeof object.attackComplexity === "number") { + message.attackComplexity = object.attackComplexity; + break; + } + break; case "ATTACK_COMPLEXITY_UNSPECIFIED": case 0: message.attackComplexity = 0; @@ -32194,6 +32360,12 @@ break; } switch (object.privilegesRequired) { + default: + if (typeof object.privilegesRequired === "number") { + message.privilegesRequired = object.privilegesRequired; + break; + } + break; case "PRIVILEGES_REQUIRED_UNSPECIFIED": case 0: message.privilegesRequired = 0; @@ -32212,6 +32384,12 @@ break; } switch (object.userInteraction) { + default: + if (typeof object.userInteraction === "number") { + message.userInteraction = object.userInteraction; + break; + } + break; case "USER_INTERACTION_UNSPECIFIED": case 0: message.userInteraction = 0; @@ -32226,6 +32404,12 @@ break; } switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; case "SCOPE_UNSPECIFIED": case 0: message.scope = 0; @@ -32240,6 +32424,12 @@ break; } switch (object.confidentialityImpact) { + default: + if (typeof object.confidentialityImpact === "number") { + message.confidentialityImpact = object.confidentialityImpact; + break; + } + break; case "IMPACT_UNSPECIFIED": case 0: message.confidentialityImpact = 0; @@ -32258,6 +32448,12 @@ break; } switch (object.integrityImpact) { + default: + if (typeof object.integrityImpact === "number") { + message.integrityImpact = object.integrityImpact; + break; + } + break; case "IMPACT_UNSPECIFIED": case 0: message.integrityImpact = 0; @@ -32276,6 +32472,12 @@ break; } switch (object.availabilityImpact) { + default: + if (typeof object.availabilityImpact === "number") { + message.availabilityImpact = object.availabilityImpact; + break; + } + break; case "IMPACT_UNSPECIFIED": case 0: message.availabilityImpact = 0; @@ -32329,21 +32531,21 @@ if (message.impactScore != null && message.hasOwnProperty("impactScore")) object.impactScore = options.json && !isFinite(message.impactScore) ? String(message.impactScore) : message.impactScore; if (message.attackVector != null && message.hasOwnProperty("attackVector")) - object.attackVector = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.AttackVector[message.attackVector] : message.attackVector; + object.attackVector = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.AttackVector[message.attackVector] === undefined ? message.attackVector : $root.google.cloud.osconfig.v1.CVSSv3.AttackVector[message.attackVector] : message.attackVector; if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - object.attackComplexity = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; + object.attackComplexity = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.AttackComplexity[message.attackComplexity] === undefined ? message.attackComplexity : $root.google.cloud.osconfig.v1.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - object.privilegesRequired = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; + object.privilegesRequired = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired[message.privilegesRequired] === undefined ? message.privilegesRequired : $root.google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - object.userInteraction = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; + object.userInteraction = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.UserInteraction[message.userInteraction] === undefined ? message.userInteraction : $root.google.cloud.osconfig.v1.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Scope[message.scope] : message.scope; + object.scope = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.osconfig.v1.CVSSv3.Scope[message.scope] : message.scope; if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - object.confidentialityImpact = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; + object.confidentialityImpact = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.confidentialityImpact] === undefined ? message.confidentialityImpact : $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - object.integrityImpact = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; + object.integrityImpact = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.integrityImpact] === undefined ? message.integrityImpact : $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - object.availabilityImpact = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; + object.availabilityImpact = options.enums === String ? $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.availabilityImpact] === undefined ? message.availabilityImpact : $root.google.cloud.osconfig.v1.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; return object; }; @@ -32692,6 +32894,12 @@ return object; var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -32714,6 +32922,12 @@ break; } switch (object.outcome) { + default: + if (typeof object.outcome === "number") { + message.outcome = object.outcome; + break; + } + break; case "OUTCOME_UNSPECIFIED": case 0: message.outcome = 0; @@ -32751,9 +32965,9 @@ object.errorMessage = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type[message.type] === undefined ? message.type : $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type[message.type] : message.type; if (message.outcome != null && message.hasOwnProperty("outcome")) - object.outcome = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome[message.outcome] : message.outcome; + object.outcome = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome[message.outcome] === undefined ? message.outcome : $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome[message.outcome] : message.outcome; if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) object.errorMessage = message.errorMessage; return object; @@ -33078,6 +33292,12 @@ } } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -33134,7 +33354,7 @@ object.configSteps[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.toObject(message.configSteps[j], options); } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] === undefined ? message.state : $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { object.execResourceOutput = $root.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.toObject(message.execResourceOutput, options); if (options.oneofs) @@ -33704,6 +33924,12 @@ if (object.instance != null) message.instance = String(object.instance); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -33778,7 +34004,7 @@ if (message.instance != null && message.hasOwnProperty("instance")) object.instance = message.instance; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] === undefined ? message.state : $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; if (message.detailedState != null && message.hasOwnProperty("detailedState")) object.detailedState = message.detailedState; if (message.detailedStateReason != null && message.hasOwnProperty("detailedStateReason")) @@ -34047,6 +34273,12 @@ if (object.osPolicyAssignment != null) message.osPolicyAssignment = String(object.osPolicyAssignment); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -34106,7 +34338,7 @@ if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) object.osPolicyAssignment = message.osPolicyAssignment; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] === undefined ? message.state : $root.google.cloud.osconfig.v1alpha.OSPolicyComplianceState[message.state] : message.state; if (message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length) { object.osPolicyResourceCompliances = []; for (var j = 0; j < message.osPolicyResourceCompliances.length; ++j) @@ -35861,6 +36093,12 @@ if (object.id != null) message.id = String(object.id); switch (object.originType) { + default: + if (typeof object.originType === "number") { + message.originType = object.originType; + break; + } + break; case "ORIGIN_TYPE_UNSPECIFIED": case 0: message.originType = 0; @@ -35881,6 +36119,12 @@ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -35930,9 +36174,9 @@ if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.originType != null && message.hasOwnProperty("originType")) - object.originType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType[message.originType] : message.originType; + object.originType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType[message.originType] === undefined ? message.originType : $root.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType[message.originType] : message.originType; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.Inventory.Item.Type[message.type] === undefined ? message.type : $root.google.cloud.osconfig.v1alpha.Inventory.Item.Type[message.type] : message.type; if (message.installedPackage != null && message.hasOwnProperty("installedPackage")) { object.installedPackage = $root.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.toObject(message.installedPackage, options); if (options.oneofs) @@ -38472,6 +38716,12 @@ if (object.name != null) message.name = String(object.name); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "INVENTORY_VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -38508,7 +38758,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] === undefined ? message.view : $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; return object; }; @@ -38771,6 +39021,12 @@ if (object.parent != null) message.parent = String(object.parent); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "INVENTORY_VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -38816,7 +39072,7 @@ if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] === undefined ? message.view : $root.google.cloud.osconfig.v1alpha.InventoryView[message.view] : message.view; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -39361,6 +39617,12 @@ if (object.description != null) message.description = String(object.description); switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; case "MODE_UNSPECIFIED": case 0: message.mode = 0; @@ -39415,7 +39677,7 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Mode[message.mode] : message.mode; + object.mode = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.osconfig.v1alpha.OSPolicy.Mode[message.mode] : message.mode; if (message.resourceGroups && message.resourceGroups.length) { object.resourceGroups = []; for (var j = 0; j < message.resourceGroups.length; ++j) @@ -41425,6 +41687,12 @@ return object; var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource(); switch (object.desiredState) { + default: + if (typeof object.desiredState === "number") { + message.desiredState = object.desiredState; + break; + } + break; case "DESIRED_STATE_UNSPECIFIED": case 0: message.desiredState = 0; @@ -41492,7 +41760,7 @@ if (options.defaults) object.desiredState = options.enums === String ? "DESIRED_STATE_UNSPECIFIED" : 0; if (message.desiredState != null && message.hasOwnProperty("desiredState")) - object.desiredState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] : message.desiredState; + object.desiredState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] === undefined ? message.desiredState : $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState[message.desiredState] : message.desiredState; if (message.apt != null && message.hasOwnProperty("apt")) { object.apt = $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.toObject(message.apt, options); if (options.oneofs) @@ -43665,6 +43933,12 @@ return object; var message = new $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository(); switch (object.archiveType) { + default: + if (typeof object.archiveType === "number") { + message.archiveType = object.archiveType; + break; + } + break; case "ARCHIVE_TYPE_UNSPECIFIED": case 0: message.archiveType = 0; @@ -43716,7 +43990,7 @@ object.gpgKey = ""; } if (message.archiveType != null && message.hasOwnProperty("archiveType")) - object.archiveType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] : message.archiveType; + object.archiveType = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] === undefined ? message.archiveType : $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType[message.archiveType] : message.archiveType; if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; if (message.distribution != null && message.hasOwnProperty("distribution")) @@ -45095,6 +45369,12 @@ message.args[i] = String(object.args[i]); } switch (object.interpreter) { + default: + if (typeof object.interpreter === "number") { + message.interpreter = object.interpreter; + break; + } + break; case "INTERPRETER_UNSPECIFIED": case 0: message.interpreter = 0; @@ -45152,7 +45432,7 @@ object.args[j] = message.args[j]; } if (message.interpreter != null && message.hasOwnProperty("interpreter")) - object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] : message.interpreter; + object.interpreter = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] === undefined ? message.interpreter : $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter[message.interpreter] : message.interpreter; if (message.outputFilePath != null && message.hasOwnProperty("outputFilePath")) object.outputFilePath = message.outputFilePath; return object; @@ -45470,6 +45750,12 @@ if (object.path != null) message.path = String(object.path); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "DESIRED_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -45523,7 +45809,7 @@ if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState[message.state] === undefined ? message.state : $root.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState[message.state] : message.state; if (message.permissions != null && message.hasOwnProperty("permissions")) object.permissions = message.permissions; return object; @@ -47169,6 +47455,12 @@ if (object.osPolicyId != null) message.osPolicyId = String(object.osPolicyId); switch (object.complianceState) { + default: + if (typeof object.complianceState === "number") { + message.complianceState = object.complianceState; + break; + } + break; case "UNKNOWN": case 0: message.complianceState = 0; @@ -47220,7 +47512,7 @@ if (message.osPolicyId != null && message.hasOwnProperty("osPolicyId")) object.osPolicyId = message.osPolicyId; if (message.complianceState != null && message.hasOwnProperty("complianceState")) - object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState[message.complianceState] : message.complianceState; + object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState[message.complianceState] : message.complianceState; if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) object.complianceStateReason = message.complianceStateReason; if (message.osPolicyResourceCompliances && message.osPolicyResourceCompliances.length) { @@ -47543,6 +47835,12 @@ } } switch (object.complianceState) { + default: + if (typeof object.complianceState === "number") { + message.complianceState = object.complianceState; + break; + } + break; case "UNKNOWN": case 0: message.complianceState = 0; @@ -47594,7 +47892,7 @@ object.configSteps[j] = $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.toObject(message.configSteps[j], options); } if (message.complianceState != null && message.hasOwnProperty("complianceState")) - object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState[message.complianceState] : message.complianceState; + object.complianceState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState[message.complianceState] : message.complianceState; if (message.complianceStateReason != null && message.hasOwnProperty("complianceStateReason")) object.complianceStateReason = message.complianceStateReason; if (message.execResourceOutput != null && message.hasOwnProperty("execResourceOutput")) { @@ -47807,6 +48105,12 @@ return object; var message = new $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -47851,7 +48155,7 @@ object.errorMessage = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type[message.type] === undefined ? message.type : $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type[message.type] : message.type; if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) object.errorMessage = message.errorMessage; return object; @@ -48566,6 +48870,12 @@ if (object.etag != null) message.etag = String(object.etag); switch (object.rolloutState) { + default: + if (typeof object.rolloutState === "number") { + message.rolloutState = object.rolloutState; + break; + } + break; case "ROLLOUT_STATE_UNSPECIFIED": case 0: message.rolloutState = 0; @@ -48647,7 +48957,7 @@ if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState[message.rolloutState] === undefined ? message.rolloutState : $root.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState[message.rolloutState] : message.rolloutState; if (message.baseline != null && message.hasOwnProperty("baseline")) object.baseline = message.baseline; if (message.deleted != null && message.hasOwnProperty("deleted")) @@ -50029,6 +50339,12 @@ if (object.osPolicyAssignment != null) message.osPolicyAssignment = String(object.osPolicyAssignment); switch (object.apiMethod) { + default: + if (typeof object.apiMethod === "number") { + message.apiMethod = object.apiMethod; + break; + } + break; case "API_METHOD_UNSPECIFIED": case 0: message.apiMethod = 0; @@ -50047,6 +50363,12 @@ break; } switch (object.rolloutState) { + default: + if (typeof object.rolloutState === "number") { + message.rolloutState = object.rolloutState; + break; + } + break; case "ROLLOUT_STATE_UNSPECIFIED": case 0: message.rolloutState = 0; @@ -50104,9 +50426,9 @@ if (message.osPolicyAssignment != null && message.hasOwnProperty("osPolicyAssignment")) object.osPolicyAssignment = message.osPolicyAssignment; if (message.apiMethod != null && message.hasOwnProperty("apiMethod")) - object.apiMethod = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] : message.apiMethod; + object.apiMethod = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] === undefined ? message.apiMethod : $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod[message.apiMethod] : message.apiMethod; if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] : message.rolloutState; + object.rolloutState = options.enums === String ? $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] === undefined ? message.rolloutState : $root.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState[message.rolloutState] : message.rolloutState; if (message.rolloutStartTime != null && message.hasOwnProperty("rolloutStartTime")) object.rolloutStartTime = $root.google.protobuf.Timestamp.toObject(message.rolloutStartTime, options); if (message.rolloutUpdateTime != null && message.hasOwnProperty("rolloutUpdateTime")) @@ -55448,6 +55770,12 @@ if (object.impactScore != null) message.impactScore = Number(object.impactScore); switch (object.attackVector) { + default: + if (typeof object.attackVector === "number") { + message.attackVector = object.attackVector; + break; + } + break; case "ATTACK_VECTOR_UNSPECIFIED": case 0: message.attackVector = 0; @@ -55470,6 +55798,12 @@ break; } switch (object.attackComplexity) { + default: + if (typeof object.attackComplexity === "number") { + message.attackComplexity = object.attackComplexity; + break; + } + break; case "ATTACK_COMPLEXITY_UNSPECIFIED": case 0: message.attackComplexity = 0; @@ -55484,6 +55818,12 @@ break; } switch (object.privilegesRequired) { + default: + if (typeof object.privilegesRequired === "number") { + message.privilegesRequired = object.privilegesRequired; + break; + } + break; case "PRIVILEGES_REQUIRED_UNSPECIFIED": case 0: message.privilegesRequired = 0; @@ -55502,6 +55842,12 @@ break; } switch (object.userInteraction) { + default: + if (typeof object.userInteraction === "number") { + message.userInteraction = object.userInteraction; + break; + } + break; case "USER_INTERACTION_UNSPECIFIED": case 0: message.userInteraction = 0; @@ -55516,6 +55862,12 @@ break; } switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; case "SCOPE_UNSPECIFIED": case 0: message.scope = 0; @@ -55530,6 +55882,12 @@ break; } switch (object.confidentialityImpact) { + default: + if (typeof object.confidentialityImpact === "number") { + message.confidentialityImpact = object.confidentialityImpact; + break; + } + break; case "IMPACT_UNSPECIFIED": case 0: message.confidentialityImpact = 0; @@ -55548,6 +55906,12 @@ break; } switch (object.integrityImpact) { + default: + if (typeof object.integrityImpact === "number") { + message.integrityImpact = object.integrityImpact; + break; + } + break; case "IMPACT_UNSPECIFIED": case 0: message.integrityImpact = 0; @@ -55566,6 +55930,12 @@ break; } switch (object.availabilityImpact) { + default: + if (typeof object.availabilityImpact === "number") { + message.availabilityImpact = object.availabilityImpact; + break; + } + break; case "IMPACT_UNSPECIFIED": case 0: message.availabilityImpact = 0; @@ -55619,21 +55989,21 @@ if (message.impactScore != null && message.hasOwnProperty("impactScore")) object.impactScore = options.json && !isFinite(message.impactScore) ? String(message.impactScore) : message.impactScore; if (message.attackVector != null && message.hasOwnProperty("attackVector")) - object.attackVector = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector[message.attackVector] : message.attackVector; + object.attackVector = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector[message.attackVector] === undefined ? message.attackVector : $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector[message.attackVector] : message.attackVector; if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - object.attackComplexity = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; + object.attackComplexity = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity[message.attackComplexity] === undefined ? message.attackComplexity : $root.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - object.privilegesRequired = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; + object.privilegesRequired = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired[message.privilegesRequired] === undefined ? message.privilegesRequired : $root.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - object.userInteraction = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; + object.userInteraction = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction[message.userInteraction] === undefined ? message.userInteraction : $root.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction[message.userInteraction] : message.userInteraction; if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Scope[message.scope] : message.scope; + object.scope = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.osconfig.v1alpha.CVSSv3.Scope[message.scope] : message.scope; if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - object.confidentialityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; + object.confidentialityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.confidentialityImpact] === undefined ? message.confidentialityImpact : $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - object.integrityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; + object.integrityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.integrityImpact] === undefined ? message.integrityImpact : $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.integrityImpact] : message.integrityImpact; if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - object.availabilityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; + object.availabilityImpact = options.enums === String ? $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.availabilityImpact] === undefined ? message.availabilityImpact : $root.google.cloud.osconfig.v1alpha.CVSSv3.Impact[message.availabilityImpact] : message.availabilityImpact; return object; }; @@ -56118,6 +56488,12 @@ if (object.nameField != null) message.nameField = String(object.nameField); switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; case "HISTORY_UNSPECIFIED": case 0: message.history = 0; @@ -56142,6 +56518,10 @@ for (var i = 0; i < object.style.length; ++i) switch (object.style[i]) { default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } case "STYLE_UNSPECIFIED": case 0: message.style[i] = 0; @@ -56189,7 +56569,7 @@ if (message.nameField != null && message.hasOwnProperty("nameField")) object.nameField = message.nameField; if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; if (message.plural != null && message.hasOwnProperty("plural")) object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) @@ -56197,7 +56577,7 @@ if (message.style && message.style.length) { object.style = []; for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } return object; }; @@ -59971,6 +60351,12 @@ if (object.number != null) message.number = object.number | 0; switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; case "LABEL_OPTIONAL": case 1: message.label = 1; @@ -59985,6 +60371,12 @@ break; } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_DOUBLE": case 1: message.type = 1; @@ -60111,9 +60503,9 @@ if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; if (message.typeName != null && message.hasOwnProperty("typeName")) object.typeName = message.typeName; if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) @@ -62460,6 +62852,12 @@ if (object.javaStringCheckUtf8 != null) message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; case "SPEED": case 1: message.optimizeFor = 1; @@ -62568,7 +62966,7 @@ if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; if (message.goPackage != null && message.hasOwnProperty("goPackage")) @@ -63370,6 +63768,12 @@ return object; var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; case "STRING": case 0: message.ctype = 0; @@ -63386,6 +63790,12 @@ if (object.packed != null) message.packed = Boolean(object.packed); switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; case "JS_NORMAL": case 0: message.jstype = 0; @@ -63424,6 +63834,10 @@ for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) switch (object[".google.api.fieldBehavior"][i]) { default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: message[".google.api.fieldBehavior"][i] = 0; @@ -63494,7 +63908,7 @@ object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; if (message.packed != null && message.hasOwnProperty("packed")) object.packed = message.packed; if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -63502,7 +63916,7 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) object.lazy = message.lazy; if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) @@ -63515,7 +63929,7 @@ if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { object[".google.api.fieldBehavior"] = []; for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); @@ -64892,6 +65306,12 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; case "IDEMPOTENCY_UNKNOWN": case 0: message.idempotencyLevel = 0; @@ -64961,7 +65381,7 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -66716,6 +67136,12 @@ if (object.end != null) message.end = object.end | 0; switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; case "NONE": case 0: message.semantic = 0; @@ -66765,7 +67191,7 @@ if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; From 7083fa6d6ef12fca95ac7f0ec8d0561217c2d177 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 01:35:29 -0800 Subject: [PATCH 150/154] chore(main): release 2.1.2 (#221) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.1.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-osconfig/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-osconfig/package.json | 2 +- .../snippet_metadata.google.cloud.osconfig.v1.json | 2 +- ...ippet_metadata.google.cloud.osconfig.v1alpha.json | 2 +- packages/google-cloud-osconfig/samples/package.json | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-osconfig/CHANGELOG.md b/packages/google-cloud-osconfig/CHANGELOG.md index 3fbb137dd4c..c0ee91ce54d 100644 --- a/packages/google-cloud-osconfig/CHANGELOG.md +++ b/packages/google-cloud-osconfig/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [2.1.2](https://github.com/googleapis/nodejs-os-config/compare/v2.1.1...v2.1.2) (2022-11-11) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#220](https://github.com/googleapis/nodejs-os-config/issues/220)) ([13ef9fc](https://github.com/googleapis/nodejs-os-config/commit/13ef9fc7804fe21d200d3053196371f5a621c18a)) +* **deps:** Use google-gax v3.5.2 ([#228](https://github.com/googleapis/nodejs-os-config/issues/228)) ([c02bb82](https://github.com/googleapis/nodejs-os-config/commit/c02bb8288378280736343c0022ec8c7693285738)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-os-config/issues/1553)) ([#219](https://github.com/googleapis/nodejs-os-config/issues/219)) ([7c06e21](https://github.com/googleapis/nodejs-os-config/commit/7c06e2122f41f730d746c68b5ddaa2e93e5972dd)) +* Preserve default values in x-goog-request-params header ([#222](https://github.com/googleapis/nodejs-os-config/issues/222)) ([19a88d1](https://github.com/googleapis/nodejs-os-config/commit/19a88d1d760b3235df81afe04d0de9ead31b55d1)) +* Regenerated protos JS and TS definitions ([#231](https://github.com/googleapis/nodejs-os-config/issues/231)) ([9c1c5ee](https://github.com/googleapis/nodejs-os-config/commit/9c1c5ee464ca93f974e88d52cd8045cfd54b6872)) +* use google-gax v3.3.0 ([7c06e21](https://github.com/googleapis/nodejs-os-config/commit/7c06e2122f41f730d746c68b5ddaa2e93e5972dd)) + ## [2.1.1](https://github.com/googleapis/nodejs-os-config/compare/v2.1.0...v2.1.1) (2022-08-23) diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index d98e8cd01f3..faace764a6d 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/os-config", - "version": "2.1.1", + "version": "2.1.2", "description": "Osconfig client for Node.js", "repository": "googleapis/nodejs-os-config", "license": "Apache-2.0", diff --git a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json index b059df35f13..b6f90a2660f 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json +++ b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "2.1.1", + "version": "2.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json index c048b34dc1d..5d6895a0e76 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "2.1.1", + "version": "2.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/package.json b/packages/google-cloud-osconfig/samples/package.json index c007f1dcb8d..885c2f2189f 100644 --- a/packages/google-cloud-osconfig/samples/package.json +++ b/packages/google-cloud-osconfig/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/os-config": "^2.1.1" + "@google-cloud/os-config": "^2.1.2" }, "devDependencies": { "c8": "^7.1.0", From b30782043948acf93a0adbc8400388c71aa96670 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 11 Nov 2022 01:39:33 -0800 Subject: [PATCH 151/154] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- packages/google-cloud-osconfig/.mocharc.js | 2 +- packages/google-cloud-osconfig/.prettierrc.js | 2 +- .../google-cloud-osconfig/.repo-metadata.json | 2 +- packages/google-cloud-osconfig/README.md | 52 +- packages/google-cloud-osconfig/package.json | 13 +- .../google-cloud-osconfig/samples/README.md | 696 +++++++++++++++++- packages/google-cloud-osconfig/src/index.ts | 2 +- release-please-config.json | 3 +- 10 files changed, 753 insertions(+), 26 deletions(-) rename packages/google-cloud-osconfig/{.github => }/.OwlBot.yaml (82%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c38b0a70276..98f65686d2d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -23,6 +23,7 @@ "packages/google-cloud-language": "5.1.2", "packages/google-cloud-memcache": "2.1.4", "packages/google-cloud-monitoring": "3.0.3", + "packages/google-cloud-osconfig": "2.1.2", "packages/google-cloud-oslogin": "4.0.4", "packages/google-cloud-phishingprotection": "3.0.6", "packages/google-cloud-policytroubleshooter": "2.0.6", diff --git a/packages/google-cloud-osconfig/.github/.OwlBot.yaml b/packages/google-cloud-osconfig/.OwlBot.yaml similarity index 82% rename from packages/google-cloud-osconfig/.github/.OwlBot.yaml rename to packages/google-cloud-osconfig/.OwlBot.yaml index e525106dca3..6426171875d 100644 --- a/packages/google-cloud-osconfig/.github/.OwlBot.yaml +++ b/packages/google-cloud-osconfig/.OwlBot.yaml @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging @@ -21,8 +19,8 @@ deep-preserve-regex: - /owl-bot-staging/v1beta deep-copy-regex: - - source: /google/cloud/osconfig/(v.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/osconfig/(v.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-osconfig/$1 begin-after-commit-hash: fb91803ccef5d7c695139b22788b309e2197856b diff --git a/packages/google-cloud-osconfig/.mocharc.js b/packages/google-cloud-osconfig/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-osconfig/.mocharc.js +++ b/packages/google-cloud-osconfig/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/.prettierrc.js b/packages/google-cloud-osconfig/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-osconfig/.prettierrc.js +++ b/packages/google-cloud-osconfig/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-osconfig/.repo-metadata.json b/packages/google-cloud-osconfig/.repo-metadata.json index 73385278141..c40476e0724 100644 --- a/packages/google-cloud-osconfig/.repo-metadata.json +++ b/packages/google-cloud-osconfig/.repo-metadata.json @@ -1,7 +1,7 @@ { "language": "nodejs", "product_documentation": "https://cloud.google.com/compute/docs/os-patch-management", - "repo": "googleapis/nodejs-os-config", + "repo": "googleapis/google-cloud-node", "repo_short": "nodejs-os-config", "default_version": "v1", "api_description": "provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index c7100c5acb1..c4ee3eadb34 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [OS Config API: Node.js Client](https://github.com/googleapis/nodejs-os-config) +# [OS Config API: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/os-config.svg)](https://www.npmjs.org/package/@google-cloud/os-config) @@ -14,11 +14,11 @@ Osconfig client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-os-config/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-osconfig/CHANGELOG.md). * [OS Config API Node.js Client API Reference][client-docs] * [OS Config API Documentation][product-docs] -* [github.com/googleapis/nodejs-os-config](https://github.com/googleapis/nodejs-os-config) +* [github.com/googleapis/google-cloud-node/packages/google-cloud-osconfig](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-osconfig) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -79,11 +79,49 @@ const listPatchDeploymentsResponse = listPatchDeployments(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-os-config/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-os-config/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-os-config&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Os_config_service.cancel_patch_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js,samples/README.md) | +| Os_config_service.create_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js,samples/README.md) | +| Os_config_service.delete_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js,samples/README.md) | +| Os_config_service.execute_patch_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js,samples/README.md) | +| Os_config_service.get_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js,samples/README.md) | +| Os_config_service.get_patch_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js,samples/README.md) | +| Os_config_service.list_patch_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js,samples/README.md) | +| Os_config_service.list_patch_job_instance_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js,samples/README.md) | +| Os_config_service.list_patch_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js,samples/README.md) | +| Os_config_service.pause_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js,samples/README.md) | +| Os_config_service.resume_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js,samples/README.md) | +| Os_config_service.update_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js,samples/README.md) | +| Os_config_zonal_service.create_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.delete_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.get_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js,samples/README.md) | +| Os_config_zonal_service.get_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.get_o_s_policy_assignment_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) | +| Os_config_zonal_service.get_vulnerability_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) | +| Os_config_zonal_service.list_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignment_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignment_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) | +| Os_config_zonal_service.list_vulnerability_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) | +| Os_config_zonal_service.update_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.create_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.delete_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.get_instance_o_s_policies_compliance | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js,samples/README.md) | +| Os_config_zonal_service.get_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js,samples/README.md) | +| Os_config_zonal_service.get_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.get_o_s_policy_assignment_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) | +| Os_config_zonal_service.get_vulnerability_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) | +| Os_config_zonal_service.list_instance_o_s_policies_compliances | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js,samples/README.md) | +| Os_config_zonal_service.list_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignment_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignment_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) | +| Os_config_zonal_service.list_vulnerability_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) | +| Os_config_zonal_service.update_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | @@ -133,7 +171,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-os-config/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -145,7 +183,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-os-config/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/os-config/latest [product-docs]: https://cloud.google.com/compute/docs/os-patch-management diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index faace764a6d..ebb3e9a5ba2 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -2,7 +2,11 @@ "name": "@google-cloud/os-config", "version": "2.1.2", "description": "Osconfig client for Node.js", - "repository": "googleapis/nodejs-os-config", + "repository": { + "type": "git", + "directory": "packages/google-cloud-osconfig", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", @@ -22,8 +26,8 @@ "lint": "gts check", "prelint": "cd samples; npm link ../; npm install", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", - "system-test": "c8 mocha build/system-test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -48,5 +52,6 @@ }, "engines": { "node": ">=12.0.0" - } + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-osconfig" } diff --git a/packages/google-cloud-osconfig/samples/README.md b/packages/google-cloud-osconfig/samples/README.md index 0efd805e9f6..dba744158e7 100644 --- a/packages/google-cloud-osconfig/samples/README.md +++ b/packages/google-cloud-osconfig/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [OS Config API: Node.js Samples](https://github.com/googleapis/nodejs-os-config) +# [OS Config API: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,50 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Os_config_service.cancel_patch_job](#os_config_service.cancel_patch_job) + * [Os_config_service.create_patch_deployment](#os_config_service.create_patch_deployment) + * [Os_config_service.delete_patch_deployment](#os_config_service.delete_patch_deployment) + * [Os_config_service.execute_patch_job](#os_config_service.execute_patch_job) + * [Os_config_service.get_patch_deployment](#os_config_service.get_patch_deployment) + * [Os_config_service.get_patch_job](#os_config_service.get_patch_job) + * [Os_config_service.list_patch_deployments](#os_config_service.list_patch_deployments) + * [Os_config_service.list_patch_job_instance_details](#os_config_service.list_patch_job_instance_details) + * [Os_config_service.list_patch_jobs](#os_config_service.list_patch_jobs) + * [Os_config_service.pause_patch_deployment](#os_config_service.pause_patch_deployment) + * [Os_config_service.resume_patch_deployment](#os_config_service.resume_patch_deployment) + * [Os_config_service.update_patch_deployment](#os_config_service.update_patch_deployment) + * [Os_config_zonal_service.create_o_s_policy_assignment](#os_config_zonal_service.create_o_s_policy_assignment) + * [Os_config_zonal_service.delete_o_s_policy_assignment](#os_config_zonal_service.delete_o_s_policy_assignment) + * [Os_config_zonal_service.get_inventory](#os_config_zonal_service.get_inventory) + * [Os_config_zonal_service.get_o_s_policy_assignment](#os_config_zonal_service.get_o_s_policy_assignment) + * [Os_config_zonal_service.get_o_s_policy_assignment_report](#os_config_zonal_service.get_o_s_policy_assignment_report) + * [Os_config_zonal_service.get_vulnerability_report](#os_config_zonal_service.get_vulnerability_report) + * [Os_config_zonal_service.list_inventories](#os_config_zonal_service.list_inventories) + * [Os_config_zonal_service.list_o_s_policy_assignment_reports](#os_config_zonal_service.list_o_s_policy_assignment_reports) + * [Os_config_zonal_service.list_o_s_policy_assignment_revisions](#os_config_zonal_service.list_o_s_policy_assignment_revisions) + * [Os_config_zonal_service.list_o_s_policy_assignments](#os_config_zonal_service.list_o_s_policy_assignments) + * [Os_config_zonal_service.list_vulnerability_reports](#os_config_zonal_service.list_vulnerability_reports) + * [Os_config_zonal_service.update_o_s_policy_assignment](#os_config_zonal_service.update_o_s_policy_assignment) + * [Os_config_zonal_service.create_o_s_policy_assignment](#os_config_zonal_service.create_o_s_policy_assignment) + * [Os_config_zonal_service.delete_o_s_policy_assignment](#os_config_zonal_service.delete_o_s_policy_assignment) + * [Os_config_zonal_service.get_instance_o_s_policies_compliance](#os_config_zonal_service.get_instance_o_s_policies_compliance) + * [Os_config_zonal_service.get_inventory](#os_config_zonal_service.get_inventory) + * [Os_config_zonal_service.get_o_s_policy_assignment](#os_config_zonal_service.get_o_s_policy_assignment) + * [Os_config_zonal_service.get_o_s_policy_assignment_report](#os_config_zonal_service.get_o_s_policy_assignment_report) + * [Os_config_zonal_service.get_vulnerability_report](#os_config_zonal_service.get_vulnerability_report) + * [Os_config_zonal_service.list_instance_o_s_policies_compliances](#os_config_zonal_service.list_instance_o_s_policies_compliances) + * [Os_config_zonal_service.list_inventories](#os_config_zonal_service.list_inventories) + * [Os_config_zonal_service.list_o_s_policy_assignment_reports](#os_config_zonal_service.list_o_s_policy_assignment_reports) + * [Os_config_zonal_service.list_o_s_policy_assignment_revisions](#os_config_zonal_service.list_o_s_policy_assignment_revisions) + * [Os_config_zonal_service.list_o_s_policy_assignments](#os_config_zonal_service.list_o_s_policy_assignments) + * [Os_config_zonal_service.list_vulnerability_reports](#os_config_zonal_service.list_vulnerability_reports) + * [Os_config_zonal_service.update_o_s_policy_assignment](#os_config_zonal_service.update_o_s_policy_assignment) * [Quickstart](#quickstart) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-os-config#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +67,662 @@ Before running the samples, make sure you've followed the steps outlined in +### Os_config_service.cancel_patch_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js` + + +----- + + + + +### Os_config_service.create_patch_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js` + + +----- + + + + +### Os_config_service.delete_patch_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js` + + +----- + + + + +### Os_config_service.execute_patch_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js` + + +----- + + + + +### Os_config_service.get_patch_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js` + + +----- + + + + +### Os_config_service.get_patch_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js` + + +----- + + + + +### Os_config_service.list_patch_deployments + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js` + + +----- + + + + +### Os_config_service.list_patch_job_instance_details + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js` + + +----- + + + + +### Os_config_service.list_patch_jobs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js` + + +----- + + + + +### Os_config_service.pause_patch_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js` + + +----- + + + + +### Os_config_service.resume_patch_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js` + + +----- + + + + +### Os_config_service.update_patch_deployment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js` + + +----- + + + + +### Os_config_zonal_service.create_o_s_policy_assignment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js` + + +----- + + + + +### Os_config_zonal_service.delete_o_s_policy_assignment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js` + + +----- + + + + +### Os_config_zonal_service.get_inventory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js` + + +----- + + + + +### Os_config_zonal_service.get_o_s_policy_assignment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js` + + +----- + + + + +### Os_config_zonal_service.get_o_s_policy_assignment_report + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js` + + +----- + + + + +### Os_config_zonal_service.get_vulnerability_report + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js` + + +----- + + + + +### Os_config_zonal_service.list_inventories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js` + + +----- + + + + +### Os_config_zonal_service.list_o_s_policy_assignment_reports + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js` + + +----- + + + + +### Os_config_zonal_service.list_o_s_policy_assignment_revisions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js` + + +----- + + + + +### Os_config_zonal_service.list_o_s_policy_assignments + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js` + + +----- + + + + +### Os_config_zonal_service.list_vulnerability_reports + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js` + + +----- + + + + +### Os_config_zonal_service.update_o_s_policy_assignment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js` + + +----- + + + + +### Os_config_zonal_service.create_o_s_policy_assignment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js` + + +----- + + + + +### Os_config_zonal_service.delete_o_s_policy_assignment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js` + + +----- + + + + +### Os_config_zonal_service.get_instance_o_s_policies_compliance + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js` + + +----- + + + + +### Os_config_zonal_service.get_inventory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js` + + +----- + + + + +### Os_config_zonal_service.get_o_s_policy_assignment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js` + + +----- + + + + +### Os_config_zonal_service.get_o_s_policy_assignment_report + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js` + + +----- + + + + +### Os_config_zonal_service.get_vulnerability_report + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js` + + +----- + + + + +### Os_config_zonal_service.list_instance_o_s_policies_compliances + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js` + + +----- + + + + +### Os_config_zonal_service.list_inventories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js` + + +----- + + + + +### Os_config_zonal_service.list_o_s_policy_assignment_reports + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js` + + +----- + + + + +### Os_config_zonal_service.list_o_s_policy_assignment_revisions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js` + + +----- + + + + +### Os_config_zonal_service.list_o_s_policy_assignments + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js` + + +----- + + + + +### Os_config_zonal_service.list_vulnerability_reports + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js` + + +----- + + + + +### Os_config_zonal_service.update_o_s_policy_assignment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-os-config/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-os-config&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node /workspace/google-cloud-node/samples/quickstart.js` @@ -46,5 +730,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-os-config&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/compute/docs/os-patch-management diff --git a/packages/google-cloud-osconfig/src/index.ts b/packages/google-cloud-osconfig/src/index.ts index 11dd47215c0..5548a6b5f89 100644 --- a/packages/google-cloud-osconfig/src/index.ts +++ b/packages/google-cloud-osconfig/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index ca8fb90627b..de7613ae101 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -24,6 +24,7 @@ "packages/google-cloud-language": {}, "packages/google-cloud-memcache": {}, "packages/google-cloud-monitoring": {}, + "packages/google-cloud-osconfig": {}, "packages/google-cloud-oslogin": {}, "packages/google-cloud-phishingprotection": {}, "packages/google-cloud-policytroubleshooter": {}, @@ -49,4 +50,4 @@ } ], "release-type": "node" -} \ No newline at end of file +} From 3c51fce3c32f348c4e1f537652e33a594c07177a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 10:02:35 +0000 Subject: [PATCH 152/154] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= =?UTF-8?q?=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- packages/google-cloud-osconfig/README.md | 78 +++--- .../google-cloud-osconfig/samples/README.md | 234 +++++++++--------- release-please-config.json | 2 +- 3 files changed, 157 insertions(+), 157 deletions(-) diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index c4ee3eadb34..c87916c364c 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -83,45 +83,45 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Os_config_service.cancel_patch_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js,samples/README.md) | -| Os_config_service.create_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js,samples/README.md) | -| Os_config_service.delete_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js,samples/README.md) | -| Os_config_service.execute_patch_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js,samples/README.md) | -| Os_config_service.get_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js,samples/README.md) | -| Os_config_service.get_patch_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js,samples/README.md) | -| Os_config_service.list_patch_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js,samples/README.md) | -| Os_config_service.list_patch_job_instance_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js,samples/README.md) | -| Os_config_service.list_patch_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js,samples/README.md) | -| Os_config_service.pause_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js,samples/README.md) | -| Os_config_service.resume_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js,samples/README.md) | -| Os_config_service.update_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js,samples/README.md) | -| Os_config_zonal_service.create_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) | -| Os_config_zonal_service.delete_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) | -| Os_config_zonal_service.get_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js,samples/README.md) | -| Os_config_zonal_service.get_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) | -| Os_config_zonal_service.get_o_s_policy_assignment_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) | -| Os_config_zonal_service.get_vulnerability_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) | -| Os_config_zonal_service.list_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js,samples/README.md) | -| Os_config_zonal_service.list_o_s_policy_assignment_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) | -| Os_config_zonal_service.list_o_s_policy_assignment_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) | -| Os_config_zonal_service.list_o_s_policy_assignments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) | -| Os_config_zonal_service.list_vulnerability_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) | -| Os_config_zonal_service.update_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) | -| Os_config_zonal_service.create_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) | -| Os_config_zonal_service.delete_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) | -| Os_config_zonal_service.get_instance_o_s_policies_compliance | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js,samples/README.md) | -| Os_config_zonal_service.get_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js,samples/README.md) | -| Os_config_zonal_service.get_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) | -| Os_config_zonal_service.get_o_s_policy_assignment_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) | -| Os_config_zonal_service.get_vulnerability_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) | -| Os_config_zonal_service.list_instance_o_s_policies_compliances | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js,samples/README.md) | -| Os_config_zonal_service.list_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js,samples/README.md) | -| Os_config_zonal_service.list_o_s_policy_assignment_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) | -| Os_config_zonal_service.list_o_s_policy_assignment_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) | -| Os_config_zonal_service.list_o_s_policy_assignments | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) | -| Os_config_zonal_service.list_vulnerability_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) | -| Os_config_zonal_service.update_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | +| Os_config_service.cancel_patch_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js,samples/README.md) | +| Os_config_service.create_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js,samples/README.md) | +| Os_config_service.delete_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js,samples/README.md) | +| Os_config_service.execute_patch_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js,samples/README.md) | +| Os_config_service.get_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js,samples/README.md) | +| Os_config_service.get_patch_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js,samples/README.md) | +| Os_config_service.list_patch_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js,samples/README.md) | +| Os_config_service.list_patch_job_instance_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js,samples/README.md) | +| Os_config_service.list_patch_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js,samples/README.md) | +| Os_config_service.pause_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js,samples/README.md) | +| Os_config_service.resume_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js,samples/README.md) | +| Os_config_service.update_patch_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js,samples/README.md) | +| Os_config_zonal_service.create_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.delete_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.get_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js,samples/README.md) | +| Os_config_zonal_service.get_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.get_o_s_policy_assignment_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) | +| Os_config_zonal_service.get_vulnerability_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) | +| Os_config_zonal_service.list_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignment_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignment_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) | +| Os_config_zonal_service.list_vulnerability_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) | +| Os_config_zonal_service.update_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.create_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.delete_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.get_instance_o_s_policies_compliance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js,samples/README.md) | +| Os_config_zonal_service.get_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js,samples/README.md) | +| Os_config_zonal_service.get_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) | +| Os_config_zonal_service.get_o_s_policy_assignment_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) | +| Os_config_zonal_service.get_vulnerability_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) | +| Os_config_zonal_service.list_instance_o_s_policies_compliances | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js,samples/README.md) | +| Os_config_zonal_service.list_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignment_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignment_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) | +| Os_config_zonal_service.list_o_s_policy_assignments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) | +| Os_config_zonal_service.list_vulnerability_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) | +| Os_config_zonal_service.update_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-osconfig/samples/README.md b/packages/google-cloud-osconfig/samples/README.md index dba744158e7..efb4d80c5ae 100644 --- a/packages/google-cloud-osconfig/samples/README.md +++ b/packages/google-cloud-osconfig/samples/README.md @@ -69,14 +69,14 @@ Before running the samples, make sure you've followed the steps outlined in ### Os_config_service.cancel_patch_job -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.cancel_patch_job.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.cancel_patch_job.js` ----- @@ -86,14 +86,14 @@ __Usage:__ ### Os_config_service.create_patch_deployment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.create_patch_deployment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.create_patch_deployment.js` ----- @@ -103,14 +103,14 @@ __Usage:__ ### Os_config_service.delete_patch_deployment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.delete_patch_deployment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.delete_patch_deployment.js` ----- @@ -120,14 +120,14 @@ __Usage:__ ### Os_config_service.execute_patch_job -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.execute_patch_job.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.execute_patch_job.js` ----- @@ -137,14 +137,14 @@ __Usage:__ ### Os_config_service.get_patch_deployment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_deployment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_deployment.js` ----- @@ -154,14 +154,14 @@ __Usage:__ ### Os_config_service.get_patch_job -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.get_patch_job.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.get_patch_job.js` ----- @@ -171,14 +171,14 @@ __Usage:__ ### Os_config_service.list_patch_deployments -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_deployments.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_deployments.js` ----- @@ -188,14 +188,14 @@ __Usage:__ ### Os_config_service.list_patch_job_instance_details -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_job_instance_details.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_job_instance_details.js` ----- @@ -205,14 +205,14 @@ __Usage:__ ### Os_config_service.list_patch_jobs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.list_patch_jobs.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.list_patch_jobs.js` ----- @@ -222,14 +222,14 @@ __Usage:__ ### Os_config_service.pause_patch_deployment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.pause_patch_deployment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.pause_patch_deployment.js` ----- @@ -239,14 +239,14 @@ __Usage:__ ### Os_config_service.resume_patch_deployment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.resume_patch_deployment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.resume_patch_deployment.js` ----- @@ -256,14 +256,14 @@ __Usage:__ ### Os_config_service.update_patch_deployment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_service.update_patch_deployment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_service.update_patch_deployment.js` ----- @@ -273,14 +273,14 @@ __Usage:__ ### Os_config_zonal_service.create_o_s_policy_assignment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.create_o_s_policy_assignment.js` ----- @@ -290,14 +290,14 @@ __Usage:__ ### Os_config_zonal_service.delete_o_s_policy_assignment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.delete_o_s_policy_assignment.js` ----- @@ -307,14 +307,14 @@ __Usage:__ ### Os_config_zonal_service.get_inventory -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_inventory.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_inventory.js` ----- @@ -324,14 +324,14 @@ __Usage:__ ### Os_config_zonal_service.get_o_s_policy_assignment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment.js` ----- @@ -341,14 +341,14 @@ __Usage:__ ### Os_config_zonal_service.get_o_s_policy_assignment_report -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_o_s_policy_assignment_report.js` ----- @@ -358,14 +358,14 @@ __Usage:__ ### Os_config_zonal_service.get_vulnerability_report -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.get_vulnerability_report.js` ----- @@ -375,14 +375,14 @@ __Usage:__ ### Os_config_zonal_service.list_inventories -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_inventories.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_inventories.js` ----- @@ -392,14 +392,14 @@ __Usage:__ ### Os_config_zonal_service.list_o_s_policy_assignment_reports -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_reports.js` ----- @@ -409,14 +409,14 @@ __Usage:__ ### Os_config_zonal_service.list_o_s_policy_assignment_revisions -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignment_revisions.js` ----- @@ -426,14 +426,14 @@ __Usage:__ ### Os_config_zonal_service.list_o_s_policy_assignments -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_o_s_policy_assignments.js` ----- @@ -443,14 +443,14 @@ __Usage:__ ### Os_config_zonal_service.list_vulnerability_reports -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.list_vulnerability_reports.js` ----- @@ -460,14 +460,14 @@ __Usage:__ ### Os_config_zonal_service.update_o_s_policy_assignment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js` +`node packages/google-cloud-osconfig/samples/generated/v1/os_config_zonal_service.update_o_s_policy_assignment.js` ----- @@ -477,14 +477,14 @@ __Usage:__ ### Os_config_zonal_service.create_o_s_policy_assignment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.create_o_s_policy_assignment.js` ----- @@ -494,14 +494,14 @@ __Usage:__ ### Os_config_zonal_service.delete_o_s_policy_assignment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.delete_o_s_policy_assignment.js` ----- @@ -511,14 +511,14 @@ __Usage:__ ### Os_config_zonal_service.get_instance_o_s_policies_compliance -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_instance_o_s_policies_compliance.js` ----- @@ -528,14 +528,14 @@ __Usage:__ ### Os_config_zonal_service.get_inventory -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_inventory.js` ----- @@ -545,14 +545,14 @@ __Usage:__ ### Os_config_zonal_service.get_o_s_policy_assignment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment.js` ----- @@ -562,14 +562,14 @@ __Usage:__ ### Os_config_zonal_service.get_o_s_policy_assignment_report -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_o_s_policy_assignment_report.js` ----- @@ -579,14 +579,14 @@ __Usage:__ ### Os_config_zonal_service.get_vulnerability_report -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.get_vulnerability_report.js` ----- @@ -596,14 +596,14 @@ __Usage:__ ### Os_config_zonal_service.list_instance_o_s_policies_compliances -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_instance_o_s_policies_compliances.js` ----- @@ -613,14 +613,14 @@ __Usage:__ ### Os_config_zonal_service.list_inventories -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_inventories.js` ----- @@ -630,14 +630,14 @@ __Usage:__ ### Os_config_zonal_service.list_o_s_policy_assignment_reports -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_reports.js` ----- @@ -647,14 +647,14 @@ __Usage:__ ### Os_config_zonal_service.list_o_s_policy_assignment_revisions -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignment_revisions.js` ----- @@ -664,14 +664,14 @@ __Usage:__ ### Os_config_zonal_service.list_o_s_policy_assignments -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_o_s_policy_assignments.js` ----- @@ -681,14 +681,14 @@ __Usage:__ ### Os_config_zonal_service.list_vulnerability_reports -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js` ----- @@ -698,14 +698,14 @@ __Usage:__ ### Os_config_zonal_service.update_o_s_policy_assignment -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js` +`node packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js` ----- @@ -715,14 +715,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/quickstart.js` +`node packages/google-cloud-osconfig/samples/quickstart.js` diff --git a/release-please-config.json b/release-please-config.json index de7613ae101..c020bccd15d 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -50,4 +50,4 @@ } ], "release-type": "node" -} +} \ No newline at end of file From 14c422025c349a613719a43823016bcf97fce202 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 11 Nov 2022 15:41:26 -0800 Subject: [PATCH 153/154] samples: add quickstart test --- .../samples/test/quickstart.test.js | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 packages/google-cloud-osconfig/samples/test/quickstart.test.js diff --git a/packages/google-cloud-osconfig/samples/test/quickstart.test.js b/packages/google-cloud-osconfig/samples/test/quickstart.test.js new file mode 100644 index 00000000000..2bfec0412d6 --- /dev/null +++ b/packages/google-cloud-osconfig/samples/test/quickstart.test.js @@ -0,0 +1,39 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +const path = require('path'); +const {assert} = require('chai'); +const cp = require('child_process'); +const {describe, it, before} = require('mocha'); +const {OsConfigServiceClient} = require('@google-cloud/os-config'); +const client = new OsConfigServiceClient(); +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +describe('Quickstart', () => { + let projectId; + before(async () => { + projectId = await client.getProjectId(); + }); + it('should run quickstart', async () => { + const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); + assert.match(stdout, /found [0-9]+ deployments/); + }); +}); From accac67bc6a849287fa079fa396f64cfbeda2300 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 12 Nov 2022 00:07:55 +0000 Subject: [PATCH 154/154] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= =?UTF-8?q?=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- packages/google-cloud-osconfig/README.md | 1 + .../google-cloud-osconfig/samples/README.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/packages/google-cloud-osconfig/README.md b/packages/google-cloud-osconfig/README.md index c87916c364c..d2395620e8e 100644 --- a/packages/google-cloud-osconfig/README.md +++ b/packages/google-cloud-osconfig/README.md @@ -122,6 +122,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Os_config_zonal_service.list_vulnerability_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.list_vulnerability_reports.js,samples/README.md) | | Os_config_zonal_service.update_o_s_policy_assignment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/generated/v1alpha/os_config_zonal_service.update_o_s_policy_assignment.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/test/quickstart.test.js,samples/README.md) | diff --git a/packages/google-cloud-osconfig/samples/README.md b/packages/google-cloud-osconfig/samples/README.md index efb4d80c5ae..04630804cd8 100644 --- a/packages/google-cloud-osconfig/samples/README.md +++ b/packages/google-cloud-osconfig/samples/README.md @@ -51,6 +51,7 @@ * [Os_config_zonal_service.list_vulnerability_reports](#os_config_zonal_service.list_vulnerability_reports) * [Os_config_zonal_service.update_o_s_policy_assignment](#os_config_zonal_service.update_o_s_policy_assignment) * [Quickstart](#quickstart) + * [Quickstart.test](#quickstart.test) ## Before you begin @@ -725,6 +726,23 @@ __Usage:__ `node packages/google-cloud-osconfig/samples/quickstart.js` +----- + + + + +### Quickstart.test + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-osconfig/samples/test/quickstart.test.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-osconfig/samples/test/quickstart.test.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-osconfig/samples/test/quickstart.test.js` + +